/* web/app.css — FloodGap's one stylesheet (picture I, look-v2/pictures/I.html; the architect's pass, section 8: body
   18 px, light only, one action blue, one filled button per screen). The app's own look (J14, J15, J27): the system
   sans, never a mono stack, never a Paper St font, logo or colour. Every colour is a token on :root; nothing below
   names a colour of its own (test/look-i.test.mjs). Sizes under 18 px are only the ones picture I draws: the legal line
   16, the day pill 15 with its i at 13 (the state chip takes the pill's 15), the Sample tag 12, the pin numerals 17.
   Picture K's smaller board lines (year, source, foot) are 18 here (O5: body 18 px; the dyslexia rule). The only
   animation is the one block marked MOTION at the foot of this file (test/motion-contract.test.mjs,
   test/keydates-loading.test.mjs). */

:root {
  --ink: #14213D;
  --ink-2: #4A5568;
  --ink-3: #6B7684;
  --ink-4: #9AA5B1;
  --page: #FFFFFF;
  --canvas: #FBFCFA;
  --line: #E6EAEE;
  --grab: #D5DAE0;
  --tag-bg: #EEF6FB;
  --action: #0072B2;
  --pin-alert: #D55E00;
  --pin-map: #E69F00;
  --pin-scar: #CC79A7;
  --pin-other: #0072B2;
  --pin-done: #009E73;
  --pin-ink-dark: #1A1A1A;
  --pin-ink-light: #FFFFFF;
  --sans: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow-card: 0 8px 30px color-mix(in srgb, var(--ink) 18%, transparent);
  --shadow-sheet: 0 -8px 30px color-mix(in srgb, var(--ink) 30%, transparent);
  --dim: color-mix(in srgb, var(--ink) 22%, transparent);
  --veil: color-mix(in srgb, var(--page) 90%, transparent);
  /* the page around the framed column on a wide screen (DEVICES block) */
  --page-out: #EEF2F5;
  --shadow-frame: 0 20px 60px color-mix(in srgb, var(--ink) 14%, transparent);
  /* the date tag's state chip edge (picture K) */
  --tag-line: color-mix(in srgb, var(--action) 40%, var(--page));
  /* line A's band on the front door (O33): two lines of 18 px from 320 to 560 px wide (measured at 320 and 1280) */
  --front-why-h: 66px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.4;
}
h1, h2, h3, p, ol, ul { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--action); }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
/* front.js moves focus to an open sheet's or card's title (tabIndex -1) for screen readers; that move draws no box. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The one filled button (section 3: one per screen). 60 px tall, white on the action blue. */
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: auto; min-height: 60px; padding: 10px 20px;
  border: 0; border-radius: 30px; background: var(--action); color: var(--page); font-size: 20px; font-weight: 700; line-height: 1.2;
  text-align: center; text-decoration: none;
}
/* A text press: 44 px tall at least, bold action blue, never filled. */
.link {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 6px; padding: 0 8px;
  border: 0; background: none; color: var(--action); font-size: 18px; font-weight: 700; text-decoration: none;
}
.legal { font-size: 16px; color: var(--ink-2); }

/* ---------- the page: a phone-width column, the bar on top (96 px = the 56 px bar + the 36 px day-tag row) ---------- */
/* No min-height: under 600 px of visible height (Safari's bar, a landscape phone, a keyboard) the page itself must never
   scroll, or the one button and the bar leave the screen (tests 12 and 15). The parts that can be long scroll inside
   themselves: .sheet, .rsheet, .screen.yes, .front-card. */
