/* Still Here — government view. Same Apple HIG web tokens as the public app (css/apple/): light by default, dark with the system.
   Layout: header · filter row · stat tiles · (queue | map with a sheet for detail). Explicit pane heights so Safari scrolls (audit A1).
   Status is a dot and a word. One filled button per sheet. No uppercase. Colour only for status and the map scale. */
:root {
  /* Light by default, like the public app (Apple grouped style); dark only when the system is dark */
  --canvas: #F2F2F7; --group: #FFFFFF; --group2: #F7F7FA; --elev: #FFFFFF; --label: #1D1D1F; --label2: #6E6E73; --label3: rgb(60 60 67 / .45);
  --hair: rgb(0 0 0 / .08); --fill: rgb(120 120 128 / .12); --fill2: rgb(120 120 128 / .2); --thumb: #FFFFFF;
  --accent: var(--apple-blue); --red: var(--apple-red); --orange: var(--apple-orange); --amber: var(--apple-orange); --green: var(--apple-green); --grey: var(--apple-gray); --blue: var(--apple-blue);
  --r0: #F8E5E3; --r1: #F4C6C1; --r2: #EFA49C; --r3: #EA8178; --r4: #E45F55; --r5: #DC4438; --nodata: #E5E5EA; --nodata-line: #D1D1D6; --flow: #007AFF; --group-solid: #FFFFFF; --st-reached: var(--apple-green); --st-going: var(--apple-orange); --st-nobody: var(--apple-red); --s0: #df4b4b; --s3: #1b8a4d;
  --land: #E3E3E8; --edge: rgb(255 255 255 / .9); --outline: #8E8E93; --sel: #1D1D1F; --bg-map: #EAF0F6;
  --btn-prominent-bg: var(--apple-blue); --btn-prominent-fg: #FFFFFF; --ease: cubic-bezier(.32, .72, 0, 1);
  --card-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 16px rgb(0 0 0 / .05);
  --hdr: 60px; --filters: 52px; --kpis: 118px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --canvas: #08080A; --group: #1C1C1E; --group2: #242426; --elev: #1C1C1E; --label: #F5F5F7; --label2: rgb(235 235 245 / .62); --label3: rgb(235 235 245 / .36);
  --hair: rgb(255 255 255 / .08); --fill: rgb(120 120 128 / .24); --fill2: rgb(120 120 128 / .36); --thumb: #48484A;
  --r0: #2B2526; --r1: #47272A; --r2: #682A2E; --r3: #8E2E33; --r4: #B8353A; --r5: #E04448; --nodata: #3A3A3E; --nodata-line: #4A4A50; --flow: #0091FF; --group-solid: #1C1C1E;
  --land: #2c2c30; --edge: rgb(0 0 0 / .55); --outline: #636366; --sel: #F5F5F7; --bg-map: #0e0e10; --btn-prominent-bg: #F5F5F7; --btn-prominent-fg: #1D1D1F; --card-shadow: none;
} }
:root[data-theme="dark"] {
  --canvas: #08080A; --group: #1C1C1E; --group2: #242426; --elev: #1C1C1E; --label: #F5F5F7; --label2: rgb(235 235 245 / .62); --label3: rgb(235 235 245 / .36);
  --hair: rgb(255 255 255 / .08); --fill: rgb(120 120 128 / .24); --fill2: rgb(120 120 128 / .36); --thumb: #48484A;
  --r0: #2B2526; --r1: #47272A; --r2: #682A2E; --r3: #8E2E33; --r4: #B8353A; --r5: #E04448; --nodata: #3A3A3E; --nodata-line: #4A4A50; --flow: #0091FF; --group-solid: #1C1C1E;
  --land: #2c2c30; --edge: rgb(0 0 0 / .55); --outline: #636366; --sel: #F5F5F7; --bg-map: #0e0e10; --btn-prominent-bg: #F5F5F7; --btn-prominent-fg: #1D1D1F; --card-shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--label); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.app { height: 100vh; display: flex; flex-direction: column; }

/* header: glass, the functional layer */
.hdr { flex: none; height: var(--hdr); display: flex; align-items: center; gap: 18px; padding: 0 18px; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); border-bottom: 1px solid var(--hair); position: relative; z-index: 6; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: none; }
.brand span { white-space: nowrap; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: #1D1D1F; box-shadow: inset 0 0 0 1px var(--hair); display: grid; place-items: center; flex: none; }
.brand .mark i { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--apple-green); }
.brand b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.brand span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--label2); cursor: help; }
.brand span .ic { color: var(--apple-red); }
.tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fill); gap: 2px; }
.tabs button { border: 0; background: transparent; color: var(--label2); font-size: 13.5px; font-weight: 500; min-height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s; }
.tabs button.on { background: var(--thumb); color: var(--label); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.who { font-size: 13px; color: var(--label2); }
.clock { font-weight: 600; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label2); cursor: help; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--apple-orange); }

