/* Financial Brain owner cockpit.
   Constraints from plan v1.3 that this stylesheet enforces:
   - status is legible in grayscale (every state carries a glyph, never colour alone)
   - contrast meets WCAG 2.2 AA in both schemes
   - focus is always visible (keyboard-only completion is a release gate)
   - amounts can be masked without changing what the user is allowed to see
   Both colour schemes come from light-dark(); the light values are the audited ones. */

:root {
  color-scheme: light dark;

  --paper: light-dark(#f6f4ef, #161210);
  --panel: light-dark(#fffefb, #1e1915);
  --panel-2: light-dark(#efece5, #1a1512);
  --ink: light-dark(#14100d, #ede7df);
  --ink-2: light-dark(#4a423b, #c9bfb4);
  --ink-3: light-dark(#75695f, #9d9186);
  --line: light-dark(#e4ded5, #352d26);
  --line-2: light-dark(#cfc7bd, #4a4038);

  --accent: light-dark(#b8541f, #e08a54);
  --accent-strong: light-dark(#a34715, #e5854f);
  --accent-soft: light-dark(#faefe6, #2e2018);
  /* Text on filled accent/good shapes: white fails AA on the lightened dark-
     scheme fills, so the on-colors flip to dark ink there (a11y_check.py). */
  --on-accent: light-dark(#ffffff, #171310);
  --on-good: light-dark(#ffffff, #14251d);

  --good: light-dark(#1f6b4d, #7fc9a8);
  --good-soft: light-dark(#eaf4ef, #1c2b23);
  --good-line: light-dark(#a8cdbb, #35543f);
  --warn: light-dark(#8a5a00, #e3b45e);
  --warn-soft: light-dark(#fdf3e0, #2e2515);
  --warn-line: light-dark(#e8cf9c, #57451f);
  --bad: light-dark(#a02020, #e88f83);
  --bad-soft: light-dark(#fbecec, #301b18);
  --bad-line: light-dark(#e0b0b0, #5c2f28);
  --wait: light-dark(#55606b, #a7b2bd);
  --wait-soft: light-dark(#eef1f3, #1d2226);
  --wait-line: light-dark(#c3ccd3, #3a444d);
  --done-soft: light-dark(#f0eee9, #26211c);

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px light-dark(rgba(20,16,13,.06), rgba(0,0,0,.3)),
            0 8px 24px light-dark(rgba(20,16,13,.05), rgba(0,0,0,.25));
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Outfit", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 8% -10%, light-dark(rgba(184,84,31,.07), rgba(224,138,84,.05)), transparent 32rem),
    linear-gradient(180deg, light-dark(#faf9f6, #171310) 0, var(--paper) 18rem);
  background-attachment: fixed;
}

/* Focus is never removed. Keyboard-only completion is gate ACC-01. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .7rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- shell ---------- */

.app { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem 5rem; }

header.topbar {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 25;
  background: light-dark(rgba(250,249,246,.92), rgba(23,19,16,.92));
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: .6rem; margin-right: .4rem; }
.brand .mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-strong); color: var(--on-accent);
  font-family: var(--display); font-weight: 700; font-size: .72rem; letter-spacing: .05em;
}
.brand .brandtext { display: grid; line-height: 1.2; }
.brand .brandtext strong { font-family: var(--display); font-size: .98rem; letter-spacing: -.01em; }
.brand .brandtext small { color: var(--ink-3); font-size: .74rem; }

nav.mainnav { display: flex; gap: .2rem; flex-wrap: wrap; margin: 0 auto; position: relative; }
nav.mainnav button {
  font: inherit; font-size: .88rem;
  background: none; border: none; cursor: pointer;
  color: var(--ink-3);
  padding: .45rem .7rem; border-radius: 9px;
}
nav.mainnav button:hover { color: var(--ink); background: var(--panel); }
nav.mainnav button[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 600;
}

.topbar .utils { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.synthetic-flag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--warn-line);
  padding: .2rem .5rem;
  border-radius: 999px;
}

.headbtn {
  font: inherit;
  font-size: .82rem;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  padding: .35rem .65rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.headbtn:hover { background: var(--panel); border-color: var(--ink-3); }

/* ---------- Ask bar, global on every screen (gate ASK-01) ---------- */

.askbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1.1rem 0 1.5rem;
  padding: .35rem .4rem .35rem .9rem;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.askbar :is(input, textarea) {
  flex: 1;
  font: inherit;
  padding: .45rem 0;
  border: none;
  background: transparent;
  color: var(--ink);
  min-width: 8rem;
}
.askbar textarea { resize: none; line-height: 1.45; max-height: 192px; }
.askbar :is(input, textarea)::placeholder { color: var(--ink-3); }
.askbar :is(input, textarea):focus-visible { outline-offset: 6px; }
.askbar kbd {
  font-family: var(--sans);
  font-size: .68rem;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: .12rem .4rem;
  background: var(--panel-2);
  white-space: nowrap;
}

.btn {
  font: inherit;
  font-weight: 600;
  background: light-dark(#14100d, #ece6de);
  color: light-dark(#fbfaf8, #171310);
  border: 1px solid transparent;
  padding: .6rem 1.05rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: light-dark(#2a231d, #d8d0c6); }
.btn:disabled {
  background: var(--done-soft);
  color: var(--ink-3);
  cursor: not-allowed;
}
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn.small { padding: .4rem .75rem; font-size: .85rem; font-weight: 500; }
.btn.full { width: 100%; }

/* ---------- headings ---------- */

h1 { font-family: var(--display); font-size: 1.55rem; letter-spacing: -.015em; margin: 0; }
h2 { font-family: var(--display); font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }
h3 { font-size: .95rem; margin: 0; }
.sub { color: var(--ink-3); font-size: .9rem; margin: .3rem 0 0; }
.eyebrow {
  color: var(--accent-strong);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .15rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.page-head > div:first-child { max-width: 52rem; }

.section-head { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; margin-bottom: .7rem; }
.section-head p { color: var(--ink-3); font-size: .8rem; margin: .1rem 0 0; }
.section-head .count { color: var(--ink-3); font-size: .78rem; white-space: nowrap; }

/* ---------- surfaces and grids ---------- */

.surface {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.05rem 1.15rem;
  margin-bottom: .9rem;
  box-shadow: var(--shadow);
}

.askpanel {
  border-top: 3px solid var(--accent-strong);
  padding: 1.2rem 1.25rem;
}
.askpanel .scopefind { min-height: 44px; background: var(--paper); }
.askpanel-input {
  flex: 1 1 16rem;
  width: 100%;
  max-height: 192px;
  resize: none;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.45;
}

/* ---------- customized tasks ---------- */

/* Saved requests are working tools, not tags. One bordered row per task keeps
   long wording readable and makes the two management actions predictable. */
.custom-tasks {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.custom-tasks-head { margin-bottom: .75rem; }
.custom-tasks-head h3 { font-size: 1rem; margin: 0; }
.custom-tasks-head .note { margin: .2rem 0 0; }
.custom-task-list { display: grid; gap: .55rem; }
.custom-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem 1rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.custom-task-name {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
}
button.custom-task-name { cursor: pointer; }
button.custom-task-name:hover { color: var(--accent-strong); }
button.custom-task-name:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
  border-radius: 3px;
}
.custom-task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}
.custom-task-row > .custom-task-actions { white-space: nowrap; }
.custom-task-remove { color: var(--bad); }
.custom-task-remove-button {
  background: var(--bad);
  border-color: var(--bad);
  color: white;
}
.custom-task-remove-button:hover { background: var(--bad); border-color: var(--bad); }
.custom-task-edit { grid-column: 1 / -1; }
.custom-task-editor {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 192px;
  resize: none;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.custom-task-edit .custom-task-actions,
.custom-task-add .custom-task-actions { margin-top: .55rem; justify-content: flex-start; }
.custom-task-error { margin: .35rem 0 0; color: var(--bad); font-size: .8rem; }
.custom-task-confirm {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .85rem;
}
.custom-task-add { margin-top: .75rem; }
.custom-task-add-link { display: inline-block; margin-top: .75rem; }

.scope-contract {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  flex-wrap: wrap;
  margin: -.45rem 0 1rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--ink-2);
  font-size: .84rem;
}
.scope-contract strong { color: var(--ink); }

.thread-context {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  align-items: center;
  margin-bottom: .4rem;
  color: var(--ink-3);
  font-size: .76rem;
}
.thread-context .linklike { font-size: .78rem; }
.thread-context .linklike:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }

.citation-link {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.citation-link:hover { color: var(--accent-strong); }
.citation-text { color: inherit; }

.doc-drawer {
  margin-top: .8rem;
  border-top: 1px solid var(--line);
  padding-top: .65rem;
}
.doc-drawer > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-size: .84rem;
  font-weight: 600;
}
.doc-drawer-body { padding-top: .75rem; }
.record-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem 1rem;
  margin: 0;
}
.record-meta div { min-width: 0; }
.record-meta dt {
  color: var(--ink-3);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.record-meta dd { margin: .12rem 0 0; font-size: .86rem; color: var(--ink-2); }
.record-proof {
  margin: .8rem 0 0;
  padding: .75rem .85rem;
  background: var(--panel-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: .86rem;
}
.record-proof strong { color: var(--ink); }

.field { display: grid; gap: .35rem; margin-top: 1rem; }
.field > span { font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: .75rem .8rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 8rem; }
.plain-steps { margin: 1rem 0; padding-left: 1.3rem; }
.plain-steps li { margin: 0 0 .75rem; color: var(--ink-2); }
.plain-steps strong { color: var(--ink); }
.boundary-callout {
  padding: .8rem .9rem;
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  color: var(--ink-2);
  font-size: .86rem;
}

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); gap: 1.1rem; align-items: start; }
.grid-2.even { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); }
.col { min-width: 0; }

/* At a glance sticks beside the page, per Jay 2026-08-27: it summarises the
   whole screen, so scrolling the actions away from their summary is what made
   it read as not flowing with the page.

   max-height plus its own scroll so a long glance can never outgrow the
   viewport and strand its last row off-screen, which is the failure mode a
   naive sticky block has. The stickiness is dropped entirely on narrow
   screens, where the grid is one column and sticky would pin a summary over
   the content it summarises. */
.glance {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  /* Sticky is not motion, but a pinned panel behaves like one to some readers.
     Honour the preference rather than assuming. */
  .glance { position: static; max-height: none; }
}

.nav-more { color: var(--ink-3); }
.nav-flyout {
  position: absolute;
  z-index: 45;
  top: calc(100% + .45rem);
  right: 0;
  min-width: 10rem;
  padding: .35rem;
  display: grid;
  gap: .15rem;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px light-dark(rgba(20,16,13,.12), rgba(0,0,0,.4));
}
.nav-flyout button { width: 100%; text-align: left; }

.choice-group {
  margin: .55rem 0 .1rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.choices .choice-group:first-child { margin-top: 0; }

details.srcfold > summary {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: baseline;
  cursor: pointer;
  font-size: .95rem;
}
details.srcfold > summary .count { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }
details.srcfold[open] > summary { margin-bottom: .4rem; }

.linkrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  width: 100%;
  font: inherit;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: .75rem .2rem;
  cursor: pointer;
  color: inherit;
}
.linkrow:last-of-type { border-bottom: none; }
.linkrow:hover strong { color: var(--accent-strong); }
.linkrow .lr-text { display: grid; gap: .1rem; min-width: 0; }
.linkrow strong { font-size: .88rem; }
.linkrow small { color: var(--ink-3); font-size: .78rem; }

.blindspots {
  margin-top: .8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .9rem;
}
.blindspots h3 { font-size: .88rem; margin-bottom: .4rem; }
.blindspots ul { margin: 0 0 .45rem; padding-left: 1.1rem; }
.blindspots li { font-size: .82rem; color: var(--ink-2); margin-bottom: .25rem; }
.blindspots .note { margin-top: .2rem; }

/* ---------- critical banner: outside the five-action cap ---------- */

.critical {
  border: 1.5px solid var(--bad);
  background: var(--bad-soft);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
  display: flex;
  gap: .85rem;
  align-items: flex-start;
}
.critical .glyph { color: var(--bad); font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.critical h3 { color: var(--bad); margin-bottom: .2rem; }
.critical p { margin: .2rem 0 .7rem; font-size: .9rem; color: var(--ink-2); }

/* ---------- state chips: glyph + text, never colour alone ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  font-weight: 600;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.chip .g { font-size: .7rem; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }
.chip.done { background: var(--done-soft); color: var(--ink-2); border-color: var(--line-2); }
.chip.act { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.chip.wait { background: var(--wait-soft); color: var(--wait); border-color: var(--wait-line); }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }

/* ---------- cards and actions ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
  box-shadow: var(--shadow);
}
.card.urgent { border-left: 4px solid var(--accent-strong); }

.action-grid { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .85rem; }
.action-n {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-strong);
  font-size: .82rem; font-weight: 700;
}
.action-head { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; }
.action-head h3 { flex: 1; }

.why { font-size: .88rem; color: var(--ink-2); margin: .45rem 0 0; }
.meta { font-size: .82rem; color: var(--ink-3); margin: .5rem 0 0; }
.row { display: flex; gap: .5rem; margin-top: .85rem; flex-wrap: wrap; }

details.receipt { margin-top: .7rem; }
details.receipt summary {
  cursor: pointer;
  font-size: .84rem;
  color: var(--ink-3);
  padding: .2rem 0;
}
details.receipt summary:hover { color: var(--accent); }
details.receipt .body {
  font-size: .85rem;
  color: var(--ink-2);
  border-left: 2px solid var(--line-2);
  padding: .5rem 0 .2rem .8rem;
  margin-top: .4rem;
}

.backlog {
  font-size: .85rem;
  color: var(--ink-3);
  padding: .8rem 0 0;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

/* ---------- quiet state ---------- */

.quiet {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.quiet .big { font-family: var(--display); font-size: 1.15rem; margin-bottom: .3rem; }
.quiet .small { color: var(--ink-3); font-size: .9rem; }

/* ---------- tables ---------- */

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 520px; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td.num { font-variant-numeric: tabular-nums; }

/* ---------- rows with a leading label (sources, recent items) ---------- */

.itemrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  padding: .7rem .1rem;
  border-bottom: 1px solid var(--line);
}
.itemrow:last-child { border-bottom: none; }
.itemrow .it-text { display: grid; gap: .12rem; min-width: 0; }
.itemrow .it-text > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.itemrow strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itemrow small { color: var(--ink-3); font-size: .78rem; }

/* The next step on an Access row. Darker than the description above it and set
   off by a rule, because a client who reads only the muted grey line reads the
   risk and misses the move, which was the whole complaint. Not colour-coded: the
   state chip already carries severity and this has to stay legible in grayscale. */
.itemrow small.nextstep {
  color: var(--ink-2);
  margin-top: .3rem;
  padding-left: .6rem;
  border-left: 2px solid var(--line-2);
  line-height: 1.45;
  white-space: normal;
}

.mini-meter {
  width: min(220px, 70%);
  height: 5px;
  margin-top: .3rem;
  border-radius: 99px;
  background: var(--done-soft);
  overflow: hidden;
}
.mini-meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent-strong); }

.meter {
  height: 7px;
  margin: .7rem 0 .5rem;
  border-radius: 99px;
  background: var(--done-soft);
  overflow: hidden;
}
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--good); }

/* ---------- add / dropzone ---------- */

.drop {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 2.1rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  margin-bottom: .8rem;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .big { font-family: var(--display); font-size: 1.05rem; margin-bottom: .25rem; }
.drop .small { color: var(--ink-3); font-size: .88rem; }

.addgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .7rem; }
.addopt {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: .85rem .95rem; text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.addopt:hover { border-color: var(--accent); background: var(--accent-soft); }
.addopt strong { display: block; font-size: .9rem; margin-bottom: .15rem; }
.addopt span { font-size: .8rem; color: var(--ink-3); }

/* ---------- one question at a time ---------- */

.question { border-left: 3px solid var(--accent-strong); }
.question .q { font-family: var(--display); font-size: 1.08rem; margin: .15rem 0 .2rem; }
.question .consequence { font-size: .87rem; color: var(--ink-2); margin: 0 0 .9rem; }
.choices { display: flex; flex-direction: column; gap: .5rem; }
.choice {
  text-align: left; font: inherit; background: var(--panel); color: inherit;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: .7rem .9rem; cursor: pointer;
}
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice strong { display: block; font-size: .93rem; }
.choice span { font-size: .83rem; color: var(--ink-3); }

/* ---------- answers ---------- */

.answer { border-left: 3px solid var(--ink); }
.answer .headline { font-family: var(--display); font-size: 1.08rem; line-height: 1.4; margin: 0 0 .5rem; }
.answer .detail { font-size: .92rem; color: var(--ink-2); margin: 0 0 .9rem; }
.answer .strip { font-size: .84rem; padding: .55rem .75rem; border-radius: 8px; margin-bottom: .45rem; }
.answer .strip.src { background: var(--done-soft); color: var(--ink-2); }
.answer .strip.miss { background: var(--warn-soft); color: var(--warn); }
.answer .strip.conf { background: var(--bad-soft); color: var(--bad); }
.answer .asof { font-size: .8rem; color: var(--ink-3); margin-top: .7rem; }

.refusal { border-left: 3px solid var(--warn); }
.refusal .headline { color: var(--warn); }

/* ---------- deadline hero (This year) ---------- */

.hero-deadline {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: light-dark(#fdf0df, #33261a);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.hero-deadline .date-block {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 11px;
  background: light-dark(#a1532e, #b0602c); color: #fff;
  line-height: 1;
}
.hero-deadline .date-block strong { font-family: var(--display); font-size: 1.3rem; }
.hero-deadline .date-block small { font-size: .58rem; letter-spacing: .12em; margin-top: .1rem; }
.hero-deadline h2 { margin: .05rem 0 .15rem; }
.hero-deadline p { font-size: .85rem; color: var(--ink-2); margin: 0; }

blockquote {
  margin: .8rem 0;
  padding-left: .8rem;
  border-left: 3px solid var(--accent);
  font-size: .95rem;
  line-height: 1.5;
}
.facts { font-size: .82rem; color: var(--ink-3); margin: .3rem 0 0; }

/* ---------- close checklist ---------- */

ol.closelist { list-style: none; margin: .3rem 0 0; padding: 0; }
ol.closelist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: .6rem;
  align-items: baseline;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .87rem;
}
ol.closelist li:last-child { border-bottom: none; }
ol.closelist .stepmark {
  display: grid; place-items: center;
  width: 21px; height: 21px; border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: .7rem; font-weight: 700; color: var(--ink-3);
  align-self: center;
}
ol.closelist li.done { color: var(--ink-2); }
ol.closelist li.done .stepmark { background: var(--good); border-color: var(--good); color: var(--on-good); }
ol.closelist small { display: block; color: var(--ink-3); font-size: .78rem; }

/* ---------- install console ---------- */

.install-shell {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.stage-rail {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: .6rem;
  display: grid;
  gap: .2rem;
}
.stage-btn {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: .6rem;
  align-items: center;
  width: 100%;
  font: inherit;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius);
  padding: .55rem .5rem;
  color: var(--ink-3);
  cursor: pointer;
}
.stage-btn:hover { background: var(--panel); color: var(--ink); }
.stage-btn[aria-current="step"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.stage-btn .st-ic {
  display: grid; place-items: center;
  width: 25px; height: 25px; border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: .72rem; font-weight: 700;
}
.stage-btn.done { color: var(--good); }
.stage-btn.done .st-ic { background: var(--good); border-color: var(--good); color: var(--on-good); }
.stage-btn.now .st-ic { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.stage-btn .st-text { display: grid; line-height: 1.25; min-width: 0; }
.stage-btn .st-text strong { font-size: .85rem; font-weight: 600; }
.stage-btn .st-text small { font-size: .72rem; color: var(--ink-3); }

.install-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 1.1rem;
  align-items: start;
}

.attention {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin: .8rem 0;
}
.attention .glyph { color: var(--warn); font-weight: 700; }
.attention strong { display: block; font-size: .88rem; color: var(--warn); }
.attention span { font-size: .84rem; color: var(--ink-2); }

.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; padding: .28rem 0; }
.check .g { flex: none; width: 1.1rem; font-weight: 700; }
.check.ok .g { color: var(--good); }
.check.intervention .g { color: var(--warn); }
.check.waiting .g { color: var(--wait); }
.check.skipped .g { color: var(--ink-3); }
.check .note { display: block; color: var(--ink-3); font-size: .82rem; margin-top: .1rem; }

.handoff { text-align: left; }
.manifest-row {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  padding: .16rem 0;
  font-variant-numeric: tabular-nums;
}
.manifest-group { margin: .5rem 0 .15rem; font-weight: 600; font-size: .78rem; color: var(--ink-2); }
.manifest-group:first-child { margin-top: 0; }
.manifest-state { display: inline-flex; gap: .5rem; align-items: baseline; color: var(--ink-3); text-align: right; }
.manifest-state a { color: var(--accent-strong); }
.handoff .bignum { font-family: var(--display); font-size: 1.7rem; letter-spacing: -.03em; margin: .2rem 0 0; }
.handoff .sub { margin: 0 0 .2rem; }
.handoff small { display: block; color: var(--ink-3); font-size: .78rem; margin-top: .55rem; line-height: 1.45; }

.truthnote {
  font-size: .85rem;
  background: var(--wait-soft);
  border: 1px solid var(--wait-line);
  border-radius: var(--radius);
  padding: .7rem .9rem;
  color: var(--ink-2);
  margin-top: 1rem;
}

/* ---------- misc ---------- */

/* Privacy mode replaces the amount entirely: nothing readable remains in the page,
   the accessibility tree, or a screen reader. Blur was cosmetic; this is not. */
.masked { color: var(--ink-3); letter-spacing: .15em; user-select: none; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: light-dark(#14100d, #ece6de);
  color: light-dark(#fbfaf8, #171310);
  padding: .7rem 1.1rem; border-radius: var(--radius);
  font-size: .9rem; box-shadow: var(--shadow); z-index: 60;
  max-width: min(92vw, 34rem);
}

.note { font-size: .84rem; color: var(--ink-3); margin-top: .5rem; }

pre.payload { font-size: .78rem; white-space: pre-wrap; margin: 0; }

/* "Ask me later" and its consequence line. It is a lesser action than the three
   commit choices, so it stays a ghost button, but it gets the same explanation
   they get: four of four could not predict it and two pressed a commit button
   instead rather than risk it. */
.choice-later { margin-top: .7rem; display: grid; gap: .3rem; justify-items: start; }
.choice-later span { color: var(--ink-3); font-size: .82rem; line-height: 1.45; }

/* The paused states. Neither is a greyed-out rectangle: a control that refuses
   without saying why is the furniture the usability rounds keep rejecting. */
.drop.paused { cursor: default; border-style: solid; opacity: 1;
  display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; text-align: left; }
.drop.paused .big { color: var(--ink); }
.pause-dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-width: none;
  margin: auto;
  padding: 1.15rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(20, 13, 8, .26);
}
.pause-dialog[open] { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; }
.pause-dialog::backdrop { background: rgba(31, 24, 19, .5); backdrop-filter: blur(2px); }
.pause-dialog-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 800;
}
.pause-dialog h2 { margin: 0 0 .45rem; font-size: 1.18rem; }
.pause-dialog p { margin: 0 0 .55rem; color: var(--ink-2); }
.pause-dialog .note { font-size: .82rem; }
.pause-dialog-actions { display: flex; justify-content: flex-end; margin-top: .85rem; }
.addopt[disabled] { opacity: .75; cursor: default; }

/* The scope bar: one control, every scoped screen, always visible so the scope
   can never be active and invisible at the same time. The chip row is a single
   swipeable line rather than a wrapping wall, because the design target is a
   client with twenty businesses, not three. */
.scopebar { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: -.6rem 0 1.1rem; }
.scopebar-label { color: var(--ink-3); font-size: .8rem; margin-right: .2rem; }
.scoperow { display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; max-width: 100%;
  padding-bottom: .25rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.scoperow .btn { flex: 0 0 auto; }
.scopefind { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem;
  font: inherit; font-size: .85rem; background: var(--paper); color: var(--ink); min-height: 36px; }
.entity-classification { min-width: 8.5rem; width: 100%; max-width: 11rem; }

/* ---------- Text-styled actions and the actions fold ---------- */

/* Manage actions render as highlighted text, per Jay 2026-08-27: not buttons.
   They remain real button elements so keyboards and screen readers keep
   working; only the paint changed. */
.linklike { background: none; border: none; padding: 0; font: inherit;
  color: var(--accent-strong); text-decoration: underline; cursor: pointer; }
.linklike:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

/* Your actions, folded until opened. The summary carries the derived count so
   the fold never hides how much is waiting. */
.actions-fold { margin: 0; min-width: 0; }
.actions-fold > summary { cursor: pointer; font-weight: 600; font-size: 1.05rem;
  padding: .65rem .2rem; list-style-position: inside; }
.actions-fold > summary:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.actions-first { display: block; margin: .2rem 0 0 1.2rem; color: var(--ink-3); font-size: .78rem; font-weight: 500; }

/* ---------- Settings section bar ---------- */

/* Deliberately NOT .scopebar. That bar chooses which business you are looking
   at, and two suites assert it must never appear on Settings, because offering
   a data filter beside a security control implies the control is scoped when it
   is not. This one only chooses a page. */
.sectionbar { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.4rem 0 1.2rem;
  border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.sectionbar .chipbtn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: .42rem .7rem;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.sectionbar .chipbtn:hover { color: var(--ink); background: var(--panel-2); }
.sectionbar .chipbtn.on { color: var(--ink); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 650; }

.settings-more > summary {
  display: grid;
  gap: .18rem;
  cursor: pointer;
  list-style-position: inside;
}
.settings-more > summary span { color: var(--ink-3); font-size: .8rem; font-weight: 400; margin-left: 1.15rem; }
.settings-more[open] > summary { padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.settings-more .grid-2 { margin-top: 1rem !important; }
.settings-more .surface { box-shadow: none; background: var(--paper); }

/* ---------- Explore thread ---------- */

/* One turn: the question as asked, then its answer. The question is set apart so
   a client scrolling back can find where each answer came from, which is the
   whole reason the thread exists rather than one replaceable card. */
.thread-turn { margin-bottom: 1.4rem; }
.thread-turn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 6px; border-radius: var(--radius); }
.thread-q {
  display: flex;
  gap: .55rem;
  align-items: baseline;
  margin: 0 0 .5rem;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
}
.thread-q .g {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 700;
}

/* Jump links on long pages: navigation, not decoration. Access measures nearly
   4000px on a phone with its wording deliberately kept, so the aid is structural. */
.jumprow { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .2rem 0 .8rem; }
.jumprow a { font-size: .8rem; color: var(--accent-strong); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: .1rem; }
.jumprow a:hover { border-bottom-color: var(--accent-strong); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .grid-2, .grid-2.even, .install-cols { grid-template-columns: 1fr; }
  /* One column: sticky would pin the summary over what it summarises. */
  .glance { position: static; max-height: none; overflow-y: visible; }
  .install-shell { grid-template-columns: 1fr; }
  .stage-rail { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 640px) {
  /* Room for the fixed bottom navigation. */
  .app { padding: 0 .9rem 5.4rem; }
  h1 { font-size: 1.3rem; }
  /* A filtered ancestor becomes the containing block for fixed descendants in
     Chromium. Drop the desktop glass treatment so the bottom navigation is
     fixed to the phone viewport, not to the header. */
  header.topbar { position: static; backdrop-filter: none; background: transparent; }

  .custom-task-row { grid-template-columns: minmax(0, 1fr); }
  .custom-task-row > .custom-task-actions { justify-content: flex-start; }
  .custom-task-confirm { align-items: flex-start; flex-direction: column; }

  /* The experience audit measured pages at 1.8 to 4.6 viewports tall with the
     only navigation in a non-sticky 193px header, so after any scrolling there
     was no way to move between screens without scrolling all the way back. The
     nav becomes a fixed bottom bar at phone width: the same element, the same
     four-plus-More set the mobile budget allows, no second navigation system.
     Button height also rises past the 44px touch convention here; it was 34px. */
  nav.mainnav {
    order: 3;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    gap: 0;
    padding: .25rem .3rem calc(.25rem + env(safe-area-inset-bottom));
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
  /* Buttons share the bar and may shrink, so five labels can never force the
     bar wider than the narrowest phone. */
  nav.mainnav button { flex: 1; min-width: 0; padding: .8rem .3rem; font-size: .84rem; min-height: 44px; }
  nav.mainnav .nav-flyout {
    position: absolute;
    top: auto;
    bottom: calc(100% + .45rem);
    right: .5rem;
    width: min(14rem, calc(100vw - 1rem));
    display: grid;
    padding: .45rem;
  }
  nav.mainnav .nav-flyout button { flex: none; text-align: left; padding: .75rem .8rem; }
  .askbar kbd { display: none; }
  .hero-deadline { grid-template-columns: 54px minmax(0, 1fr); }
  .hero-deadline .btn { grid-column: 1 / -1; width: 100%; }
  .page-head .btn { width: 100%; }
  /* The toast must not hide behind the bottom bar. */
  .toast { bottom: calc(4.2rem + env(safe-area-inset-bottom)); }

  /* Tables stop forcing a 520px canvas on a 320px screen. Columns compress and
     text wraps; the request-fields table stacks fully, because the message the
     client must proofread has to be readable without sideways scrolling. */
  .tablewrap table { min-width: 0; width: 100%; }
  .tablewrap td, .tablewrap th { white-space: normal; }
  table.request-fields, table.request-fields tbody,
  table.request-fields tr, table.request-fields th, table.request-fields td {
    display: block;
    width: 100%;
    text-align: left;
  }
  table.request-fields th { padding-bottom: 0; color: var(--ink-3); }
  table.request-fields td { padding-top: .15rem; }

  /* Operational tables become labelled cards. The important state and newest
     date remain in the first viewport instead of hiding behind sideways scroll. */
  .responsive-table thead, .responsive-table .responsive-head {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
    display: block;
    width: 100%;
  }
  .responsive-table tr {
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
  }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
    gap: .65rem;
    padding: .28rem .1rem;
    text-align: left;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: var(--ink-3);
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .record-meta { grid-template-columns: 1fr; }
  .thread-context { align-items: flex-start; }
  .sectionbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .55rem; scrollbar-width: thin; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ================= the statement finish, 2026-08-27 =================
   Applied from the design pass: accent moves from chrome to state, figures
   behave like a statement, nothing moves unless something happened. Every
   rule below EXTENDS the audited sheet by cascade; nothing above is edited. */

/* ---------- wordmark seal (replaces the FB tile's paint) ---------- */
.brand .mark { background: none; color: var(--ink); width: 28px; height: 28px; border-radius: 0; }
.brand .mark svg { display: block; }
.brand .mark .seal-pt { fill: var(--accent-strong); }
.brand .brandtext small { letter-spacing: .02em; }

/* ---------- statement typography ---------- */
html, body { font-variant-numeric: lining-nums tabular-nums; }
h1 { font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.2; font-weight: 650; }
h2 { font-size: 1.1rem; line-height: 1.3; font-weight: 650; }
h3 { font-weight: 650; letter-spacing: -.005em; }
/* A label is not an event; accent is reserved for state and the deadline. */
.eyebrow { color: var(--ink-3); letter-spacing: .1em; }
th { font-size: .72rem; letter-spacing: .06em; }
.answer .headline { font-size: 1.15rem; }
.amt { font-weight: 600; letter-spacing: .005em; }

/* ---------- segmented coverage bar ---------- */
.covbar { display: flex; gap: 3px; margin: .3rem 0 .15rem; max-width: 260px; }
.covbar .seg { flex: 1 1 0; max-width: 26px; height: 7px; border-radius: 2px;
  border: 1px solid var(--line-2); background: var(--panel); }
.covbar .seg.on   { background: var(--good); border-color: var(--good); }
.covbar .seg.part { border-color: var(--wait);
  background: repeating-linear-gradient(90deg, var(--wait) 0 2px, var(--wait-soft) 2px 5px); }
.covbar .seg.stop { border-color: var(--bad);
  background: repeating-linear-gradient(45deg, var(--bad) 0 3px, var(--bad-soft) 3px 6px); }
@media (forced-colors: active) {
  .covbar .seg { forced-color-adjust: none; border: 1px solid CanvasText; background: Canvas; }
  .covbar .seg.on { background: CanvasText; }
  .covbar .seg.part { background: repeating-linear-gradient(90deg, CanvasText 0 2px, Canvas 2px 5px); }
  .covbar .seg.stop { background: repeating-linear-gradient(45deg, CanvasText 0 3px, Canvas 3px 6px); }
}

/* ---------- deadline countdown ---------- */
.due-in { display: inline-flex; gap: .3rem; align-items: baseline; white-space: nowrap; }
.due-in .g { font-size: .78em; font-weight: 700; }
.due-in.act { color: var(--warn); font-weight: 600; }
.due-in.bad { color: var(--bad); font-weight: 650; }

/* ---------- state-communicating motion, and only that ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* A fold opening: the eye tracks what the click revealed. Native details
     toggle, once per open; engines without the feature simply snap, as now. */
  :root { interpolate-size: allow-keywords; }
  details.receipt::details-content,
  details.actions-fold::details-content {
    transition: height .18s ease, content-visibility .18s allow-discrete;
    height: 0; overflow: clip;
  }
  details[open]::details-content { height: auto; }
  /* The toast is the one element that truly enters. It rises once. */
  .toast { animation: toast-in .18s ease-out; }
  /* A screen change: 120ms crossfade says the page changed, without theatre. */
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .12s; }
}
@keyframes toast-in { from { transform: translate(-50%, .4rem); opacity: 0; } }

/* ---------- subtractions: chrome stops competing with state ---------- */
:root {
  /* One hairline, not a 24px bloom: elevation reads document, not dashboard. */
  --shadow: 0 1px 2px light-dark(rgba(20,16,13,.07), rgba(0,0,0,.35));
  /* 14px corners are consumer; 8 and 10 are instrument. */
  --radius: 8px;
  --radius-lg: 10px;
}
/* Current page: an ink label with a rule under it, not a filled accent pill. */
nav.mainnav button[aria-current="page"] {
  background: none;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent-strong);
  border-radius: 0;
}
/* Action numbers are an index, not an alert. */
.action-n { background: none; border: 1px solid var(--line-2); color: var(--ink-3); }

/* ================= owner cockpit refresh, 2026-08-27 =================
   Home should show the product's value before it asks the owner to read. The
   hero is a compact command surface: one next move and three figures, all
   derived from the same records rendered below it. */

.app { max-width: 1240px; padding-inline: 1.5rem; }

header.topbar {
  margin-top: .75rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: light-dark(rgba(255,254,251,.94), rgba(30,25,21,.94));
  box-shadow: 0 10px 32px light-dark(rgba(31,22,15,.06), rgba(0,0,0,.22));
}

.scopebar {
  margin: .65rem 0 1.25rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: light-dark(rgba(255,254,251,.72), rgba(30,25,21,.72));
}

.scopebar-label {
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .68rem;
}

.home-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr);
  gap: 1.5rem;
  margin: .1rem 0 1.3rem;
  padding: clamp(1.4rem, 3vw, 2.15rem);
  border: 1px solid light-dark(#2f251f, #503a2d);
  border-radius: 16px;
  color: #fffaf4;
  background:
    radial-gradient(circle at 90% 0, rgba(208,111,55,.22), transparent 19rem),
    linear-gradient(135deg, #17120f 0%, #251913 58%, #312016 100%);
  box-shadow: 0 18px 46px rgba(24,16,11,.16);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -5rem;
  width: 17rem;
  height: 17rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero-copy { position: relative; z-index: 1; min-width: 0; }
.home-kicker {
  margin: 0 0 .35rem;
  color: #dda17a;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-hero h1 {
  max-width: 14ch;
  color: #fffaf4;
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.home-lede {
  max-width: 44rem;
  margin: .75rem 0 1.25rem;
  color: #d9cec5;
  font-size: .94rem;
}
.home-next {
  display: flex;
  align-items: center;
  max-width: 45rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.14);
}
.btn.hero-review {
  flex: none;
  background: #fffaf4;
  color: #17120f;
  border-color: #fffaf4;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.btn.hero-review:hover { background: #f0dfd1; }

.home-scoreboard {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: stretch;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(8px);
}
.home-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .08rem .8rem;
  align-items: center;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.11);
}
.home-stat:last-child { border-bottom: 0; }
.home-stat-label {
  color: #cfc2b8;
  font-size: .73rem;
  font-weight: 650;
}
.home-stat-value {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #fffaf4;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -.03em;
}
.home-stat small { color: #9f9186; font-size: .69rem; }
.home-stat.stat-attention .home-stat-value { color: #f1bd72; }
.home-stat.stat-good .home-stat-value { color: #91d5b6; }

.home-hero + .paused-banner,
.home-hero + .critical { margin-top: 0; }

.grid-2 { gap: 1.35rem; }
.surface,
.card,
.glance {
  border-color: light-dark(#ddd5ca, #40362e);
}
.askpanel {
  border-top-width: 1px;
  padding: 1.2rem 1.25rem 1.1rem;
  box-shadow: 0 12px 34px light-dark(rgba(31,22,15,.075), rgba(0,0,0,.25));
}
.askpanel::before {
  content: "EXPLORE YOUR BRAIN";
  display: block;
  margin-bottom: .35rem;
  color: var(--accent-strong);
  font-size: .64rem;
  font-weight: 750;
  letter-spacing: .12em;
}
.askpanel .scopefind {
  border-color: var(--line-2);
  background: var(--paper);
  padding-inline: .8rem;
}
.glance {
  padding: 1.15rem 1.2rem;
  background: light-dark(#f0ece5, #1b1613);
  box-shadow: inset 0 1px 0 light-dark(rgba(255,255,255,.8), rgba(255,255,255,.025));
}
.glance .section-head { padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
.linkrow {
  margin-inline: -.45rem;
  width: calc(100% + .9rem);
  padding: .78rem .45rem;
  border-radius: 7px;
}
.linkrow:hover { background: var(--panel); }
.linkrow strong { font-size: .9rem; }
.linkrow small { line-height: 1.45; }
.actions-fold > summary {
  margin-top: .2rem;
  padding: .8rem .7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: light-dark(rgba(255,254,251,.65), rgba(30,25,21,.65));
}
.actions-fold[open] > summary { margin-bottom: .75rem; border-color: var(--line-2); }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-scoreboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,.11);
  }
  .home-stat:last-child { border-right: 0; }
  .home-stat-value { order: -1; }
}

@media (max-width: 640px) {
  .app { padding-inline: .85rem; }
  header.topbar {
    margin-top: .55rem;
    padding: .65rem;
    border-radius: 10px;
    background: var(--panel);
  }
  .scopebar { margin-top: .55rem; }
  .home-hero {
    margin-top: .2rem;
    padding: 1.25rem;
    border-radius: 13px;
  }
  .home-hero h1 { font-size: 2rem; }
  .btn.hero-review { width: 100%; }
  .pause-dialog[open] { grid-template-columns: 1fr; }
  .pause-dialog-actions .btn { width: 100%; }
  .home-scoreboard {
    grid-template-columns: 1fr;
    background: rgba(255,255,255,.045);
  }
  .home-stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.11);
  }
  .home-stat:last-child { border-bottom: 0; }
  .home-stat-value { order: initial; }
  .askpanel::before { margin-bottom: .25rem; }
}