.app { position: relative; max-width: 560px; height: 100vh; height: 100dvh; min-height: 0; margin: 0 auto; overflow: hidden; background: var(--page); }
.hdr { position: absolute; left: 0; right: 0; top: 0; z-index: 9; height: 96px; background: var(--page); border-bottom: 1px solid var(--line); }
.bar { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; }
.back {
  position: absolute; left: 6px; top: 6px; height: 44px; min-width: 64px; padding: 0 12px 0 6px; display: flex; align-items: center;
  border: 0; background: none; color: var(--action); font-size: 19px; font-weight: 700; text-decoration: none;
}
.back i { font-style: normal; font-size: 34px; line-height: 1; margin: -4px 4px 0 0; font-weight: 400; }
.ttl {
  position: absolute; left: 96px; right: 104px; top: 0; height: 56px; display: block; line-height: 56px;
  font-size: 19px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ttl.l { left: 24px; right: 24px; text-align: left; font-size: 22px; }
/* The app's name is the one-line logo (N2, 2026-10-03), 30 px tall in the 56 px bar, where the title was: left on the
   front door, centred on a sheet over it. A byte copy of brand/floodgap-logo-line.svg, never redrawn or recoloured. */
.ttl-logo { display: inline-block; height: 30px; width: auto; vertical-align: middle; }
.hb {
  position: absolute; right: 6px; top: 6px; height: 44px; min-width: 44px; padding: 0 8px; display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--action);
}
.prow { position: absolute; left: 16px; top: 56px; height: 36px; display: flex; align-items: center; }
.pill {
  position: relative; display: flex; align-items: baseline; gap: 6px; padding: 4px 12px; border: 0; border-radius: 20px; background: var(--tag-bg);
  color: var(--action); font-size: 15px; font-weight: 700; white-space: nowrap;
}
/* The date tag is drawn 29 px tall (pictures I and K) but pressed through a 44 px box: a clear hit area over and under
   it (2026-10-03: the only control under the 44 px minimum). It draws nothing. */
.pill::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; min-height: 100%; transform: translateY(-50%); }
.pill b { display: inline-block; font-weight: 800; }
.pill .i { font-size: 13px; font-weight: 600; margin-left: 5px; }
/* In a season under way the tag is a sentence with no count: it may wrap to two lines inside the 36 px row. */
.hdr .prow { right: 16px; }
.pill.past { max-width: 100%; padding: 1px 12px; white-space: normal; line-height: 1.1; text-align: left; }
/* J36 (picture K): the visitor's or the file's state as a small chip before the count. */
.pill .st {
  align-self: center; flex: none; padding: 0 6px; border: 1.5px solid var(--tag-line); border-radius: 10px; background: var(--page);
  font-weight: 700; line-height: 18px;
}
.pill:has(.st) { padding-left: 6px; }
/* Until the visitor's state is known (at most 800 ms), the tag keeps its room and draws nothing (front.js). */
.hdr .prow[data-pending] { visibility: hidden; }

.screens { position: absolute; left: 0; right: 0; top: 96px; bottom: 0; }
.screen { position: absolute; inset: 0; }

/* ---------- the front door (picture I, frame 2; picture B; O33: line A under the logo line) ---------- */
/* The front door's own layer (line A, the Sample tag, the card) is the box under line A, the same box as the map. The
   card measures its max-height in it (calc(100% - 44px)), so no screen height lets the card climb over line A (UD-2,
   check round 1: on a landscape phone, 844 x 390, the card sat on top of it). */
/* The box itself is layout only: a tap on the map under it reaches the map, as it did before the box. */
.front-ui { position: absolute; left: 0; right: 0; top: var(--front-why-h); bottom: 0; pointer-events: none; }
.front-ui > * { pointer-events: auto; }
/* Line A (J9) on white just above that box, under the bar, so the bar's logo, the date tag and the why read as one top.
   The bar's own rule steps aside on the front door, so one rule sits between the white top and the map. */
.front-why {
  position: absolute; left: 0; right: 0; bottom: 100%; z-index: 3; height: var(--front-why-h); display: flex; align-items: center;
  padding: 0 24px; overflow: hidden; background: var(--page); border-bottom: 1px solid var(--line); color: var(--ink-2); line-height: 1.3;
  text-wrap: balance;
}
body[data-current="front"] .hdr { border-bottom-color: transparent; }
.front .map { position: absolute; inset: 0; top: var(--front-why-h); overflow: hidden; background: var(--canvas); isolation: isolate; }
/* J35: once the map B module drew (front.js sets data-live), the drawn sample map steps aside under it. Until then the
   module's box is hidden, so its opaque canvas never hides the drawn map and its pins while it loads (UD-3: on a
   phone with a GPU the front door went blank for the whole load, up to 12 s). */
.front .map[data-live] > svg { visibility: hidden; }
.fgm[data-map="loading"] { visibility: hidden; }
/* Scaled by width, top-anchored: on a short, wide column the drawing's top (and its pins) stays under the bar and only
   the bottom, behind the card, is cropped; on a tall, narrow one the canvas fills below it (the drawing's own fill). */
