/* Outage Prep app: "rugged premium" look (marketing/site/directions/e-rugged.html).
   Dark mineral surfaces, chalk text, Barlow Condensed for numbers and labels.
   Signal ochre is kept for two things only: the shortest supply and the next step
   (and the readout's bar, as in the direction's phone mock). Fonts are local (fonts/, SIL OFL 1.1)
   so the app looks the same offline. */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-800.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --basalt: #161917;
  --granite: #262A28;
  --iron: #3A3F3C;
  --stone: #A7ADA8;
  --chalk: #F3F3EF;
  --ochre: #E2A626;
  --ink-on-ochre: #161917;
  --warn: #F0604A;             /* under 3 days ready: ink text on it 5.5:1, against the iron track 3.3:1 */

  --bg: var(--basalt);
  --card: var(--granite);
  --ink: var(--chalk);
  --ink-2: var(--stone);
  --ink-3: var(--stone);       /* nothing dimmer than stone carries text */
  --line: var(--iron);
  --accent: var(--chalk);      /* actions are chalk; ochre is not an action colour */
  --accent-soft: var(--iron);
  --sage: #7FB48C;             /* ready */
  --sage-soft: #1F3326;
  --amber: #D9C08A;            /* soon (sand, kept apart from the ochre signal) */
  --amber-soft: #36301F;
  --rose: #F0A493;             /* expired */
  --rose-soft: #3F2421;
  --sky: #A6CBEA;
  --sky-soft: #22303B;
  --radius: 6px;
  --shadow: none;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #0B0D0C; color: var(--ink); font-family: var(--font); font-size: 16px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; justify-content: center; }
.phone { width: 100%; max-width: 430px; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 104px; }
@media (min-width: 520px) { .phone { box-shadow: 0 0 0 1px var(--iron); } }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
input::placeholder { color: var(--stone); opacity: .85; }

/* type: condensed for labels, headings and numbers */
.label, .eyebrow, h2, .pill, .badge, nav.tabs a, .tag, .meter-scale, .field label, .seg button, .seg a {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
}
header.top { padding: 18px 20px 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.eyebrow { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
h1 { font-family: var(--font-display); font-size: 40px; line-height: .95; margin: 4px 0 0; font-weight: 800; letter-spacing: 0; }
h2 { font-size: 14px; color: var(--ink-2); margin: 28px 20px 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .08em; padding: 6px 10px; border-radius: 3px; background: transparent; color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot.on { background: var(--sage); } .dot.off { background: var(--ink-3); }

.card { background: var(--card); border-radius: var(--radius); margin: 0 16px 12px; padding: 18px; }
.icon { width: 30px; height: 30px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }

/* Today: the readout, ruled rows, the next step */
.card.hero { background: transparent; border-radius: 0; margin: 0; padding: 14px 20px 16px; }
.ring .num { display: flex; align-items: flex-end; gap: 12px; }
.ring .num b { font-family: var(--font-display); font-weight: 800; font-size: 100px; line-height: .78; letter-spacing: -.01em; }
.ring .num span { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; padding-bottom: 2px; }
.meter { position: relative; height: 12px; background: var(--iron); margin-top: 14px; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ochre); }
.meter i.done { background: var(--sage); }
.meter i.crit { background: var(--warn); }
.meter-scale { display: flex; justify-content: space-between; margin-top: 7px; color: var(--ink-2); font-size: 13px; }
.hero .say { margin-top: 12px; }
.hero h3, .hero h2.sayh { color: var(--ink); text-transform: none; letter-spacing: 0; margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.05; }
.hero p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.hero p b { color: var(--ink); font-weight: 600; }

.tiles { margin: 0; border-bottom: 1px solid var(--line); }
.tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); }
.tile .k { font-size: 17px; font-weight: 600; line-height: 1.25; min-width: 0; }
.tile .s { font-size: 13.5px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.tile .v { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; white-space: nowrap; }
.tile .v small { font-weight: 600; font-size: 12.5px; letter-spacing: .12em; color: var(--ink-2); margin-left: 0; text-transform: uppercase; }
.tile.short { background: var(--ochre); color: var(--ink-on-ochre); border-top-color: var(--ochre); }
.tile.short .s, .tile.short .v small, .tile.short .estmark { color: var(--ink-on-ochre); }
.tile.short + .tile { border-top-color: var(--ochre); }
.tiles.crit .tile.short, .tiles.crit .tile.short + .tile { border-top-color: var(--warn); }
.tiles.crit .tile.short { background: var(--warn); }
.tag { display: block; font-size: 12px; margin-top: 1px; }

.next { margin: 14px 16px 4px; border: 2px solid var(--ochre); padding: 14px 16px; }
.next .label { color: var(--ochre); font-size: 13px; display: block; }
.next b { display: block; font-size: 17px; font-weight: 600; margin: 5px 0 4px; line-height: 1.35; }
.next p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

.bar { height: 8px; background: var(--line); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sage); }
.bar i.low { background: var(--amber); } .bar i.crit { background: var(--rose); }

