/* Lookout public preview · Soldier Data Civic tokens (STYLE-GUIDE.md 2026-09-18) */
@import url("/fonts/fonts.css");

:root {
  --navy: #0F2A4A; --navy-deep: #0A1D33; --navy-lift: #1B4478;
  --blue: #1D5FC4; --blue-strong: #164A9A; --sky: #9DB7DD; --tint: #E4ECF7; --gold: #E0A82E;
  --white: #FFFFFF; --mist: #EEF2F8; --ink: #14243A; --muted: #52637A; --rule: #D2DAE6; --field: #8A9AB0;
  --on-dark: #FFFFFF; --on-dark-strong: #DCE5F1; --on-dark-soft: #C8D5E6; --on-dark-dim: #9BAFC9; --on-dark-line: #34537B; --accent-dark: #9CC4FF;
  --water: #DCE6F0; --land: #EEF2F8; --nodata: #D9D4CC;
  --r0: #E4ECF7; --r1: #B3C9E8; --r2: #6F9BDD; --r3: #1D5FC4; --r4: #0F2A4A;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --header-h: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--white); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); text-wrap: balance; }
a { color: var(--blue-strong); }
a:hover { color: var(--navy); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.hd :focus-visible, .dk :focus-visible { outline-color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 50; background: var(--white); color: var(--navy); padding: 10px 14px; border: 2px solid var(--navy); border-radius: 3px; font: 700 14px/1 var(--display); }
.skip:focus { top: 8px; }

/* ---- type helpers ---- */
.lab { font: 600 12px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lab.blue { color: var(--blue); } .lab.sky { color: var(--sky); }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.textlink { font: 700 13px/1 var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--blue); padding-bottom: 5px; }
.textlink:hover { color: var(--blue-strong); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 3px; font: 700 14px/1 var(--display); letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background .14s, color .14s, border-color .14s; min-height: 44px; padding: 0 20px; }
.btn .ar { transition: transform .14s; }
.btn:hover .ar { transform: translateX(4px); }
.btn.pri { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn.pri:hover { background: var(--blue-strong); border-color: var(--blue-strong); color: var(--white); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); }
.btn.ghost.dk { color: var(--white); border-color: var(--white); min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.ghost.dk:hover { background: var(--white); color: var(--navy); }
.btn.wh { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn.wh:hover { background: var(--on-dark-strong); border-color: var(--on-dark-strong); }
.btn.done { background: var(--tint); color: var(--navy); border-color: var(--tint); cursor: default; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.big { min-height: 50px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.linkbtn:hover { color: var(--navy); }

/* ---- header ---- */
.hd { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--header-h); padding: 0 24px; background: var(--navy-deep); color: var(--white); }
.hd a { color: var(--on-dark-soft); text-decoration: none; }
.hd a:hover { color: var(--white); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white) !important; }
.brand .word { font: 800 16px/1 var(--display); letter-spacing: .1em; }
.brand .sep { width: 1px; height: 18px; background: rgba(255,255,255,.22); }
.brand .firm { font: 500 12px/1 var(--display); letter-spacing: .06em; color: var(--sky); }
.nav { display: flex; align-items: stretch; gap: 4px; margin-left: 12px; height: 100%; }
.dest { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 14px; font: 600 14px/1 var(--display); letter-spacing: .02em; color: var(--on-dark-soft); border-bottom: 3px solid transparent; border-top: 3px solid transparent; background: none; border-left: 0; border-right: 0; cursor: pointer; }
.dest:hover { color: var(--white); }
.dest[aria-current="page"] { color: var(--white); border-bottom-color: var(--accent-dark); }
.badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; align-items: center; justify-content: center; font-size: 11px; background: var(--blue); color: var(--white); }
.pill { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; margin-left: auto; border: 1px solid var(--on-dark-line); border-radius: 15px; font-size: 12px; color: var(--on-dark-soft); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 4px; background: var(--accent-dark); }

/* ---- page frames ---- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 48px; }
.band { padding: 56px 0; }
.band.mist { background: var(--mist); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 16px 48px; background: var(--navy-deep); color: var(--on-dark-dim); font-size: 12px; }
.foot a { color: var(--on-dark-soft); }

/* ---- overview ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: start; padding-top: 64px; padding-bottom: 56px; }
.hero h1 { font: 800 52px/1.05 var(--display); letter-spacing: -.018em; font-stretch: 92%; }
.hero .lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 34em; }
.qrow { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto 24px; gap: 24px; align-items: center; padding: 20px 12px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: background .14s; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; cursor: pointer; }
.qrow:hover { background: var(--mist); color: var(--ink); }
.qrow h2, .qrow h3 { font: 700 19px/1.2 var(--display); }
.qrow p { color: var(--muted); font-size: 15px; line-height: 1.45; }
.qrow .tag { font: 600 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); white-space: nowrap; }
.qrow .ar { font-size: 20px; color: var(--blue); transition: transform .14s; }
.qrow:hover .ar { transform: translateX(5px); }
.fig { border: 1px solid var(--rule); background: var(--white); }
.fig .mapbox { background: var(--water); aspect-ratio: 1000 / 720; overflow: hidden; }
.fig figcaption { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.45; color: var(--muted); }
.ramp { display: inline-flex; align-items: center; gap: 2px; }
.ramp i { display: inline-block; width: 28px; height: 10px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.intro h2 { font: 700 40px/1.08 var(--display); letter-spacing: -.012em; }
.intro p { font-size: 18px; line-height: 1.55; color: var(--muted); }
.trace { display: flex; align-items: center; margin-bottom: 14px; }
.trace i { display: block; width: 10px; height: 10px; border-radius: 5px; background: var(--blue); }
.trace b { display: block; width: 42px; height: 2px; background: var(--sky); }
.place { display: flex; flex-wrap: wrap; align-items: end; gap: 20px; padding: 20px 24px; background: var(--white); border: 1px solid var(--rule); margin-top: 32px; }
.place label { display: flex; flex-direction: column; gap: 8px; }
.place .chip { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; background: var(--tint); color: var(--blue-strong); font: 600 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
select, input[type="text"], input[type="search"] { font: 500 15px/1.2 var(--body); color: var(--ink); background: var(--white); border: 2px solid var(--field); border-radius: 3px; padding: 10px 12px; height: 44px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.card { background: var(--white); border: 1px solid var(--rule); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 250px; }
.card.first { border-color: var(--navy); }
.card h3 { font: 700 22px/1.2 var(--display); }
.card p { color: var(--muted); font-size: 15px; line-height: 1.5; flex: 1; }

/* ---- workspace (explore / compare) ---- */
.ws { display: flex; height: calc(100vh - var(--header-h)); min-height: 640px; }
.rail { width: 300px; flex: 0 0 auto; display: flex; flex-direction: column; overflow: auto; background: var(--white); }
.rail.left { border-right: 1px solid var(--rule); }
.rail.right { width: 360px; border-left: 1px solid var(--rule); }
.rail .sec { padding: 18px 16px 14px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; }
.rail .sec.tight { padding: 10px 8px 6px; border-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field select, .field input { height: 42px; }
.cat { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 10px; background: none; border: 0; border-top: 1px solid var(--rule); font: 700 14px/1.2 var(--display); color: var(--navy); cursor: pointer; text-align: left; }
.cat:hover { background: var(--mist); }
.cat[aria-expanded="true"] { background: var(--mist); }
.cat .cnt { font: 500 12px/1 var(--body); color: var(--muted); }
.cat .chev { transition: transform .14s; color: var(--muted); margin-left: 8px; }
.cat[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mlist { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 10px; }
.ms { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 9px 10px 9px 22px; background: none; border: 0; font: 400 14px/1.35 var(--body); color: var(--ink); text-align: left; cursor: pointer; border-radius: 3px; }
.ms:hover { background: var(--mist); }
.ms[aria-pressed="true"] { background: var(--tint); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.ms .src { font-size: 11px; color: var(--muted); white-space: nowrap; }
.chk { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.chk .cnt { margin-left: auto; font-size: 12px; color: var(--muted); }

.stage { position: relative; flex: 1; min-width: 0; background: var(--water); overflow: hidden; }
.stage svg.map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.stage svg.map.grab { cursor: grab; }
.stage svg.map.grabbing { cursor: grabbing; }
.tr { stroke: var(--white); stroke-width: .7; cursor: pointer; transition: filter .12s; vector-effect: non-scaling-stroke; }
.tr:hover { filter: brightness(.9); }
.nb { fill: var(--land); stroke: var(--white); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.county-line { fill: none; stroke: var(--navy); stroke-width: 1.6; pointer-events: none; vector-effect: non-scaling-stroke; }
.sel-halo { fill: none; stroke: var(--white); stroke-width: 6; pointer-events: none; vector-effect: non-scaling-stroke; }
.sel-line { fill: none; stroke: var(--navy-deep); stroke-width: 2.6; pointer-events: none; vector-effect: non-scaling-stroke; }
.flood { fill: #007676; fill-opacity: .32; stroke: #0A5C5C; stroke-width: .8; pointer-events: none; vector-effect: non-scaling-stroke; }
.pt { stroke: var(--white); stroke-width: 1.4; vector-effect: non-scaling-stroke; cursor: pointer; }
.pt.schools { fill: #E0A82E; stroke: #4A3600; } .pt.hospitals { fill: #B3261E; } .pt.fire_ems_stations { fill: #D9480F; } .pt.clinics { fill: #6A3D9A; }
.lbl { font-family: var(--body); font-size: 13px; font-weight: 600; fill: var(--ink); stroke: var(--white); stroke-width: 3px; paint-order: stroke; pointer-events: none; }
.lbl.water { font-size: 12px; font-weight: 400; fill: var(--muted); stroke: none; letter-spacing: .1em; }
.overlay { position: absolute; display: flex; flex-direction: column; gap: 10px; }
.overlay.tl { top: 16px; left: 16px; right: 72px; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.overlay.tr { top: 16px; right: 16px; }
.overlay.bl { bottom: 16px; left: 16px; }
.overlay.br { bottom: 16px; right: 16px; }
.mcard { background: var(--white); border: 1px solid var(--rule); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.mcard .title { font: 700 17px/1.2 var(--display); color: var(--navy); }
.mcard .sub { font-size: 12px; color: var(--muted); }
.seg { display: flex; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; background: var(--white); }
.seg button { background: var(--white); border: 0; padding: 0 12px; height: 34px; font: 600 12px/1 var(--display); letter-spacing: .02em; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.ctl { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--white); border: 1px solid var(--rule); color: var(--navy); cursor: pointer; font: 700 18px/1 var(--display); padding: 0; }
.ctl:hover { background: var(--mist); }
.ctl + .ctl { border-top: 0; }
.ctl.fit { font-size: 12px; letter-spacing: .06em; }
.legend { background: var(--white); border: 1px solid var(--rule); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 230px; }
.legend .rows { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink); }
.legend .rows span { display: flex; align-items: center; gap: 10px; }
.legend .rows i { display: inline-block; width: 28px; height: 12px; flex: 0 0 auto; }
.ramp-mini { display: none; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.ramp-mini i { display: inline-block; width: 18px; height: 10px; }
.ramp-mini span { padding: 0 3px; }
.overlay.bl .legend { max-height: min(calc(100vh - var(--header-h) - 150px), 46vh, 400px); overflow: auto; max-width: 300px; }
.legend .rows i.mk { width: 14px; height: 14px; flex: 0 0 14px; display: flex; align-items: center; justify-content: center; }
.legend .rows i.mk svg { display: block; }
.legend-body { display: flex; flex-direction: column; gap: 8px; }
.legend-more > summary { display: list-item; cursor: pointer; font: 600 12px/1.3 var(--display); color: var(--navy); min-height: 24px; padding-top: 2px; }
.legend-more[open] > summary { position: sticky; top: -12px; background: var(--white); padding-bottom: 4px; z-index: 1; }
.legend-more[open] .legend-body { margin-top: 4px; }
.legend:has(> .legend-more:not([open])) > .ramp-mini { display: flex; }
.legend .srcs { border-top: 1px solid var(--rule); padding-top: 8px; font-size: 12px; }
.legend .srcs > summary { cursor: pointer; font: 600 12px/1.3 var(--display); color: var(--navy); }
.legend .srclist { margin: 8px 0 0; padding: 0 0 0 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--ink); line-height: 1.4; }
.legend .srclist ul { margin: 4px 0 0; padding-left: 16px; color: var(--muted); }
.legend .srclist li li { margin-top: 2px; }
.legend .geo-dl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
.legend .geo-dl a { font: 600 12px/1.4 var(--display); letter-spacing: 0; text-transform: none; border-bottom-width: 1px; padding-bottom: 1px; align-self: flex-start; }
.attr { background: rgba(255,255,255,.9); padding: 6px 10px; font-size: 12px; color: var(--muted); }
.tablewrap { position: absolute; inset: 0; background: var(--white); overflow: auto; padding: 76px 24px 24px; }
table.sd { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
table.sd th { font: 600 12px/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 10px 10px; border-bottom: 2px solid var(--navy); position: sticky; top: 0; background: var(--white); cursor: pointer; }
table.sd th.r, table.sd td.r { text-align: right; }
table.sd td { padding: 11px 10px; border-bottom: 1px solid var(--rule); }
table.sd tr.row { cursor: pointer; }
table.sd tr.row:hover td { background: var(--mist); }
table.sd tr.row[aria-selected="true"] td { background: var(--tint); font-weight: 600; }
table.sd td.mut { color: var(--muted); }

/* tour (docked) */
.tour { background: var(--navy-deep); color: var(--white); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.tour .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.tour .top a, .tour .top button { color: var(--on-dark-soft); background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.tour .prog { display: grid; gap: 3px; }
.tour .prog i { height: 3px; background: var(--on-dark-line); }
.tour .prog i.on { background: var(--accent-dark); }
.tour h3 { font: 700 20px/1.2 var(--display); color: var(--white); }
.tour p { font-size: 14px; line-height: 1.5; color: var(--on-dark-soft); }
.tour .acts { display: flex; align-items: center; gap: 14px; padding-top: 2px; }
.tour .acts .back { color: var(--on-dark-soft); background: none; border: 0; cursor: pointer; font-size: 13px; }
.hint { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--tint); font-size: 13px; line-height: 1.5; color: var(--ink); }

/* measure panel */
.panel { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--rule); }
.panel h2 { font: 700 22px/1.2 var(--display); }
.bigv { display: flex; align-items: baseline; gap: 10px; }
.bigv .v { font: 800 44px/1 var(--display); letter-spacing: -.02em; color: var(--navy); }
.bigv .u { font-size: 13px; color: var(--muted); }
.track { position: relative; height: 14px; background: var(--mist); border: 1px solid var(--rule); }
.track .ci { position: absolute; top: 0; bottom: 0; background: var(--r1); }
.track .v { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--navy); }
.track-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.empty { border: 2px dashed var(--rule); padding: 12px 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; line-height: 1.45; }
.dl dt { color: var(--muted); } .dl dd { color: var(--ink); }
details.about { padding: 14px 20px 18px; border-bottom: 1px solid var(--rule); }
details.about summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font: 700 14px/1.2 var(--display); color: var(--navy); }
details.about summary::-webkit-details-marker { display: none; }
details.about .chev { transition: transform .14s; color: var(--muted); }
details.about[open] .chev { transform: rotate(180deg); }
.railfoot { margin-top: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--rule); background: var(--white); position: sticky; bottom: 0; }
.railfoot .note { font-size: 12px; color: var(--muted); text-align: center; }

/* compare */
.cmp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.cmp-head h1 { font: 800 34px/1.1 var(--display); letter-spacing: -.015em; font-stretch: 94%; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mchip { display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; background: var(--white); border: 1px solid var(--rule); font-size: 14px; color: var(--ink); }
.mchip b { font: 700 14px/1 var(--display); color: var(--navy); }
.mchip .src { font-size: 12px; color: var(--muted); }
.mchip button { background: none; border: 0; color: var(--blue-strong); font-size: 12px; cursor: pointer; padding: 4px; }
.mchip.add { border: 2px dashed var(--field); color: var(--blue-strong); font-weight: 600; cursor: pointer; background: transparent; }
.mchip.add:hover { background: var(--white); }
.cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: stretch; margin-top: 20px; }
.cmp-map { position: relative; background: var(--water); border: 1px solid var(--rule); min-height: 560px; overflow: hidden; }
.cmp-card { background: var(--white); border: 1px solid var(--rule); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.cmp-card .hero-n { display: flex; align-items: baseline; gap: 8px; }
.cmp-card .hero-n .n { font: 800 56px/1 var(--display); letter-spacing: -.02em; color: var(--navy); }
.cmp-card .hero-n .of { font: 600 20px/1 var(--display); color: var(--muted); }
.cmp-card h2 { font: 700 20px/1.25 var(--display); }
.bar { display: flex; height: 14px; border: 1px solid var(--rule); overflow: hidden; }
.bar i { display: block; height: 100%; }
.picker { position: absolute; z-index: 30; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10,29,51,.4); display: flex; align-items: flex-start; justify-content: center; padding-top: 80px; }
.picker .box { background: var(--white); width: min(560px, 92vw); max-height: 70vh; overflow: auto; border: 1px solid var(--rule); padding: 20px; display: flex; flex-direction: column; gap: 12px; }

/* annex */
.ahead { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: end; }
.ahead h1 { font: 800 40px/1.08 var(--display); letter-spacing: -.015em; font-stretch: 94%; }
.ahead .lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 40em; }
.progress { background: var(--white); border: 1px solid var(--rule); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.progress .segs { display: flex; gap: 4px; height: 6px; }
.progress .segs i { flex: 1; background: var(--navy); }
.progress .segs i.add { background: var(--blue); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; padding: 40px 0 64px; }
.secrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 12px; border-bottom: 1px solid var(--rule); }
.secrow h3, .secrow h2 { font: 700 17px/1.2 var(--display); }
.secrow p { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ck { width: 24px; height: 24px; border-radius: 12px; background: var(--tint); color: var(--blue-strong); display: flex; align-items: center; justify-content: center; font: 700 13px/1 var(--display); }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; font: 600 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.tag.ok { color: var(--blue-strong); background: var(--tint); }
.rm { background: none; border: 0; color: var(--blue-strong); font: 600 13px/1 var(--body); cursor: pointer; padding: 8px 10px; border-radius: 3px; }
.rm:hover { background: var(--mist); color: var(--navy); }
.undo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--tint); font-size: 13px; }
.cover { background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--navy); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.cover .t { font: 800 24px/1.1 var(--display); letter-spacing: -.01em; color: var(--navy); }
.cover .mini { background: var(--water); aspect-ratio: 1000 / 560; overflow: hidden; border: 1px solid var(--rule); }
.dlrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); }
.dlrow .fmt { font: 700 13px/1 var(--display); color: var(--navy); }
.dlrow .st { font-size: 12px; color: var(--muted); }
.dlrow a.st { font-weight: 600; color: var(--blue-strong); }
.quote { background: var(--tint); padding: 18px 24px; display: flex; flex-direction: column; gap: 6px; }

/* skeleton / loading */
.sk { background: #E6ECF3; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0)); transform: translateX(-100%); animation: sh 1.6s ease-in-out infinite; }
@keyframes sh { to { transform: translateX(100%); } }
.spin { width: 16px; height: 16px; border-radius: 8px; border: 2px solid var(--rule); border-top-color: var(--blue); animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--rule); padding: 12px 18px; box-shadow: 0 8px 24px rgba(15,42,74,.12); z-index: 5; }
.fade-in { animation: fin .35s ease-out both; }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
.view-enter { animation: ve .22s ease-out both; }
@keyframes ve { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--navy-deep); color: var(--white); padding: 12px 16px; font-size: 14px; display: flex; align-items: center; gap: 14px; box-shadow: 0 8px 24px rgba(15,42,74,.25); }
#toast:empty { display: none; }
#toast a, #toast button { color: var(--accent-dark); background: none; border: 0; cursor: pointer; font: inherit; text-decoration: underline; }

/* phone tab bar */
.tabbar { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media (max-width: 1100px) {
  .rail { width: 260px; } .rail.right { width: 320px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { font-size: 42px; }
}

@media (max-width: 760px) {
  :root { --header-h: 56px; }
  .wrap { padding: 0 16px; }
  .hd { padding: 0 16px; gap: 10px; }
  .nav, .pill, .brand .sep, .brand .firm { display: none; }
  .hero { padding-top: 28px; padding-bottom: 24px; }
  .hero h1 { font-size: 31px; }
  .hero .lead { font-size: 16px; }
  .qrow { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: "t a" "p a"; row-gap: 4px; padding: 14px 4px; }
  .qrow h2 { grid-area: t; } .qrow p { grid-area: p; } .qrow .ar { grid-area: a; }
  .qrow .tag { display: none; }
  .intro { grid-template-columns: 1fr; gap: 12px; }
  .intro h2 { font-size: 26px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .foot { padding: 16px; }
  .ws { display: block; height: auto; min-height: 0; }
  .ws[data-tab="map"] { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 64px); min-height: 0; }
  .ws > .rail, .ws > .stage { display: none; }
  .ws[data-tab="map"] > .stage, .ws[data-tab="data"] > .rail.left, .ws[data-tab="details"] > .rail.right { display: flex; }
  .ws[data-tab="map"] > .stage { display: block; flex: 1 1 auto; height: auto; min-height: 220px; }
  .rail, .rail.right { width: auto; border: 0; min-height: calc(100vh - var(--header-h) - 64px); }
  .overlay.tl { right: 60px; }
  .overlay.tl .seg[aria-label="Map extent"] { display: none; }
  .overlay.br, .overlay.bl .legend + .legend { display: none; }
  .legend { min-width: 0; padding: 8px 10px; }
  .overlay.bl { bottom: 34px; }
  .overlay.bl .legend { max-height: 36vh; max-width: calc(100vw - 32px); }
  .legend-more[open] .legend-body { margin-top: 8px; }
  .legend-more > summary { display: list-item; cursor: pointer; font: 600 12px/1.3 var(--display); color: var(--navy); min-height: 24px; padding-top: 4px; }
  .legend .lab { font-size: 11px; }
  .ramp-mini { display: flex; }
  .mcard { padding: 8px 12px; }
  .mcard .title { font-size: 15px; }
  .pill { display: flex; margin-left: auto; padding: 0 10px; height: 26px; font-size: 11px; }
  .pill .txt { display: none; }
  .tablewrap { position: static; padding: 16px; }
  .tour .acts .next { min-height: 40px; }
  .sheet { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; background: var(--white); border-top: 1px solid var(--rule); flex: 0 0 auto; }
  .tabbar { display: flex; position: sticky; bottom: 0; z-index: 30; background: var(--white); border-top: 1px solid var(--rule); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; background: none; border: 0; border-top: 3px solid transparent; font: 600 11px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; position: relative; }
  .tab[aria-current="page"] { color: var(--navy); border-top-color: var(--blue); }
  .tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tab .badge { position: absolute; top: 8px; right: calc(50% - 24px); }
  .cmp-grid, .ahead, .two { grid-template-columns: 1fr; gap: 20px; }
  .cmp-map { min-height: 60vh; }
  .cmp-head h1 { font-size: 26px; }
  .ahead h1 { font-size: 30px; }
  .band { padding: 28px 0; }
}
@media (min-width: 761px) { .sheet { display: none; } }

/* ---- MapLibre host and popups ---- */
.maphost-slot { position: absolute; inset: 0; }
.maphost, .maphost.maplibregl-map { position: absolute !important; inset: 0; width: 100%; height: 100%; }
.maphost .maplibregl-canvas-container, .maphost .maplibregl-canvas { width: 100%; height: 100%; }
.maphost .maplibregl-canvas { outline: none; }
.overlay { z-index: 3; }
/* Facility and tract popups sit above the title card, legend and view switch; taps between the overlay cards reach the map. */
.lk-popup { z-index: 6; }
.overlay.tl { pointer-events: none; }
.overlay.tl > * { pointer-events: auto; }
.map-loading { z-index: 4; }
.maplibregl-ctrl-bottom-right { z-index: 3; }
.maplibregl-ctrl-attrib { font: 11px/1.3 var(--body) !important; color: var(--muted) !important; background: rgba(255,255,255,.9) !important; border-radius: 0 !important; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib.maplibregl-compact { margin: 0 !important; }
.lk-popup .maplibregl-popup-content { font: 13px/1.45 var(--body); color: var(--ink); background: var(--white); border: 1px solid var(--rule); border-radius: 0; padding: 10px 12px; box-shadow: 0 8px 24px rgba(15,42,74,.14); }
.lk-popup .maplibregl-popup-tip { border-top-color: var(--white) !important; border-bottom-color: var(--white) !important; }
.lk-popup .pm { color: var(--muted); font-size: 12px; }
.lk-popup strong { font: 700 13px/1.3 var(--display); color: var(--navy); }
@media (max-width: 760px) { .maplibregl-ctrl-bottom-right { bottom: 0; } .lk-popup .maplibregl-popup-content { font-size: 12px; padding: 8px 10px; } }

/* ---- access and phone (lane D, 2026-10-06) ---- */
/* Overview question rows: the heading holds the button; the whole row stays clickable */
.qrow { position: relative; }
.qbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.qbtn::after { content: ""; position: absolute; inset: 0; }
.qbtn:focus-visible { outline: none; }
.qrow:has(.qbtn:focus-visible) { outline: 3px solid var(--blue); outline-offset: -3px; background: var(--mist); }
/* tract table: each row's first cell is a real button */
.rowbtn { display: block; width: 100%; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rowbtn:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
table.sd tr.row:focus-within td { background: var(--mist); }
table.sd tr.row[aria-current="true"] td { background: var(--tint); font-weight: 600; }
/* Table and List views: the title card and view switch sit above the table instead of floating over its first rows */
.stage:has(> .tablewrap) { display: flex; flex-direction: column; background: var(--white); }
.stage:has(> .tablewrap) > .overlay.tl { position: relative; top: auto; left: auto; right: auto; order: -1; flex: 0 0 auto; padding: 16px 24px 8px; }
.stage:has(> .tablewrap) > .tablewrap { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 24px 24px; }
.fl-h { font: 700 20px/1.2 var(--display); }
/* map: visible focus ring when the canvas has keyboard focus */
.maphost .maplibregl-canvas:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
/* Compare: tracts meeting all rules, as text */
.cmp-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 16px/1.25 var(--display); color: var(--navy); }
.cmp-list summary::-webkit-details-marker { display: none; }
.cmp-list .chev { transition: transform .14s; color: var(--muted); }
.cmp-list[open] .chev { transform: rotate(180deg); }
.cmp-list ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; }
.cmp-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--rule); }
.cmp-list li .linkbtn { align-self: flex-start; font: 700 14px/1.3 var(--display); }
.cmp-list li .linkbtn[aria-current="true"] { color: var(--navy); text-decoration-thickness: 2px; }
/* phone sheet: the selected tract is named in large type so it cannot be mistaken for the area on screen */
.sheet-sel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-name { font: 800 20px/1.15 var(--display); color: var(--navy); }
@media (max-width: 760px) {
  .ws[data-tab="map"] > .stage:has(> .tablewrap) { display: flex; }
  .stage:has(> .tablewrap) > .overlay.tl { padding: 12px 16px 6px; }
  .stage:has(> .tablewrap) > .tablewrap { padding: 4px 16px 16px; }
  table.sd { font-size: 13px; }
  table.sd th, table.sd td { padding-left: 6px; padding-right: 6px; }
  .place .chip { height: auto; min-height: 44px; padding: 8px 14px; line-height: 1.3; }
  .place label { min-width: 0 !important; max-width: 100%; }
  .place select, .place input { max-width: 100%; min-width: 0 !important; }
  .sheet .btn, .hd .btn { white-space: nowrap; }
}
@media (max-width: 360px) { .hd { gap: 8px; } .hd .btn.ghost.dk { padding: 0 10px; } .pill { padding: 0 8px; } }

/* ---- page shells, round 2 (lane E, 2026-10-06) ---- */
/* Explore: the map title card's measure name is the page h1; phones get a visible h1 on the Measures and Details tabs */
.mcard h1.title { font: 700 17px/1.2 var(--display); color: var(--navy); }
.tab-h1 { font: 700 18px/1.25 var(--display); color: var(--navy); padding: 14px 16px 10px; background: var(--white); border-bottom: 1px solid var(--rule); }
.rail-src { font-size: 12px; line-height: 1.45; }
/* Statewide is not in the preview: a disabled-looking button with a note on hover and keyboard focus */
.seg[aria-label="Map extent"] { position: relative; overflow: visible; }
.seg button.off { background: var(--mist); color: var(--muted); cursor: not-allowed; }
.seg .tip { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 6; width: max-content; max-width: 240px; padding: 6px 10px; background: var(--navy-deep); color: var(--white); font: 500 12px/1.35 var(--body); }
.seg button.off:hover + .tip, .seg button.off:focus-visible + .tip { display: block; }
/* Compare: grid columns may shrink below their content (the FEMA rating floor row made the page 449 px wide on a 360 px phone) */
.cmp-grid > * { min-width: 0; }
.cmp-card > label { flex-wrap: wrap; }
.cmp-card select { max-width: 100%; min-width: 0; }
.rule-ok { font-weight: 600; }
.rule-no { color: var(--muted); }
/* phone section menu (jump links) on Compare and Annex */
.jump { display: none; }
.jump-target { scroll-margin-top: calc(var(--header-h) + 12px); }
.jump-target:focus { outline: none; }
a.tab { text-decoration: none; }
button[data-act="reset-build"] { min-height: 24px; } /* 24 px target (WCAG 2.5.8) */
@media (max-width: 760px) {
  .cmp-grid, .ahead, .two { grid-template-columns: minmax(0, 1fr); }
  .jump { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
  .jump ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
  .jump a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 18px; background: var(--white); font: 600 13px/1 var(--display); color: var(--blue-strong); text-decoration: none; }
  .jump a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .sheet-tour { flex: 0 0 auto; }
  .sheet-tour .tour { padding: 12px 16px 14px; gap: 8px; }
  .sheet-tour .tour h3 { font-size: 17px; }
  .sheet-tour .tour p { font-size: 13px; line-height: 1.45; }
  html { scroll-padding-bottom: 72px; } /* keyboard focus is not hidden under the sticky tab bar */
}

/* link from the Lookout header back to the list of demos */
.hd .alldemos{font:600 13px/1 var(--body);color:#C9D6EA;text-decoration:none;padding:8px 10px;border:1px solid rgba(255,255,255,.22);border-radius:4px;white-space:nowrap}
.hd .alldemos:hover{color:#fff;border-color:rgba(255,255,255,.5)}
@media (max-width:1100px){.hd .alldemos{display:none}}

.brand .sdmark{display:block;flex:none}
