/* Transparency Counsel client dashboard. Self-contained: system fonts, no external
   assets (the content policy allows same-origin files only). Light and dark. */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1b2433;
  --ink-2: #4a5568;
  --ink-3: #6b7689;
  --line: #e3e8ef;
  --line-2: #d3dae4;
  --brand: #1f3a5f;
  --brand-2: #2c5282;
  --brand-ink: #ffffff;
  --accent: #b7791f;
  --focus: #3b82f6;

  --danger: #b42318;   --danger-bg: #fef3f2;  --danger-line: #fecdca;
  --warn: #9a5b00;     --warn-bg: #fffaeb;    --warn-line: #fedf89;
  --good: #067647;     --good-bg: #ecfdf3;    --good-line: #abefc6;
  --info: #175cd3;     --info-bg: #eff8ff;    --info-line: #b2ddff;

  --st-open: #175cd3;      --st-open-bg: #eff8ff;
  --st-requestor: #6941c6; --st-requestor-bg: #f4f3ff;
  --st-ag: #b54708;        --st-ag-bg: #fffaeb;
  --st-release: #c11574;   --st-release-bg: #fdf2fa;
  --st-referred: #475467;  --st-referred-bg: #f2f4f7;
  --st-closed: #067647;    --st-closed-bg: #ecfdf3;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1520;
    --surface: #161e2b;
    --surface-2: #1b2433;
    --ink: #e6ebf2;
    --ink-2: #b4bfcd;
    --ink-3: #8b97a8;
    --line: #263142;
    --line-2: #334155;
    --brand: #7fa6d6;
    --brand-2: #9dbce3;
    --brand-ink: #0f1520;
    --accent: #e0b25c;
    --danger: #fda29b;   --danger-bg: #3a1714;  --danger-line: #7a271a;
    --warn: #fec84b;     --warn-bg: #33270b;    --warn-line: #7a5a0b;
    --good: #75e0a7;     --good-bg: #0f2e1e;    --good-line: #1a5c3a;
    --info: #84caff;     --info-bg: #102a43;    --info-line: #1d4f7c;
    --st-open: #84caff;      --st-open-bg: #102a43;
    --st-requestor: #bdb4fe; --st-requestor-bg: #251f45;
    --st-ag: #fdb022;        --st-ag-bg: #33270b;
    --st-release: #f9a8d4;   --st-release-bg: #3b1530;
    --st-referred: #cbd5e1;  --st-referred-bg: #222c3a;
    --st-closed: #75e0a7;    --st-closed-bg: #0f2e1e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); font-weight: 600; }
.text-warn { color: var(--warn); font-weight: 600; }

/* Masthead */
.masthead {
  background: var(--brand);
  color: var(--brand-ink);
  padding-top: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) { .masthead { background: #121a26; border-bottom: 1px solid var(--line); color: var(--ink); } }
.masthead-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.wordmark { display: flex; align-items: center; gap: 12px; color: inherit; }
.wordmark:hover { text-decoration: none; }
.wordmark-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  font: 700 15px/1 var(--serif); letter-spacing: .5px;
}
.wordmark-text { display: flex; flex-direction: column; font: 600 17px/1.15 var(--serif); letter-spacing: .2px; }
.wordmark-text small { font: 400 12px/1.4 var(--font); opacity: .78; letter-spacing: .3px; }
.masthead-nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.masthead-nav a { color: inherit; opacity: .9; }
.masthead-nav .who { opacity: .75; }
.masthead-nav form { margin: 0; }
.masthead .btn-quiet { color: inherit; border-color: rgba(255, 255, 255, .35); background: transparent; }
.masthead .btn-quiet:hover { background: rgba(255, 255, 255, .1); }

/* Page */
.page { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 24px 48px; }
.messages { max-width: 1240px; margin: 16px auto 0; padding: 0 24px; width: 100%; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid var(--info-line); background: var(--info-bg); color: var(--ink); }
.flash-success { border-color: var(--good-line); background: var(--good-bg); }
.flash-critical, .flash-error { border-color: var(--danger-line); background: var(--danger-bg); }
.footer { border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 18px 24px; color: var(--ink-3); font-size: 13px; }
.footer-inner p { margin: 4px 0; }

/* Hero */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-title h1 { font: 600 32px/1.15 var(--serif); font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.2px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.hero-action { margin: 0; }
.updated-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); min-width: 260px;
}
.updated-card h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); margin-bottom: 8px; }
.updated-card dl { margin: 0; display: grid; gap: 6px; }
.updated-card dl div { display: flex; justify-content: space-between; gap: 16px; }
.updated-card dt { color: var(--ink-2); }
.updated-card dd { margin: 0; font-weight: 600; text-align: right; }
.updated-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }

