/* ==========================================================================
   Outreach Tracker

   One stylesheet, no build step. The deployed CSP forbids inline style
   blocks and inline style attributes, so every visual decision lives here.

   Palette: a warm neutral (paper, not pure grey) with a deep teal accent and
   four distinct state colours. Dark mode overrides tokens only - no component
   rule below is duplicated for it.
   ========================================================================== */

:root {
  color-scheme: light;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* surfaces */
  --bg: #f7f5f1;
  --bg-sunken: #efece5;
  --surface: #fffdfa;
  --surface-2: #f3f0ea;
  --surface-hover: #f0ece4;
  --border: #ded8cd;
  --border-strong: #c3bbac;

  /* ink */
  --text: #211f1b;
  --text-muted: #67604f;
  --text-faint: #8c8475;

  /* accent */
  --accent: #15645a;
  --accent-hover: #0f4d45;
  --accent-ink: #ffffff;
  --accent-weak: #e0edea;
  --focus: #15645a;

  /* danger */
  --danger: #9c3320;
  --danger-weak: #f8e7e2;

  /* four feed states: colour, plus a different mark shape per state */
  --fresh-fg: #1d6238;
  --fresh-bg: #e3efe5;
  --fresh-bd: #a7caaf;
  --aging-fg: #7c4f10;
  --aging-bg: #f8eed9;
  --aging-bd: #ddc091;
  --stale-fg: #93301d;
  --stale-bg: #fae4df;
  --stale-bd: #e2aea2;
  --never-fg: #4a505c;
  --never-bg: #ebedf0;
  --never-bd: #c1c6cd;

  /* depth */
  --shadow-sm: 0 1px 2px rgba(33, 31, 27, 0.07), 0 1px 1px rgba(33, 31, 27, 0.04);
  --shadow-md: 0 10px 30px rgba(33, 31, 27, 0.14);
  --backdrop: rgba(33, 31, 27, 0.42);

  /* geometry */
  --radius-sm: 5px;
  --radius: 9px;
  --radius-lg: 14px;
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --maxw: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #16150f;
    --bg-sunken: #100f0b;
    --surface: #201e19;
    --surface-2: #292620;
    --surface-hover: #2e2b24;
    --border: #38342c;
    --border-strong: #4e4940;

    --text: #ece6da;
    --text-muted: #aaa193;
    --text-faint: #867e71;

    --accent: #5bbaa9;
    --accent-hover: #74ccbc;
    --accent-ink: #11231f;
    --accent-weak: #1a332e;
    --focus: #5bbaa9;

    --danger: #eb876e;
    --danger-weak: #3a221b;

    --fresh-fg: #85cb9d;
    --fresh-bg: #1b2c20;
    --fresh-bd: #335b41;
    --aging-fg: #e0b86e;
    --aging-bg: #2e2718;
    --aging-bd: #5d4a25;
    --stale-fg: #f09276;
    --stale-bg: #32201a;
    --stale-bd: #64382b;
    --never-fg: #9ea7b4;
    --never-bg: #22252a;
    --never-bd: #3d434c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.6);
    --backdrop: rgba(8, 8, 6, 0.65);
  }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

main:focus {
  outline: none;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s5);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.link {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.link:hover {
  color: var(--accent-hover);
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -4rem;
  z-index: 50;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--s2) var(--s4);
  text-decoration: none;
  transition: top 120ms ease-out;
}

.skip-link:focus {
  top: var(--s4);
}

/* ----------------------------------------------------------------- shell */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 3.5rem;
  flex-wrap: wrap;
  padding-block: var(--s2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--accent);
}

.nav {
  display: flex;
  gap: var(--s1);
  margin-right: auto;
  flex-wrap: wrap;
}

.nav__link {
  display: inline-block;
  padding: var(--s2) var(--s3);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 550;
  font-size: 0.875rem;
}

.nav__link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav__link[aria-current="page"] {
  background: var(--accent-weak);
  color: var(--accent);
}

.account {
  display: flex;
  align-items: center;
  gap: var(--s3);
  visibility: hidden;
}

body.is-ready .account {
  visibility: visible;
}

.account__who {
  color: var(--text-muted);
  font-size: 0.8125rem;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account__signout {
  margin: 0;
}

main {
  flex: 1 0 auto;
  padding-block: var(--s6) var(--s7);
}

.footer {
  padding-block: var(--s5);
  color: var(--text-faint);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------- live region */

.status {
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 0.875rem;
}

.status:empty {
  display: none;
}

.status--success {
  border-color: var(--fresh-bd);
  background: var(--fresh-bg);
  color: var(--fresh-fg);
}

.status--error {
  border-color: var(--stale-bd);
  background: var(--stale-bg);
  color: var(--stale-fg);
}

/* ------------------------------------------------------------ page heads */

.page-head {
  margin-bottom: var(--s5);
}

.page-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}

.page-head__titles {
  min-width: 0;
}

.page-title {
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 680;
}

.page-sub {
  color: var(--text-muted);
  margin-top: var(--s1);
  font-size: 0.9375rem;
}

.page-head__chip {
  margin-top: var(--s3);
}

.page-head__actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.backlink {
  display: inline-block;
  margin-bottom: var(--s3);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 550;
}

.backlink:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------- panels */

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
}