/* filter row */
.filters { flex: none; height: var(--filters); display: flex; align-items: center; gap: 14px; padding: 0 18px; overflow-x: auto; }
.filters .lab { font-size: 13px; color: var(--label2); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fill); gap: 2px; flex: none; }
.seg button { border: 0; background: transparent; color: var(--label2); font-size: 13px; font-weight: 500; min-height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s; }
.seg button.on { background: var(--thumb); color: var(--label); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.proj { font-size: 13px; color: var(--label2); display: inline-flex; align-items: center; gap: 6px; cursor: help; white-space: nowrap; }
.proj::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--apple-orange); }
.proj.now::before { background: var(--apple-green); }

/* status: a dot and a word */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label2); white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--apple-gray); flex: none; }
.st.red::before { background: var(--apple-red); } .st.orange::before { background: var(--apple-orange); } .st.green::before { background: var(--apple-green); } .st.blue::before { background: var(--apple-blue); }
.st.red, .st.orange { color: var(--label); }

/* stat tiles */
.kpis { flex: none; height: var(--kpis); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 4px 18px 14px; }
.kpi { background: var(--group); border-radius: 16px; padding: 12px 14px; cursor: help; min-width: 0; position: relative; }
.kpi .l { font-size: 13px; line-height: 1.3; color: var(--label2); padding-right: 20px; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 13px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.info { position: absolute; top: 11px; right: 11px; color: var(--label3); display: inline-flex; }
.inl-info { position: static; display: inline-flex; margin-left: 6px; vertical-align: -2px; cursor: help; color: var(--label3); }

/* situation body */
.sit-body { height: calc(100vh - var(--hdr) - var(--filters) - var(--kpis)); display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; padding: 0 18px 18px; }
.queue { height: 100%; min-height: 0; display: flex; flex-direction: column; background: var(--group); border-radius: 18px; overflow: hidden; }
.q-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 14px 10px; }
.q-head b { font-size: 17px; font-weight: 600; letter-spacing: -.015em; margin-right: auto; }
.q-head .btn-plain { min-block-size: 30px; padding-inline: 8px; gap: 4px; font-size: 13px; }
.q-list { flex: 1; min-height: 0; overflow-y: auto; }
.qi { position: relative; padding: 12px 16px; cursor: pointer; transition: background .15s; }
.qi + .qi::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--hair); }
.qi:hover { background: var(--fill); }
.qi.on { background: var(--fill2); }
.qi.on::before, .qi.on + .qi::before { display: none; }
.qi.done .qi-title { color: var(--label2); }
.qi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--label2); margin-bottom: 4px; }
.qi-title { font-size: 15px; font-weight: 500; line-height: 1.35; }
.qi-why { font-size: 13px; color: var(--label2); margin-top: 3px; line-height: 1.4; }
.qi-foot { margin-top: 10px; }
.btn { font-size: 14px; letter-spacing: -.01em; cursor: pointer; }
.btn-compact { font-size: 13.5px; padding-inline: 14px; }
.donetext { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label2); }
.donetext .ic { color: var(--apple-green); }
.upd { padding: 11px 16px; position: relative; }
.upd + .upd::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--hair); }
.upd .m { font-size: 12.5px; color: var(--label2); }
.upd b { font-weight: 600; color: var(--label); }

