/* Leeron's dashboard. Restyled 2026-10-12 to the same system as the HomeLink engine
   dashboard (gentex-homelink/agent-service/src/dashboard/ui.ts), which Christian named
   the gold standard on a live call with her, and brought to his 2026-10-19 bar for it
   on 2026-10-20 (Rule 9 of the build standard): Montserrat, dark by default with a
   light look one tap away, the Gentex shape on every screen.

   WHAT IS TAKEN FROM GENTEX, AND WHY
   - The token roles: bg, surface, surface-sunk, border, border-strong, three text
     strengths, one accent with hover, soft, 10% and 25% alphas, and three states
     (positive, warning, danger) each with its own soft wash. Two looks, dark first,
     chosen by her and kept in a cookie (engine/dashboard/app.py, /theme), never by
     the phone's own setting. The roles are HomeLink's; the hues stay hers (plaster,
     umber, clay, sage, rust, oak, from DESIGN.md), because every pair is measured by
     design/contrast-check.py and that check is law. Nothing is #000 or #fff.
   - The type system: one sans at 14px, 1.55 line height, tabular numerals on every
     figure, 10.5px uppercase tracked labels, 17px card titles, 20px bar title, 38px
     greeting (30px on a phone), 40px tile figures, 11.5px uppercase pill buttons with
     2px tracking. The face is Montserrat, self hosted (fonts.css), the face of the
     Gentex dashboard and never a generic one; the wordmark alone keeps her serif.
   - The shell: a 240px left rail with the wordmark, the pages with an icon each, the
     look switch and sign out at its foot; a sticky 64px top bar with the page word and
     a one line count under it; content on a 12 column grid at 1400 with 32px gutters,
     20px gaps and 24px card padding, every card on the same column edges. Under 900px
     the rail becomes a top strip, the pages become a fixed bottom tab bar, the gutter
     drops to 16px.
   - The components: cards with a hairline border, 16px radius and a soft shadow; 10px
     radius inside; 100px pills; 44px tap targets; a greeting hero with the day's one
     sentence and one action; a ring gauge for today's sending; an area chart for the
     last fourteen days; stat tiles with an icon chip, a figure and its unit; pill
     filters where the active one is accent text on a 10% accent wash with a 25%
     accent border; a 3px accent bar beside the active page; stacked rows on a phone;
     written empty states in muted text with one accent action; 12.5px sub lines.
   - Motion, all of it under 300ms and ease out: a fade up on load at 40ms steps,
     press feedback, a lift on a card that is a link, colour on a hover. Transform and
     opacity only. Off under reduced motion.
   - What was left out on purpose: the body's radial blooms (no gradients here), the
     command palette and the bell (a script, and nothing to ring about), the donut.

   Her words, routes, ids and form names are unchanged. Every colour pair is in
   design/contrast-check.py; run it after any colour change. */

:root {
  /* Dark, her default (Rule 9, 2026-10-19): the umber ground of her deck, raised
     and sunk panels of the same warm near black, chalk for the words, and the
     clay lifted so it holds contrast on the dark ground. Every pair is measured
     in design/contrast-check.py. */
  --bg:            oklch(0.185 0.010 58);
  --surface:       oklch(0.242 0.012 56);
  --surface-sunk:  oklch(0.215 0.011 57);
  --border:        oklch(0.305 0.012 56);
  --border-strong: oklch(0.470 0.040 50);
  --text:          oklch(0.962 0.006 70);
  --text-2:        oklch(0.790 0.010 68);
  --text-muted:    oklch(0.720 0.010 68);

  --accent:        oklch(0.688 0.118 46);
  --accent-hover:  oklch(0.740 0.115 46);
  --accent-soft:   oklch(0.300 0.045 46);
  --accent-10:     oklch(0.688 0.118 46 / 0.14);
  --accent-25:     oklch(0.688 0.118 46 / 0.30);
  --on-accent:     oklch(0.185 0.010 58);

  --positive:      oklch(0.760 0.090 148);
  --positive-soft: oklch(0.270 0.030 148);
  --warning:       oklch(0.780 0.100 78);
  --warning-soft:  oklch(0.280 0.030 78);
  --danger:        oklch(0.760 0.110 28);
  --danger-soft:   oklch(0.280 0.035 28);

  --track:         oklch(0.305 0.012 56);
  --shadow: 0 0 10px oklch(0 0 0 / 0.30), 0 14px 24px -4px oklch(0 0 0 / 0.42);
  --shadow-lift: 0 0 12px oklch(0 0 0 / 0.34), 0 22px 38px -6px oklch(0 0 0 / 0.50);
  --glow:   0 6px 18px -6px oklch(0.688 0.118 46 / 0.45);
  --inset:  oklch(1 0 0 / 0.04);

  --rail: 240px; --content: 1400px; --gutter: 32px; --gap: 20px; --pad: 24px;
  --r: 16px; --r-sm: 10px; --pill: 100px; --tap: 44px;

  --sans: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --serif: 'Source Serif 4', Iowan Old Style, Palatino, Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --dur: 280ms; --step: 40ms;
  color-scheme: dark;
}