.front .map svg { display: block; width: 100%; height: auto; }
/* front.js fitFront: a strip too short for any pin whole (a landscape phone) shows the map with no pin cut by the card */
.front .map svg.pins-off .pins { visibility: hidden; }
/* a kept call list (front.js drawFront): the sample pins step aside, so they are never read as the agency's own */
.front .map svg.sample-off .pins { visibility: hidden; }
.pin-disc { stroke: var(--page); stroke-width: 3; }
.pin-alert .pin-disc { fill: var(--pin-alert); }
.pin-map .pin-disc { fill: var(--pin-map); }
.pin-scar .pin-disc { fill: var(--pin-scar); }
.pin-other .pin-disc { fill: var(--pin-other); }
.pin-done .pin-disc { fill: var(--pin-done); }
.pin-n { font-family: var(--sans); font-size: 17px; font-weight: 700; }
.pin-ink-dark { fill: var(--pin-ink-dark); }
.pin-ink-light { fill: var(--pin-ink-light); }
.sample-tag {
  position: absolute; right: 14px; top: 12px; z-index: 3; padding: 2px 8px; border-radius: 10px; background: var(--veil);
  color: var(--ink-3); font-size: 12px;
}
.card { background: var(--page); border-radius: 28px; box-shadow: var(--shadow-card); }
.front-card { position: absolute; left: 16px; right: 16px; bottom: 28px; z-index: 3; max-height: calc(100% - 44px); overflow-y: auto; padding: 22px 22px 12px; }
/* The link's words and chevron are one inline run (screens.js frontHtml joins them with a no-break space): a wrap at
   320 px keeps the chevron with its words. */
.front-card .link { display: block; text-align: center; padding: 10px 8px; }
.front-line { margin: 0 0 16px; font-size: 26px; line-height: 1.2; font-weight: 700; }
.trust { margin-top: 14px; color: var(--ink-2); line-height: 1.35; text-align: center; }

/* ---------- the Key dates board (J36, picture K frames 3 and 4; O34): a sheet the date tag opens ----------
   The title and a 44 px close on one line; per state its dated rows (the day 22 px bold over its year, the line, the
   source), its season line or "not set"; the "All states" row; the foot line. State names in normal case, no added
   letter spacing (O34). */
