:root {
  --bg: #0D0E11;
  --ink: #F1F2F4;
  --ink-2: #C7CAD1;
  --muted: #8B909B;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --surface: rgba(255, 255, 255, .045);
  --sky: #3D6BFF;
  --scan: #9FE3FF;
  --clean: #43C485;
  --alert: #F5C542;
  --burn: #FF6A3D;
  --r-s: 9px;
  --r-m: 13px;
  --r-l: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 0 0 1px var(--line), 0 16px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.45 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
:lang(hi) { font-family: Mukta, Geist, sans-serif; }
:lang(pa) { font-family: "Noto Sans Gurmukhi", Geist, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 18px; height: 18px; flex: none; }
button:focus-visible, a:focus-visible, input:focus-visible, li:focus-visible { outline: 2px solid var(--scan); outline-offset: 2px; }

/* charcoal glass: neutral, so the map and the status colours carry the meaning */
.glass {
  background: linear-gradient(180deg, rgba(32, 33, 38, .84), rgba(17, 18, 22, .9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: var(--r-m);
}

#map { position: fixed; inset: 0; }
/* a soft vignette keeps the eye in the middle without blacking out the surroundings */
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, .45)); }
.maplibregl-ctrl-bottom-right { bottom: 98px; right: 12px; }
.maplibregl-ctrl-bottom-left { bottom: 98px; left: 12px; }
.maplibregl-ctrl-attrib { background: rgba(17, 18, 22, .85) !important; border-radius: 8px !important; font-size: 10.5px; }
.maplibregl-ctrl-attrib-inner, .maplibregl-ctrl-attrib-inner a { color: var(--ink-2) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); opacity: .75; }
.maplibregl-ctrl-scale { background: rgba(17, 18, 22, .7); color: var(--ink-2); border: 1px solid var(--line-2); border-top: 0; font: 500 10.5px "Geist Mono", monospace; border-radius: 0 0 4px 4px; }