/* Banners */
.banner { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 20px; border: 1px solid; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.banner[hidden] { display: none; }
.banner-amber { background: var(--warn-bg); border-color: var(--warn-line); color: var(--ink); }
.banner-amber strong { color: var(--warn); }
.banner-info { background: var(--info-bg); border-color: var(--info-line); }
.banner-good { background: var(--good-bg); border-color: var(--good-line); }
.preview-bar { background: var(--accent); color: #1b1300; padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; }
.preview-bar a { color: inherit; text-decoration: underline; margin-left: 8px; }

/* One-glance summary */
.headline { margin: -4px 0 18px; font-size: 17px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 6px; }
.headline span { white-space: normal; }
.headline-attention span:first-child { color: var(--ink); font-weight: 600; }

/* Tiles: always one row; on a narrow screen the row scrolls sideways. */
.tiles {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px;
  margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity;
}
.tile {
  position: relative; display: flex; flex-direction: column; gap: 2px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 12px; box-shadow: var(--shadow); color: var(--ink); overflow: hidden;
}
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tile-color, var(--line-2)); }
a.tile:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.tile-count { font: 600 30px/1.05 var(--serif); color: var(--tile-color, var(--ink)); font-variant-numeric: tabular-nums; }
.tile-label { font-weight: 600; font-size: 14px; }
.tile-help { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.tile-you { --tile-color: var(--brand-2); }
.tile-danger { --tile-color: var(--danger); }
.tile-warn { --tile-color: var(--warn); }
.tile-ag { --tile-color: var(--st-ag); }
.tile-release { --tile-color: var(--st-release); }
.tile-attention { background: linear-gradient(180deg, var(--info-bg), var(--surface)); border-color: var(--info-line); }
.tile-danger.tile-attention { background: linear-gradient(180deg, var(--danger-bg), var(--surface)); border-color: var(--danger-line); }
.tile-current { border-color: var(--brand-2); box-shadow: 0 0 0 2px var(--brand-2) inset, var(--shadow); }

/* The sheet */
.sheet-card { padding-bottom: 14px; }
.legend { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--surface); }
.swatch-past { background: var(--danger-bg); border-color: var(--danger); }
.swatch-soon { background: var(--warn-bg); border-color: var(--warn); }
.swatch-window { background: var(--info-bg); border-color: var(--info); }
.swatch-quiet { background: var(--surface-2); }
.sheet-wrap {
  overflow: auto; max-height: min(75vh, 900px); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface);
}
.sheet { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td {
  padding: 6px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; line-height: 1.35;
}
.sheet th:last-child, .sheet td:last-child { border-right: 0; }
.sheet thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line-2);
}
.sheet thead th a { color: inherit; display: block; }
.sheet thead th[aria-sort] { color: var(--brand-2); }
.sheet .col-key {
  position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap; font-weight: 600;
  border-right: 1px solid var(--line-2);
}
.sheet thead .col-key { z-index: 3; background: var(--surface-2); }
.sheet tbody tr:nth-child(even) td, .sheet tbody tr:nth-child(even) .col-key { background: var(--surface-2); }
.sheet tbody tr:hover td, .sheet tbody tr:hover .col-key { background: color-mix(in srgb, var(--info-bg) 70%, var(--surface)); }
.sheet tbody tr.row-past .col-key { box-shadow: inset 3px 0 0 var(--danger); }
.sheet tbody tr.row-soon .col-key { box-shadow: inset 3px 0 0 var(--warn); }
.sheet .col-text { min-width: 140px; max-width: 220px; }
.sheet .col-note { min-width: 200px; max-width: 320px; color: var(--ink-2); }
.sheet .date { white-space: nowrap; min-width: 104px; }
.sheet .date .d { display: block; font-weight: 600; }
.sheet .date .left { display: block; font-size: 11.5px; color: var(--ink-3); }
.sheet .date .blank { color: var(--ink-3); }
.sheet tbody td.cell-past { background: var(--danger-bg) !important; }
.sheet td.cell-past .d, .sheet td.cell-past .left { color: var(--danger); }
.sheet td.cell-past .left { font-weight: 700; }
.sheet tbody td.cell-soon { background: var(--warn-bg) !important; }
.sheet td.cell-soon .d, .sheet td.cell-soon .left { color: var(--warn); }
.sheet td.cell-soon .left { font-weight: 700; }
.sheet tbody td.cell-window { background: var(--info-bg) !important; }
.sheet td.cell-window .left { color: var(--info); }
.sheet td.cell-quiet .d { color: var(--ink-3); font-weight: 400; }
.sheet .col-next { border-right: 1px solid var(--line-2); }
.sheet .pill { font-size: 11.5px; padding: 1px 8px; }
.sheet .empty { text-align: center; padding: 24px; }