.kd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.kd-head .sheet-title { margin: 0; font-size: 22px; }
.kd-head .x {
  flex: none; width: 44px; height: 44px; margin-right: -10px; display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--ink-3); font-size: 28px; line-height: 1;
}
.kd-sec + .kd-sec { margin-top: 4px; border-top: 1px solid var(--line); }
.kd-name { padding: 12px 0 2px; color: var(--ink-2); font-size: 18px; font-weight: 700; }
.kd-rows { list-style: none; padding: 0; margin: 0; }
.kd-row { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.kd-head + .kd-sec > .kd-rows:first-child > .kd-row:first-child, .kd-name + .kd-rows > .kd-row:first-child { border-top: 0; }
.kd-date { flex: none; width: 76px; }
.kd-date b { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.kd-date span { display: block; margin-top: 2px; color: var(--ink-3); }
.kd-text { flex: 1; min-width: 0; line-height: 1.3; }
.kd-src { margin-top: 4px; color: var(--ink-3); }
.kd-line, .kd-note { padding: 4px 0 14px; color: var(--ink-2); line-height: 1.35; }
.kd-note { padding-top: 12px; }
.kd-confirm { padding: 14px 0 0; border-top: 1px solid var(--line); color: var(--ink-3); text-align: center; }

/* ---------- LOADING (J36: "remove the logo from all waiting screens and add a cool simple loading animation") ----------
   The look J38 approved (PICB checking-slow, picb.css .loading): a thin line under the press whose one request runs,
   a short blue piece sweeping along a grey track. screens.js draws it (LOADING_LINE) from the model's own flag (the
   consent send, the Yes press, Try again, the file read), never from a copy name, and front.js marks that sheet or screen
   data-loading. The line takes no room: its margins cancel its height (6 + 4 - 10 = 0), so nothing under the press
   moves when it shows or goes (O9: J-shift counts a shift after a press too). It sweeps only in the MOTION block; with
   reduced motion the piece stands still mid-track. No picture of the app's mark on any wait. */
.loading { position: relative; height: 4px; margin: 6px 0 -10px; overflow: hidden; border-radius: 2px; background: var(--line); }
.loading i { position: absolute; top: 0; bottom: 0; left: 33%; width: 34%; border-radius: 2px; background: var(--action); }

/* ---------- sheets (picture I, frame 3; picture H, frame 7) ---------- */
.dim { position: absolute; left: 0; right: 0; top: 96px; bottom: 0; z-index: 4; background: var(--dim); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-height: calc(100% - 96px); overflow-y: auto;
  padding: 14px 24px 28px; background: var(--page); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-sheet);
}
.grab { width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--grab); }
.sheet-title { margin-bottom: 14px; font-size: 26px; font-weight: 700; line-height: 1.2; }
.lead { color: var(--ink-2); line-height: 1.35; margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 10px; }
.steps li { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.step-n {
  flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--action);
  border-radius: 50%; color: var(--action); font-size: 18px; font-weight: 700;
}
.sheet .legal { margin: 0 0 12px; }
.sheet .btn { margin-top: 8px; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- the consent sheet, "Who gets what" and the file-cannot-be-read sheet (picture I frames 3 and 8) ---------- */
[data-sheet="consent"] .sheet-title, [data-sheet="file-error"] .sheet-title { margin-bottom: 8px; }
[data-sheet="file-error"] .lead { margin: 10px 0 20px; }
[data-sheet="file-error"] .sheet-title { font-size: 24px; line-height: 1.2; } /* picture I frame 8 */
/* A title of its own with no line under it (W3 checker's defect 4): the 20px the line kept above the button stays */
[data-sheet="file-error"] .sheet-title + .btn { margin-top: 20px; }
/* A picked file being read (W2d, EDGE M4 and X16; J36): the one loading line (.loading) under the title, in a slot with
   the room the old 8 px bar had (6 + 4 + 14 = 24 px), so the reading sheet stays the height it was. In the slot the
   line has no margins of its own (under a press they cancel its height). The MOTION block fades it in once the sheet
   is up, so a fast read never flashes it (check round 4, UD4-1). */
.read-line { margin: 6px 0 14px; }
.read-line .loading { margin: 0; }
[data-sheet="file-error"] { min-height: 360px; } /* picture I frame 8: 300 px of content under the grab, so nothing peeks out */
/* While a sheet is up, NOTHING behind it is hidden: the whole page under the bar sits under the one even dim (.dim,
   z-index 4, over line A, the front card, the results sheet, the Sample tag and the pins, all z-index 3 or less), and
   closing takes the dim away with nothing to re-show, so nothing vanishes, jumps or flashes. N4 (2026-10-03, on the
   phone): a card disappearing under a popover "reads as a glitch". This retires the 2026-10-03 rules that made the front
   card, the results sheet, the Sample tag and the pins invisible while a sheet was up (test 14's "no layer cut in half"
   is now met by the dim: the layer behind reads as behind). */
[data-sheet="consent"] [data-copy="CONSENT_LINE"] { margin: 8px 0 20px; } /* picture I frame 3: the line, then 20px to Send */
[data-sheet="consent"] [data-copy="CONSENT_LINE"]:has(+ [data-copy="CAP_LINE"]) { margin-bottom: 4px; }
[data-sheet="consent"] .lead[data-copy="CAP_LINE"] { margin: 0 0 20px; }
/* W3 (root cause C11): the reader's own lines (data-note: a list EZLynx may have cut, the file read from inside a zip)
   join the line and the cap line as one group, 4px apart, and the group keeps its 20px to Send (picture I frame 3) */
[data-sheet="consent"] .lead[data-note] { margin: 0 0 20px; }
[data-sheet="consent"] .lead:has(+ .lead[data-note]) { margin-bottom: 4px; }
/* The line that asks for an agreement, right above its button (legal/APPLY-TO-APP.md step 2; OC-03): body size and the
   ink colour, never the small grey legal style, and its links in the action blue AND underlined, so the line reads as
   part of the press and a link is told by more than its colour. 12 px to the button, then the button's own 8. */
.assent { margin: 0 0 12px; color: var(--ink); font-size: 18px; line-height: 1.35; }
.assent a { color: var(--action); text-decoration: underline; }
/* ---------- the signing sheet (picture 18A, DECISIONS O39; legal/APPLY-TO-APP.md step 3) ----------
   A sheet from the Yes button: its title with its own close, the signer's four fields (name and title side by side),
   the notice with the Privacy link, the box with its line, then the one filled button. Every size is the body's 18 px
   (O5; test/look-i.test.mjs), so a field never makes an iPhone zoom the page on focus. A field is 52 px tall and the
   box's row at least 44: room for a thumb (Apple, 44 pt). Colours are the page's tokens. */
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sh-head .sheet-title { margin: 0; }
.sh-head .x {
  flex: none; width: 44px; height: 44px; margin-right: -10px; display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--ink-3); font-size: 28px; line-height: 1;
}
.fld { display: block; margin-top: 12px; }
.fld .lb { display: block; margin-bottom: 4px; color: var(--ink-2); font-weight: 600; }
.fld .in {
  display: block; width: 100%; height: 52px; padding: 0 14px; border: 2px solid var(--grab); border-radius: 12px;
  background: var(--page); color: var(--ink); font-size: 18px;
}
.fld .in:focus-visible { outline: 3px solid var(--action); outline-offset: 0; border-color: var(--action); }
.two { display: flex; gap: 10px; }
.two .fld { flex: 1; min-width: 0; }
.notice { margin-top: 12px; color: var(--ink-2); line-height: 1.35; }
.notice a { color: var(--action); text-decoration: underline; }
.agree { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 16px 0 12px; cursor: pointer; }
.agree input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--action); }
.agree .assent { margin: 0; }
[data-sheet="sign"] .legal { margin: 10px 0 0; text-align: center; }
.status { margin-top: 10px; color: var(--ink); line-height: 1.35; }
.status:empty { margin: 0; }
.link.quiet { margin-top: 0; color: var(--ink-2); font-weight: 400; }
.who { list-style: none; padding: 0; margin: 0 0 14px; }
.who li { margin-bottom: 10px; line-height: 1.4; }
.ok-text { margin-bottom: 8px; color: var(--ink-2); line-height: 1.4; }
.cols { margin-bottom: 8px; }
.cols ol { list-style: none; padding: 0; margin: 0 0 8px; }
.cols .fd-row { padding: 8px 0; border-top: 1px solid var(--line); }
.cols .fd-row-head { display: flex; flex-direction: column; gap: 6px; }
.cols select { min-height: 44px; padding: 0 8px; border: 1px solid var(--grab); border-radius: 10px; background: var(--page); font-size: 18px; }
.cols .fd-mute { color: var(--ink-3); }
.cols summary { min-height: 44px; display: flex; align-items: center; color: var(--action); font-weight: 700; cursor: pointer; }