/* ---- top bar ---- */
.bar { position: fixed; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; z-index: 6; pointer-events: none; }
.bar > * { pointer-events: auto; }
.spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 15px 0 6px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; }
.brand .name { font: 800 18px/1 Geist, sans-serif; letter-spacing: -.035em; }
.brand .name-local { font: 600 16px/1 Mukta, sans-serif; color: #A9B6CF; padding-left: 10px; border-left: 1px solid var(--line-2); }
.brand .name-local:lang(pa) { font-family: "Noto Sans Gurmukhi", sans-serif; font-size: 15px; }

.modes { display: flex; gap: 2px; padding: 4px; height: 46px; align-items: center; }
.modes a { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: var(--r-s); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; transition: color .2s, background .2s; }
.modes a svg { width: 17px; height: 17px; }
.modes a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.modes a.on { color: var(--bg); background: var(--ink); }

.lang { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 11px 0 13px; color: var(--ink); font-weight: 700; font-size: 14px; }
.lang-btn .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: 54px; right: 0; width: 200px; margin: 0; padding: 6px; list-style: none; animation: pop .18s var(--ease) both; }
.lang-menu[hidden] { display: none; }
.lang-menu li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--r-s); cursor: pointer; }
.lang-menu li:hover, .lang-menu li.on { background: rgba(255, 255, 255, .07); }
.lang-menu li.on b::after { content: "  ✓"; color: var(--scan); }
.lang-menu b { font-weight: 700; font-size: 15px; }
.lang-menu span { font-size: 12px; color: var(--muted); font-family: Geist, sans-serif; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---- right rail: compact, icon-only, labels on hover ---- */
.rail { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 5; transition: right .45s var(--ease), opacity .3s; }
body.panel-open .rail { right: 416px; }
.stack { display: flex; flex-direction: column; padding: 3px; gap: 1px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-s); color: var(--ink-2); transition: background .15s, color .15s, transform .1s, opacity .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.icon-btn:active { transform: scale(.93); }
.layers .icon-btn { opacity: .38; }
.layers .icon-btn.on { opacity: 1; background: rgba(255, 255, 255, .06); }
.c-burn { color: #FF6A3D; }
.c-fire { color: var(--alert); }
.c-missed { color: #FF8A5C; }
.tip { position: fixed; z-index: 8; padding: 6px 10px; font-size: 12.5px; font-weight: 600; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.tip[hidden] { display: none; }

/* ---- opening over India ---- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
/* bottom left, where the headline card sits later: the map of India above stays clear */
.caption { position: fixed; left: 16px; bottom: 106px; z-index: 4; width: min(480px, calc(100% - 32px)); margin: 0; padding: 20px 22px 18px; border-radius: var(--r-l); animation: fade .8s var(--ease) both; pointer-events: none; display: grid; gap: 8px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.caption[hidden] { display: none; }
.caption b { font-size: 25px; line-height: 1.2; letter-spacing: -.025em; font-weight: 800; }
.caption:lang(hi) b, .caption:lang(pa) b { letter-spacing: 0; line-height: 1.35; }
.caption span { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.caption em { display: flex; align-items: center; gap: 8px; font: 500 12.5px Geist, sans-serif; font-style: normal; color: var(--muted); margin-top: 2px; }
.caption em i { width: 8px; height: 8px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 8px rgba(245, 197, 66, .7); }
.skip { position: fixed; right: 56px; bottom: 104px; z-index: 6; }
.skip[hidden] { display: none; }
.delhi { display: flex; align-items: center; gap: 8px; color: var(--ink); font: 700 13px Geist, sans-serif; text-shadow: 0 1px 6px #000; white-space: nowrap; pointer-events: none; }
.delhi i { position: relative; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.delhi i::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); animation: ping 2s ease-out infinite; }
.delhi span { color: var(--ink-2); font-weight: 500; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.state-label { font: 700 11px Geist, sans-serif; letter-spacing: .28em; color: rgba(255, 255, 255, .6); text-shadow: 0 1px 6px #000; pointer-events: none; }
.study-label { padding: 3px 8px; border-radius: 6px; background: rgba(17, 18, 22, .85); font: 600 11px Geist, sans-serif; color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2); white-space: nowrap; pointer-events: none; }

/* ---- hero ---- */
.hero { position: fixed; left: 16px; bottom: 106px; width: min(460px, calc(100% - 32px)); padding: 22px 22px 18px; border-radius: var(--r-l); z-index: 4; overflow: hidden; animation: rise .7s var(--ease) both; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, #FF8A3D, #D9468C, #3D6BFF); }
.hero[hidden] { display: none; }
/* the card never reaches up under the logo: on shorter screens it tightens, then scrolls */
.hero { max-height: calc(100% - 106px - 84px); overflow-y: auto; scrollbar-width: none; }
@media (max-height: 920px) and (min-width: 641px) {
  .hero { padding: 18px 20px 14px; }
  .hero h1 { font-size: 26px; margin: 4px 0 12px; }
  .hero h1:lang(hi), .hero h1:lang(pa) { font-size: 23px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.kicker { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.hero h1 { margin: 6px 0 16px; font-size: 30px; line-height: 1.12; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.hero h1:lang(hi), .hero h1:lang(pa) { letter-spacing: 0; line-height: 1.3; font-size: 27px; }
.hero h1 em { font-style: normal; color: #FF7A4D; }
.vs { display: grid; gap: 9px; padding: 14px; border-radius: var(--r-m); background: var(--surface); }
.vs .lbl { margin: 0 0 2px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.vs .row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 52px; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.vs .row b { text-align: right; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 1.3s var(--ease) .35s; }
.hero.show .track i { width: calc(var(--w) * 5); }
.track .bad { background: var(--alert); }
.track .good { background: var(--clean); }
.cap { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 11px; font-weight: 700; font-size: 15px; transition: transform .12s, box-shadow .2s, background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { color: var(--bg); background: var(--ink); }
.btn.primary:hover { background: #fff; }
.btn.ghost { color: var(--ink); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px var(--line-2) inset; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.wide { width: 100%; }
.fine { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ---- timeline ---- */
.timeline { position: fixed; left: 16px; right: 16px; bottom: 16px; height: 76px; display: flex; align-items: center; gap: 18px; padding: 0 20px 0 12px; border-radius: var(--r-l); z-index: 5; }
.play { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); }
.play .ring { position: absolute; inset: 0; width: 52px; height: 52px; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 2.5; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-fg { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 151; stroke-dashoffset: 151; }
.play::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--ink); transition: transform .12s; }
.play:active::before { transform: scale(.93); }
.play .glyph { position: relative; width: 19px; height: 19px; }
.when { flex: none; width: 128px; display: flex; flex-direction: column; gap: 1px; }
.when b { font-size: 19px; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.when span { font-size: 12.5px; color: var(--muted); }
.scrub { position: relative; flex: 1; height: 52px; min-width: 0; }
.spark { position: absolute; left: 0; right: 0; top: 4px; width: 100%; height: 26px; overflow: visible; }
.spark .all { fill: rgba(255, 255, 255, .1); }
.spark .past { fill: #FF6A3D; }
.ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; border-top: 1px solid var(--line-2); }
.ticks span { position: absolute; top: 4px; font: 500 10.5px "Geist Mono", monospace; color: var(--muted); white-space: nowrap; }
.ticks span::before { content: ""; position: absolute; left: 0; top: -9px; width: 1px; height: 5px; background: var(--line-2); }
.ticks span:lang(hi), .ticks span:lang(pa) { font-family: inherit; font-size: 11.5px; }
#slider { position: absolute; left: 0; right: 0; top: -6px; bottom: 0; width: 100%; height: calc(100% + 6px); margin: 0; opacity: 0; cursor: pointer; }
.thumb { position: absolute; left: 0; top: 2px; bottom: 19px; width: 1px; background: var(--ink); pointer-events: none; will-change: transform; }
.thumb::after { content: ""; position: absolute; left: -5px; bottom: -6px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px rgba(17, 18, 22, .95); }
.stat { flex: none; display: flex; flex-direction: column; align-items: flex-end; min-width: 88px; }
.stat b { font-size: 23px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.1; }
.stat.burn b { color: #FF7A4D; }
.stat.fire b { color: var(--alert); }
.stat span { font-size: 11.5px; color: var(--muted); }

/* ---- field pins ---- */
.pin { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 7px; border-radius: 999px; background: rgba(17, 18, 22, .92); box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 6px 16px rgba(0, 0, 0, .45); color: var(--ink); font: 600 12px Geist, sans-serif; white-space: nowrap; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.pin:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--ink), 0 8px 20px rgba(0, 0, 0, .5); }
.pin i { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.pin.clean i { background: var(--clean); }
.pin.burn i { background: var(--burn); }
.pin.review i { background: var(--alert); }

/* ---- case-file panel ---- */
.panel { position: fixed; top: 76px; right: 16px; max-height: calc(100% - 184px); width: min(384px, calc(100% - 32px)); overflow: auto; padding: 0; border-radius: var(--r-l); z-index: 7; animation: slide .45s var(--ease) both; scrollbar-width: thin; }
.panel[hidden] { display: none; }
@keyframes slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.panel .close { position: absolute; top: 14px; right: 14px; z-index: 8; color: var(--ink); background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); }
.panel .close:hover { background: rgba(255, 255, 255, .16); }
.panel .head { padding: 18px 20px 14px; }
.panel h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; padding-right: 40px; }
.panel .sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.compare { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; user-select: none; }
.compare canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.compare .after { clip-path: inset(0 0 0 var(--cut, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.compare .handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare .tag { position: absolute; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .7); font: 600 11.5px Geist, sans-serif; color: #fff; pointer-events: none; }
.compare .tag:lang(hi) { font-family: Mukta, sans-serif; }
.compare .tag.l { left: 8px; }
.compare .tag.r { right: 8px; }
.band { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.band .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.band .ic svg { width: 20px; height: 20px; }
.band b { display: block; font-size: 18px; letter-spacing: -.01em; }
.band p { margin: 1px 0 0; font-size: 13px; color: var(--ink-2); }
.band.clean { background: rgba(67, 196, 133, .1); }
.band.clean .ic { background: rgba(67, 196, 133, .18); color: var(--clean); }
.band.clean b { color: var(--clean); }
.band.burn { background: rgba(255, 106, 61, .1); }
.band.burn .ic { background: rgba(255, 106, 61, .18); color: var(--burn); }
.band.burn b { color: #FF8A5C; }
.band.review { background: rgba(245, 197, 66, .08); }
.band.review .ic { background: rgba(245, 197, 66, .16); color: var(--alert); }
.band.review b { color: var(--alert); }
.sec { padding: 14px 20px; border-top: 1px solid var(--line); }
.sec h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.signal { width: 100%; height: 96px; display: block; overflow: visible; }
.signal .grid { stroke: var(--line); }
.signal .line { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }
.signal .dot { fill: var(--ink-2); }
.signal .mark { stroke: var(--burn); stroke-width: 1.5; stroke-dasharray: 3 3; }
.signal text { font: 500 10px "Geist Mono", monospace; fill: var(--muted); }
.signal .mlabel { fill: #FF8A5C; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.facts div { padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.facts dt { font-size: 11.5px; color: var(--muted); }
.facts dd { margin: 1px 0 0; font-size: 15px; font-weight: 700; }
.band .smoke-l { margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.last { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.last .mini { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.last .mini svg { width: 15px; height: 15px; }
.mini.clean { background: rgba(67, 196, 133, .16); color: var(--clean); }
.mini.burn { background: rgba(255, 106, 61, .16); color: var(--burn); }
.mini.review { background: rgba(245, 197, 66, .14); color: var(--alert); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.scanning { display: grid; justify-items: center; gap: 10px; padding: 24px 12px; text-align: center; }
.scanning svg { width: 56px; height: 56px; border-radius: 14px; }
.scanning p { margin: 0; font-size: 13.5px; color: var(--scan); min-height: 1.4em; }
.dots { display: flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(159, 227, 255, .25); transition: background .3s; }
.dots i.on { background: var(--scan); }
.err { color: #FF8A5C; font-size: 14px; }

/* ---- field filmstrip ---- */
.viewer { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0; transition: opacity .25s; }
.viewer canvas.on { opacity: 1; }
.viewer .tag { position: absolute; left: 10px; bottom: 10px; padding: 4px 9px; border-radius: 7px; background: rgba(0, 0, 0, .72); font: 600 12px Geist, sans-serif; color: #fff; }
.viewer .tag:lang(hi), .viewer .tag:lang(pa) { font-family: inherit; }
.viewer .tag.burnt { left: auto; right: 10px; background: rgba(255, 106, 61, .9); color: #111; }
.strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; padding: 6px 8px 2px; }
.strip button { position: relative; display: grid; gap: 3px; padding: 0 0 4px; border-radius: 6px; color: var(--muted); font: 500 10.5px "Geist Mono", monospace; text-align: center; border-bottom: 2px solid transparent; }
.strip canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 4px; image-rendering: pixelated; opacity: .55; transition: opacity .2s; }
.strip button.on canvas, .strip button:hover canvas { opacity: 1; }
.strip button.on { color: var(--ink); }
.strip button.burnt { border-bottom-color: var(--burn); color: #FF8A5C; }
.scanning .elapsed { font: 500 12px "Geist Mono", monospace; color: var(--muted); }

/* ---- small messages ---- */
.toast[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 106px; transform: translateX(-50%); z-index: 6; margin: 0; padding: 10px 16px; font-size: 14px; font-weight: 600; border-radius: 12px; white-space: nowrap; }

/* ---- loader ---- */
.loader { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 16px; background: radial-gradient(circle at 50% 45%, #1A1C22, var(--bg) 60%); transition: opacity .6s var(--ease); }
.loader-mark { position: relative; width: 80px; height: 80px; border-radius: 20px; overflow: hidden; animation: breathe 2.4s ease-in-out infinite; }
.loader-mark svg { width: 80px; height: 80px; display: block; }
/* transform-only animations run on the compositor, so they stay smooth while the page is busy loading */
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #9FE3FF; box-shadow: 0 0 14px 3px rgba(159, 227, 255, .6); animation: scan 1.6s cubic-bezier(.45, 0, .55, 1) infinite; will-change: transform; }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(78px); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.loader p { margin: 0; font-size: 13px; color: var(--muted); }
.loader.gone { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  .modes span { display: none; }
  .modes a { padding: 0 11px; }
  .stat.fire { display: none; }
}
@media (max-width: 640px) {
  .bar { top: 10px; left: 10px; right: 10px; gap: 8px; }
  .brand { height: 44px; padding-right: 12px; }
  .brand .name-local { display: none; }
  .modes a { padding: 0 9px; }  /* icons only: Officer and Farmer stay one tap away on a phone */
  .lang-btn { height: 44px; }
  .rail { top: auto; bottom: 100px; transform: none; right: 10px; }
  .layers { display: none; }
  body.panel-open .rail, body.hero-open .rail { opacity: 0; pointer-events: none; right: 10px; }
    .hero { left: 10px; right: 10px; width: auto; bottom: 96px; padding: 18px 16px 14px; }
  .hero h1 { font-size: 23px; }
  .vs .row { grid-template-columns: 76px minmax(0, 1fr) 46px; }
  .timeline { left: 10px; right: 10px; bottom: 10px; height: 72px; gap: 12px; padding: 0 14px 0 10px; }
  .when { width: 74px; }
  .when b { font-size: 15px; }
  .ticks span { visibility: hidden; }
  .stat { min-width: 0; }
  .stat b { font-size: 19px; }
  .panel { top: auto; left: 10px; right: 10px; bottom: 92px; width: auto; max-height: 66vh; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 90px; }
  body.panel-open .maplibregl-ctrl-bottom-left, body.hero-open .maplibregl-ctrl-bottom-left { display: none; }
  .toast { bottom: 96px; }
}

/* ---- orbiting satellite: page loader and the live check ---- */
.orbit { position: relative; width: 64px; height: 64px; }
.orbit.big { width: 84px; height: 84px; }
.orbit .o-mark { position: relative; z-index: 2; width: 100%; height: 100%; border-radius: 26%; display: block; }
.orbit .o-ring, .orbit .o-path { position: absolute; left: -30%; top: -30%; width: 160%; height: 160%; transform: rotate(-14deg); }
.orbit .o-ring { z-index: 1; overflow: visible; }
.orbit .o-ring ellipse { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1.4; }
/* the satellite passes in front of the tile on the near half of the orbit and behind it on the far half */
.orbit .o-path { animation: depth 2.4s steps(1) infinite; }
.orbit .o-sat { position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgba(159, 227, 255, .8);
  offset-path: path("M 3.3 50 A 46.7 13.3 0 1 0 96.7 50 A 46.7 13.3 0 1 0 3.3 50"); offset-rotate: 0deg; animation: orbit 2.4s linear infinite; }
.orbit.big .o-sat { offset-path: path("M 4.2 67.2 A 63 18 0 1 0 130.2 67.2 A 63 18 0 1 0 4.2 67.2"); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes depth { 0% { z-index: 3; } 50% { z-index: 0; } }
.loader .orbit { margin-bottom: 6px; }
.caption.out, .skip.out { opacity: 0; transition: opacity .6s var(--ease); }
.burnview summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); list-style: none; }
.burnview summary::-webkit-details-marker { display: none; }
.burnview summary::before { content: "+ "; color: var(--muted); }
.burnview[open] summary::before { content: "– "; }
.burnview img { width: 100%; margin-top: 10px; border-radius: 8px; }

/* ---- case file v4: action first, pictures second, details last ---- */
.viewer { aspect-ratio: 2 / 1; }
.strip canvas { aspect-ratio: 2 / 1; }
.strip button span { white-space: nowrap; }
#action { padding: 16px 20px 14px; }
.act .cap { margin: 8px 0 0; }
.band { margin: 0 -20px; }
.band .bt { min-width: 0; }
.band small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; font-weight: 600; }
.status { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r-m); background: rgba(159, 227, 255, .06); box-shadow: 0 0 0 1px rgba(159, 227, 255, .18) inset; }
.status { isolation: isolate; }
.status .orbit { flex: none; width: 40px; height: 40px; margin: 6px; }
.status .orbit .o-sat { offset-path: path("M 2.1 32 A 29.9 8.5 0 1 0 61.9 32 A 29.9 8.5 0 1 0 2.1 32"); width: 6px; height: 6px; margin: -3px 0 0 -3px; }
.status p { margin: 0; }
.st1 { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.st2 { margin-top: 3px !important; font-size: 13px; color: var(--ink-2); }
.st3 { margin-top: 2px !important; font: 500 12px "Geist Mono", monospace; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 5px; background: rgba(255, 75, 75, .16); color: #FF7070; font: 700 10.5px Geist, sans-serif; letter-spacing: .08em; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #FF5A5A; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
/* a working line along the top of the card while a check runs */
.panel.busy::before { content: ""; position: sticky; top: 0; display: block; height: 2px; margin-bottom: -2px; z-index: 3;
  background: linear-gradient(90deg, transparent, #9FE3FF, transparent) 0 0 / 40% 100% no-repeat; animation: sweep-x 1.4s linear infinite; }
@keyframes sweep-x { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.panel.scrolls { -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), transparent); mask-image: linear-gradient(#000 calc(100% - 34px), transparent); }
#details .sec:last-child { padding-bottom: 26px; }

/* ---- guided story bar ---- */
.story { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; max-width: calc(100% - 520px); }
.story[hidden] { display: none; }
.story b { font-size: 13px; white-space: nowrap; }
.story #story-step { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story .btn.small { height: 30px; border-radius: 999px; }
.story .rec { width: 8px; height: 8px; border-radius: 50%; background: #FF5A5A; animation: blink 1.2s ease-in-out infinite; flex: none; }
.story.out { opacity: 0; transition: opacity .6s var(--ease); }
@media (max-width: 900px) { .story { top: auto; bottom: 100px; max-width: calc(100% - 20px); } }

/* ---- opening: the hero waits for the season to load ---- */
/* a fixed-width button that fills smoothly from left to right while the season loads */
#play-season { position: relative; overflow: hidden; isolation: isolate; min-width: 236px; justify-content: flex-start; }
#play-season::before { content: ""; position: absolute; inset: 0; z-index: -1; transform-origin: left; transform: scaleX(var(--p, 0)); background: rgba(159, 227, 255, .16); transition: transform .9s linear; }
#play-season:disabled { opacity: 1; color: var(--ink); background: rgba(255, 255, 255, .07); cursor: progress; }
#play-season:not(:disabled)::before { opacity: 0; transition: opacity .4s; }
#play-season:disabled svg { opacity: .45; }
#play-season .pct { margin-left: auto; font: 500 13px "Geist Mono", monospace; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn:disabled, .play:disabled { pointer-events: none; }
#explore:disabled { opacity: .45; }
.play:disabled::before { background: rgba(255, 255, 255, .25); }

/* ---- sources, at the end of the timeline ---- */
.srcbtn { flex: none; align-self: center; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); box-shadow: 0 0 0 1px var(--line-2) inset; }
.srcbtn:hover { color: var(--ink); }
.sources { position: fixed; right: 16px; bottom: 102px; z-index: 8; width: min(340px, calc(100% - 32px)); padding: 14px 16px; animation: pop .18s var(--ease) both; }
.sources p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.sources p + p { margin-top: 9px; }
.sources b { display: block; color: var(--ink); font-size: 12px; }
.maplibregl-ctrl-attrib { display: none !important; }

/* ---- story bar sits under the header, never on it, and clears an open card ---- */
.story { top: 76px; transition: left .45s var(--ease); max-width: calc(100% - 40px); }
body.panel-open .story { left: calc((100% - 400px) / 2); max-width: calc(100% - 460px); }

/* ---- case file: name stays in view; colour or infrared over the same frames ---- */
.panel .head { position: sticky; top: 0; z-index: 6; background: linear-gradient(180deg, rgba(30, 31, 36, .98), rgba(24, 25, 30, .94)); border-bottom: 1px solid var(--line); }
.vtabs { display: flex; gap: 3px; margin: 0 20px 10px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.vtabs button { flex: 1; height: 30px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.vtabs button.on { background: rgba(255, 255, 255, .12); color: var(--ink); }
.vtabs button:disabled { opacity: .4; cursor: not-allowed; }
.strip { grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); }
.viewer .whole { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.irnote { padding: 2px 20px 0; }
.btn.pulse { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(159, 227, 255, .55); } 100% { box-shadow: 0 0 0 14px rgba(159, 227, 255, 0); } }
.stat.smoke b { color: #B9C2D0; }
@media (max-width: 1100px) { .stat.smoke { display: none; } }

@media (max-width: 640px) { .strip button span { white-space: normal; line-height: 1.15; overflow-wrap: anywhere; } }

/* phones: the headline card keeps the headline, the comparison and the buttons; method notes live in Sources */
@media (max-width: 640px) {
  .hero .vs .cap, .hero .fine { display: none; }
  .act .cap { display: none; }
}

/* tablets and phones: the story bar sits just above the timeline (the desktop rule above pins it to the top, and
   pinned to both it stretched over the map); once the field card opens, the card carries the story */
@media (max-width: 900px) {
  .story { top: auto; bottom: 100px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 20px); }
  body.panel-open .story { display: none; }
}
@media (max-width: 640px) {
  .story { bottom: 92px; left: 10px; right: 10px; transform: none; max-width: none; padding: 4px 4px 4px 12px; }
  .story b { display: none; }
  /* the opening caption gets the screen to itself: no zoom buttons or scale bar over it, Skip inside its corner */
  body.intro .rail, body.intro .maplibregl-ctrl-bottom-left, body.intro .maplibregl-ctrl-bottom-right { opacity: 0; pointer-events: none; }
  .caption { left: 10px; right: 10px; width: auto; bottom: 92px; padding: 18px 16px 60px; }
  .skip { right: 22px; bottom: 104px; }
}
@media (max-width: 640px) { .rail { bottom: 140px; } }  /* clear of the story bar above the timeline */
.band small.aws-l { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #FFB547; font-size: 11.5px; }
.band small.aws-l::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #FFB547; flex: none; }
