/* Grouped lists (iOS-style): .rh-section-title above a .rh-group of .rh-row items.
   A row is lead · main · end on one grid line, so icons, text and values always align. */

.rh-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--rh-space-2);
  font-size: var(--rh-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--rh-color-muted);
  margin: var(--rh-space-5) var(--rh-space-1) var(--rh-space-2);
}

.rh-section-title a {
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--rh-text-s);
  font-weight: 600;
}

.rh-group {
  background: var(--rh-color-surface);
  border-radius: var(--rh-radius-m);
  overflow: hidden;
  box-shadow: var(--rh-shadow);
}

.rh-group + .rh-group {
  margin-top: var(--rh-space-3);
}

.rh-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--rh-space-3);
  min-height: var(--rh-row);
  padding: 10px var(--rh-space-4);
  color: var(--rh-color-text);
}

.rh-body a.rh-row {
  color: var(--rh-color-text);
}

a.rh-row:hover,
a.rh-row:active,
a.rh-row:focus-visible,
summary.rh-row:hover,
summary.rh-row:active {
  background: var(--rh-color-surface-2);
}

.rh-group > * + .rh-row::before,
.rh-group > * + details > .rh-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 60px;
  right: 0;
  height: 1px;
  background: var(--rh-color-border);
  transform: scaleY(0.5);
}

.rh-row--plain {
  grid-template-columns: minmax(0, 1fr) auto;
}

.rh-group > * + .rh-row--plain::before {
  left: var(--rh-space-4);
}

.rh-row-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.rh-row-label {
  font-size: 16px;
}

.rh-row-sub {
  display: block;
  color: var(--rh-color-muted);
  font-size: 14px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rh-row-note {
  display: block;
  color: var(--rh-color-muted);
  font-size: 14px;
  margin-top: 4px;
}

.rh-row-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--rh-color-muted);
  font-size: 15px;
  white-space: nowrap;
}

.rh-row-value {
  color: var(--rh-color-text);
  font-weight: 600;
}

.rh-row-chevron {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  color: var(--rh-color-chevron);
}

.rh-row form {
  margin: 0;
}

/* Icon tile at the start of a row; coloured by data-tone. */
.rh-tile {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--rh-color-wait-bg);
  color: var(--rh-color-wait);
}

.rh-tile .rh-icon {
  width: 18px;
  height: 18px;
}

.rh-tile[data-tone="overdue"],
.rh-tile[data-tone="alert"] {
  background: var(--rh-color-alert-bg);
  color: var(--rh-color-alert);
}

.rh-tile[data-tone="today"] {
  background: var(--rh-color-alert-bg);
  color: var(--rh-color-accent);
}

.rh-tile[data-tone="soon"],
.rh-tile[data-tone="act"] {
  background: var(--rh-color-act-bg);
  color: var(--rh-color-act);
}

.rh-tile[data-tone="ok"],
.rh-tile[data-tone="done"] {
  background: var(--rh-color-ok-bg);
  color: var(--rh-color-ok);
}

/* Disclosure rows: a summary that looks like a row, content below it. */
.rh-group details > summary {
  list-style: none;
  cursor: pointer;
}

.rh-group details > summary::-webkit-details-marker {
  display: none;
}

.rh-group details[open] > summary .rh-row-chevron {
  transform: rotate(90deg);
}

.rh-disclosure-body {
  padding: 0 var(--rh-space-4) var(--rh-space-4);
}

.rh-empty {
  padding: var(--rh-space-5) var(--rh-space-4);
  text-align: center;
  color: var(--rh-color-muted);
  font-size: var(--rh-text-s);
}

.rh-row > a {
  color: inherit;
  min-width: 0;
}

.rh-body .rh-row > a {
  color: var(--rh-color-text);
}

/* A group nested inside a disclosure reads as a flat inset panel. */
.rh-disclosure-body .rh-group {
  background: var(--rh-color-surface-2);
  box-shadow: none;
}

/* A <button> that looks like a row (Sign out). */
.rh-row--button {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rh-row-label--danger {
  color: var(--rh-color-alert);
}