/* ---------- RESULTS: the results screen (picture I frames 4, 6 and 7; H4, H7; slice S4) ----------
   The 300 px map, the sheet over it: "Call these first" 26 px, rows that are each a 44 px press, every line 18 px or
   more, names 20 px, the disc numerals 17 (.pin-n, the allow-list). Dark ink on the amber and pink discs. No animation
   here: nothing moves on a result row (test/motion-contract.test.mjs). test/results.test.mjs reads this block. */
/* The map fills the screen down to the sheet (picture I frame 7: no blank band). Its drawing is 390 wide; the pins sit
   in the top 390 x 300 of it (pins.js), top-aligned, so the part the sheet leaves open is the part with the pins. */
.rmap { position: absolute; left: 0; right: 0; top: 0; bottom: 0; height: auto; overflow: hidden; background: var(--canvas); isolation: isolate; }
/* Each map box is its own stacking context (isolation), so nothing a map draws (map B's pins carry z-index up to 999)
   can rise over the bar, the dim or a sheet (found 2026-10-04: the pins painted over the Key dates board). */
.rmap svg { display: block; width: 100%; height: auto; } /* scaled by width, top-anchored: a tall column never crops the sides */
.rmap .base { fill: none; stroke: var(--line); stroke-width: 3; }
.rmap .base-major { fill: none; stroke: var(--grab); stroke-width: 5; }
/* A real answer's map carries each pin's reason as a soft ring in its data colour (screens.js zonesSvg; the sample's
   drawing does this with its own art): a blue band, an amber wash, a dashed pink edge, a vermillion wash. The fixed
   states draw the homes read as small grey dots (screens.js dotsSvg). Token colours only, mixed to a wash. */
.rmap .zone { stroke-width: 2; }
.rmap .zone-other { fill: color-mix(in srgb, var(--pin-other) 14%, transparent); stroke: color-mix(in srgb, var(--pin-other) 40%, transparent); stroke-width: 10; }
.rmap .zone-map { fill: color-mix(in srgb, var(--pin-map) 30%, transparent); stroke: color-mix(in srgb, var(--pin-map) 70%, transparent); }
.rmap .zone-scar { fill: color-mix(in srgb, var(--pin-scar) 28%, transparent); stroke: var(--pin-scar); stroke-dasharray: 6 5; }
.rmap .zone-alert { fill: color-mix(in srgb, var(--pin-alert) 22%, transparent); stroke: color-mix(in srgb, var(--pin-alert) 55%, transparent); }
.rmap .zone-done { fill: color-mix(in srgb, var(--pin-done) 18%, transparent); stroke: none; }
.rmap .dot { fill: var(--ink-4); stroke: var(--page); stroke-width: 3; }
/* The row sheet's pin (reverify round 1, defect 8): ringed in ink, the others and their rings stepped back, so the
   pin the sheet explains is the one the eye finds. */
