:root {
  --bg: #f6f5f1; --panel: #ffffff; --ink: #1f2328; --muted: #6b7078; --line: #e2e0d9; --accent: #9a3412;
  --sourced: #1d4ed8; --derived: #0f766e; --assumption: #b45309; --rule: #7e22ce; --missing: #9ca3af;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 14px; background: #2b2118; color: #f5efe6; }
header h1 { font-size: 16px; margin: 0; font-weight: 600; }
header .phase { font-size: 11px; font-weight: 500; background: #6b4b2a; padding: 2px 6px; border-radius: 3px; margin-left: 6px; }
header .welcome { font-size: 13px; color: #f4ebde; }
header .disclaimer { font-size: 11.5px; color: #e8d9c4; }
header .disclaimer a { color: #f4ebde; }
header .title { flex: 1 1 auto; min-width: 0; }
header nav { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
header nav button { background: #4a3a2a; color: #f5efe6; border: 1px solid #6b5640; }
header a.official { color: #fde68a; font-size: 12px; text-decoration: none; border: 1px solid #a1784a; padding: 4px 8px; border-radius: 4px; }
/* The page is a column: the header takes the height its text needs, the footer its line, and main the rest. */
body { display: flex; flex-direction: column; }
header, #license-foot { flex: 0 0 auto; }
main { display: grid; grid-template-columns: 300px 1fr 360px; flex: 1 1 auto; min-height: 0; }
#license-foot { height: 20px; line-height: 20px; padding: 0 14px; font-size: 11px; color: #6b5a48; background: #f3ede4; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#license-foot a { color: inherit; }
aside { overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); }
#right { border-right: none; border-left: 1px solid var(--line); }
section { padding: 10px 12px; border-bottom: 1px solid var(--line); }
h2 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; color: #4b3a2a; }
h3 { font-size: 12px; margin: 10px 0 4px; }
label { display: block; margin: 6px 0; font-size: 12px; color: #333; }
label.inline { display: inline-block; margin: 0 0 0 6px; }
select, input[type=text], input[type=number], input:not([type]) { width: 100%; padding: 4px 6px; border: 1px solid #cfcac0; border-radius: 4px; font: inherit; background: #fff; }
label.inline select { width: auto; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row > label { flex: 1; }
button { font: inherit; padding: 4px 10px; border-radius: 4px; border: 1px solid #cfcac0; background: #f3f1ec; cursor: pointer; }
button:hover { filter: brightness(0.96); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.tabs { display: flex; gap: 4px; margin-bottom: 4px; }
.tabs button.on { background: #4b3a2a; color: #fff; border-color: #4b3a2a; }
.blurb { font-size: 12px; color: #444; margin: 4px 0; }
.note { font-size: 11.5px; color: #7c2d12; background: #fff7ed; border-left: 3px solid #fb923c; padding: 4px 6px; margin: 4px 0; }
.note:empty { display: none; }
.small { font-size: 11.5px; } .muted { color: var(--muted); }
input[type=range] { width: 100%; }
.layers { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.layers label { margin: 2px 0; display: flex; gap: 4px; align-items: center; }
#mapwrap { position: relative; overflow: hidden; }
#map { width: 100%; height: 100%; display: block; cursor: grab; }
#clockbar { position: absolute; top: 10px; left: 10px; display: flex; gap: 8px; align-items: flex-start; z-index: 2; }
#map-controls { display: flex; gap: 4px; }
#map-controls button { box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
#clock { background: rgba(255,255,255,.9); padding: 6px 10px; border-radius: 6px; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
#clock .sub { font-weight: 400; color: var(--muted); font-size: 11px; display: block; }
#legend { position: absolute; bottom: 10px; right: 10px; background: rgba(255,255,255,.92); padding: 6px 8px; border-radius: 6px; font-size: 11px; max-width: 280px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
#legend .sw { display: inline-block; width: 18px; height: 4px; vertical-align: middle; margin-right: 4px; border-radius: 2px; }
#legend .dot { display: inline-block; width: 7px; height: 7px; vertical-align: middle; margin-right: 4px; }
#legend div { white-space: nowrap; }
#status { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.85); padding: 2px 8px; border-radius: 4px; font-size: 11px; color: #444; }
#loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(246,245,241,.9); font-size: 14px; }
.badge { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 3px; color: #fff; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.b-sourced { background: var(--sourced); } .b-derived { background: var(--derived); } .b-assumption { background: var(--assumption); } .b-rule { background: var(--rule); } .b-missing { background: var(--missing); } .b-synthetic { background: #be185d; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
td, th { padding: 3px 4px; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
th { font-weight: 600; color: #4b3a2a; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv td:first-child { color: #555; width: 44%; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fbfaf7; }
.card .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card .k { font-size: 11px; color: #555; }
.card.bad .v { color: #b91c1c; } .card.good .v { color: #15803d; }
.spark { width: 100%; height: 60px; display: block; margin-top: 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
#events { margin: 0; padding-left: 18px; max-height: 320px; overflow-y: auto; font-size: 12px; }
#events li { margin: 3px 0; cursor: default; }
#events li .t { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 4px; }
#events li.k-exposure { color: #9f1239; } #events li.k-responder { color: #0e7490; } #events li.k-plan { color: #166534; } #events li.k-warn { color: #92400e; } #events li.k-queue { color: #7c2d12; }
.delta-good { color: #15803d; } .delta-bad { color: #b91c1c; }
dialog { max-width: 860px; width: 90vw; max-height: 85vh; border: 1px solid #ccc; border-radius: 8px; padding: 16px 20px; }
dialog .close { position: sticky; float: right; top: 0; border: none; background: none; font-size: 18px; }
dialog h2 { text-transform: none; font-size: 16px; letter-spacing: 0; }
dialog h3 { font-size: 13px; margin-top: 16px; }
details summary { cursor: pointer; color: #555; }
/* simple / expert views */
body.simple .expert-only, body.expert .simple-only { display: none !important; }
.modes { display: flex; border: 1px solid #6b5640; border-radius: 4px; overflow: hidden; }
header nav .modes button { border: none; border-radius: 0; background: #3a2c1f; }
header nav .modes button.on { background: #f5efe6; color: #2b2118; font-weight: 600; }
.presets { display: grid; gap: 6px; }
.preset { text-align: left; padding: 7px 9px; border-radius: 6px; background: #fbfaf7; border: 1px solid var(--line); }
.preset b { display: block; font-size: 12.5px; color: #4b3a2a; }
.preset span { font-size: 11.5px; color: #555; }
.preset.on { border-color: var(--accent); background: #fff7ed; box-shadow: inset 3px 0 0 var(--accent); }
.preset:disabled { cursor: not-allowed; background: #f3f2ef; opacity: 0.75; }
.preset:disabled b { color: #8a8079; }
.preset .why { display: block; margin-top: 3px; font-size: 11px; color: #8a4b0f; font-style: italic; }
.fires { display: grid; gap: 4px; margin-bottom: 8px; }
.fire-pick { text-align: left; padding: 5px 7px; border-radius: 6px; background: #fbfaf7; border: 1px solid var(--line); }
.fire-pick b { font-size: 12px; color: #4b3a2a; margin-right: 4px; }
.fire-pick span { font-size: 11px; color: #555; line-height: 1.3; }
.fire-pick.on { border-color: #dc2626; background: #fef2f2; box-shadow: inset 3px 0 0 #dc2626; }
.plans-ab { margin: 8px 0; font-size: 12px; }
.plans-ab div { margin: 3px 0; }
.watch { font-size: 12px; background: #f0f7ff; border-left: 3px solid #60a5fa; padding: 5px 7px; margin: 6px 0; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.btns button.on { outline: 2px solid var(--accent); }
.takeaway { font-size: 13px; background: #f0fdf4; border-left: 3px solid #16a34a; padding: 6px 8px; margin: 6px 0; }
.takeaway.mixed { background: #fefce8; border-color: #ca8a04; }
#modal.intro { max-width: 760px; }
#modal.guided { max-width: 560px; }
.guided-note h2 { text-transform: none; letter-spacing: 0; font-size: 17px; }
.guided-note p, .guided-note li { font-size: 13px; }
.guided-note li { margin: 6px 0; }
.guided-note .start { display: flex; justify-content: flex-end; margin-top: 12px; }
.guided-note .start button { font-size: 14px; padding: 6px 16px; }
.intro h2 { text-transform: none; letter-spacing: 0; font-size: 18px; }
.intro .steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0; }
.intro .steps div { background: #fbfaf7; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.intro .steps b { display: block; color: var(--accent); }
.intro .start { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
header nav #btn-intro { background: #fde68a; color: #2b2118; border-color: #fbbf24; font-weight: 700; padding: 5px 14px; }
header nav #btn-intro:hover { background: #fcd34d; filter: none; }
#legend .key-toggle { display: block; margin: 0 0 4px auto; font-size: 11px; padding: 1px 6px; }
#legend:has(> div) .key-toggle { float: right; margin: 0 0 4px 8px; }
#run-plan { display: block; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--accent); margin-top: 2px; }
.tip { color: var(--muted); cursor: help; font-size: 11px; }
.card[title]:not([title=""]), tr[title]:not([title=""]) { cursor: help; }
/* access-constrained areas */
.access-summary:empty { display: none; }
.access-summary { margin: 6px 0; padding: 5px 7px; background: #eff6ff; border-left: 3px solid #2a78d6; }
#modal.wide { max-width: 1280px; width: 96vw; }
table.sortable th { cursor: pointer; white-space: nowrap; position: sticky; top: 0; background: #fff; }
table.sortable td { font-size: 11.5px; }
#legend .ramp { display: flex; gap: 1px; margin: 2px 0 3px; }
#legend .ramp span { display: flex; flex-direction: column; font-size: 10px; color: #444; width: 36px; }
#legend .ramp i { display: block; height: 6px; margin-bottom: 1px; }
.delta-mixed { color: var(--muted); }
#clock .of { font-weight: 400; color: var(--muted); font-size: 12px; }
#clock.done { background: #ecfdf5; box-shadow: 0 0 0 2px #16a34a; }
#clock .done-tag { color: #15803d; margin-right: 4px; }
.run-status:empty { display: none; }
.run-status { margin-top: 6px; font-size: 12px; background: #ecfdf5; border-left: 3px solid #16a34a; padding: 5px 7px; }
#sim-banner { position: absolute; top: 68px; left: 10px; z-index: 3; background: #1f2937; color: #fff; font-size: 12px; padding: 6px 12px 8px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.25); max-width: 60%; }
#sim-banner[hidden] { display: none; }
#sim-banner .track { height: 3px; background: rgba(255,255,255,.25); border-radius: 2px; margin-top: 5px; overflow: hidden; }
#sim-banner-bar { height: 100%; width: 0; background: #fbbf24; transition: width .3s; }
/* Simple view: Watch a fire and Try changes (js/main.js renderSimple, js/mitigate.js) */
.step { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; margin-right: 4px; }
#simple h3 { font-size: 12.5px; margin: 10px 0 4px; color: #4b3a2a; }
.lever { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 5px 0; background: #fbfaf7; }
.lever-h { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.lever-h b { font-size: 12.5px; color: #4b3a2a; }
.lever .cost { font-size: 11px; color: #6b5d50; text-align: right; }
.cant { font-size: 11px; color: #6b4a1f; background: #fffbeb; border-left: 3px solid #f59e0b; padding: 3px 6px; margin: 4px 0; }
.chosen { border: 1px solid var(--accent); border-radius: 6px; padding: 6px 8px; background: #fff7ed; margin-bottom: 6px; }
#simple details { margin: 6px 0; font-size: 12px; }
#simple details > summary { cursor: pointer; color: #4b3a2a; }

.tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.tabs button { border: 1px solid var(--line); border-bottom: none; border-radius: 6px 6px 0 0; background: #f3f0ea; padding: 5px 10px; font-weight: 600; color: #6b5d50; margin-bottom: -1px; }
.tabs button.on { background: #fff; color: #4b3a2a; border-color: var(--accent); border-bottom: 1px solid #fff; }
.nudge { border: 1px solid var(--accent); border-left-width: 4px; border-radius: 6px; background: #fff7ed; padding: 7px 9px; margin: 8px 0; }
.nudge b { font-size: 13px; color: #7c2d12; }
.lever.pick label { cursor: pointer; }
.lever.pick.on { border-color: var(--accent); background: #fff7ed; }
.lever.grey { opacity: .62; background: #f4f4f2; }
.lever.grey label { cursor: not-allowed; }
.greynote { color: #444; font-style: italic; margin-top: 2px; }
.yourplan { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fbfaf7; margin: 6px 0; font-size: 12px; }
.tryres { border: 1px solid var(--accent); border-radius: 6px; padding: 6px 8px; margin: 6px 0; background: #fff; font-size: 12px; }
.tryres.old { border-color: var(--line); background: #fbfaf7; opacity: .85; }
table.cmp { width: 100%; border-collapse: collapse; margin: 4px 0; font-size: 11.5px; }
table.cmp td, table.cmp th { padding: 2px 4px; border-bottom: 1px solid #eee; vertical-align: top; text-align: left; }
table.cmp td.num { text-align: right; white-space: nowrap; }
.tryres .good { color: #15803d; font-weight: 600; } .tryres .bad { color: #b91c1c; font-weight: 600; } .tryres .mixed { color: #92400e; }
button.linkish { background: none; border: none; padding: 0; color: #9a3412; text-decoration: underline; font-size: 11px; cursor: pointer; margin-top: 2px; }
.mk { display: inline-block; width: 14px; height: 4px; vertical-align: 2px; margin: 0 2px; }
/* Disabled buttons look disabled (Eric, 2026-11-02: Compare looked usable before any change was picked) */
button:disabled, button.primary:disabled { background: #e7e5e0; color: #9a948a; border-color: #d6d3cc; cursor: not-allowed; box-shadow: none; }
#simple h3.phase { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #7c2d12; border-bottom: 1px solid var(--line); padding-bottom: 2px; margin-top: 12px; }
#simple h4 { font-size: 12px; margin: 8px 0 3px; color: #4b3a2a; }
/* Simple view: the playback controls live in the open tab (#pb-slot); the Run section is Expert only */
body.simple #run-section { display: none; }
#playback.today .onmap { display: none; }
#playback { margin: 6px 0; }
.scrub-label { display: block; font-size: 11px; color: #6b5d50; margin: 6px 0 0; }
.pace { margin: 6px 0 8px; }
label.famopt { margin: 8px 0 2px; font-size: 13px; }
label.famopt input { margin-right: 4px; }
.pace-pick { font-size: 12px; padding: 3px 8px; margin: 2px 4px 2px 0; }
.pace-pick.on { background: #7c2d12; color: #fff; border-color: #7c2d12; }
.bd { border-top: 1px solid #eee; padding: 5px 0; font-size: 12px; }
.bd ul { margin: 3px 0 0 16px; padding: 0; }
.tryres h3 { font-size: 12.5px; margin: 8px 0 2px; color: #4b3a2a; }
/* Set a goal (js/goal.js) */
.goals { display: grid; gap: 4px; margin: 6px 0; }
.goal-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.goal-row select { font-size: 12px; width: 165px; }
.goal-row .reach { grid-column: 1 / -1; font-size: 11px; margin: -5px 0 6px; }
.goal-row option.unreached { color: #888; }

/* Phones: one scrolling column (header, map, choices, results). Simple view is the phone view; Expert view works but is built for a larger screen. */
.phone-only { display: none; }
@media (max-width: 760px) {
  html, body { height: auto; }
  body { display: block; }
  header { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 16px; }
  header .welcome { font-size: 12.5px; }
  header .disclaimer { font-size: 11px; }
  header nav { flex-wrap: wrap; flex-shrink: 1; gap: 4px; }
  header nav button, header a.official { font-size: 11.5px; padding: 3px 7px; }
  main { display: flex; flex-direction: column; }
  #mapwrap { order: 1; height: 62vh; min-height: 320px; border-bottom: 1px solid var(--line); }
  #map { touch-action: none; }
  #left { order: 2; }
  #right { order: 3; border-left: none; }
  aside { overflow: visible; border-right: none; }
  section { padding: 10px 16px; }
  #sim-banner { max-width: calc(100% - 20px); top: 56px; }
  #legend { max-width: 60%; max-height: 40%; overflow: auto; }
  #legend div { white-space: normal; }
  #license-foot { height: auto; white-space: normal; padding: 6px 16px; line-height: 1.4; }
  .phone-only { display: block; }
  #phone-note { margin: 0; padding: 8px 16px; background: #fff7ed; border-bottom: 1px solid var(--line); font-size: 12px; }
  dialog, #modal.intro, #modal.wide { width: calc(100vw - 16px); max-width: none; max-height: 90vh; padding: 12px 14px; }
  table { display: block; overflow-x: auto; }
}
/* Guided view: four questions (js/explore.js), robustness labels (js/robust.js) */
.firehead { margin-bottom: 8px; }
.firehead select { margin-top: 2px; }
.qtabs { flex-wrap: wrap; }
.qtabs button { flex: 1 1 45%; text-align: left; }
.qtabs .step { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; background: #e7e1d6; color: #4b3a2a; font-size: 10px; font-weight: 700; margin-right: 2px; }
.qtabs button.on .step { background: #fff; }
h2.qtitle { margin-top: 10px; text-transform: none; letter-spacing: 0; font-size: 15px; }
.views { margin: 8px 0 4px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.views button.on { background: #4b3a2a; color: #fff; border-color: #4b3a2a; }
ul.findings { padding-left: 0; list-style: none; margin: 6px 0; }
ul.findings > li { margin: 0 0 7px; font-size: 12px; }
ul.findings > li.sub { margin-left: 12px; color: #444; }
.robust { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 10px; border: 1px solid; white-space: nowrap; margin-right: 2px; }
.r-consistent { color: #14532d; background: #dcfce7; border-color: #86efac; }
.r-mixed { color: #78350f; background: #fef3c7; border-color: #fcd34d; }
.r-sensitive { color: #581c87; background: #f3e8ff; border-color: #d8b4fe; }
table.card-q td:first-child { width: 34%; font-weight: 600; vertical-align: top; color: #4b3a2a; }
table.card-q td { vertical-align: top; }
@media (max-width: 760px) { .robust { white-space: normal; } }
#legend .gl { max-width: 260px; }
#legend .gl div { white-space: normal; }
#legend .gl { margin-top: 22px; }

/* ---------- Guided view, phone first (js/guided.js; Eric, 2026-11-10) ----------
   One screen with no page scroll: header (title and ⓘ), the fire line, and the map filling the rest. Results and
   changes replace the map in #g-panel, which scrolls on its own. Expert view keeps the three-column layout above. */
html.g, html.g body { height: 100%; overflow: hidden; }
body.simple { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
body.simple header { flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; position: relative; }
body.simple header h1 { font-size: 15px; line-height: 1.25; }
body.simple #left, body.simple #right, body.simple #license-foot { display: none; }
body.simple main { display: block; position: relative; flex: 1 1 auto; min-height: 0; }
body.simple #mapwrap { position: absolute; inset: 0; height: auto; min-height: 0; border: none; }
#g-info { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; padding: 0; font-size: 18px; background: #fde68a; color: #2b2118; border: 1px solid #fbbf24; font-weight: 700; }
#g-menu { position: absolute; top: 46px; right: 8px; z-index: 20; width: min(300px, calc(100vw - 16px)); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); padding: 6px; display: flex; flex-direction: column; }
#g-menu[hidden] { display: none; }
#g-menu button, #g-menu a { text-align: left; background: none; border: none; border-radius: 6px; padding: 10px 10px; font-size: 15px; color: var(--ink); text-decoration: none; }
#g-menu button:hover, #g-menu a:hover { background: #f3f1ec; }
#g-menu p { margin: 6px 10px 4px; color: var(--muted); }
#g-menu p a { padding: 0; font-size: inherit; color: inherit; text-decoration: underline; }
#g-fireline { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 15px; }
#g-fireline label { margin: 0; font-size: 15px; font-weight: 600; color: #4b3a2a; }
#g-fireline select { flex: 1; min-width: 0; font-size: 16px; padding: 6px 8px; } /* 16px: iOS does not zoom on focus */
body.simple #clockbar { top: 8px; left: 8px; }
body.simple #clock { font-size: 16px; }
body.simple #clock[hidden], body.simple #map-controls, body.simple #status { display: none; }
body.simple #legend { top: 8px; bottom: auto; right: 8px; max-width: min(260px, 62%); max-height: calc(100% - 90px); overflow: auto; }
body.simple #legend .key-toggle { font-size: 13px; padding: 3px 9px; }
body.simple #legend div { white-space: normal; }
#g-ctrl { position: absolute; left: 0; right: 0; bottom: 40px; display: flex; justify-content: center; z-index: 3; pointer-events: none; }
#g-ctrl button, #g-after { pointer-events: auto; }
#g-ctrl button { font-size: 16px; padding: 11px 20px; border-radius: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.25); font-weight: 600; }
#g-ctrl button[hidden], #g-after[hidden] { display: none; }
#g-after { display: flex; gap: 8px; }
#g-after #g-again { background: #fff; }
#g-chips { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
#g-chips[hidden] { display: none; }
#g-chips button { border: none; border-radius: 0; background: #fff; padding: 7px 11px; font-size: 13.5px; font-weight: 600; color: #4b3a2a; }
#g-chips button + button { border-left: 1px solid var(--line); }
#g-chips button[aria-pressed="true"] { background: #4b3a2a; color: #fff; }
#g-tag { position: absolute; left: 8px; top: 48px; z-index: 3; background: #fff7ed; border: 1px solid var(--accent); color: #7c2d12; border-radius: 12px; padding: 3px 9px; font-size: 12.5px; max-width: 60%; }
#g-tag[hidden] { display: none; }
#g-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; border-radius: 14px 14px 0 0; box-shadow: 0 -4px 16px rgba(0,0,0,.2); padding: 12px 16px 16px; font-size: 14px; max-height: 45%; overflow: auto; }
#g-sheet[hidden] { display: none; }
#g-sheet b { font-size: 15px; }
#g-sheet p { margin: 6px 0 0; }
#g-sheet .g-x { float: right; border: none; background: none; font-size: 18px; padding: 0 4px; }
/* Results, changes and comparisons replace the map until dismissed. */
#g-panel { position: absolute; inset: 0; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg); padding: 0 12px; border: none; }
#g-panel[hidden] { display: none; }
#g-panel > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.gv-head h2 { text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--ink); margin: 14px 0 2px; }
.gv-head p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.rc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 auto 8px; }
.rc-n { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: #7c2d12; }
.rc-l { font-size: 15px; margin: 2px 0 6px; }
.rc-f { display: flex; align-items: center; gap: 10px; }
.rc-f .linkish { font-size: 14px; }
.rc-f .linkish:disabled { color: var(--muted); background: none; border: none; text-decoration: none; }
.robust { font-size: 12px; }
.cmpgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 2px 0 8px; }
.cmpgrid small { display: block; color: var(--muted); font-size: 12px; }
.cmpgrid b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cmpgrid b.good { color: #15803d; } .cmpgrid b.worse { color: #b45309; } .cmpgrid b.same { color: var(--muted); font-weight: 600; }
.gv-foot { display: flex; flex-direction: column; gap: 8px; margin: 14px auto 18px; }
.gv-foot button { font-size: 16px; padding: 11px; border-radius: 8px; }
.gprog { margin: 0 auto 10px; font-size: 13px; }
.gprog .track { height: 6px; background: #e7e5e0; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.gprog .track div { height: 100%; background: var(--accent); transition: width .3s; }
.sortbar { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 auto 4px; }
.sortbar button { padding: 4px 10px; border-radius: 14px; font-size: 13px; }
.sortbar button[aria-pressed="true"] { background: #4b3a2a; color: #fff; border-color: #4b3a2a; }
h3.cg { font-size: 14px; margin: 14px auto 6px; color: #4b3a2a; }
.cr { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin: 0 0 6px; }
.cr.on { border-color: var(--accent); background: #fff7ed; box-shadow: inset 4px 0 0 var(--accent); }
.cr:disabled { background: #f4f3f0; color: #8a8079; }
.cr-t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 14.5px; }
.cr-c { font-size: 12.5px; color: #6b5d50; white-space: nowrap; }
.cr-s { display: block; font-size: 13px; margin-top: 3px; color: #333; }
.cr-s.muted { color: var(--muted); }
.cr-w { display: block; font-size: 12.5px; color: #92400e; margin: 4px 0 0; }
.pickbar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.08); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); margin: 0 -12px; max-width: none !important; }
.pickbar.empty { box-shadow: none; }
.pickrow { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; font-size: 14px; }
.pickrow span { flex: 1; }
.pickrow button { font-size: 15px; padding: 8px 14px; border-radius: 8px; }
.gx h2 { text-transform: none; letter-spacing: 0; font-size: 17px; }
.gx h3 { font-size: 14px; margin: 14px 0 4px; }
.gx p { font-size: 14px; margin: 0; }
#modal.gx, #modal.intro { max-width: 560px; }
.howto { padding-left: 20px; } .howto li { margin: 8px 0; font-size: 14px; }
@media (max-width: 760px) {
  body.simple header { padding: 8px 12px; }
  body.simple main { display: block; }
  body.simple aside { overflow: visible; }
}
.gv-back { display: flex; justify-content: space-between; margin: 10px auto -6px; }
.gv-back .linkish { font-size: 14px; }
.cr { padding: 7px 10px; margin: 0 0 5px; }
.cr-t { font-size: 14px; flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.cr-t b { flex: 1 1 60%; }
.cr-s { font-size: 12.5px; margin-top: 2px; }
details.cg-none summary { display: flex; align-items: baseline; gap: 8px; list-style: none; cursor: pointer; }
details.cg-none summary::-webkit-details-marker { display: none; }
details.cg-none summary h3 { margin-left: 0; margin-right: 0; }
details.cg-none summary span { font-size: 13px; color: var(--accent); text-decoration: underline; white-space: nowrap; }
details.cg-none[open] summary span { display: none; }
.cr .robust { font-size: 11px; padding: 0 5px; }
.cr-c { font-size: 12px; }
/* Change rows: a card holding the pick button and, top right, the cost button (its provenance pop-up). */
.cr { position: relative; padding: 0; }
.cr-pick { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 10px; padding: 7px 10px; font: inherit; color: inherit; }
.cr-pick:disabled { background: none; color: #8a8079; cursor: not-allowed; }
.cr.off { background: #f4f3f0; }
.cr-t b { display: block; padding-right: 9.5em; }
.cr .cr-c { position: absolute; top: 7px; right: 10px; font-size: 12px; color: #6b5d50; text-decoration: underline dotted; margin: 0; }
#g-sheet .g-src { margin-top: 8px; font-size: 13px; }
#g-sheet .g-src summary { color: var(--accent); cursor: pointer; }
#g-sheet .g-src b { font-size: 13px; }
.gv-about { margin: -6px auto 8px; font-size: 13px; }
.gv-about .linkish { font-size: 13px; }
.cg-more { display: block; margin: 0 0 4px 2px; font-size: 13.5px; padding: 4px 0; }
.sortbar > span { display: flex; align-items: center; gap: 6px; }
.sortbar .gv-about { margin: 0 0 0 auto; font-size: 13px; }
h3.cg { margin-top: 10px; }
.sortbar { flex-wrap: wrap; row-gap: 4px; }
.pickbar.empty { display: none; }
.cr-dup .cr-pick { padding: 6px 10px; }
.cr-dup .cr-s { margin: 0; }
.cr-dup .cr-s b { font-weight: 600; }
/* Plain-language labels (GV12): worse in nearly every run gets a warning color; no difference is neutral. */
.r-worse { color: #7c2d12; background: #ffedd5; border-color: #fdba74; }
.r-same { color: #4b5563; background: #f3f4f6; border-color: #d1d5db; }
/* Guided map caption: what the colors show, without opening the key (GV11, GV12). */
#g-caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 3; background: rgba(255,255,255,.92); color: #3b2a1c; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.15); max-width: calc(100% - 24px); text-align: center; pointer-events: none; }
#g-caption[hidden] { display: none; }
/* The four parts of a "people not yet out" result (GV13). */
.sp { margin: 2px 0 8px; }
.sp-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #eee; }
.sp-bar i { display: block; height: 100%; }
.sp-key { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; margin-top: 4px; font-size: 12.5px; color: #333; }
.sp-key span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-key i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.sp-car { background: #7c2d12; } .sp-noCar { background: #dc6b2f; } .sp-notOrdered { background: #d4a017; } .sp-road { background: #64748b; }
.sp-list { padding-left: 18px; margin: 4px 0; font-size: 14px; } .sp-list li { margin: 4px 0; }