/* lists */
.list { background: var(--card); border-radius: var(--radius); margin: 0 16px 12px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 16.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.badge { font-size: 12.5px; letter-spacing: .08em; padding: 4px 8px; border-radius: 3px; white-space: nowrap; }
.badge.ok { background: var(--sage-soft); color: #B4DABD; }
.badge.soon { background: var(--amber-soft); color: #E8D7AE; }
.badge.exp { background: var(--rose-soft); color: var(--rose); }
.badge.none { background: var(--iron); color: #C9CDC9; }
.chev { color: var(--ink-3); }

.seg { display: flex; gap: 8px; padding: 6px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 14px; letter-spacing: .08em; min-height: 44px; padding: 0 14px; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.seg button.on, .seg a.on { background: var(--chalk); color: var(--basalt); border-color: var(--chalk); }
.seg a { border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; letter-spacing: .08em; min-height: 44px; padding: 0 14px; border-radius: 3px; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }

/* buttons: chalk slabs, mixed case so they read as plain words */
.btn { border: 0; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .03em; min-height: 52px; padding: 12px 18px; border-radius: 4px; cursor: pointer; }
.btn.primary { background: var(--chalk); color: var(--basalt); }
.btn.ghost { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 2px var(--iron); }
.btn.plain { background: transparent; color: var(--ink-2); font-weight: 600; }
.btn.block { width: 100%; }
.fab { position: absolute; right: 18px; top: 22px; }
.icon-btn { border: 0; background: var(--chalk); width: 48px; height: 48px; border-radius: 4px; font-size: 28px; font-weight: 600; color: var(--basalt); cursor: pointer; line-height: 1; flex: none; }

nav.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: rgba(22,25,23,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; padding: 0 4px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
nav.tabs a { flex: 1; text-align: center; text-decoration: none; color: var(--ink-2); font-size: 12px; letter-spacing: .1em; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0 4px; min-height: 58px; border-top: 3px solid transparent; }
nav.tabs a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
nav.tabs a.on { color: var(--chalk); border-top-color: var(--chalk); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check .t { font-size: 16px; line-height: 1.4; }
.box { width: 24px; height: 24px; border-radius: 3px; border: 2.5px solid var(--stone); flex: none; display: flex; align-items: center; justify-content: center; margin-top: 0; transition: all .15s; }
.check.done .box { background: var(--sage); border-color: var(--sage); }
.check.done .box::after { content: ""; width: 6px; height: 12px; border: solid var(--basalt); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px,-1px); }
.check.done .t { color: var(--ink-3); text-decoration: line-through; }
.check .why { font-size: 14px; color: var(--ink-2); line-height: 1.45; margin-top: 3px; }
.check.done .why { display: none; }
.card.sysintro b { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.05; display: block; }
.card.sysintro p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.card.sysintro p.progress { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--chalk); }
.progress { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.progress .bar { flex: 1; margin: 0; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--ink-2); }
.kv span:last-child { text-align: right; }
/* member colours are stored data from the light theme; show them all on iron here */
.avatar { width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 19px; flex: none; background: var(--iron) !important; color: var(--chalk); }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 10; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 430px; background: var(--bg); border-top: 4px solid var(--chalk); border-radius: 8px 8px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2,.8,.2,1); max-height: 92vh; overflow: auto; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--iron); margin: 0 auto 12px; }
.sheet h3, .sheet h2.sheeth { color: var(--ink); text-transform: none; letter-spacing: 0; padding-right: 44px; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.05; margin: 4px 0 14px; }
.sheet p.muted { font-size: 15px; }
.field { background: var(--card); border-radius: 4px; padding: 10px 14px; margin-bottom: 10px; border: 1px solid transparent; }
.field:focus-within { border-color: var(--stone); }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 3px; }
.field input, .field select { width: 100%; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); outline: none; padding: 3px 0; min-height: 30px; }
.field select option { background: var(--granite); color: var(--chalk); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.actions .btn { flex: 1; }
@keyframes up { from { transform: translateY(40px); opacity: .4 } to { transform: none; opacity: 1 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ask */
.ask-wrap { padding: 12px 16px 0; }
.askbox { display: flex; gap: 8px; background: var(--card); border-radius: 4px; padding: 6px 6px 6px 16px; align-items: center; border: 1px solid var(--line); }
.askbox:focus-within { border-color: var(--stone); }
.askbox input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 17px; background: transparent; color: var(--ink); min-height: 44px; }
.askbox button { border: 0; background: var(--chalk); color: var(--basalt); width: 48px; height: 48px; border-radius: 4px; font-size: 22px; font-weight: 600; cursor: pointer; flex: none; }
.askbox button:disabled { background: var(--iron); color: var(--stone); cursor: default; }
.note { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 12px 4px; }
.note b { color: var(--ink); font-weight: 600; }
/* the fixed 911 banner: client copy, on every answer, decline and error. Basalt ink on the warn
   red is 5.5:1 (AA); chalk on it would be under 3:1, so the text is dark. */
.banner911 { background: var(--warn); color: var(--basalt); border-radius: 4px; padding: 13px 16px; margin: 12px 0; font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: .01em; }
.banner911 b { font-weight: 800; }
.answer { white-space: pre-wrap; font-size: 16.5px; line-height: 1.55; }
.answer sup { color: var(--sky); font-weight: 600; font-size: 11px; }
.sources { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.sources a { display: block; font-size: 14px; color: var(--sky); text-decoration: underline; text-decoration-color: rgba(166,203,234,.4); text-underline-offset: 3px; padding: 6px 0; }
.offline-card { text-align: center; padding: 28px 22px; }
.offline-card .big { font-size: 40px; margin-bottom: 8px; }
.offline-card b { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.offline-card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 6px 0 0; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.suggest button { border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; min-height: 44px; padding: 8px 13px; border-radius: 4px; cursor: pointer; text-align: left; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--chalk); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg) } }
.muted { color: var(--ink-2); font-size: 15px; }
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); background: var(--chalk); color: var(--basalt); font-weight: 600; padding: 11px 16px; border-radius: 4px; font-size: 15px; z-index: 20; animation: fade .2s; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.foot { text-align: center; font-size: 13.5px; color: var(--ink-3); margin: 20px 22px 0; line-height: 1.55; }
.foot a { text-underline-offset: 3px; }
.ask-wrap .card { margin: 12px 0; }