.pins.has-sel .pin:not(.sel), .zones.has-sel .zone:not(.sel) { opacity: 0.4; }
.pin.sel .pin-disc { stroke: var(--ink); stroke-width: 4; }
.results .sample-tag { top: 12px; }
.rsheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; max-height: calc(100% - 160px); overflow-y: auto;
  padding: 12px 22px 0; background: var(--page); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-sheet);
}
.rsheet .grab { margin-bottom: 6px; }
.r-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.r-title { font-size: 26px; font-weight: 700; line-height: 1.2; }
.showall { flex: none; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--action); font-size: 18px; font-weight: 700; }
.r-count { margin-bottom: 6px; color: var(--ink-2); font-size: 18px; }
.r-group { margin: 10px 0 2px; color: var(--ink-2); font-size: 18px; font-weight: 700; }
.r-list { list-style: none; padding: 0; margin: 0; }
.rrow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--line); }
.rrow-main {
  flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none;
  text-align: left; font-size: 18px;
}
.disc {
  flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-weight: 700;
}
.disc.pin-alert { background: var(--pin-alert); }
.disc.pin-map { background: var(--pin-map); }
.disc.pin-scar { background: var(--pin-scar); }
.disc.pin-other { background: var(--pin-other); }
.disc.pin-done { background: var(--pin-done); }
.disc.ink-dark { color: var(--pin-ink-dark); }
.disc.ink-light { color: var(--pin-ink-light); }
.r-text { display: flex; flex-direction: column; min-width: 0; }
.r-name { font-size: 20px; font-weight: 700; line-height: 1.2; }
.r-why { color: var(--ink-2); font-size: 18px; line-height: 1.2; }
.r-date { color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.2; }
.off {
  flex: none; height: 44px; padding: 0 14px; border: 2px solid var(--action); border-radius: 22px; background: none;
  color: var(--action); font-size: 18px; font-weight: 700;
}
.r-empty { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.r-sentence { color: var(--ink); font-size: 18px; line-height: 1.35; }
/* No row to call (2026-10-03): the state sentence is the sheet's heading and first line, so no rule above it. */
.r-empty.r-first { border-top: 0; padding-top: 4px; }
h2.r-sentence { font-size: 20px; font-weight: 700; }
.r-fema { margin-bottom: 6px; } /* FEMA answered for no row, yet rows need a call: said under the count line */
.r-demo { margin: 6px 0 10px; font-size: 18px; }
.r-status { margin: 6px 0 10px; color: var(--ink); font-size: 18px; line-height: 1.35; } /* a refused Try again says why */
.rsheet .btn { margin-top: 10px; }
/* The one filled button stays in view while an expanded list scrolls (test 12): it sticks to the sheet's foot on a white
   backing with a 12 px pad above it. */
.rsheet .r-foot { position: sticky; bottom: 0; z-index: 1; margin: 0 -22px; padding: 12px 22px 20px; background: var(--page); }
.rsheet .r-foot .btn { margin-top: 0; }
/* An offered row (picture I frame 5; slice S5): the green check, "Offered Oct 3, 10:42" in ink, "Copy note · Undo" as
   44 px text presses (Copy note in the action blue, Undo in --ink-2), the saved line in --ink-3. No toast, nothing moves. */
.rrow.done { display: block; }
.r-done { display: flex; flex-direction: column; }
.r-at { color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.2; }
.r-acts { display: flex; align-items: center; gap: 2px; margin-left: 48px; }
.r-act {
  min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--action); font-size: 18px; font-weight: 700;
}
.r-act:first-child { padding-left: 0; }
.r-act.undo { color: var(--ink-2); }
.r-dot { color: var(--ink-4); font-weight: 400; font-size: 18px; }
.r-saved { margin-left: 48px; color: var(--ink-3); font-size: 18px; line-height: 1.2; }
/* The row sheet (slice S5): each reason, its source and checked day; "No answer · try later" quiet; no filled button.
   It always leaves 120 px of map open above it (150 px on a framed column), so its row's pin shows whole above the sheet
   (reverify round 1, defect 9: on a 375 x 548 Safari view the sheet cut pin 2 in half). */
