/* Orthic Systems · the product page, the FAQs, the company page and the legal pages.
   Everything shared (fonts, tokens, type, buttons, status chips, header, sub-nav, footer, pilot band) is in site.css,
   which loads first. This file is only these pages' own sections and the Orthic Flow demos. Older names used by the
   demo rules are kept as aliases of the shared tokens. */
:root {
  --green: var(--forest); --green-2: var(--forest-2); --green-line: var(--forest-line); --on-green: var(--on-forest); --on-green-2: var(--on-forest-2);
  --card: var(--sheet); --card-2: var(--sheet-2); --graphite: var(--ink-2); --radius: var(--r-3); --radius-lg: var(--r-4);
  --ease: var(--ease-out); --space: var(--section); --shadow-card: var(--shadow-float);
}

/* ------------------------------------------------------------------ hero: one display line, the copy and its buttons together */
.hero { padding: calc(var(--hdr) + clamp(40px, 6vw, 88px)) 0 clamp(40px, 5vw, 72px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 5vw, 80px); align-items: end; }
.hero__title { max-width: 14em; }
.hero__side { display: grid; gap: 22px; }
.hero__lede { color: var(--text-2); max-width: 34rem; }
.ev { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--text-2);
  border: 1px solid var(--line); border-radius: var(--r-3); padding: 2px 7px; background: var(--card); white-space: nowrap; }
.ev::before { content: ""; width: 9px; height: 11px; border: 1.2px solid currentColor; border-radius: 1.5px; opacity: 0.7; }
.ev--ok { color: var(--ok); }
.ev--dark { color: var(--mint); background: transparent; border-color: rgb(255 255 255 / 0.16); }
a.ev:hover { border-color: var(--ok); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-3); font-size: 0.75rem; font-weight: 500; }
.chip--quiet { background: var(--quiet-bg); color: var(--quiet); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.arrow { color: var(--muted); }
.t-review { color: var(--review); } .t-flag { color: var(--flag); }
.muted { color: var(--muted); font-weight: 400; }
.tone-night .lede, .tone-night .caption { color: var(--on-night-2); }

/* ------------------------------------------------------------------ chapter: the stage (ink) */
.stage__lede { margin-top: 20px; max-width: 52ch; }
.stage__view { margin-top: clamp(40px, 5vw, 64px); }
.stage__frame { position: relative; }
.app { position: relative; border-radius: var(--r-4); background: var(--card); color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-float);
  font-size: 0.8125rem; line-height: 1.45; }
.app__bar { display: flex; align-items: center; gap: 22px; height: 48px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.app__logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 640; }
.app__crumbs { display: flex; gap: 8px; color: var(--muted); }
.app__crumbs > * + *::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.app__crumbs b { color: var(--ink); font-weight: 500; }
.app__meta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app__fy { font-weight: 500; border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px; }
.app__avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--graphite); color: var(--paper); display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; }
.app__body { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.app__side { padding: 18px 12px; border-right: 1px solid var(--line); background: var(--card-2); border-bottom-left-radius: var(--radius-lg); display: grid; align-content: start; gap: 2px; color: var(--text-2); }
.app__side li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 7px; }
.app__side li.is-on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.app__side b { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; color: var(--muted); }
.app__side b.warn { color: var(--flag); }
.app__main { padding: 24px 26px 30px; min-width: 0; }
.app__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.app__title { font-size: 1.25rem; font-weight: 640; letter-spacing: -0.02em; }
.app__sub { color: var(--muted); margin-top: 2px; }
.metrics { display: grid; grid-template-columns: repeat(4, auto); gap: 0 28px; }
.metrics dt { color: var(--muted); font-size: 0.75rem; }
.metrics dd { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 22px; }
.filters button { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text-2);
  font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: background-color 180ms var(--ease), color 180ms, border-color 180ms; }