/* Cards and layout */
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
@media (max-width: 960px) { .grid-2, .grid-even { grid-template-columns: minmax(0, 1fr); } }
.grid-2 > .card, .grid-even > .card { margin-bottom: 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 20px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font: 600 19px/1.3 var(--serif); }
.card-sub { margin: 0; color: var(--ink-3); font-size: 13px; }
.card-foot { margin: 12px 0 0; color: var(--ink-3); font-size: 12px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.card-actions form { margin: 0; }
.empty { color: var(--ink-3); margin: 6px 0; font-style: italic; }
.empty-good { color: var(--good); font-style: normal; font-weight: 500; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px;
  padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.table th a { color: inherit; }
.table td.key a, .table td.key { white-space: nowrap; font-weight: 600; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table-compact td { padding: 8px 10px; }
.table .num { text-align: right; }
.row-danger td { background: var(--danger-bg); }
.row-danger:hover td { background: var(--danger-bg) !important; }
.row-warn td { background: var(--warn-bg); }
.row-warn:hover td { background: var(--warn-bg) !important; }
.row-muted td { color: var(--ink-3); }
.summary { min-width: 220px; max-width: 420px; color: var(--ink-2); }
.summary details summary { cursor: pointer; list-style: none; }
.summary details summary::-webkit-details-marker { display: none; }
.summary details summary::after { content: " more"; color: var(--brand-2); font-weight: 600; font-size: 12px; }
.summary details[open] summary::after { content: " less"; }
.summary details p { margin: 6px 0 0; white-space: pre-line; }
.note-cell { min-width: 180px; max-width: 320px; color: var(--ink-2); }

.due { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.due-soon { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.due-past { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .due-past { color: #1b0a08; } }

/* Status pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--pill-bg, var(--surface-2)); color: var(--pill, var(--ink-2)); border: 1px solid transparent; }
.pill-lg { font-size: 14px; padding: 5px 14px; }
.pill-open { --pill: var(--st-open); --pill-bg: var(--st-open-bg); }
.pill-requestor { --pill: var(--st-requestor); --pill-bg: var(--st-requestor-bg); }
.pill-ag { --pill: var(--st-ag); --pill-bg: var(--st-ag-bg); }
.pill-release { --pill: var(--st-release); --pill-bg: var(--st-release-bg); }
.pill-referred { --pill: var(--st-referred); --pill-bg: var(--st-referred-bg); }
.pill-closed { --pill: var(--st-closed); --pill-bg: var(--st-closed-bg); }
.pill-unknown { border-color: var(--line-2); }
.pill-good { --pill: var(--good); --pill-bg: var(--good-bg); }
.pill-warn { --pill: var(--warn); --pill-bg: var(--warn-bg); }

/* Lists */
.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stack-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.stack-attention { border-left: 4px solid var(--brand-2); }
.stack-title { font-weight: 600; }
.note { flex-basis: 100%; margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.group + .group { margin-top: 18px; }
.group-title { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--surface-2); font-size: 14px; }

/* Forms and buttons */
input[type=email], input[type=text], input[type=search], select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%;
}
input:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }
label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 14px/1 var(--font); padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-quiet { background: transparent; }
.btn-small { padding: 6px 10px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: var(--danger-line); }
.btn-block { width: 100%; padding: 13px 16px; font-size: 15px; }
.field-error { color: var(--danger); margin: 6px 0 0; font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input[type=search] { flex: 1 1 260px; width: auto; }
.filters select { flex: 0 1 200px; width: auto; }
.stacked { display: grid; gap: 4px; }
.stacked .btn { margin-top: 12px; }
.fine { color: var(--ink-3); font-size: 13px; margin: 14px 0 0; }

/* Sign-in */
body.auth .page { display: grid; place-items: center; padding-top: 56px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 32px 30px;
}
.auth-card h1 { font: 600 26px/1.2 var(--serif); margin-bottom: 8px; }
.auth-card .lede { color: var(--ink-2); margin: 0 0 20px; }
.auth-card form { display: grid; gap: 6px; }
.auth-card .btn-block { margin-top: 12px; }
.setup-steps { margin: 0 0 20px; padding-left: 20px; display: grid; gap: 12px; color: var(--ink-2); }
.setup-steps .fine { display: block; margin-top: 8px; }
.qr { display: block; margin: 12px 0 0; width: 200px; height: 200px; max-width: 100%; background: #fff; padding: 8px; border: 1px solid var(--line, #ccc); border-radius: 6px; }
.setup-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; word-break: break-word; }
td form { display: inline-block; }
.auth-icon { font-size: 30px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); margin-bottom: 14px; }

/* Matter page */
.crumbs { margin-bottom: 14px; font-size: 14px; }
.matter-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
.matter-head h1 { font: 600 28px/1.2 var(--serif); font-size: clamp(24px, 3vw, 30px); }
.matter-meta { margin: 6px 0 0; color: var(--ink-2); }
.matter-status { text-align: right; max-width: 380px; }
.matter-status p { margin: 6px 0 0; font-size: 13px; }
@media (max-width: 640px) { .matter-status { text-align: left; } }
.callout { border: 1px solid var(--info-line); background: var(--info-bg); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.callout h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--info); margin-bottom: 4px; }
.callout p { margin: 0; }
.prose { margin: 0 0 16px; color: var(--ink); white-space: normal; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; }
.facts dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts-dates { grid-template-columns: 1fr; }
.facts-dates div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.facts-dates dt { align-self: center; }
.facts-dates dd { text-align: right; }
.facts-dates .due { margin-top: 4px; }
.fact-wide { grid-column: 1 / -1; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-2); }
.timeline time { display: block; font-size: 12px; color: var(--ink-3); }

/* Help */
.help details summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.help details summary::-webkit-details-marker { display: none; }
.help details summary::after { content: "Show"; color: var(--brand-2); font-weight: 600; font-size: 13px; }
.help details[open] summary::after { content: "Hide"; }
.help h2 { font: 600 19px/1.3 var(--serif); }
.help-list { margin: 14px 0 0; display: grid; gap: 10px; }
.help-list dt { font-weight: 600; }
.help-list dd { margin: 2px 0 0; color: var(--ink-2); }

/* Admin */
.client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.client-grid .card { margin-bottom: 0; }
.client-stale { border-color: var(--warn-line); }
.card-issues { border-color: var(--danger-line); }
.issues { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.issue-kind { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--danger); margin-right: 4px; }

@media (max-width: 640px) {
  .page { padding: 16px 16px 40px; }
  .masthead-inner, .footer-inner, .messages { padding-left: 16px; padding-right: 16px; }
  .masthead-nav .who { display: none; }
  .updated-card { min-width: 0; width: 100%; }
  .card { padding: 16px; }
}

@media print {
  .masthead-nav, .filters, .card-actions, #new-data, .preview-bar { display: none !important; }
  body { background: #fff; }
  .tiles { overflow: visible; }
  .sheet-wrap { max-height: none; overflow: visible; }
  .sheet thead th, .sheet .col-key { position: static; }
  .card, .tile, .updated-card { box-shadow: none; break-inside: avoid; }
}