:root[data-theme="light"] {
  /* Light, one tap away and kept: the plaster of her walls, a card a shade
     whiter than the ground, the ink, and the clay as it is. */
  --bg:            oklch(0.982 0.005 72);
  --surface:       oklch(0.996 0.002 75);
  --surface-sunk:  oklch(0.958 0.007 70);
  --border:        oklch(0.905 0.009 68);
  --border-strong: oklch(0.720 0.060 48);
  --text:          oklch(0.235 0.014 62);
  --text-2:        oklch(0.468 0.013 62);
  --text-muted:    oklch(0.530 0.012 62);

  --accent:        oklch(0.470 0.116 44);
  --accent-hover:  oklch(0.410 0.112 44);
  --accent-soft:   oklch(0.945 0.028 48);
  --accent-10:     oklch(0.470 0.116 44 / 0.10);
  --accent-25:     oklch(0.470 0.116 44 / 0.25);
  --on-accent:     oklch(0.962 0.006 70);

  --positive:      oklch(0.455 0.072 148);
  --positive-soft: oklch(0.948 0.022 148);
  --warning:       oklch(0.470 0.090 76);
  --warning-soft:  oklch(0.952 0.024 78);
  --danger:        oklch(0.455 0.132 28);
  --danger-soft:   oklch(0.950 0.022 30);

  --track:         oklch(0.905 0.009 68);
  --shadow: 0 0 10px oklch(0.235 0.014 62 / 0.05), 0 14px 24px -4px oklch(0.235 0.014 62 / 0.08);
  --shadow-lift: 0 0 12px oklch(0.235 0.014 62 / 0.07), 0 22px 38px -6px oklch(0.235 0.014 62 / 0.14);
  --glow:   0 6px 18px -6px oklch(0.470 0.116 44 / 0.45);
  --inset:  oklch(1 0 0 / 0.55);
  color-scheme: light;
}

/* --- base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; scroll-padding-top: 80px; background: var(--bg); }
body {
  margin: 0; min-height: 100%; overflow-x: clip;
  font-family: var(--sans); font-size: 14px; line-height: 1.55; letter-spacing: 0.005em;
  color: var(--text-2); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--text); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.meta, .figure, .kpi-sub, .pager, .route dd, .rows .d.note, .mail .d.note, .filters b, .who .meta {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- the shell: rail, top bar, content, tab bar ------------------------- */