.filters button:hover { border-color: var(--line-2); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters__count { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.grid-table { width: 100%; margin-top: 12px; font-variant-numeric: tabular-nums; }
.grid-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.75rem; padding: 0 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table .num { text-align: right; }
.grid-table tbody tr { cursor: pointer; }
.grid-table tbody tr td { transition: background-color 180ms var(--ease); }
.grid-table tbody tr:hover td { background: rgb(13 16 19 / 0.025); }
.grid-table tbody tr.is-selected td { background: rgb(31 107 82 / 0.075); }
.grid-table tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.rowpick { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; border-radius: 4px; }
.rowpick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.peek { position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(-64px, -4vw, -28px); width: 380px; background: var(--night-2); color: var(--on-night);
  border-radius: 14px; padding: 18px 18px 16px; box-shadow: 0 40px 70px -24px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(255 255 255 / 0.08) inset; }
.tone-night .app .peek .id { color: var(--mint); }
.peek__k { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-night-muted); }
.peek__head { margin-top: 4px; font-weight: 600; display: flex; align-items: baseline; }
.peek__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.peek__pair > div { background: var(--night-3); border-radius: 10px; padding: 11px 12px; display: grid; gap: 2px; align-content: start; }
.peek__pair span { color: var(--on-night-muted); font-size: 0.75rem; }
.peek__pair b { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.peek__pair small { color: var(--on-night-2); font-size: 0.75rem; }
.peek__pair small.t-review { color: var(--amber); }
.peek__foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.peek [data-swap] { transition: opacity 220ms var(--ease), transform 300ms var(--ease); }
.peek.is-swapping [data-swap] { opacity: 0; transform: translateY(4px); }
.callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: clamp(96px, 9vw, 128px); }
.callout { position: relative; padding-top: 18px; border-top: 1px solid var(--night-line); display: grid; gap: 4px; }
.callout b { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.callout span { color: var(--on-night-muted); font-size: 0.9375rem; max-width: 32ch; }
.caption { margin-top: 40px; font-size: 0.8125rem; color: var(--on-night-muted); }

/* the problem: a pile that resolves into one record */
.converge { margin-top: var(--space); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.converge .lede { margin-top: 24px; }
.converge .lede + .lede { margin-top: 16px; }
.converge .btn { margin-top: 32px; }
.board { position: relative; height: 560px; }
.board__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.board__lines path { fill: none; stroke: var(--mint); stroke-width: 1.2; stroke-opacity: 0.7; stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 900ms var(--ease) 250ms; }
.board.is-joined .board__lines path { stroke-dashoffset: 0; }
.frag { position: absolute; width: 46%; background: var(--night-2); border: 1px solid var(--night-line); border-radius: 12px; padding: 16px 18px; font-size: 0.8125rem;
  box-shadow: 0 30px 50px -30px rgb(0 0 0 / 0.8); transition: transform 900ms var(--ease), opacity 600ms var(--ease); }
.frag[data-k="sheet"] { left: 0; top: 0; }
.frag[data-k="tally"] { right: 0; top: 0; }
.frag[data-k="invoice"] { left: 0; bottom: 0; }
.frag[data-k="floor"] { right: 0; bottom: 0; }
/* scattered: the four records lie piled near the centre */
.board:not(.is-joined) .frag[data-k="sheet"] { transform: translate(28%, 52%) rotate(-7deg); }
.board:not(.is-joined) .frag[data-k="tally"] { transform: translate(-30%, 66%) rotate(5deg); }
.board:not(.is-joined) .frag[data-k="invoice"] { transform: translate(34%, -46%) rotate(4deg); }
.board:not(.is-joined) .frag[data-k="floor"] { transform: translate(-24%, -58%) rotate(-4deg); }
.board.is-joined .frag { opacity: 0.6; }
.frag__src { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.75rem; color: var(--on-night-muted); margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frag__kind { flex: none; font-size: 0.75rem; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; color: var(--on-night); }
.frag--sheet .frag__kind { background: rgb(79 154 116 / 0.3); } .frag--tally .frag__kind { background: rgb(127 143 216 / 0.3); }
.frag--invoice .frag__kind { background: rgb(201 167 106 / 0.3); } .frag--floor .frag__kind { background: rgb(154 160 168 / 0.3); }
.frag dl { display: grid; gap: 6px; }
.frag dl div { display: flex; justify-content: space-between; gap: 12px; }
.frag dt { color: var(--on-night-muted); }
.frag dd { font-variant-numeric: tabular-nums; text-align: right; }
.frag dd.hl { color: var(--ember-glow); }
.frag__cells div { justify-content: flex-start !important; align-items: center; }
.frag__cells dt { font-family: var(--mono); font-size: 0.75rem; width: 22px; text-align: center; padding: 1px 0; border-radius: 4px; background: rgb(255 255 255 / 0.08); }
.frag__cells dd { flex: 1; text-align: left; padding: 3px 8px; border-bottom: 1px solid var(--night-line); }
.joined { position: absolute; left: 50%; top: 50%; width: min(400px, 64%); z-index: 2; background: var(--card); color: var(--ink); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 50px 90px -30px rgb(0 0 0 / 0.85); font-size: 0.875rem; opacity: 0; visibility: hidden; transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 500ms var(--ease) 350ms, transform 700ms var(--ease) 350ms, visibility 0s linear 1050ms; }
.board.is-joined .joined { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 450ms, 450ms, 0s; }
.joined__k { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.joined__head { font-weight: 640; font-size: 1.0625rem; margin-top: 4px; }
.joined__rows { margin-top: 10px; display: grid; }
.joined__rows li { display: grid; grid-template-columns: 6.5em 1fr auto; gap: 0 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.joined__rows span { color: var(--muted); }
.joined__rows b { font-weight: 500; font-variant-numeric: tabular-nums; }
.joined__rows em { font-style: normal; display: flex; gap: 4px; }
.joined__rows em i { font-style: normal; font-family: var(--mono); font-size: 0.75rem; padding: 1px 5px; border-radius: 4px; background: var(--quiet-bg); color: var(--quiet); }
.joined__flag { margin-top: 10px; display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 0.8125rem; line-height: 1.5; }
.joined__flag .state { flex: none; margin-top: 1px; }

/* ------------------------------------------------------------------ chapter: the working (ledger green) */
.working .lede { color: var(--on-green-2); margin-top: 24px; max-width: 48ch; }
.working__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(40px, 6vw, 96px); align-items: end; }
.working__head .lede { margin-top: 0; }
@media (max-width: 960px) { .working__head > p:last-child, .caps__head > p:last-child, .intel__head > p:last-child { margin-top: 20px; } }
.working .id { color: var(--mint); }
.sheet { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "result tax" "ledger tax" "control control";
  gap: clamp(28px, 4vw, 56px) clamp(40px, 6vw, 96px); padding-top: 28px; border-top: 1px solid var(--green-line); }
.sheet__result { grid-area: result; }
.sheet__asset { font-size: 0.9375rem; color: var(--on-green-2); }
.sheet__figure { display: block; margin-top: 8px; font-size: clamp(3.5rem, 0.6rem + 10vw, 10.5rem); letter-spacing: -0.035em; line-height: 0.9; font-variant-numeric: tabular-nums; font-weight: 500; }
.sheet__caption { margin-top: 12px; font-size: var(--t-caption); color: var(--on-green-2); }
.ledger { grid-area: ledger; border-top: 1px solid var(--green-line); counter-reset: none; }
.ledger li { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; grid-template-areas: "op k v" "op s v"; gap: 0 12px; padding: 14px 0; border-bottom: 1px solid var(--green-line); align-items: center; }
.ledger__op { grid-area: op; font-size: 1.25rem; color: var(--mint); text-align: center; }
.ledger__k { grid-area: k; font-size: 1.0625rem; font-weight: 500; }
.ledger__src { grid-area: s; font-family: var(--mono); font-size: 0.75rem; color: var(--on-green-2); }
.ledger b { grid-area: v; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; text-align: right; }
.ledger__sub b { color: var(--on-green-2); }
.ledger__total { border-bottom: 0 !important; border-top: 2px solid var(--on-green); margin-top: -1px; }
.ledger__total .ledger__k, .ledger__total b { font-weight: 640; }
.ledger [data-flash] { transition: color 500ms var(--ease); }
.ledger .is-flash { color: var(--mint); transition-duration: 0ms; }
.sheet__tax { grid-area: tax; align-self: start; background: var(--green-2); border-radius: var(--radius-lg); padding: clamp(22px, 2.6vw, 32px); box-shadow: inset 0 0 0 1px var(--green-line); }
.sheet__tax-k { font-size: 0.9375rem; color: var(--on-green-2); }
.sheet__tax-figure { display: block; margin-top: 10px; font-size: clamp(2.5rem, 1rem + 3.6vw, 4.5rem); letter-spacing: -0.03em; line-height: 0.95; font-variant-numeric: tabular-nums; font-weight: 500; }
.sheet__tax-figure.is-shift { animation: shift 620ms var(--ease); }
@keyframes shift { 0% { color: var(--amber); transform: translateY(-4px); } 100% { color: var(--on-green); transform: none; } }
.sheet__tax-w { margin-top: 12px; font-size: 0.9375rem; color: var(--on-green-2); transition: color 300ms; }
.sheet__tax-w.t-review { color: var(--amber); }
.sheet__tax-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--green-line); font-size: 0.875rem; color: var(--on-green-2); }
.sheet__control { grid-area: control; }
.sheet__control label { display: flex; justify-content: space-between; align-items: baseline; color: var(--on-green-2); font-size: 0.9375rem; }
.sheet__control label output { color: var(--on-green); font-size: 1.5rem; font-weight: 560; font-stretch: var(--cond); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.track { position: relative; margin-top: 14px; height: 32px; --fill: 53.3%; --cut: 50.8%; }
.track::before, .track::after { content: ""; position: absolute; left: 0; top: 14px; height: 4px; border-radius: 4px; }
.track::before { right: 0; background: rgb(238 243 236 / 0.18); }
.track::after { width: var(--fill); background: var(--on-green); }
.track__half { position: absolute; top: 14px; height: 4px; left: var(--cut); right: 0; background: rgb(226 176 98 / 0.35); border-radius: 0 4px 4px 0; }
.track input { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; z-index: 2; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.track input::-webkit-slider-runnable-track { height: 32px; background: transparent; }
.track input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: 3px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 6px rgb(255 255 255 / 0.12), 0 6px 16px rgb(0 0 0 / 0.4); transition: transform 160ms var(--ease), box-shadow 200ms; }
.track input:active::-webkit-slider-thumb { transform: scale(1.14); box-shadow: 0 0 0 9px rgb(255 255 255 / 0.16), 0 6px 16px rgb(0 0 0 / 0.4); }
.track input::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgb(255 255 255 / 0.12), 0 6px 16px rgb(0 0 0 / 0.4); }
.track input::-moz-range-track { background: transparent; }
.track input:focus-visible { outline: none; }
.track input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--mint); }
.track__scale { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 0.75rem; color: var(--on-green-2); }
.track__scale span:nth-child(2) { color: var(--amber); }
.sheet__help { margin-top: 12px; color: var(--on-green-2); font-size: 0.9375rem; max-width: 70ch; }
.working__note { margin-top: 48px; font-size: 0.8125rem; color: var(--on-green-2); max-width: 100ch; }

/* ------------------------------------------------------------------ workflow: a horizontal rail */
.rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line-2); }
.step { all: unset; box-sizing: border-box; display: grid; gap: 8px; align-content: start; padding: 22px 24px 22px 0; cursor: pointer; }
.step__n { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); transition: color 250ms; }
.step__t { font-size: 1.1875rem; font-weight: 560; letter-spacing: -0.015em; line-height: 1.25; color: var(--muted); transition: color 250ms; max-width: 14em; }
.step:hover .step__t { color: var(--ink); }
.step[aria-selected="true"] .step__t { color: var(--ink); }
.step[aria-selected="true"] .step__n { color: var(--accent); }
.step:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rail__bar { position: absolute; left: 0; top: -1px; width: 100%; height: 2px; pointer-events: none; }
.rail__bar i { display: block; width: 25%; height: 100%; background: var(--ink); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform 600ms var(--ease); }
.panels { margin-top: clamp(28px, 3vw, 40px); display: grid; }
.panels > .panel { grid-area: 1 / 1; }
.panels > .panel[hidden] { display: grid !important; visibility: hidden; pointer-events: none; }
.panel__say { align-self: start; }
.panel .win { display: flex; flex-direction: column; }
.win__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--card-2); color: var(--text-2); font-size: 0.8125rem; }
.win__foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 960px) { .panel { grid-template-rows: auto 1fr; } }
@media (max-width: 640px) {
  .panels > .panel[hidden] { display: none !important; }
  .panel .win { display: block; }
}
.panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.panel__say { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--graphite); text-wrap: pretty; padding-top: 6px; }
.panel.from-right { animation: from-right 560ms var(--ease) both; }
.panel.from-left { animation: from-left 560ms var(--ease) both; }
@keyframes from-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes from-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.win { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); font-size: 0.875rem; overflow: hidden; }
.win__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.win__head b { font-weight: 640; }
.srcs li, .issues li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.srcs li:first-child, .issues li:first-child { border-top: 0; }
.srcs__kind { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); color: var(--text-2); }
.srcs b, .issues b { font-weight: 500; display: block; }
.srcs small, .issues small { color: var(--muted); font-size: 0.8125rem; }
.issues li { grid-template-columns: 7.2em minmax(0, 1fr); }
.issues .state { justify-self: start; }
.calcs { display: grid; grid-template-columns: 1fr 1fr; }
.calcs > div { padding: 20px; }
.calcs > div + div { border-left: 1px solid var(--line); }
.calcs__name { color: var(--muted); font-size: 0.8125rem; }
.calcs__val { font-size: 1.875rem; font-weight: 500; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.calcs__work { margin-top: 14px; display: grid; }
.calcs__work li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.calcs__work span { color: var(--muted); }
.calcs__work b { font-weight: 500; }
.evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--card-2); }
.evidence > span:first-child { color: var(--muted); font-size: 0.8125rem; margin-right: 4px; }
.filelist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 13px 20px; border-top: 1px solid var(--line); align-items: center; }
.filelist li:first-child { border-top: 0; }
.filelist span:first-child { font-weight: 500; }
.filelist em { grid-row: 2; font-style: normal; color: var(--muted); font-size: 0.8125rem; }
.filelist .state { grid-column: 2; grid-row: 1 / span 2; }