/* map zone */
.mapzone { position: relative; height: 100%; min-height: 0; display: flex; flex-direction: column; background: var(--bg-map); border-radius: 18px; overflow: hidden; }
.map-tools { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: nowrap; overflow-x: auto; }
.crumb { font-size: 14px; color: var(--label2); white-space: nowrap; margin-right: auto; padding-left: 4px; }
.crumb b { color: var(--label); font-weight: 600; }
.crumb button { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 0 4px; font-size: 14px; }
.chip { border: 0; background: var(--fill); color: var(--label2); font-size: 13px; font-weight: 500; min-height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.chip.on { color: var(--label); background: var(--fill2); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; opacity: .35; }
.chip.on i { opacity: 1; }
.stage { flex: 1; min-height: 0; position: relative; padding: 8px; }
.has-drawer .stage .mapsvg { right: 384px; }
.has-drawer .ov-trend { display: none; }
.has-drawer .map-tools { padding-right: 392px; }
.stage .mapsvg { position: absolute; inset: 8px; }
.stage svg { width: 100%; height: 100%; display: block; }
.shape { cursor: pointer; transition: opacity .12s; }
.shape:hover { opacity: .82; }
.mlabel { fill: var(--label); font-weight: 600; paint-order: stroke; stroke: var(--bg-map); stroke-linejoin: round; pointer-events: none; }
.mlabel.strong { font-weight: 700; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--label2); cursor: help; align-items: center; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.legend .info { position: static; }
.overlay { position: absolute; border-radius: 14px; padding: 8px 12px; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--glass-edge), var(--glass-shadow); }
.ov-trend { left: 12px; bottom: 12px; width: 380px; padding: 10px 12px 6px; }
.ov-trend .t { font-size: 13px; color: var(--label2); margin-bottom: 2px; }
.ov-trend .t b { color: var(--label); font-weight: 600; }