/* first run and "Edit household" */
nav.tabs[hidden] { display: none; }
.welcome { padding: 64px 24px 40px; }
.welcome .mark { display: block; width: 64px; height: 64px; margin: 0 0 22px; }
.welcome h1 { font-size: 60px; text-transform: none; line-height: .9; }
.welcome .lede { font-size: 19px; line-height: 1.5; margin: 18px 0 12px; padding-top: 18px; border-top: 4px solid var(--chalk); }
.welcome .muted { line-height: 1.55; margin: 0 0 28px; }
.welcome .btn { margin-top: 10px; }
.steps { display: flex; gap: 6px; margin: 12px 20px 16px; }
.steps i { flex: 1; height: 6px; background: var(--line); }
.steps i.on { background: var(--chalk); }
.prow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px 12px 16px; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow .main { flex: 1; min-width: 0; }
.prow .s { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.inline { width: 100%; border: 0; border-bottom: 1px dashed var(--stone); background: transparent; font: inherit; font-size: 17px; color: var(--ink); padding: 6px 0; outline: none; }
.inline:focus { border-bottom: 1px solid var(--chalk); }
.inline.small { width: auto; font-size: 15px; color: var(--ink); margin-top: 4px; min-height: 44px; }
.inline.num { width: 64px; text-align: right; }
.petline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.wt { font-size: 15px; color: var(--ink-2); }
.x { border: 0; background: transparent; color: var(--ink-2); font-size: 26px; width: 44px; height: 44px; border-radius: 4px; cursor: pointer; flex: none; }
.addrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 16px 6px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--chalk); font: inherit; font-weight: 600; font-size: 15px; min-height: 44px; padding: 8px 14px; border-radius: 4px; cursor: pointer; }
.chip.on { background: var(--chalk); color: var(--basalt); border-color: var(--chalk); }
.err { color: var(--rose); font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.list + .err, .addrow + .err { margin: 0 22px 8px; }
.note.intro { margin: 14px 20px; font-size: 15.5px; }
.prow ~ p.note, .welcome ~ p.note { margin: 10px 22px; }
#view > p.note { margin: 10px 20px; }
.actions.pad { margin: 22px 16px 0; }
.card.pad0 { padding: 0; }
.field.flat { margin: 0; background: transparent; }
.medrow { padding: 12px 12px 4px; }
.medrow .field { background: var(--bg); border: 1px solid var(--line); }
.btn.small { font-size: 16px; min-height: 44px; padding: 8px 10px; }
.goals { display: grid; gap: 10px; margin: 0 16px; }
.goal { text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 4px; padding: 14px 16px; min-height: 64px; font: inherit; color: var(--ink); cursor: pointer; }
.goal b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.05; }
.goal span { font-size: 15px; color: var(--ink-2); }
.goal.on { border-color: var(--chalk); background: var(--iron); }
.goal.on span { color: #D3D6D1; }
.h2row { display: flex; justify-content: space-between; align-items: center; }
.link { border: 0; background: transparent; color: var(--chalk); font-family: var(--font); font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; min-height: 44px; padding: 10px 0; text-decoration: underline; text-underline-offset: 4px; }

/* rough quick start and estimates */
.badge.est { background: var(--sky-soft); color: var(--sky); }
.estmark { color: var(--sky); }
.hero p.estnote { margin-top: 8px; font-size: 14.5px; }
.hero p.estnote a { color: var(--chalk); font-weight: 600; text-underline-offset: 3px; }
.card.exact { background: var(--sky-soft); padding: 14px 16px; }
.card.exact b { font-size: 16px; font-weight: 600; }
.card.exact p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; color: #C9D6E0; }
.row.estrow .t { color: var(--ink); }
.card.q { padding: 14px 14px 14px; }
.qtext { margin: 0 0 12px; font-size: 16.5px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { color: var(--ink); font-weight: 600; }
.chips .chip.on { color: var(--basalt); }
.other { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.other input, .medq input { width: 96px; min-height: 44px; border: 1px solid var(--stone); border-radius: 4px; padding: 8px 10px; font: inherit; font-size: 17px; background: var(--bg); color: var(--ink); }
.hint { font-size: 13.5px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.45; }
.medq { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.medq:last-child { border-bottom: 0; }
.medq label { grid-column: 1 / -1; font-size: 16px; line-height: 1.45; }
.medq .hint { margin: 0; }
.field.counted[hidden] { display: none; }
.field.counted { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.field.counted input { width: 22px; height: 22px; min-height: 0; margin-top: 1px; accent-color: var(--chalk); flex: none; }
.field.counted span { font-size: 16px; }
.field.counted small { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }

/* add chooser and common-items catalog */
.choice { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 4px; padding: 14px 16px; min-height: 72px; margin-bottom: 10px; font: inherit; color: var(--ink); cursor: pointer; }
.choice .icon { width: 44px; height: 44px; font-size: 22px; }
.choice b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.1; }
.choice span { font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.searchbox { background: var(--card); border-radius: 4px; border: 1px solid var(--line); padding: 8px 14px; margin-bottom: 10px; }
.searchbox:focus-within { border-color: var(--stone); }
.searchbox input { width: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 17px; color: var(--ink); min-height: 32px; }
.seg.tight { padding: 0 0 10px; }
.sheet .list { margin: 0 0 10px; }
.catrow { cursor: default; padding: 10px 10px 10px 14px; }
.catrow .t { white-space: normal; font-size: 15.5px; }
.stepper { display: flex; align-items: center; gap: 2px; flex: none; }
.stepper button { width: 44px; height: 44px; border-radius: 4px; border: 0; background: var(--iron); color: var(--chalk); font-size: 24px; line-height: 1; cursor: pointer; }
.stepper button:disabled { background: transparent; color: #6F7571; box-shadow: inset 0 0 0 1px var(--iron); cursor: default; }
.stepper output { min-width: 26px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.sheet .note { margin: 4px 4px 10px; }
.sheet-foot { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); background: var(--bg); padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 4px; border-top: 1px solid var(--line); }
.sheet-foot .field.counted { margin-bottom: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

/* emergency cards (Ask): fixed text, shown first under the 911 banner. A chalk frame sets them
   apart from model answers; the steps are big and numbered. The draft tag is sand on its soft
   ground (the "soon" badge colours), so it reads as a caution without competing with the banner. */
.ecard { background: var(--card); border: 2px solid var(--chalk); border-radius: 4px; padding: 16px 16px 12px; margin: 0 0 14px; }
.ecard-top { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.tag-card, .tag-draft { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; padding: 3px 7px; border-radius: 3px; }
.tag-card { background: var(--chalk); color: var(--basalt); }
.tag-draft { background: var(--amber-soft); color: #E8D7AE; }
.ecard h3 { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.05; margin: 10px 0 6px; }
.ecard h4 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--ink-2); margin: 16px 0 6px; }
.ecard .signs { font-size: 15.5px; line-height: 1.5; color: var(--ink); margin: 8px 0 0; }
.ecard ol.csteps { margin: 0; padding: 0; list-style: none; }
.ecard ol.csteps li { position: relative; padding: 9px 0 9px 44px; font-size: 19px; line-height: 1.4; font-weight: 600; border-top: 1px solid var(--line); }
.ecard ol.csteps li:first-child { border-top: 0; }
.ecard ol.csteps li::before { content: counter(list-item); position: absolute; left: 0; top: 8px; width: 32px; height: 32px; background: var(--chalk); color: var(--basalt); border-radius: 3px; font-family: var(--font-display); font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.ecard ul.why { margin: 0; padding-left: 20px; }
.ecard ul.why li { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 0 0 6px; }
.ecard a.cite { color: var(--sky); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; padding: 2px 1px; }
.ecard details.csrc { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.ecard details.csrc summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--ink-2); min-height: 36px; display: flex; align-items: center; }
.ecard details.csrc a { display: block; font-size: 14px; color: var(--sky); padding: 5px 0; }
h2.libhead { margin: 18px 4px 10px; }
.card.related a { display: block; overflow-wrap: anywhere; font-size: 15px; color: var(--sky); text-decoration: underline; text-decoration-color: rgba(166,203,234,.4); text-underline-offset: 3px; padding: 7px 0; }

/* ---- the example household's way out, the update prompt, sharing and the email card (12-04) ---- */
.demobar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--ochre); color: var(--ink-on-ochre); padding: 10px 16px; font-size: 15px; line-height: 1.3; }
.demobar b { font-weight: 600; }
.demobar .btn.primary { background: var(--basalt); color: var(--chalk); min-height: 44px; font-size: 16px; white-space: nowrap; flex: none; }
.updatebar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top)); z-index: 30;
  width: min(398px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--chalk); color: var(--basalt); padding: 10px 12px 10px 16px; border-radius: 4px; font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.updatebar .btn.primary { background: var(--basalt); color: var(--chalk); flex: none; }
.sharebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 16px 4px; padding: 12px 14px 12px 16px;
  border: 1px solid var(--line); font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.15; }
.sharebar .btn { flex: none; }
.card.invite b, .card.mail b { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.1; display: block; }
.card.invite p, .card.mail > p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.card.invite, .card.mail { margin-top: 12px; }
.mailrow { display: flex; gap: 8px; margin-top: 12px; }
.mailrow input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--stone); border-radius: 4px; padding: 8px 10px; font: inherit; font-size: 17px; background: var(--bg); color: var(--ink); }
.card.mail .hint .link { font-size: 13.5px; min-height: 0; padding: 0; color: var(--ink-2); }
.card.mail .hint a { color: var(--ink-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
blockquote.preview { margin: 0 0 6px; padding: 12px 14px; border-left: 3px solid var(--ochre); background: var(--card); font-size: 16px; line-height: 1.5; }
.copybox { width: 100%; min-height: 110px; margin-top: 12px; font: inherit; font-size: 15px; padding: 10px; background: var(--card); color: var(--ink); border: 1px solid var(--stone); border-radius: 4px; }
.other select { min-height: 44px; border: 1px solid var(--stone); border-radius: 4px; padding: 6px 8px; font: inherit; font-size: 16px; background: var(--bg); color: var(--ink); }
.goalline { margin: 10px 20px 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.estnote b { color: var(--ink); font-weight: 600; }
/* keyboard focus on text fields (the fields themselves draw no outline) */
.field:focus-within, .askbox:focus-within, .searchbox:focus-within { outline: 3px solid var(--chalk); outline-offset: 2px; }
.inline:focus-visible, .other input:focus-visible, .other select:focus-visible, .medq input:focus-visible, .mailrow input:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
.row[role=button] { cursor: pointer; }
html:has(.demobar) { scroll-padding-top: 76px; }
.updatebar .x { flex: none; border: 0; background: transparent; color: var(--basalt); font-size: 22px; min-width: 36px; min-height: 36px; cursor: pointer; }
.next .nextgo { margin-top: 12px; display: inline-flex; align-items: center; text-decoration: none; }
.next a.btn.primary { background: var(--chalk); color: var(--basalt); }
.sheet { position: relative; }
.sheetx { position: sticky; float: right; top: 6px; margin: 6px 0 -50px; z-index: 2; border: 0; background: transparent; color: var(--ink-2); font-size: 26px; min-width: 44px; min-height: 44px; cursor: pointer; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast .undo { border: 0; background: transparent; color: var(--basalt); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; cursor: pointer; }
.link.small { font-size: 14px; min-height: 36px; padding: 6px 0 0; }
.medq .err { grid-column: 1 / -1; }
body:has(.scrim) .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top)); }
.kv span { overflow-wrap: anywhere; }