/* ------------------------------------------------------------------ capabilities: asymmetric */
.caps__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(40px, 6vw, 96px); align-items: end; }
.caps__grid { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto auto;
  gap: 0 clamp(40px, 6vw, 96px); }
.cap { padding: 28px 0 40px; border-top: 1px solid var(--ink); }
.cap p { margin-top: 12px; color: var(--text-2); max-width: 46ch; }
.cap--recon { grid-row: 1 / span 3; }
.cap--register, .cap--dep, .cap--audit { border-top-color: var(--line-2); }
.cap--register { border-top-color: var(--ink); }
.finding { margin-top: 28px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 24px; font-size: 0.875rem; }
.finding p { margin-top: 0; max-width: none; color: inherit; }
.finding__title { margin-top: 12px !important; font-size: 1.1875rem; font-weight: 640; letter-spacing: -0.015em; }
.finding__rows { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.finding__rows div { padding: 12px 14px; display: flex; gap: 4px; align-items: baseline; }
.finding__rows div + div { border-top: 1px solid var(--line); }
.finding__rows em { font-style: normal; color: var(--text-2); }
.finding__label { margin-top: 16px !important; color: var(--muted) !important; font-size: 0.8125rem; }
.finding__text { margin-top: 2px !important; }
.seg { display: inline-flex; margin-top: 18px; padding: 3px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms, box-shadow 200ms; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(13 16 19 / 0.12), 0 0 0 1px var(--line); }
.seg button:hover { color: var(--ink); }
.seg button:active { transform: scale(0.96); }
.finding__status { margin-top: 12px !important; color: var(--muted) !important; font-size: 0.8125rem; }
.record { margin-top: 18px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; font-size: 0.875rem; overflow: hidden; }
.record__head { display: flex; align-items: center; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.record__head b { font-weight: 640; margin-right: auto; }
.record__change { margin-top: 0 !important; padding: 12px 18px; color: var(--text-2); font-size: 0.8125rem; background: var(--card-2); }
.record__change span { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-right: 10px; }
.record__change s { color: var(--flag); }
.index { margin-top: 16px; }
.index li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.index span { font-weight: 500; }
.index b { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); color: var(--text-2); }

/* ------------------------------------------------------------------ document intelligence (ink) */
.intel__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(40px, 6vw, 96px); align-items: end; }
.intel__grid { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.doc__paper { background: #f6f3ea; color: #1b1e22; border-radius: 4px; padding: clamp(22px, 3vw, 40px); font-size: 0.875rem; line-height: 1.5;
  box-shadow: 0 60px 90px -40px rgb(0 0 0 / 0.85); transform: rotate(-1.2deg); transition: transform 800ms var(--ease); }
.doc:hover .doc__paper { transform: rotate(0deg); }
.doc__top { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid #d8d2c4; }
.doc__top > div { display: grid; gap: 2px; }
.doc__top b { font-size: 1rem; }
.doc__top small, .doc__to { color: #5c6168; }
.doc__meta { text-align: right; }
.doc__to { margin-top: 14px; }
.doc__table { width: 100%; margin-top: 16px; font-variant-numeric: tabular-nums; }
.doc__table th { text-align: left; font-weight: 500; color: #5c6168; font-size: 0.75rem; padding-bottom: 6px; border-bottom: 1px solid #d8d2c4; }
.doc__table td { padding: 10px 0; border-bottom: 1px solid #d8d2c4; }
.doc__table th:not(:first-child), .doc__table td:not(:first-child) { text-align: right; }
.doc__sum { margin: 16px 0 0 auto; width: min(270px, 100%); display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.doc__sum div { display: flex; justify-content: space-between; padding: 3px 6px; }
.doc__sum div[data-f="total"] { font-weight: 640; border-top: 1px solid #1b1e22; margin-top: 4px; padding-top: 7px; }
.doc__sum dt { color: #5c6168; }
.doc [data-f] { border-radius: 4px; transition: box-shadow 250ms var(--ease), background-color 250ms var(--ease); }
.doc [data-f].is-lit { background: var(--ember-wash); box-shadow: 0 0 0 1.5px var(--ember); }   /* the place on the page being looked at */
.doc__caption { margin-top: 18px; color: var(--on-night-muted); font-size: 0.8125rem; }
.fields__list { border-top: 1px solid var(--on-night-2); }
.fields__list li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--night-line);
  font-size: 0.9375rem; border-radius: 6px; transition: background-color 200ms; }
.fields__list li:hover, .fields__list li.is-lit, .fields__list li:focus-visible { background: rgb(255 255 255 / 0.05); }
.fields__list li > span:first-child { color: var(--on-night-muted); font-size: 0.875rem; }
.fields__list b { font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fields__list b.muted { color: var(--on-night-muted); }
.fields__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.fields__note { margin-top: 16px; color: var(--on-night-muted); font-size: 0.875rem; max-width: 56ch; }

/* ------------------------------------------------------------------ approach: a typographic manifesto */
.manifesto { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--ink); }
.manifesto li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22em); grid-template-areas: "line token" "line say"; gap: 6px clamp(32px, 5vw, 80px);
  padding: clamp(22px, 2.6vw, 34px) 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.manifesto__line { grid-area: line; font-weight: 600; font-stretch: var(--cond); font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); letter-spacing: -0.015em; line-height: 1.15; }
.manifesto__token { grid-area: token; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; align-self: end; }
.manifesto__token .mono { font-size: 0.8125rem; color: var(--text-2); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.manifesto__say { grid-area: say; color: var(--text-2); align-self: start; }
.status { margin-top: clamp(80px, 10vw, 140px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(40px, 6vw, 96px); }
.status__head p { margin-top: 12px; color: var(--text-2); max-width: 40ch; }
.status__more { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.status__more:hover { color: var(--ink); }
.status__table { width: 100%; border-top: 1px solid var(--ink); }
.status__table thead th { text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--muted); padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.status__table thead th:last-child { text-align: right; }
.status__table tbody th { text-align: left; font-weight: 400; padding: 15px 16px 15px 0; border-bottom: 1px solid var(--line-2); }
.status__table td { text-align: right; padding: 15px 0; border-bottom: 1px solid var(--line-2); }

/* ------------------------------------------------------------------ company */
.company { padding: clamp(80px, 9vw, 128px) 0; background: var(--paper-2); }
.company__title { font-size: clamp(2.25rem, 0.9rem + 4vw, 5rem); letter-spacing: -0.035em; line-height: 0.95; max-width: 12em; text-wrap: balance; }
.company__say { margin-top: 24px; font-size: var(--t-lede); color: var(--text-2); max-width: 46ch; }
.facts { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.facts div { border-top: 1px solid var(--ink); padding-top: 14px; display: grid; gap: 4px; }
.facts dt { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.facts dd { color: var(--ink); }
.facts a { border-bottom: 1px solid var(--line-2); transition: border-color 200ms; }
.facts a:hover { border-color: var(--ink); }

/* ------------------------------------------------------------------ closing + footer */
.close__row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 32px; align-items: end; margin-top: clamp(40px, 5vw, 72px);
  padding-top: 28px; border-top: 1px solid var(--night-line); }
.close__row .actions { justify-content: flex-end; gap: 20px 24px; }

/* ------------------------------------------------------------------ laptop */
@media (max-width: 1180px) {
  .app__side { display: none; }
  .app__body { grid-template-columns: minmax(0, 1fr); }
  .grid-table .c-cat { display: none; }
  .metrics { gap: 0 18px; }
  .metrics dd { font-size: 1.25rem; }
}

/* ------------------------------------------------------------------ tablet */
@media (max-width: 960px) {
  .hero__foot { grid-template-columns: 1fr; }
  .hero__foot .actions { justify-content: flex-start; }
  .app__crumbs, .app__meta .chip { display: none; }
  .app__head { flex-direction: column; align-items: flex-start; }
  .grid-table .c-ev { display: none; }
  .peek { width: 340px; }
  .callouts { grid-template-columns: 1fr; gap: 28px; margin-top: 96px; }
  .converge, .working__head, .sheet, .panel, .caps__head, .caps__grid, .intel__head, .intel__grid, .status, .close__row { grid-template-columns: minmax(0, 1fr); }
  .sheet { grid-template-areas: "result" "ledger" "tax" "control"; }
  .caps__grid { grid-template-rows: none; }
  .cap--recon { grid-row: auto; }
  .board { max-width: 640px; }
  .manifesto li { grid-template-columns: 1fr; grid-template-areas: "line" "token" "say"; }
  .manifesto__token { margin-top: 8px; }
  .close__row .actions { justify-content: flex-start; }
  .facts { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
    }

/* ------------------------------------------------------------------ phone */
@media (max-width: 640px) {
  .actions .btn { flex: 1 1 auto; }
  .app__bar { gap: 12px; padding: 0 14px; }
  .app__btns, .app__avatar { display: none; }
  .app__main { padding: 16px 14px 18px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px 16px; width: 100%; }
  .filters__count { width: 100%; margin: 4px 0 0; }
  .filters button { height: 36px; }
  .grid-table thead { display: none; }
  .grid-table .c-date, .grid-table .c-book { display: none; }
  .grid-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a s" "c s"; padding: 8px 0 8px 10px; border-bottom: 1px solid var(--line); }
  .grid-table tr:last-child { border-bottom: 0; }
  .grid-table td { padding: 0; border: 0; white-space: normal; background: none !important; }
  .grid-table td:first-child { grid-area: a; font-weight: 500; box-shadow: none !important; }
  .grid-table td.num:not(.c-book) { grid-area: c; color: var(--muted); }
  .grid-table td.num:not(.c-book)::before { content: "₹"; }
  .grid-table td:last-child { grid-area: s; align-self: center; }
  .grid-table tbody tr.is-selected { box-shadow: inset 2px 0 0 var(--accent); background: rgb(31 107 82 / 0.075); }
  .rowpick { min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; }
  .peek { position: relative; right: auto; bottom: auto; width: auto; margin: 0 12px 12px; }
  .peek__pair { grid-template-columns: 1fr; }
  .callouts { margin-top: 48px; }
    .board__lines { display: none; }
  .frag, .joined { position: relative; inset: auto; width: 100%; transform: none !important; left: auto; top: auto; }
  .board:not(.is-joined) .frag:nth-child(odd) { transform: rotate(-1deg) !important; }
  .board:not(.is-joined) .frag:nth-child(even) { transform: rotate(1deg) !important; }
  .joined { display: none; order: 9; }
  .board.is-joined .joined { display: block; }
  .board.is-joined .frag { opacity: 0.45; }
  .ledger li { grid-template-columns: 1.6em minmax(0, 1fr) auto; }
  .ledger b { font-size: 1.0625rem; }
  .ledger__k { font-size: 1rem; }
  .track__scale span:nth-child(2) { display: none; }
  .rail { grid-template-columns: 1fr 1fr; border-top: 0; gap: 0 16px; }
  .rail__bar { display: none; }
  .step { padding: 14px 0; border-top: 1px solid var(--line-2); }
  .step[aria-selected="true"] { border-top: 2px solid var(--ink); padding-top: 13px; }
  .step__t { font-size: 1rem; }
  .srcs li { grid-template-columns: auto minmax(0, 1fr); }
  .srcs li .state { grid-column: 2; justify-self: start; }
  .issues li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .calcs { grid-template-columns: 1fr; }
  .calcs > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .finding__rows div { flex-direction: column; }
  .doc__paper { transform: none; }
  .fields__list li { grid-template-columns: minmax(0, 1fr) auto; }
  .fields__list li > span:first-child { grid-column: 1 / -1; }
  .status__table .state { white-space: normal; height: auto; padding: 3px 8px; text-align: left; }
  .facts { grid-template-columns: 1fr; }
  }

/* ------------------------------------------------------------------ legal pages
   Same paper, ink and type as the site. The display voice titles the page; reading text
   stays in the regular face at a comfortable measure. Details awaiting confirmation are
   marked in amber so they cannot be published by accident. */

.lhero { padding: calc(var(--hdr) + clamp(40px, 6vw, 88px)) 0 clamp(36px, 4.5vw, 64px); border-bottom: 1px solid var(--line-2); }
.lhero__title { font-size: var(--t-display); font-weight: 600; font-stretch: var(--cond); letter-spacing: -0.03em; line-height: 1; max-width: 16em; text-wrap: balance; }
.lhero__lede { margin-top: 22px; font-size: var(--t-lede); line-height: 1.6; color: var(--text-2); max-width: 56ch; text-wrap: pretty; }
.lhero__meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--t-caption); color: var(--muted); }

.lbody { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 112px); padding-top: clamp(40px, 5vw, 72px); padding-bottom: var(--space); }
.lside { position: sticky; top: calc(var(--hdr) + 32px); align-self: start; display: grid; gap: 36px; }
.lside__h { font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.ldocs { display: grid; gap: 2px; }
.ldocs a { display: block; padding: 8px 12px; margin-left: -12px; border-radius: 8px; font-size: 0.9375rem; color: var(--text-2); transition: background 200ms, color 200ms; }
.ldocs a:hover { background: var(--paper-2); color: var(--ink); }
.ldocs a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 500; }
.ltoc { display: grid; gap: 8px; font-size: 0.875rem; border-left: 1px solid var(--line-2); padding-left: 16px; }
.ltoc a { color: var(--muted); transition: color 200ms; }
.ltoc a:hover { color: var(--ink); }

.ldoc { max-width: 36rem; font-size: 1.0625rem; line-height: 1.7; color: var(--text-2); }
.ldoc > * + * { margin-top: 18px; }
.ldoc h2 { scroll-margin-top: calc(var(--hdr) + 32px); margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-2); font-size: clamp(1.625rem, 1.3rem + 1vw, 2.25rem); font-weight: 600; font-stretch: var(--cond); letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); }
.ldoc h2:first-child, .ldoc .lshort + h2 { margin-top: 48px; }
.ldoc h3 { margin-top: 32px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.ldoc strong { color: var(--ink); font-weight: 600; }
.ldoc a:not(.btn) { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ldoc a:not(.btn):hover { color: var(--ink); }
.ldoc ul, .ldoc ol.list { display: grid; gap: 10px; }
.ldoc ul > li { position: relative; padding-left: 22px; }
.ldoc ul > li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: 0.75; }
.ldoc ol.list { counter-reset: n; }
.ldoc ol.list > li { position: relative; padding-left: 30px; counter-increment: n; }
.ldoc ol.list > li::before { content: counter(n) "."; position: absolute; left: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ldoc code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; color: var(--ink); }

.lshort { background: var(--ink); color: var(--on-night); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); }
.lshort__h { font-size: 0.9375rem; font-weight: 600; color: var(--mint); }
.lshort ul { margin-top: 16px; }
.lshort ul > li { color: var(--on-night-2); }
.lshort ul > li::before { background: var(--mint); }
.lshort strong { color: var(--on-night); }
.ldoc .lshort a:not(.btn) { color: var(--mint); }
.ldoc .lshort a:not(.btn):hover { color: var(--on-night); }

.ltable { width: 100%; font-size: 0.9375rem; line-height: 1.55; border-top: 1px solid var(--ink); }
.ltable th, .ltable td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line-2); }
.ltable thead th { font-size: 0.8125rem; font-weight: 600; color: var(--muted); padding-top: 12px; padding-bottom: 12px; }
.ltable tbody th { color: var(--ink); font-weight: 600; }
.ltable td:last-child, .ltable th:last-child { padding-right: 0; }
.lscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.lnote { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 20px; font-size: 0.9375rem; }
.lnote--warn { background: var(--review-bg); border-color: #e4cfa6; color: #5a3d0e; }
.lnote--warn strong { color: #4a3209; }

.confirm { background: var(--review-bg); color: var(--review); font-weight: 600; padding: 1px 6px; border-radius: 5px; border: 1px dashed #c99a4c; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.ldoc .status__table { margin-top: 24px; }
.lcontact { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; padding: 20px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-2); font-size: 0.9375rem; }
.lcontact dt { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.lcontact dd { color: var(--ink); }

@media (max-width: 960px) {
  .lbody { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lside { position: static; gap: 0; }
  .ldocs { display: flex; flex-wrap: wrap; gap: 8px; }
  .ldocs a { margin-left: 0; border: 1px solid var(--line-2); padding: 7px 12px; font-size: 0.875rem; }
  .ldocs a[aria-current="page"] { border-color: var(--ink); }
  .lside__toc { display: none; }
}
@media (max-width: 640px) {
      .ldoc { font-size: 1rem; }
  .ltable--stack thead { display: none; }
  .ltable--stack tr { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .ltable--stack th, .ltable--stack td { padding: 0; border: 0; }
  .lcontact { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lcontact dd + dt { margin-top: 12px; }
}

/* the pilot band: what happens before any records are shared, and who is behind it */
.close .terms { margin: 26px 0 0; padding: 0; list-style: none; max-width: 34rem; display: grid; gap: 10px; color: var(--on-night-2); font-size: 0.9375rem; }
.close .terms li { padding-top: 10px; border-top: 1px solid var(--night-line); }
.close__by { margin-top: 22px; font-size: 0.9375rem; color: var(--on-night-2); }
.close__by a { color: var(--on-night); text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------------------ display figures and the restructured sections (1 Nov 2026) */
.sheet__figure, .sheet__tax-figure { font-stretch: var(--cond); font-optical-sizing: auto; }
.sheet__figure { font-size: clamp(3.25rem, 1rem + 6vw, 6rem); }
.stage__lede { margin-top: 16px; }
.recon .converge { margin-top: 0; }
.recon__finding { margin-top: clamp(56px, 7vw, 96px); }
.recon__finding .cap { border-top-color: var(--night-line); max-width: 760px; }
.recon__finding .cap > p { color: var(--on-night-2); }
.caps__grid .cap--tally { grid-column: 2; }
.close__row .go { color: var(--on-night); }
@media (max-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; } .caps__grid .cap--tally { grid-column: auto; } }
@media (max-width: 640px) {
  /* the register on a phone: one record per row, at reading size */
  .app { font-size: 0.875rem; }
  .grid-table td { font-size: 0.875rem; }
}
/* the register now sits on paper rather than ink */
.stage .callout { border-top-color: var(--line-2); }
.stage .callout span, .stage .caption { color: var(--muted); }
/* the company page */
.company { padding-top: clamp(32px, 4vw, 56px); padding-bottom: var(--section); background: none; }
.company .facts { margin-top: 0; }
.finding { color: var(--ink); }
.app .id { font-size: 0.75rem; }
/* light surfaces inside the ink sections keep their own ink */
.peek .id { color: var(--mint); }
.tone-night .finding .id, .tone-night .joined .id { color: var(--accent); }
.tone-night .finding .state--flag, .tone-night .joined .state--flag { color: var(--flag); background: var(--flag-bg); }
.doc small { font-size: 0.75rem; }

/* ---------------- the board in depth (1 Nov 2026): the pile of records is a stack of real sheets. A mouse leans it a few
   degrees (js/orthic/flair.js, depth.ts), the joined record sits above the pile, and a field's source badge lifts the
   paper it came from, in burnt orange, while the record itself stays in its settled green-edged state. */
.board { transform-style: preserve-3d; transform: perspective(1800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.frag { --z: 0px; }
.frag[data-k="sheet"] { --z: -20px; } .frag[data-k="tally"] { --z: 10px; } .frag[data-k="invoice"] { --z: 30px; } .frag[data-k="floor"] { --z: -40px; }
.board:not(.is-joined) .frag[data-k="sheet"] { transform: translate(28%, 52%) rotate(-7deg) translateZ(var(--z)); }
.board:not(.is-joined) .frag[data-k="tally"] { transform: translate(-30%, 66%) rotate(5deg) translateZ(var(--z)); }
.board:not(.is-joined) .frag[data-k="invoice"] { transform: translate(34%, -46%) rotate(4deg) translateZ(var(--z)); }
.board:not(.is-joined) .frag[data-k="floor"] { transform: translate(-24%, -58%) rotate(-4deg) translateZ(var(--z)); }
.board.is-joined .frag { transform: translateZ(var(--z)); }
.board.is-joined .joined { transform: translate(-50%, -50%) translateZ(60px); box-shadow: 0 0 0 1.5px var(--accent), 0 50px 90px -30px rgb(0 0 0 / 0.85); }
.board[data-trace] .frag { opacity: 0.32; }
.board .frag.is-traced { opacity: 1; transform: translateZ(90px) !important; box-shadow: 0 0 0 1.5px var(--ember-glow), 0 40px 60px -30px rgb(0 0 0 / 0.9); }
.board[data-trace] .joined { opacity: 0.94; }
.board__lines path.is-traced { stroke: var(--ember-glow); stroke-opacity: 1; stroke-width: 1.8; }
.joined .src { font: 500 0.75rem/1 var(--mono); padding: 3px 6px; border: 0; border-radius: var(--r-2); background: var(--quiet-bg); color: var(--quiet); cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.joined .src:hover { color: var(--ember-ink); background: var(--ember-wash); }
.joined .src[aria-pressed="true"] { color: #fff; background: var(--ember); }
@media (max-width: 640px) { .board .frag.is-traced { transform: none !important; } }

/* the finding's decision: while it is open it is a discovery (burnt orange); once decided it settles into green */
.finding[data-state="open"] .seg button[aria-pressed="true"], .finding:not([data-state]) .seg button[aria-pressed="true"] { color: var(--ember-ink); }
.finding[data-state="explained"] .seg button[aria-pressed="true"], .finding[data-state="confirmed"] .seg button[aria-pressed="true"] { color: var(--accent); }
.finding .seg button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.finding[data-state="explained"] .finding__status, .finding[data-state="confirmed"] .finding__status { color: var(--accent) !important; }