.app { display: flex; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; width: var(--rail); flex: none;
  display: flex; flex-direction: column; border-right: 1px solid var(--border);
}
.brand { display: block; padding: 22px 20px 16px; color: var(--text); }
.lockup { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.nav { display: flex; flex-direction: column; flex: 1; padding: 6px 12px 0; }
.nav-main { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: var(--tap); padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid transparent; color: var(--text-2); font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  transition: color 140ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.nav-item .i { opacity: 0.75; flex: none; }
.nav-item[aria-current="page"] { color: var(--accent); background: var(--accent-10); border-color: var(--accent-25); }
.nav-item[aria-current="page"] .i { opacity: 1; }
.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 3px; height: 20px; margin-top: -10px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
.rail-foot {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  padding: 14px 20px 18px; border-top: 1px solid var(--border);
}
.rail-foot .look { display: flex; }
.rail-foot .theme .i { width: 14px; height: 14px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* One slim head on every page, on the page's own ground: the page's name with its
   day small beside it, the count under them, the health line with its dot, and one
   button. Under 120px tall at a laptop and at a phone (the tabs are measured apart).
   With no count line the head is one row, so the name, the day, the health line and
   the button share one centre line; with one, the two lines centre on the button.
   The day's column is never narrower than its words; the health line takes what is
   left, wraps in its own column and sits against the button.
   The two-line rules sit in :where() so the phone's own head below still wins. */
.head-bar {
  display: grid; grid-template-columns: auto max-content minmax(0, 1fr) auto;
  grid-template-areas: "name day health act";
  align-items: center; gap: 0 20px; padding: 12px var(--gutter); border-bottom: 1px solid var(--border);
}
.head-bar:where(.has-sub) { grid-template-areas: "name day health act" "sub sub health act"; }
.head-name { grid-area: name; font-size: 20px; line-height: 1.2; font-weight: 700; color: var(--text); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.head-day { grid-area: day; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
/* The day is printed twice: the long one here, the short one on a phone. */
.head-day .day-short { display: none; }
:where(.head-bar.has-sub) .head-day { align-self: end; padding-bottom: 2px; }
.head-sub { grid-area: sub; margin-top: 2px; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.health { grid-area: health; justify-self: end; display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); max-width: 34ch; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-muted); }
.dot.ok { background: var(--positive); }
.dot.wait { background: var(--warning); }
.head-act { grid-area: act; }
/* The credits bar: what ran low, the vendor's billing page, and an X that hides it
   to the end of her day. A word and a button, never colour alone. */
.credits {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px var(--gutter);
  background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 600; line-height: 1.45;
}
.credits p { flex: 1 1 36ch; min-width: 0; overflow-wrap: anywhere; }
.credits .btn { color: var(--text); }
/* The button and its X are one unit: when the row runs out of room they move down
   together, never the X alone under the words. */
.credits-acts { display: flex; align-items: center; gap: 14px; flex: none; }
.credits form { display: flex; }
.credits-x {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: inherit;
}
@media (hover: hover) and (pointer: fine) { .credits-x:hover { border-color: var(--border-strong); } }
.hold {
  width: 100%; max-width: calc(var(--content) + var(--gutter) * 2); margin: 0 auto;
  padding: 26px var(--gutter) 72px; display: flex; flex-direction: column; gap: var(--gap);
}
.tabbar { display: none; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* The one count on the menu: how many emails wait for her yes, on Email. */
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px;
  padding: 0 7px; border-radius: var(--pill); background: var(--accent-10); color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.nav-item .badge { margin-left: auto; }
/* An area's pages, on their own thin row under the head. */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px var(--gutter) 0; }
.subtab {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--pill);
  border: 1px solid transparent; font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: color 140ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.subtab[aria-current="page"] { color: var(--accent); background: var(--accent-10); border-color: var(--accent-25); }
.subtab b { margin-left: 6px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.subtab[aria-current="page"] b { color: var(--accent); }
.subtabs-fold { display: none; }
@media (hover: hover) and (pointer: fine) { .subtab:hover { border-color: var(--border); } }

/* --- the greeting: the day, the time of day, one sentence, one action ------------ */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero-words { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.hero-title { font-size: 38px; line-height: 1.05; letter-spacing: -0.03em; color: var(--text); font-weight: 700; }
.hero-line { margin-top: 10px; font-size: 15px; color: var(--text-2); max-width: 66ch; }
.hero-action { flex: none; }

/* --- the page top: title, one plain line, at most a row of actions -------- */
.head { display: flex; flex-direction: column; gap: 10px; }
.head h1, .head .co { font-size: 38px; line-height: 1.05; letter-spacing: -0.03em; color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.head .sub { font-size: 15px; color: var(--text-2); max-width: 66ch; }
.head .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* --- cards and the grid ----------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.grid > * { grid-column: 1 / -1; min-width: 0; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; }
.card, .block {
  position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0;
  padding: var(--pad); border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow), inset 0 1px 0 var(--inset);
}
.card.is-flush { padding: 0; gap: 0; }
.block > h2, .card-title { font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; color: var(--text); }
.card-head { display: flex; flex-direction: column; gap: 4px; }
.explain, .towhom, .card-sub { font-size: 12.5px; color: var(--text-muted); max-width: 64ch; }
.block > h2 + .explain, .block > h2 + .towhom { margin-top: -10px; }
.card.is-flush > .jobs:first-child > li:first-child { border-top: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.card p, .block p { overflow-wrap: anywhere; }

/* --- buttons: HomeLink's pill, uppercase, 44px ---------------------------- */
.btn, .stagepick button, summary.btn, .rail-foot button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 22px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 12px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: transform 160ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease), background-color 200ms var(--ease);
}
.btn:active, .stagepick button:active, .rail-foot button:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .stagepick button:hover, .rail-foot button:hover { border-color: var(--border-strong); }
  .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.btn-sm, .rail-foot button { min-height: 34px; padding: 0 16px; font-size: 12px; letter-spacing: 1.2px; }
.btn[href^="mailto:"] { text-transform: none; letter-spacing: 0.01em; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* The button centres its words in a row, where no "..." can draw, so the address
   sits in its own box that may shrink and ends in "..." when it is too long. */
.btn[href^="mailto:"] > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block form > .btn { align-self: flex-start; }
.block form.notes { display: flex; flex-direction: column; gap: 12px; }

/* --- stat tiles: an icon chip, a figure and its unit, four to the row ------------ */
.tiles > .kpi { grid-column: span 3; }
.kpi { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; color: inherit; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpi-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.kpi-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-sunk); color: var(--text-2); flex: none; }
.kpi-icon .i { width: 16px; height: 16px; }
.figure { font-size: 40px; line-height: 1; font-weight: 700; color: var(--text); letter-spacing: -0.03em; }
.figure-unit { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-left: 7px; letter-spacing: 0.02em; }
.kpi-sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; letter-spacing: 0.02em; margin-top: auto; }
.kpi.primary { border-color: var(--accent-25); background: var(--accent-10); }
.kpi.primary .kpi-label, .kpi.primary .kpi-sub { color: var(--accent); }
.kpi.primary .kpi-icon { background: var(--accent-10); color: var(--accent); }
.kpi.primary .figure-unit { color: var(--text-2); }
@media (hover: hover) and (pointer: fine) {
  a.kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-lift), inset 0 1px 0 var(--inset); }
}

/* --- today's sending: the ring, and three small tiles under it ------------------- */
.ring { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 2px; }
.ring-dial { position: relative; display: inline-flex; }
.ring-svg { display: block; }
.ring-track { stroke: var(--track); }
.ring-arc { stroke: var(--accent); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ring-figure { font-size: 44px; line-height: 1; font-weight: 700; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-of { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ring-label { margin-top: 8px; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ring-kicker { font-size: 12.5px; color: var(--text-muted); text-align: center; max-width: 34ch; }
.subtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.subtile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-sunk); min-width: 0; }
.subtile-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subtile-value { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* --- the last fourteen days: an area chart the page writes itself ------------------
   The ticks and the day names sit in the page's own type beside the drawing, never
   inside it: the box is stretched to its card and text inside would stretch with it.
   One hit column per day carries a plain tooltip and lights the day's dots. */
.area-wrap { display: flex; flex-direction: column; gap: 12px; margin: 0; flex: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--text-muted); }
.legend-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-swatch.s0 { background: var(--accent); }
.legend-swatch.s1 { background: var(--positive); }
.area-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(200px, 1fr) auto; gap: 8px 12px; flex: 1; }
.area-y { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; line-height: 1; margin: -0.5em 0; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.area { grid-column: 2; grid-row: 1; width: 100%; height: 100%; min-height: 200px; overflow: visible; display: block; }
.area-x { grid-column: 2; grid-row: 2; position: relative; height: 1.3em; font-size: 11px; line-height: 1.3; color: var(--text-muted); }
.area-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.area-x span:first-child { transform: none; }
.area-x span:last-child { transform: translateX(-100%); }
.ser-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ser.s0 .ser-line { stroke: var(--accent); } .ser.s0 .ser-fill { fill: url(#fade-0); }
.ser.s1 .ser-line { stroke: var(--positive); } .ser.s1 .ser-fill { fill: url(#fade-1); }
.fade-a.s0 { stop-color: var(--accent); stop-opacity: 0.34; } .fade-b.s0 { stop-color: var(--accent); stop-opacity: 0.02; }
.fade-a.s1 { stop-color: var(--positive); stop-opacity: 0.34; } .fade-b.s1 { stop-color: var(--positive); stop-opacity: 0.02; }
.pt-hit { fill: transparent; }
.pt-ring, .pt-dot { opacity: 0; transition: opacity 140ms var(--ease); }
.pt-ring { stroke: var(--surface); stroke-width: 9; }
.pt-dot { stroke-width: 5; }
.pt-dot.s0 { stroke: var(--accent); } .pt-dot.s1 { stroke: var(--positive); }
.pt:hover .pt-ring, .pt:hover .pt-dot { opacity: 1; }

/* --- this week: six counts and the map of the city's jobs (2026-10-12) ------------
   The strip wears the tile's label and figure at a smaller size, two by three beside
   the map on a laptop, three then two across on a phone. The map is an inline SVG the
   page writes itself: the city's outline on the sunk ground, one accent dot per job,
   nothing animated, no tile service. Its colours are in design/contrast-check.py. */
.week-head { display: flex; flex-direction: column; gap: 4px; }
.week-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr;
  grid-template-areas: "strip map" "note map"; gap: 22px 40px; align-items: start; max-width: 1040px;
}
.strip { grid-area: strip; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.strip > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.strip dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.strip dd.n { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.strip dd.n .none { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text-muted); }
.strip dd.d { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.map { grid-area: map; min-width: 0; }
.map svg { display: block; width: 100%; height: auto; }
.map .city { fill: var(--surface-sunk); stroke: var(--border-strong); stroke-width: 1; stroke-linejoin: round; fill-rule: evenodd; }
.map circle, .map-note circle { fill: var(--accent); fill-opacity: 0.85; stroke: var(--surface); stroke-width: 0.8; }
.map circle { transition: fill-opacity 140ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .map circle:hover { fill-opacity: 1; } }
.map-note { grid-area: note; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); max-width: 52ch; }
.map-note .dots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.map-note .key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-note .dots svg { width: 24px; height: 24px; flex: none; }

/* --- filters and search, in the list card's head ---------------------------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: var(--pad) var(--pad) 0; }
.filters a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border-radius: var(--pill); border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: transform 160ms var(--ease), border-color 200ms var(--ease);
}
.filters a:active { transform: scale(0.985); }
.filters a b { font-weight: 700; color: var(--text-muted); }
.filters a[aria-current="page"] { color: var(--accent); background: var(--accent-10); border-color: var(--accent-25); }
.filters a[aria-current="page"] b { color: var(--accent); }
.search { display: flex; align-items: center; gap: 10px; padding: 14px var(--pad); }
.search input {
  flex: 1 1 240px; max-width: 420px; min-width: 0; min-height: var(--tap); padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--pill); background: var(--surface); color: var(--text); font-size: 13.5px;
}
.search input::placeholder { color: var(--text-muted); }
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--border-strong); }

/* --- the list: one job per row, a table that holds on a phone ---------------- */
.jobs li { border-top: 1px solid var(--border); }
.job {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 24px; row-gap: 4px;
  padding: 14px var(--pad); color: inherit; font-size: 13.5px;
  transition: background-color 140ms var(--ease);
}
a.job:hover { background: var(--surface-sunk); }
a.job:active { background: var(--accent-soft); }
.job .addr { grid-column: 1; font-weight: 600; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
.job .what { grid-column: 1; align-self: start; font-size: 12.5px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job .who { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: 6px 10px; min-width: 0; }
.job .co { font-weight: 600; color: var(--text); flex-basis: 100%; overflow-wrap: anywhere; }
.job .meta { flex-basis: 100%; font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.job .meta a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px var(--pad); border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.pager .btn { margin-left: auto; }
.pager .btn + .btn { margin-left: 0; }

/* --- pills: a word plus a tone, never a bare dot -------------------------------- */
.chip, .flag {
  display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: var(--pill);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--surface-sunk); color: var(--text-2);
}
.chip.sage { background: var(--positive-soft); color: var(--positive); }
.chip.rust { background: var(--danger-soft); color: var(--danger); }
.chip.oak  { background: var(--warning-soft); color: var(--warning); }
.flag { background: var(--accent-10); color: var(--accent); }
.flag.where, .calls .chip, .rows .flag, .head .flag, .job .flag { white-space: normal; }

/* --- forms: 8px radius, 44px, the accent on focus --------------------------------- */
textarea, .gate input, .details input {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 14px;
}
textarea { min-height: 148px; line-height: 1.6; resize: vertical; }
textarea::placeholder, .gate input::placeholder, .details input::placeholder { color: var(--text-muted); opacity: 1; }
textarea:focus-visible, .gate input:focus-visible, .details input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--border-strong); }
/* Her correction of his details. 16px so a phone does not zoom in on the box she taps. */
.details input { font-size: 16px; }
.block form.details { display: flex; flex-direction: column; gap: 14px; }
.details .fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.details .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.stagepick { display: flex; flex-wrap: wrap; gap: 8px; }
.stagepick button { color: var(--text-2); }
.stagepick button[aria-pressed="true"] { color: var(--accent); background: var(--accent-10); border-color: var(--accent-25); }

/* --- said and saved: a banner with a word, never colour alone -------------------- */
.saved, .err {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; overflow-wrap: anywhere;
}
.saved { background: var(--positive-soft); color: var(--positive); }
.err { background: var(--danger-soft); color: var(--danger); }
.head .saved, .head .err { margin-top: 8px; align-self: flex-start; }
/* What her emails are waiting for: a yes of hers, so a word and not colour alone. */
.waits {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--warning-soft); color: var(--warning); font-size: 13px; font-weight: 600;
  overflow-wrap: anywhere; max-width: 66ch;
}
.waits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.head .waits { margin-top: 8px; align-self: flex-start; }
/* Her standing yes, approve all: a state she chose, not a warning. A tint and a
   full hairline, never a side stripe; the words, then the one button that ends it,
   which drops under the words on a phone. */
.standing {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px;
  border: 1px solid var(--accent-25); border-radius: var(--r-sm); background: var(--accent-10);
  color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; max-width: 66ch;
}
.standing p { flex: 1 1 28ch; min-width: 0; }
.standing strong { font-weight: 700; }
.head .standing { margin-top: 8px; align-self: flex-start; }

/* --- the jobs on record, the emails, what they said back ---------------------------- */
.rows li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.rows li:last-child { border-bottom: 0; padding-bottom: 0; }
.rows li:first-child { padding-top: 0; }
.rows .t { font-weight: 600; color: var(--text); }
.rows .d { color: var(--text-2); margin-top: 2px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; max-width: 76ch; }
.rows .d.note { color: var(--text-muted); font-size: 12px; }
.rows .d a, .towhom a, .explain a, .foot a, .empty a { color: var(--accent); font-weight: 600; }
.rows .d .flag { margin-top: 6px; }
.mail { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-sunk); max-width: 76ch; }
.mail .subj { font-weight: 600; color: var(--text); font-size: 13.5px; overflow-wrap: anywhere; }
.mail .d.note { font-size: 12px; color: var(--text-muted); }
.mail .meant { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--text-2); }
.mail pre { font: inherit; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); margin-top: 6px; }

/* --- the approval card: the letter, the way the contractor sees it --------------------- */
.letter { max-width: 72ch; }
.letter pre { color: var(--text); }
.route { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.route > div { display: contents; }
.route dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); line-height: 1.7; }
.route dd { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.route .subj { font-weight: 600; color: var(--text); }
.kind { font-size: 13px; color: var(--text-2); max-width: 72ch; }
.kind .chip { margin-right: 6px; vertical-align: middle; }
.notices, .decide { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.decide details { flex: 1 1 16rem; min-width: 0; }
.decide summary, summary.btn { list-style: none; width: fit-content; }
.decide summary::-webkit-details-marker, summary.btn::-webkit-details-marker { display: none; }
.decide details[open] > summary, details[open] > summary.btn { color: var(--accent); background: var(--accent-10); border-color: var(--accent-25); }
.decide details form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-width: 72ch; }
.decide details form .btn { align-self: flex-start; }
details > .mail { margin-top: 12px; }

/* --- the first batch and the call list ---------------------------------------------- */
.batch .job, .calls .job { grid-template-columns: minmax(0, 1fr) auto; }
.batch .addr { color: var(--text); }
.batch .addr:hover { color: var(--accent); }
.batch .what { -webkit-line-clamp: unset; display: block; }
.batch .who, .calls .who { grid-column: 1; grid-row: auto; margin-top: 4px; }
.batch .never { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.calls .who .btn { margin-right: 4px; }
.calls .job .co { flex-basis: auto; }
.calls .job .meta { flex-basis: 100%; }

/* --- an empty state is written, not drawn ---------------------------------------- */
.empty { display: flex; flex-direction: column; gap: 6px; padding: 28px var(--pad); font-size: 13.5px; color: var(--text-muted); max-width: 52ch; }
.empty h2 { font-size: 15px; font-weight: 600; color: var(--text); }
.block > .empty { padding: 0; }

/* --- the foot: the records line and the downloads -------------------------------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 12.5px; color: var(--text-muted); padding: 8px 0 0; }
.foot .btn { color: var(--text); }
.foot > span { flex: 0 0 100%; max-width: none; padding-right: max(0px, calc(100% - 76ch)); }

/* --- sign in ----------------------------------------------------------------------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px var(--gutter) 10vh; }
.gate form { width: 100%; max-width: 452px; display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow), inset 0 1px 0 var(--inset); }
.gate .lockup { display: block; margin-bottom: 14px; color: var(--text); }
.gate h1 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; }
.gate p { font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.gate label { margin-top: 6px; }
.gate .btn { width: 100%; margin-top: 12px; }

/* --- motion: a fade up on load, off when asked ------------------------------------
   The rise is an animation with a delay for the stagger, never a transition with a
   delay: a delay on a transition would hold back every hover and press on the same
   box by the same 40 to 200ms. Each box holds its first frame through its delay
   (backwards), then is styled as itself, so a tile's lift starts the instant the
   pointer lands. */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card, .block, .head, .kpi, .hero {
  animation: rise var(--dur) var(--ease) backwards;
  transition: transform 160ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.hold > :nth-child(2), .grid > :nth-child(2) { animation-delay: var(--step); }
.hold > :nth-child(3), .grid > :nth-child(3) { animation-delay: calc(var(--step) * 2); }
.hold > :nth-child(4), .grid > :nth-child(4) { animation-delay: calc(var(--step) * 3); }
.hold > :nth-child(5), .grid > :nth-child(5) { animation-delay: calc(var(--step) * 4); }
.hold > :nth-child(n + 6), .grid > :nth-child(n + 6) { animation-delay: calc(var(--step) * 5); }

/* --- breakpoints: 1100 the grid, 900 the shell, 700 the rows ------------------------- */
@media (max-width: 1100px) {
  .s4, .s5, .s6, .s7, .s8 { grid-column: 1 / -1; }
  .tiles > .kpi { grid-column: span 6; }
}
/* Under 1024 wide, with her menu beside the page, one row has no room for the
   longest day, health line and button, so the head is drawn the way the phone
   draws it: the name over its day beside the button, then the health line on its
   own row. The phone's own head below still wins at 900 and under. */
@media (max-width: 1023.98px) {
  .head-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "day act" "sub sub" "health health"; gap: 1px 20px; }
  .head-day { align-self: start; padding-bottom: 0; }
  .health { justify-self: stretch; max-width: none; }
}
@media (max-width: 900px) {
  :root { --rail: 0px; --gutter: 16px; --gap: 16px; --pad: 18px; }
  .app { flex-direction: column; }
  .rail { position: static; height: auto; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--border); padding-right: 16px; }
  .brand { padding: 12px 16px; flex: 1 1 auto; min-width: 0; }
  .lockup { font-size: 20px; }
  /* Her business name on one line beside the look switch, cut short with an ellipsis
     rather than push a phone sideways when it is long. */
  .brand .lockup { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail .nav { display: none; }
  .rail-foot { flex-direction: row; align-items: center; gap: 12px; padding: 0; border-top: 0; }
  /* The switch is the sun or the moon alone here, a 44px circle; its words stay on
     the button's label for a screen reader. With the word beside the icon the strip
     ran 7px past a 360px phone and 47px past a 320px one. */
  .rail-foot .theme { width: var(--tap); padding: 0; }
  .rail-foot .theme span { display: none; }
  .rail-foot .theme .i { width: 18px; height: 18px; }
  /* Beside the button the day is the short one ("Wed, Sep 30"): the long one ran
     under the button at 320 to 390 wide. With a count line and a health line on two
     lines the head stays under 120px (8px above and below). */
  .head-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "day act" "sub sub" "health health"; gap: 1px 12px; padding: 8px 16px; }
  .head-name { font-size: 19px; }
  .head-day { align-self: start; padding-bottom: 0; font-size: 12.5px; }
  .head-day .day-long { display: none; }
  .head-day .day-short { display: inline; }
  .health { max-width: none; }
  .head-act { min-height: var(--tap); padding: 0 14px; letter-spacing: 1px; }
  .credits { padding: 8px 16px; }
  .hold { padding: 16px var(--gutter) 104px; }
  .hero { flex-direction: column; align-items: stretch; gap: 16px; }
  .hero-title { font-size: 30px; }
  .hero-action .btn { width: 100%; }
  .head h1, .head .co { font-size: 30px; }
  .head .acts { flex-direction: column; align-items: stretch; }
  .head .acts .btn { width: 100%; }
  .head .acts .btn:not([href^="mailto:"]) { white-space: normal; padding: 10px 22px; line-height: 1.3; text-align: center; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .tab { flex: 1 1 auto; min-width: var(--tap); min-height: var(--tap); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 1px; color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
  .tab[aria-current="page"] { color: var(--accent); }
  /* The count sits on the Email icon, so the bar keeps its height. */
  .tab { position: relative; }
  .tab .badge { position: absolute; top: 3px; left: calc(50% + 4px); height: 18px; min-width: 18px; padding: 0 5px; }
  .search input { max-width: none; }
  .search .btn { flex: none; }
  .btn-sm, .rail-foot button, .filters a, .pager .btn { min-height: var(--tap); }
  .batch .addr { display: inline-flex; align-items: center; min-height: var(--tap); }
  .foot a:not(.btn) { display: inline-flex; align-items: center; min-height: var(--tap); }
  .gate { padding-bottom: 10vh; }
  .week-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "strip" "map" "note"; }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map { max-width: 420px; }
}
/* Under 900px of column, an area's pages sit two by two, each a full 44px tap,
   never a row that runs off the side (her layout check counts anything past the
   edge). From 900px four tabs sit on one row. */
@media (max-width: 899.98px) {
  .subtabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; padding: 8px var(--gutter) 0; }
  .subtab { min-height: var(--tap); justify-content: center; text-align: center; padding: 0 8px; }
}
/* More than four is one native fold whose summary is the page she is on, up to
   1180px wide: under that the eight Email tabs cannot sit on one row beside her
   menu (they need about 850px of column), and a second row of tabs is never drawn.
   From 1180px they sit on one row. */
@media (max-width: 1179.98px) {
  .subtabs.is-many { display: none; }
  .subtabs-fold { display: block; margin: 8px var(--gutter) 0; }
  .subtabs-fold > summary {
    display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; list-style: none;
    border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  }
  .subtabs-fold > summary::-webkit-details-marker { display: none; }
  .subtabs-fold > summary::after { content: "+"; margin-left: auto; color: var(--text-muted); }
  .subtabs-fold[open] > summary::after { content: "\2212"; }
  .subtabs-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; padding-top: 4px; }
  .subtabs-open .subtab { min-height: var(--tap); justify-content: center; text-align: center; padding: 0 8px; }
}
@media (min-width: 900px) and (max-width: 1179.98px) { .subtabs-fold { max-width: 480px; } }
@media (max-width: 700px) {
  /* On a phone the credits bar says what ran low in one sentence, then its button and X. */
  .credits-more { display: none; }
  .details .fields { grid-template-columns: minmax(0, 1fr); }
  .subtiles { grid-template-columns: 1fr; }
  .area { min-height: 170px; }
  .area-plot { grid-template-rows: minmax(170px, 1fr) auto; }
  .area-x span.wide { display: none; }  /* every fourth day on a phone, so no two names touch */
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map { max-width: none; }
  .job, .batch .job, .calls .job { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .job .who, .batch .never { grid-column: 1; grid-row: auto; }
  .job .what { -webkit-line-clamp: 3; }
  .batch .never { margin-top: 8px; }
  .batch .never .btn, .calls .who .btn { width: 100%; }
  .calls .who .btn { margin-right: 0; }
  .notices .btn, .decide .btn, .decide summary, .block form > .btn, .foot .btn { width: 100%; }
  /* A button's words wrap on a phone rather than push it past its card: "Yes, this is how
     my emails sign off" in capitals ran 29px past a 360px phone. One line stays 44px. */
  .btn:not([href^="mailto:"]) { white-space: normal; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; text-align: center; }
  .decide form, .decide details { min-width: 0; }
  .decide { flex-direction: column; align-items: stretch; }
  .decide details { flex: none; }
  .decide details form .btn { align-self: stretch; }
  .pager { flex-direction: column; align-items: stretch; }
  .pager .btn, .pager .btn + .btn { margin-left: 0; }
  .route { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .route dt { margin-top: 6px; }
  .foot { flex-direction: column; align-items: stretch; }
}
/* Under 360 wide the head's button keeps its words close and its sides short, so
   the page's name beside it stays whole: with the phone's spacing, "Open your call
   list" left "Dashboard" 87px at 320 and cut it in two. */
@media (max-width: 359.98px) {
  .head-act { padding-left: 10px; padding-right: 10px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms; animation-iteration-count: 1; transition-duration: 1ms; scroll-behavior: auto; }
  .card, .block, .head, .kpi, .hero { animation: none; opacity: 1; transform: none; }
  .btn:active, .stagepick button:active, .filters a:active, a.kpi:hover { transform: none; }
}
@media (prefers-contrast: more) {
  /* Both looks named: the light look's own rule outranks a plain :root, so a rule on
     :root alone reaches the dark look only. The hairline sits mid way between the two
     grounds, so it reads on each; the text strengths fold into the look's own ink. */
  :root, :root[data-theme="light"] { --border: oklch(0.62 0.02 62); --text-2: var(--text); --text-muted: var(--text-2); }
}
@media (forced-colors: active) {
  .card, .block, .kpi, .btn, .chip, .flag, .filters a, .stagepick button, .search input, .mail { border: 1px solid CanvasText; }
  .nav-item[aria-current="page"]::before { background: Highlight; }
  .map .city { fill: Canvas; stroke: CanvasText; }
  .map circle, .map-note circle { fill: Highlight; stroke: Canvas; }
}
@media print {
  .rail, .head-bar, .credits, .subtabs, .subtabs-fold, .tabbar, .filters, .search, .pager, .foot { display: none; }
  .app { display: block; }
  body { background: #fff; color: #000; }
  .hold { max-width: none; padding: 0; }
  .card, .block { break-inside: avoid; box-shadow: none; border-color: #ccc; }
}