.panel__title {
  font-size: 0.8125rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.panel__body {
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.panel__lede {
  color: var(--text-muted);
  max-width: 48ch;
}

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 560;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-hover);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn--danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--danger);
}

.btn--danger-ghost:hover {
  background: var(--danger-weak);
}

.btn--small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------------- chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.chip__mark {
  width: 0.55rem;
  height: 0.55rem;
  flex: none;
  border: 2px solid currentColor;
  background: currentColor;
}

.chip__count {
  font-weight: 700;
  padding-left: 0.3rem;
  border-left: 1px solid currentColor;
}

/* Shape carries the state as well as colour: filled circle, filled diamond,
   filled square, hollow dashed ring. */
.chip--fresh .chip__mark {
  border-radius: 50%;
}

.chip--aging .chip__mark {
  border-radius: 1px;
  transform: rotate(45deg);
}

.chip--stale .chip__mark {
  border-radius: 1px;
}

/* A bar, not a ring: at 9px a dashed circle renders as an illegible arc. */
.chip--never .chip__mark {
  height: 0.18rem;
  border: 0;
  border-radius: 1px;
  background: currentColor;
}

.chip--fresh {
  color: var(--fresh-fg);
  background: var(--fresh-bg);
  border-color: var(--fresh-bd);
}

.chip--aging {
  color: var(--aging-fg);
  background: var(--aging-bg);
  border-color: var(--aging-bd);
}

.chip--stale {
  color: var(--stale-fg);
  background: var(--stale-bg);
  border-color: var(--stale-bd);
}

.chip--never {
  color: var(--never-fg);
  background: var(--never-bg);
  border-color: var(--never-bd);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-top: var(--s2);
}

.tag {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tally {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* ----------------------------------------------------------------- feed */

.feed-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}

.feed-summary__count {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed {
  overflow: hidden;
}

.feed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 9.5rem;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.feed-row:last-child {
  border-bottom: 0;
}

.feed-row:hover {
  background: var(--surface-hover);
}

.feed-row__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.feed-row__name {
  font-weight: 620;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-row__org {
  color: var(--text-muted);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-row__when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.feed-row__since {
  font-weight: 560;
}

.feed-row__date {
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.feed-row__state {
  display: flex;
  justify-content: flex-end;
}

/* -------------------------------------------------------------- rolodex */

.toolbar {
  display: flex;
  gap: var(--s4);
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: var(--s4);
}

.result-count {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s3);
}

.rolo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem auto;
  gap: var(--s4);
  align-items: start;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
}

.rolo-row:last-child {
  border-bottom: 0;
}

.rolo-row__main {
  min-width: 0;
}

.rolo-row__name {
  font-weight: 620;
  color: var(--text);
  text-decoration: none;
}

.rolo-row__name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.rolo-row__org {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.rolo-row__detail {
  color: var(--text-faint);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.rolo-row__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s1);
}

.rolo-row__last {
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.rolo-row__actions {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------------------------------------------------------------- forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field--inline {
  flex: 1 1 14rem;
  max-width: 22rem;
}

.field__label {
  font-size: 0.8125rem;
  font-weight: 620;
  color: var(--text);
  letter-spacing: 0.01em;
}

.field__hint {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}

.input::placeholder {
  color: var(--text-faint);
}

.input--area {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.5;
}

.input--select {
  appearance: none;
  padding-right: 2rem;
  cursor: pointer;
}

input[type="date"],
input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.input:user-invalid {
  border-color: var(--danger);
}

.form {
  padding: var(--s5);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s4);
}

.field--wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s5);
}

.form-problem:not(:empty) {
  margin-top: var(--s4);
}

/* ------------------------------------------------------------- feedback */

.loading {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s5);
  color: var(--text-muted);
}

.spinner {
  width: 1rem;
  height: 1rem;
  flex: none;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }

  .skip-link {
    transition: none;
  }
}

.notice {
  border: 1px solid var(--border-strong);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--s3) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.notice--error {
  border-color: var(--stale-bd);
  border-left-color: var(--stale-fg);
  background: var(--stale-bg);
  color: var(--stale-fg);
}

.notice--success {
  border-color: var(--fresh-bd);
  border-left-color: var(--fresh-fg);
  background: var(--fresh-bg);
  color: var(--fresh-fg);
}