/* detail sheet */
.drawer { position: absolute; top: 8px; right: 8px; bottom: 8px; width: 372px; max-width: calc(100% - 16px); background: var(--elev); border-radius: 16px; box-shadow: 0 0 0 1px var(--hair), 0 24px 60px rgb(0 0 0 / .55); display: flex; flex-direction: column; z-index: 5; }
.dr-head { flex: none; display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px; }
.dr-head h2 { margin: 6px 0 2px; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.dr-head .x { margin-left: auto; border: 0; background: var(--fill); color: var(--label2); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none; display: grid; place-items: center; position: relative; }
.dr-head .x::after { content: ""; position: absolute; inset: -7px; }
.dr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 22px; }
.dr-body h3 { font-size: 15px; font-weight: 600; color: var(--label); margin: 18px 0 6px; letter-spacing: -.01em; }
.dr-body h3:first-child { margin-top: 2px; }
.dr-body p { margin: 0 0 6px; color: var(--label2); font-size: 14px; }
.dr-body .qi { background: var(--group); border-radius: 12px; margin-top: 6px; }
.src { font-size: 12.5px; color: var(--label3); margin-top: 12px; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num { background: var(--group); border-radius: 12px; padding: 10px 12px; cursor: help; }
.num .l { font-size: 12.5px; color: var(--label2); line-height: 1.3; }
.num .v { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-top: 12px; }
.stack i { display: block; height: 100%; }
.stack-l { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--label2); margin-top: 8px; }
.stack-l i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.rank { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rank td { padding: 8px 4px; border-bottom: 1px solid var(--hair); }
.rank tr:last-child td { border-bottom: 0; }
.rank td.n { text-align: right; font-variant-numeric: tabular-nums; }

/* chart */
.grid { stroke: var(--hair); stroke-width: 1; }
.axis { font-size: 10.5px; fill: var(--label3); }
.axis.strong { fill: var(--label2); font-weight: 600; }
.marker { stroke: var(--label3); stroke-dasharray: 3 3; }
.xhair { stroke: var(--label2); stroke-width: 1; }

/* full pages */
.page { height: calc(100vh - var(--hdr)); overflow-y: auto; }
.page-in { max-width: 1080px; margin: 0 auto; padding: 30px 22px 70px; }
.page h1 { font-size: 34px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.022em; line-height: 1.1; }
.page .lede { font-size: 17px; color: var(--label2); margin: 0 0 26px; max-width: 46em; }
.sec { background: var(--group); border-radius: 18px; padding: 18px 20px; margin-bottom: 16px; }
.sec h2 { font-size: 20px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.02em; }
.sec .sub { color: var(--label2); font-size: 14px; margin: 0 0 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 13px; font-weight: 500; color: var(--label2); padding: 8px 8px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
table.t td { padding: 11px 8px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
table.t td b { font-weight: 500; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.meter { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.meter .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 3px; }
.meter span { font-size: 13px; color: var(--label2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.restricted { box-shadow: inset 0 0 0 1px rgb(255 66 69 / .35); }
.restricted .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--label2); margin-bottom: 6px; }
.restricted .tag .ic { color: var(--apple-red); }
.zrow { padding: 12px 0; position: relative; }
.zrow + .zrow { border-top: 1px solid var(--hair); }
.zrow .zt { display: flex; justify-content: space-between; gap: 8px; }
.zrow .zt b { font-weight: 600; }
.zrow .zr { font-size: 13.5px; margin-top: 2px; }
.dumb { width: 100%; }
.toggle { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; font-size: 14px; color: var(--label); padding: 6px 0; white-space: nowrap; }
.toggle .sw { width: 44px; height: 26px; border-radius: 13px; background: var(--fill2); position: relative; transition: background .2s var(--ease); flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .3); transition: transform .2s var(--ease); }
.toggle.on .sw { background: var(--apple-green); }
.toggle.on .sw::after { transform: translateX(18px); }
.world { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 12px; padding: 0 18px 18px; height: calc(100vh - var(--hdr) - var(--filters)); }
.world .wmap { position: relative; background: var(--bg-map); border-radius: 18px; overflow: hidden; min-height: 0; }
.world .wside { overflow-y: auto; min-height: 0; }
.world .wside .sec { padding: 16px; margin-bottom: 12px; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.wrow:hover .wn { color: var(--accent); }
.wn { width: 112px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aid { padding: 9px 0; position: relative; } .aid + .aid { border-top: 1px solid var(--hair); }
.aid b { font-weight: 500; } .aid span { display: block; color: var(--label2); font-size: 13px; }

/* hover card: glass */
.tip { position: fixed; z-index: 1000; max-width: 300px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; pointer-events: none; display: none; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--glass-edge), var(--glass-shadow); color: var(--label); }
.tip b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; } .tip b.inl { display: inline; }
.tip .src { color: var(--label2); font-size: 12px; margin-top: 6px; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; } .tip .row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip .hintl { color: var(--accent); margin-top: 5px; font-size: 12px; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

@media (max-width: 1180px) { .sit-body { grid-template-columns: 310px minmax(0, 1fr); } .who { display: none; } .ov-trend { width: 250px; } .ov-trend #trend { display: none; } .cols { grid-template-columns: 1fr; } .world { grid-template-columns: minmax(0, 1fr) 310px; } }
@media (max-width: 900px) {
  body { overflow-x: hidden; overflow-y: auto; } .app { height: auto; min-height: 100vh; }
  .hdr { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; } .hdr-r { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
  .sit-body { grid-template-columns: 1fr; height: auto; } .queue { height: 440px; } .mapzone { height: 580px; }
  .has-drawer .stage .mapsvg { right: 8px; } .has-drawer .map-tools { padding-right: 12px; } .drawer { width: auto; left: 8px; }
  .page { height: auto; } .world { grid-template-columns: 1fr; height: auto; } .world .wmap { height: 420px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* map controls and scale (map redesign, 24 Oct) */
.mapsvg { touch-action: pan-y; }
.mapsvg.zoomed { cursor: grab; touch-action: none; }
.mapzoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--glass-edge), var(--glass-shadow); z-index: 4; }

.mapzoom button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--label); display: grid; place-items: center; cursor: pointer; position: relative; }
.mapzoom button + button::before { content: ""; position: absolute; top: 0; left: 8px; right: 8px; height: 1px; background: var(--hair); }
.mapzoom button:hover { background: var(--fill); }
.mapzoom button:disabled { color: var(--label3); cursor: default; }
.legend .lt { color: var(--label); font-weight: 500; }
.legend .ramp { display: inline-flex; border-radius: 4px; overflow: hidden; height: 10px; }
.legend .ramp i { width: 24px; height: 10px; margin: 0; border-radius: 0; }
.legend .ends { display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
.legend .ends span:first-child::after { content: "to"; margin-left: 6px; color: var(--label3); }
.legend .nd i { background: repeating-linear-gradient(45deg, var(--nodata) 0 3px, var(--nodata-line) 3px 5px); }
.projband { fill: var(--fill); opacity: .35; }
.trendline { font-size: 13px; color: var(--label); margin: 2px 0 6px; line-height: 1.4; }
.legend.compact { gap: 8px; flex-wrap: nowrap; white-space: nowrap; }
.legend.compact .ramp i { width: 16px; }

/* 24 Oct evening: plans inside problems, the need map's legend, numbered world arrows */
.qi-have { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 13px; color: var(--label2); line-height: 1.35; }
.qi-have svg { flex: none; margin-top: 2px; color: var(--apple-blue); } .qi-have b { color: var(--label); font-weight: 500; }
.qi-left { font-size: 13px; color: var(--label2); margin-top: 6px; line-height: 1.35; }
.dr-body .have { padding: 8px 10px; background: var(--group); border-radius: 10px; margin-top: 6px; }
.dr-body .have b { display: block; font-weight: 600; color: var(--label); font-size: 14px; } .dr-body .have span { color: var(--label2); font-size: 13px; }
.legend.marks { margin-top: 6px; }
.legend .pin-k { width: 14px; height: 14px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 9px; font-weight: 800; font-style: normal; vertical-align: -3px; }
.legend .arr-k { width: 18px; height: 2px; border-radius: 1px; background: var(--flow); vertical-align: 3px; }
.legend .ring-k { width: 12px; height: 12px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--apple-orange); vertical-align: -2px; }
.aid .anum { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--flow); color: #fff; font-size: 11px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
table.plan td { vertical-align: top; } table.plan td:nth-child(1) { width: 26%; } table.plan td:nth-child(2) { width: 20%; } table.plan td:nth-child(3) { width: 24%; }
table.t td .sub { font-size: 12.5px; }
.ov-legend { right: 12px; bottom: 12px; max-width: 46%; }
.has-drawer .ov-legend { right: 396px; }
.ov-legend { max-width: calc(100% - 420px); }
.legend.compact.marks { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
.legend.compact.marks span { white-space: nowrap; }
.map-tools .lab { white-space: nowrap; font-size: 13px; color: var(--label2); }
table.plan td:nth-child(1) { width: 25%; } table.plan td:nth-child(2) { width: 17%; } table.plan td:nth-child(3) { width: 22%; } table.plan td:nth-child(4) { width: 24%; }
table.plan td:last-child { width: 170px; } table.plan td:last-child .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; min-width: 150px; }
table.t .donetext { display: flex; gap: 6px; align-items: flex-start; } table.t .donetext svg { flex: none; margin-top: 2px; }
@media (max-width: 700px) { .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } html, body { overflow-x: hidden; } }
/* Homes & sites */
:root { --v0: #ECECFA; --v1: #D4D4F5; --v2: #B4B4EE; --v3: #8E8EE4; --v4: #6767D6; --v5: #4343C2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --v0: #24243A; --v1: #30305C; --v2: #3E3E82; --v3: #5252AA; --v4: #6E6ED2; --v5: #9C9CF2; } }
:root[data-theme="dark"] { --v0: #24243A; --v1: #30305C; --v2: #3E3E82; --v3: #5252AA; --v4: #6E6ED2; --v5: #9C9CF2; }
.vstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.vstats > div { background: var(--group); border-radius: 12px; padding: 10px 12px; } .vstats span { display: block; font-size: 12.5px; color: var(--label2); }
.vstats b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; } .vstats b.sm { font-size: 14px; font-weight: 500; line-height: 1.35; margin-top: 4px; } .vstats em { display: block; font-style: normal; font-size: 12.5px; color: var(--label2); }
.vmapwrap { position: relative; height: 440px; background: var(--bg-map); border-radius: 14px; margin-top: 12px; overflow: hidden; }
.rules { margin: 6px 0 0; padding-left: 18px; color: var(--label2); font-size: 13.5px; } .rules li { margin: 4px 0; }
h3.mini { font-size: 14px; font-weight: 600; margin: 14px 0 2px; }
@media (max-width: 700px) { .vstats { grid-template-columns: 1fr; } .vmapwrap { height: 320px; } }
.vmapwrap svg { width: 100%; height: 100%; display: block; }
table.t td.grp { font-size: 12.5px; font-weight: 600; color: var(--label2); background: var(--group); padding-top: 7px; padding-bottom: 7px; }
@media (max-width: 1600px) { .hdr .who { display: none; } }
@media (max-width: 1240px) { .tabs button { padding: 0 10px; font-size: 13px; } }

/* How we're doing: the metrics, in plain words */
.ind-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.ih-k { font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; letter-spacing: .05em; }
.ih-v { font-size: 58px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ih-t { font-size: 17px; margin: 2px 0 0; max-width: 30em; }
.ih-n { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--label2); }
.ih-r { background: var(--fill); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; line-height: 1.5; color: var(--label2); } .ih-r b { color: var(--label); font-weight: 600; }
.ib { position: relative; height: 8px; border-radius: 999px; background: var(--fill2); margin: 8px 0 6px; } .ib.big { height: 12px; margin: 30px 0 12px; }
.ib i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--apple-gray); } .ib i.green { background: var(--apple-green); } .ib i.orange { background: var(--apple-orange); } .ib i.red { background: var(--apple-red); }
.ib b { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--label); border-radius: 1px; }
.ib b span { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ind-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.is { background: var(--fill); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.is-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.is .n { width: 24px; height: 24px; border-radius: 50%; background: var(--label); color: var(--canvas); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.is h3 { font-size: 15.5px; font-weight: 600; margin: 0; line-height: 1.3; letter-spacing: -.01em; }
.is .w { font-size: 13px; color: var(--label2); margin-top: 2px; min-height: 34px; }
.is .v { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.is .g { font-size: 12.5px; color: var(--label2); }
.is .h { font-size: 13px; line-height: 1.4; border-top: 1px solid var(--hair); padding-top: 9px; margin-top: 10px; flex: 1; }
.ind-g td:nth-child(2) { color: var(--label2); } .ind-g td:nth-child(3), .ind-g td:nth-child(4) { white-space: nowrap; } .ind-g td:last-child { min-width: 180px; } .ind-g .btn { margin-left: 6px; }
.ind-big { font-size: 15px; color: var(--label2); margin: 4px 0 10px; display: flex; align-items: baseline; gap: 10px; } .ind-big b { font-size: 36px; font-weight: 700; color: var(--label); letter-spacing: -.02em; }
@media (max-width: 980px) { .ind-hero { grid-template-columns: 1fr; } .ind-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ind-steps { grid-template-columns: 1fr; } .ih-v { font-size: 48px; } .ind-g { display: block; overflow-x: auto; } }
/* Eight tabs: tighter header on laptop widths so nothing scrolls sideways */
@media (max-width: 1400px) { .hdr { gap: 12px; } .tabs button { padding: 0 9px; font-size: 13px; } .hdr-r { gap: 10px; } }
@media (max-width: 1240px) and (min-width: 701px) { .brand span { display: none; } }
@media (max-width: 1100px) and (min-width: 701px) { .tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } }
/* Safari stability (24 Oct, Rahul's crash): no live blur on anything that sits over or follows across a map.
   Re-blurring hundreds of map shapes on every mouse move can crash a Safari tab; solid surfaces look the same. */
.tip, .overlay, .mapzoom { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--elev) !important; box-shadow: 0 6px 24px rgb(0 0 0 / .18), 0 0 0 1px var(--hair, rgb(0 0 0 / .08)); }
[data-map] { contain: content; }
.fb-toast { inset-block-end: auto !important; inset-block-start: 1rem !important; z-index: 60 !important; }
:root { --q0: #D93B30; --q1: #EE6A3E; --q2: #F59E42; --q3: #F2C94C; --q4: #8CCB7E; --q5: #2E9E5B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --q0: #B83229; --q1: #CF5A33; --q2: #D98A3A; --q3: #CFAE45; --q4: #6FAE66; --q5: #36A862; } }
:root[data-theme="dark"] { --q0: #B83229; --q1: #CF5A33; --q2: #D98A3A; --q3: #CFAE45; --q4: #6FAE66; --q5: #36A862; }
.fb-toast { background: var(--elev) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 8px 28px rgb(0 0 0 / .28), 0 0 0 1px var(--hair) !important; }
.l2row { margin-top: 8px; } .l2s { background: var(--fill); border-radius: 12px; padding: 8px 12px; display: grid; gap: 4px; }
.l2s div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--label2); } .l2s b { color: var(--label); font-weight: 600; } .l2s b.warn { color: var(--apple-orange); }
.ess { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; } .ess div { background: var(--fill); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ess b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; } .ess .d { font-size: 12.5px; color: var(--label2); }
.st-tab td.n, .st-tab th.n { text-align: right; white-space: nowrap; }
@media (max-width: 980px) { .ess { grid-template-columns: 1fr 1fr; } }

/* Apple grouped style: white cards with a soft shadow on a light grey canvas */
.kpi, .queue, .mapzone, .sec, .is, .ess div { box-shadow: var(--card-shadow); }
.queue { background: var(--group); }

/* No live blur (Safari crash, 24–25 Oct): glass surfaces become solid */
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
:root { --glass-bg: #FAFAFC !important; --glass-clear-bg: #FAFAFC !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-bg: #161617 !important; --glass-clear-bg: #161617 !important; } }
:root[data-theme="dark"] { --glass-bg: #161617 !important; --glass-clear-bg: #161617 !important; }
/* Apple tinted buttons for actions in lists */
.qi .btn:not(.btn-prominent), table.t .btn:not(.btn-prominent), .drawer .btn:not(.btn-prominent) { background: color-mix(in srgb, var(--apple-blue) 12%, transparent); color: var(--apple-blue); }

.hdr-r [data-theme-toggle] { color: var(--label2); }
/* 25 Oct evening: with Tour and Reset in the header, the tabs scroll sideways inside the header (never the page),
   and "Simulated data" hides on narrower laptops (the first card says it) */
@media (max-width: 1600px) and (min-width: 701px) { .tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } }
@media (max-width: 1520px) { .hdr-r .badge { display: none; } }
@media (max-width: 700px) { .kpi .d { white-space: normal; } }