[data-sheet="row"] { max-height: calc(100% - 96px - 120px); }
.row-name { margin: -6px 0 10px; color: var(--ink-2); font-size: 18px; }
.reasons { list-style: none; padding: 0; margin: 0 0 8px; }
.reason { padding: 10px 0; border-top: 1px solid var(--line); }
.reason-text { color: var(--ink); font-size: 18px; line-height: 1.35; }
.src { margin-top: 2px; color: var(--ink-2); font-size: 18px; line-height: 1.35; }
.src.asof { color: var(--ink-3); }
.row-try { margin: 4px 0 6px; color: var(--ink); font-size: 18px; font-weight: 700; }
.row-alert { margin: 0 0 10px; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.35; }
.note-text {
  display: block; width: 100%; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--grab); border-radius: 10px;
  background: var(--page); color: var(--ink); font: inherit; font-size: 18px; line-height: 1.35; resize: vertical;
}
/* The front door's "Your 10 are ready ›" (H8; review finding 4): the one filled button while this tab keeps the 10;
   "Check 10 homes free" steps down to the text link under it, for a new file. */
.front-card .ready { margin: 0 0 8px; }
/* ---------- /RESULTS ---------- */

/* ---------- YES (slice S6; picture I frame 6; H6): the title 36 px weight 800, the one stakes line in --ink-2, the
   three plain lines 18 px (the price bold), the one filled button and the 16 px legal line (.legal) at the foot. ---------- */
.screen.yes { display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; padding: 34px 24px 44px; }
.yes-title { font-size: 36px; line-height: 1.1; font-weight: 800; color: var(--ink); }
.yes-why { margin-top: 16px; font-size: 18px; line-height: 1.35; color: var(--ink-2); }
.yes-line { margin-top: 20px; font-size: 18px; line-height: 1.35; }
.yes-founding { margin-top: 28px; }
.yes-price { font-weight: 700; }
/* Near the foot on a phone; on a tall screen it follows the words. On a short screen (Safari's bar, a landscape phone,
   a 320 x 658 Android) the words scroll under a foot that stays in view, so the one button is always on screen (test 12). */
.yes-foot { margin-top: auto; padding-top: 32px; position: sticky; bottom: -44px; z-index: 1; padding-bottom: 56px; margin-bottom: -44px; background: var(--page); } /* -44: covers the screen's own 44 px foot pad, so no word shows under it */
.yes-status:empty { margin: 0; }
.yes-foot .legal { margin-top: 14px; color: var(--ink-3); text-align: center; text-wrap: balance; }
@media (min-height: 900px) { .yes-foot { margin-top: 48px; } }
/* A short phone (a 320 x 658 Android, an iPhone SE, Safari's visible area): every term reads above the button, never
   under a sticky foot (reverify round 1, defect 7: "Founding pilot: $250 for the" was cut mid-sentence). The title and
   the gaps tighten so the title, the why line, the price, the no-invoice line and the promise all sit above the button,
   and the button still shows without a scroll at 375 x 548. */
@media (max-height: 700px) {
  .screen.yes { padding: 16px 20px 24px; }
  .yes-title { font-size: 28px; }
  .yes-why { margin-top: 8px; line-height: 1.3; }
  .yes-line { margin-top: 8px; line-height: 1.3; }
  .yes-founding { margin-top: 12px; }
  .yes-foot { position: static; margin-bottom: 0; padding-top: 14px; padding-bottom: 0; }
}
/* ---------- /YES ---------- */

/* ---------- DEVICES: short screens, a 320 px phone, wide screens (2026-10-03 device pass) ---------- */
/* A short screen (a landscape phone, a keyboard): 120 px of map stays open (the pins are laid out in what is left:
   front.js, pins.js mapStripUnits), the sheet scrolls inside, and its sticky button keeps a slimmer foot. */
@media (max-height: 500px) {
  .rsheet { max-height: calc(100% - 120px); }
  .rsheet .r-foot { padding: 8px 22px 10px; }
  .yes-foot { position: static; margin-bottom: 0; padding-bottom: 0; padding-top: 20px; } /* taller than the screen: it scrolls with the words */
}
/* A 320 px phone: the bar's title keeps one line between Back and Home; a two-line button label never touches the pill. */
@media (max-width: 359px) {
  .ttl { left: 84px; right: 56px; font-size: 18px; }
  .back { min-width: 0; padding-right: 4px; }
  .btn { font-size: 18px; }
}
/* A wide screen: a phone-proportioned column, framed on a calm page, so it reads as designed, not cut out of white. */
/* The frame sits in the middle of a tall screen (reverify round 1, defect 10: 24 px above and 410 px below on an iPad Pro
   portrait), and grows to 1040 px so the map uses the room. While a sheet or card is up the page around it dims with the
   column, and a tap there closes it (front.js). */