.notice--info {
  border-left-color: var(--accent);
}

.notice__actions {
  display: flex;
  gap: var(--s2);
}

.empty {
  padding: var(--s6) var(--s5);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.empty__title {
  font-weight: 650;
  font-size: 1.0625rem;
}

.empty__body {
  color: var(--text-muted);
  margin-top: var(--s2);
  margin-inline: auto;
  max-width: 44ch;
}

.empty__action {
  margin-top: var(--s4);
}

/* --------------------------------------------------------------- dialog */

.modal {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  padding: var(--s5);
  width: min(32rem, calc(100vw - 2rem));
}

.modal::backdrop {
  background: var(--backdrop);
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin: 0;
}

.modal__title {
  font-size: 1.0625rem;
  font-weight: 650;
}

.modal__body {
  color: var(--text-muted);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  flex-wrap: wrap;
}

/* -------------------------------------------------------- contact detail */

.dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--s4);
}

.dl__row {
  min-width: 0;
}

.dl__dt {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.dl__dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.followups {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.followup {
  display: flex;
  gap: var(--s4);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--aging-bd);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--aging-bg);
  color: var(--aging-fg);
}

.followup--overdue {
  border-color: var(--stale-bd);
  border-left-color: var(--stale-fg);
  background: var(--stale-bg);
  color: var(--stale-fg);
}

.followup__main {
  min-width: 0;
}

.followup__when {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  flex-wrap: wrap;
}

.followup__rel {
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.85;
}

.followup__note {
  color: var(--text);
  margin-top: var(--s1);
}

.followup__from {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.event {
  padding: var(--s4) 0 var(--s4) var(--s4);
  border-left: 2px solid var(--border);
  position: relative;
}

.event::before {
  content: "";
  position: absolute;
  left: -0.3125rem;
  top: 1.35rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.event:first-child {
  padding-top: var(--s1);
}

.event:first-child::before {
  top: 0.55rem;
}

.event__head {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  flex-wrap: wrap;
}

.event__date {
  font-weight: 650;
}

.event__channel {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
}

.event__by {
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.event__summary {
  margin-top: var(--s2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.event__followup {
  margin-top: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border-left: 3px solid var(--border-strong);
  font-size: 0.875rem;
}

.event__followup-when {
  font-weight: 600;
}

.event__followup-note {
  color: var(--text-muted);
}

.event__followup--overdue {
  background: var(--stale-bg);
  border-left-color: var(--stale-fg);
  color: var(--stale-fg);
}

.event__followup--done {
  background: var(--fresh-bg);
  border-left-color: var(--fresh-fg);
  color: var(--fresh-fg);
}

.event__actions {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
  margin-top: var(--s2);
}

/* -------------------------------------------------------------- reports */

.report-controls {
  display: flex;
  gap: var(--s4);
  align-items: flex-end;
  flex-wrap: wrap;
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border);
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  text-align: left;
  padding: var(--s3) var(--s3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table th {
  font-size: 0.6875rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table td.num,
.table th.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-sub {
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.cell-overdue {
  color: var(--stale-fg);
  font-weight: 600;
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 52rem) {
  .rolo-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .rolo-row__side {
    flex-direction: row;
    align-items: center;
    gap: var(--s3);
  }

  .rolo-row__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 40rem) {
  .container {
    padding-inline: var(--s4);
  }

  main {
    padding-block: var(--s5) var(--s6);
  }

  .topbar__inner {
    gap: var(--s3);
    row-gap: var(--s2);
  }

  .brand__name {
    font-size: 0.9375rem;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-right: 0;
  }

  .account__who {
    max-width: 9rem;
  }

  .feed-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main state"
      "when state";
    gap: var(--s2) var(--s3);
    padding: var(--s3) var(--s4);
  }

  .feed-row__main {
    grid-area: main;
  }

  .feed-row__when {
    grid-area: when;
    flex-direction: row;
    align-items: baseline;
    gap: var(--s2);
    text-align: left;
  }

  .feed-row__state {
    grid-area: state;
    align-items: center;
  }

  .panel__body,
  .form {
    padding: var(--s4);
  }

  .panel__head {
    padding: var(--s3) var(--s4);
  }

  .rolo-row {
    padding: var(--s4);
  }

  .page-head__row {
    align-items: flex-start;
  }
}

/* ---- standalone sign-out page -------------------------------------------- */
/* Static page, no app shell around it, so it needs its own vertical rhythm. */
.signedout { max-width: 46ch; padding-block: clamp(3rem, 12vh, 7rem); }
.signedout h1 { margin-bottom: 0.75rem; }
.signedout p { margin-bottom: 1rem; }
.signedout .btn { margin-top: 0.5rem; }