@media (min-width: 700px) {
  body { background: var(--page-out); }
  .app { max-width: clamp(360px, 64dvh, 560px); height: min(100dvh - 48px, 1040px); margin: max(24px, calc((100dvh - 1040px) / 2)) auto; border-radius: 28px; box-shadow: var(--shadow-frame); }
  body[data-over-sheet] { background: color-mix(in srgb, var(--ink) 22%, var(--page-out)); }
}
/* A framed column 500 px tall or more: the results sheet leaves 210 px of map, two rows of pins FAN_PX apart at 560 px
   wide (pins.js), and the row sheet 150 px, one row (reverify round 1, defect 8: pins knotted 3 px apart at 1024 x 768). */
@media (min-width: 700px) and (min-height: 501px) {
  .rsheet { max-height: calc(100% - 210px); }
  [data-sheet="row"] { max-height: calc(100% - 96px - 150px); }
}
@media (min-width: 700px) and (max-height: 820px) {
  .app { height: 100dvh; margin: 0 auto; border-radius: 0; }
}
/* ---------- /DEVICES ---------- */

.noscript { padding: 24px; }

/* ---------- the data sheet (web/trust.html) ---------- */
.doc .hdr { position: sticky; height: 56px; }
.doc main { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; }
.doc .tr-sheet { padding: 22px 22px 16px; box-shadow: none; border: 1px solid var(--line); border-radius: 18px; }
.doc h1 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.doc h2 { font-size: 22px; margin: 24px 0 8px; }
.doc ul { padding-left: 22px; }
.doc li, .doc p { margin-bottom: 8px; line-height: 1.45; }
.doc .sub { color: var(--ink-2); }
.doc .actions { margin: 24px 0 8px; }
.doc details { margin-top: 16px; }
.doc summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--action); font-weight: 700; }
.doc .codemap { width: 100%; border-collapse: collapse; }
.doc .codemap th, .doc .codemap td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--line); }
.doc code { font-family: var(--sans); font-weight: 600; overflow-wrap: anywhere; }
@media print {
  .doc .hdr, .doc .actions { display: none; }
  .doc .tr-sheet { border: 0; padding: 0; }
}

/* ---------- MOTION: the only animation in the app (O8: transform and opacity only, under no-preference only) ----------
   1. A sheet rises (translateY) each time it opens. 0.3 s.
   2. The date tag fades in once, when its state is known (J36; until then it keeps its room, drawn nothing). 0.2 s.
   3. The loading line sweeps (translateX) while a request runs (J36: one simple loading animation on every wait, never
   the logo). It loops until the answer lands: a named departure from O8's once-and-300 ms rule, which predates J36.
   Apple, Progress indicators: "Keep progress indicators moving so people know something is continuing to happen."
   WCAG 2.2.2 Note 4 counts a progress animation during a wait as essential. F8 (h-flow-check.sh, amended by O33)
   asks for exactly this: a rule on [data-loading] running a moving @keyframes, infinite.
   4. The file read's line fades in once, after the sheet's 0.3 s rise, so a read that ends sooner never flashes it.
   Pure CSS, so it runs while the parse holds the page's thread (check round 4, UD4-1). 0.2 s.
   With reduced motion none of this applies: a plain switch, and a still line under the press or the title. O33 took
   out the opener's count-to-tag motion and the front card's rise. test/keydates-loading.test.mjs holds 3 and 4;
   test/motion-contract.test.mjs the rest. */
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: fg-sheet-rise 0.3s ease-out 1; }
  .hdr .prow:not([data-pending]) { animation: fg-fade-in 0.2s ease-out 1 both; }
  [data-loading] .loading i { animation: fg-sweep 1.2s ease-in-out infinite; }
  [data-loading] .read-line { animation: fg-fade-in 0.2s ease-out 0.3s 1 both; }
  @keyframes fg-fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes fg-sheet-rise { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes fg-sweep { from { transform: translateX(-200%); } to { transform: translateX(200%); } }
}
/* ---------- /MOTION ---------- */
