/* Seasons Explorer - Milestone Teachers. No inline styles; CSP-safe (style-src 'self'). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-700.woff2") format("woff2"); }

:root {
  --bg: #040a17; --bg2: #081328; --ink: #eef4ff; --muted: #aebbd6; --faint: #7f93b8;
  --line: rgba(130, 170, 230, 0.18); --line2: rgba(130, 170, 230, 0.32);
  --teal: #3fd6c3; --amber: #f7a928; --gold: #ffd166; --chu: #5eead4; --blue: #8fb8ff;
  --panel: linear-gradient(180deg, rgba(15, 30, 58, 0.94), rgba(8, 17, 36, 0.94));
  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
body {
  display: grid; grid-template-rows: auto 1fr; min-height: 100vh; overflow: hidden;
  background: radial-gradient(1200px 700px at 20% -10%, #0d2447 0%, transparent 60%),
              radial-gradient(900px 600px at 110% 110%, #0a2a33 0%, transparent 55%), var(--bg);
  -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.4;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: #10131a; padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px 8px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 30%, #fff3c4 0 12%, #ffb42a 34%, #e8660f 62%, transparent 64%),
              radial-gradient(circle at 50% 50%, rgba(255, 170, 60, 0.55), transparent 70%);
  box-shadow: 0 0 22px rgba(255, 170, 60, 0.45);
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid rgba(63, 214, 195, 0.65); transform: rotate(-23.4deg) scaleY(0.42); }
.eyebrow { margin: 0; color: var(--teal); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow .dot { color: var(--faint); }
h1 { margin: 0; font-size: 28px; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.btn { border: 1px solid var(--line2); background: rgba(20, 38, 72, 0.7); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 15px; min-height: 42px; transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.btn:hover { background: rgba(33, 58, 104, 0.9); border-color: rgba(160, 200, 255, 0.5); }
.btn-try { background: linear-gradient(180deg, #ffbb3d, #f39a16); color: #1a1204; border-color: transparent; }
.btn-try:hover { background: linear-gradient(180deg, #ffc85c, #f7a928); }
.btn-try[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(247, 169, 40, 0.35); }
.btn-icon { width: 42px; padding: 0; display: grid; place-items: center; }
.i-fs { width: 18px; height: 18px; position: relative; display: block; }
.i-fs i { position: absolute; width: 7px; height: 7px; border: 2.5px solid currentColor; }
.i-fs i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.i-fs i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.i-fs i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.i-fs i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; background: rgba(10, 22, 44, 0.7); }
.seg-btn { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 36px; }
.seg-btn[aria-pressed="true"] { background: rgba(63, 214, 195, 0.18); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(63, 214, 195, 0.55); }

/* ------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; padding: 2px 16px 12px; min-height: 0; }
.stage { position: relative; min-height: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #02060f; }
.viewport { position: absolute; inset: 0; }
#stageCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#stageCanvas:active { cursor: grabbing; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: #dfe9ff; padding: 3px 8px; border-radius: 999px; background: rgba(6, 14, 30, 0.72); border: 1px solid rgba(130, 170, 230, 0.25); translate: -50% -50%; will-change: transform; }
.tag.off { visibility: hidden; }
.tag-key.near { opacity: 0; }
.tag-key { transition: opacity 0.3s; }
.tag-sun { color: #ffe3a6; border-color: rgba(255, 190, 90, 0.4); }
.tag-key { color: #ffd9a0; font-size: 12px; border-color: rgba(247, 169, 40, 0.35); }
.tag-city { translate: 8px -130%; font-size: 12px; }
.tag-wpg { color: var(--gold); border-color: rgba(255, 209, 102, 0.5); }
.tag-chu { color: var(--chu); border-color: rgba(94, 234, 212, 0.5); translate: 8px 30%; }
.tag-n { background: none; border: 0; color: var(--gold); font-weight: 700; font-size: 14px; translate: 10px -60%; }
.tag-dist { color: var(--blue); font-size: 12px; }
.tag-apsis { color: #bcd3ff; border-color: rgba(143, 184, 255, 0.4); }
.tag-earth { background: none; border: 0; color: #cfe4ff; font-size: 12.5px; }
.is-reduced .tag { will-change: auto; }

.tilt-card, .dist-card { position: absolute; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.tilt-card { left: 14px; top: 14px; width: 300px; }
.dist-card { right: 14px; top: 14px; width: 262px; }
.lbl { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.tilt-head { display: flex; justify-content: space-between; align-items: baseline; }
.tilt-val { font-size: 26px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.is-whatif .tilt-val { color: var(--amber); }
.chips { display: flex; gap: 6px; margin: 8px 0 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line2); background: rgba(14, 28, 56, 0.9); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; color: var(--muted); min-height: 32px; }
.chip[aria-pressed="true"] { color: #10131a; background: var(--gold); border-color: var(--gold); }
.hint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.whatif { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #1a1204; background: var(--amber); border-radius: 8px; padding: 6px 8px; }
.dist-val { margin: 2px 0 8px; font-size: 26px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.dist-val .unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.gauge { position: relative; height: 8px; border-radius: 99px; background: rgba(143, 184, 255, 0.16); }
.gauge-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, rgba(143, 184, 255, 0.35), rgba(143, 184, 255, 0.8)); }
.gauge-dot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); translate: -50% -50%; box-shadow: 0 0 0 3px rgba(143, 184, 255, 0.25); }
.gauge-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 5px; }

.scale-note { position: absolute; left: 14px; bottom: 12px; z-index: 4; margin: 0; max-width: 520px; font-size: 12.5px; color: var(--muted); background: rgba(4, 10, 23, 0.72); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.scale-note strong { color: var(--ink); }

/* Range sliders */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; margin: 6px 0 0; height: 30px; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, #2a4a7a, #3fd6c3); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, #2a4a7a, #3fd6c3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--gold); border: 3px solid #0b1730; box-shadow: 0 0 0 2px var(--gold); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); border: 3px solid #0b1730; box-shadow: 0 0 0 2px var(--gold); }

/* ------------------------------------------------------------ Try this */
.try-card { position: absolute; z-index: 8; left: 14px; right: 14px; bottom: 14px; display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 20px; background: linear-gradient(180deg, rgba(22, 36, 66, 0.97), rgba(10, 20, 40, 0.97)); border: 1px solid rgba(247, 169, 40, 0.45); border-radius: 16px; padding: 14px 16px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.try-top { display: flex; justify-content: space-between; align-items: center; grid-column: 1; grid-row: 1; }
.try-panel { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "link think" "q think" "acts think"; column-gap: 22px; align-content: start; }
.try-link { grid-area: link; } .try-q { grid-area: q; } .try-acts { grid-area: acts; } .try-think { grid-area: think; margin: 0 !important; align-self: center; border-left: 2px solid rgba(63, 214, 195, 0.45); padding-left: 14px; }
.try-open .scale-note { display: none; }
@media (min-width: 821px) { .try-open .tilt-card, .try-open .dist-card { display: none; } }
.try-scale { display: none; }
.try-open .try-scale { display: block; position: absolute; left: 16px; bottom: 12px; margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.try-card { padding-bottom: 34px; }
.cmp { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 12px; background: rgba(4, 10, 24, 0.45); }
.cmp th, .cmp td { padding: 3px 6px; text-align: left; font-size: 14.5px; font-weight: 600; vertical-align: baseline; }
.cmp tbody th { font-size: 11.5px; font-weight: 600; color: var(--muted); width: 25%; white-space: nowrap; }
.cmp thead th { font-size: 15px; padding-top: 9px; white-space: nowrap; }
.cmp thead small { display: block; font-size: 11px; color: var(--faint); font-weight: 600; margin-left: 17px; }
.cmp .swatch { display: inline-block; margin-right: 7px; vertical-align: 1px; }
.cmp .c-chu .swatch { background: var(--chu); box-shadow: 0 0 10px var(--chu); }
.cmp .r-big td { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.cmp .r-big .c-wpg { color: var(--gold); } .cmp .r-big .c-chu { color: var(--chu); }
.cmp .r-bar td { padding-top: 0; padding-bottom: 6px; }
.cmp .r-bar .daybar { margin: 0; }
.cmp .c-chu .daybar-fill { background: linear-gradient(90deg, #2bb3a3, #5eead4); }
.cmp tbody tr:last-child td, .cmp tbody tr:last-child th { padding-bottom: 9px; }
.cmp .src-tag { margin-left: 4px; }
.try-card h2 { margin: 0; font-size: 18px; color: var(--amber); }
.btn-x { border: 0; background: rgba(255, 255, 255, 0.08); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; }
.try-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 8px 0 0; grid-column: 1; grid-row: 2; }
.try-tab { text-align: left; }
.try-tab { border: 1px solid var(--line2); background: transparent; border-radius: 999px; padding: 6px 11px; font-size: 13.5px; font-weight: 600; color: var(--muted); min-height: 34px; }
.try-tab[aria-selected="true"] { background: rgba(247, 169, 40, 0.18); color: var(--ink); border-color: rgba(247, 169, 40, 0.7); }
.try-link { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal); }
.try-q { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.try-think { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
.try-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.act { border: 1px solid rgba(255, 209, 102, 0.55); background: rgba(255, 209, 102, 0.1); color: var(--gold); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; min-height: 40px; }
.act:hover { background: rgba(255, 209, 102, 0.2); }

/* ------------------------------------------------------------ side panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.panel-head { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.panel-head .date-big, .panel-head .season { grid-column: 1 / -1; }
.date-big { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.season { margin: 2px 0 0; font-size: 13px; color: var(--teal); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: rgba(10, 22, 44, 0.8); border-radius: 999px; padding: 6px 12px 6px 6px; font-size: 13px; font-weight: 600; min-height: 38px; white-space: nowrap; }
.tog-track { width: 34px; height: 20px; border-radius: 99px; background: #26395e; position: relative; transition: background 0.2s; }
.tog-knob { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c9d6ee; transition: transform 0.2s; }
.toggle[aria-pressed="true"] .tog-track { background: var(--chu); }
.toggle[aria-pressed="true"] .tog-knob { transform: translateX(14px); background: #07201c; }
.cities { display: grid; grid-template-columns: 1fr; gap: 10px; }
.is-compare .cities { grid-template-columns: 1fr 1fr; }
.city { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: rgba(4, 10, 24, 0.45); }
.city-name { margin: 0 0 2px; font-size: 16px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.is-compare .city-name { font-size: 15px; gap: 5px; }
.is-compare .city-name .lat { font-size: 11px; }
.is-compare .facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.is-compare .facts dt { font-size: 11.5px; }
.is-compare .facts dd { font-size: 14px; white-space: nowrap; }
.is-compare .big-lbl { margin-bottom: 4px; }
.is-compare .daybar { margin-bottom: 6px; }
.city-name .lat { color: var(--faint); font-weight: 600; font-size: 12.5px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.city-chu .swatch { background: var(--chu); box-shadow: 0 0 10px var(--chu); }
.big { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.city-chu .big { color: var(--chu); }
.is-compare .big { font-size: 25px; }
.big-lbl { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.daybar { height: 8px; border-radius: 99px; background: #17264a; overflow: hidden; margin-bottom: 8px; }
.daybar-fill { display: block; height: 100%; background: linear-gradient(90deg, #f7a928, #ffd166); border-radius: 99px; transition: width 0.25s; }
.city-chu .daybar-fill { background: linear-gradient(90deg, #2bb3a3, #5eead4); }
.is-reduced .daybar-fill { transition: none; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.is-compare .facts { grid-template-columns: 1fr; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.src-tag { margin-left: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.src-nrc { background: rgba(63, 214, 195, 0.18); color: var(--teal); }
.src-est { background: rgba(174, 187, 214, 0.16); color: var(--muted); }
.src-model { background: rgba(247, 169, 40, 0.2); color: var(--amber); }
.stick { margin: 0; }
.stick > svg { width: 100%; height: auto; display: block; border-radius: 10px; overflow: hidden; }
.stick figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.st-lbl { fill: #ffffff; font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #060e1e; stroke-width: 3.5px; stroke-linejoin: round; }
.st-big { fill: #ffffff; font-size: 18px; font-weight: 700; }
.st-sm { fill: #fff3cf; font-size: 12.5px; font-weight: 600; }
.st-chu { fill: #b9fff3; }
.st-xs { fill: #c6d3ea; font-size: 11px; }
.data-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------------------ timeline */
.timeline { grid-column: 1 / -1; display: flex; gap: 14px; align-items: stretch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 6px 12px; }
.play { flex: none; width: 58px; height: 58px; align-self: center; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #ffe08a, #f7a928 60%, #d9820c); box-shadow: 0 0 0 4px rgba(247, 169, 40, 0.2), 0 6px 18px rgba(247, 169, 40, 0.35); display: grid; place-items: center; }
.i-play { width: 0; height: 0; border-left: 18px solid #1a1204; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.play.is-playing .i-play { width: 16px; height: 20px; border: 0; margin: 0; background: linear-gradient(90deg, #1a1204 0 36%, transparent 36% 64%, #1a1204 64%); }
.track-wrap { position: relative; flex: 1; min-width: 0; padding-top: 34px; }
.chart { position: absolute; left: 36px; right: 0; top: 34px; height: 72px; width: calc(100% - 36px); }
.yticks { position: absolute; left: 0; top: 28px; height: 84px; text-align: right; width: 32px; display: flex; flex-direction: column; justify-content: space-between; font-size: 10.5px; color: var(--faint); pointer-events: none; z-index: 1; }
.yticks span { padding: 0; }
.chart-marks { position: absolute; left: 36px; right: 0; top: 0; bottom: 0; pointer-events: none; }
.cursor { position: absolute; left: 0; top: 34px; width: 2px; height: 72px; margin-left: -1px; background: #ffffff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.6); will-change: transform; }
.mark { position: absolute; translate: -50% 0; font-size: 11.5px; white-space: nowrap; }
.mark-key { top: 0; color: #ffd9a0; font-weight: 600; }
.mark-dist { top: 16px; color: var(--blue); font-weight: 600; }
.mark-month { top: 108px; color: var(--muted); font-size: 11.5px; }
#date { position: relative; z-index: 2; height: 72px; margin: 0 0 0 36px; width: calc(100% - 36px); }
#date::-webkit-slider-runnable-track { height: 72px; background: transparent; border-radius: 0; }
#date::-moz-range-track { height: 72px; background: transparent; }
#date::-webkit-slider-thumb { width: 14px; height: 72px; margin-top: 0; border-radius: 7px; background: rgba(255, 255, 255, 0.14); border: 2px solid #ffffff; box-shadow: 0 0 14px rgba(255, 255, 255, 0.35); }
#date::-moz-range-thumb { width: 12px; height: 68px; border-radius: 7px; background: rgba(255, 255, 255, 0.14); border: 2px solid #ffffff; }
.legend { display: flex; gap: 16px; justify-content: flex-end; margin-top: 18px; font-size: 12px; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; background: var(--gold); }
.lg-chu::before { background: var(--chu); }
.lg-dist::before { background: repeating-linear-gradient(90deg, var(--blue) 0 6px, transparent 6px 9px); }

/* ------------------------------------------------------------ teacher notes */
.notes { border: 0; padding: 0; margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(560px, 100vw); background: #0a1428; color: var(--ink); border-left: 1px solid var(--line2); }
.notes::backdrop { background: rgba(2, 6, 15, 0.6); }
.notes-inner { padding: 20px 24px 28px; overflow: auto; height: 100%; }
.notes-top { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -20px; background: #0a1428; padding: 6px 0; }
.notes h2 { margin: 0; font-size: 22px; }
.notes h3 { margin: 18px 0 6px; font-size: 15px; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; }
.notes p, .notes li { font-size: 15px; color: #d6e0f3; }
.notes ul, .notes ol { padding-left: 20px; margin: 6px 0; }
.notes li { margin: 5px 0; }
kbd { font-family: var(--font); font-size: 12.5px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: #12213f; }
.notes-foot { margin-top: 22px; font-size: 13px !important; color: var(--faint) !important; }

.fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px 16px 70px; }
.fb-note { position: absolute; top: 14px; left: 50%; translate: -50% 0; width: min(330px, 90%); margin: 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.fallback svg { width: 100%; height: 100%; max-height: 100%; }
.fb-lbl { fill: #ffd9a0; font-size: 7px; font-family: var(--font); font-weight: 600; }
.fb-aps { fill: #bcd3ff; }
.fb-cap { fill: #aebbd6; font-size: 6.5px; font-family: var(--font); }
.noscript { padding: 20px; }

/* ------------------------------------------------------------ smaller laptops */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .tilt-card { width: 262px; }
  .dist-card { width: 232px; }
  .big { font-size: 30px; }
}
@media (max-height: 700px) and (min-width: 821px) {
  .stick figcaption, .hint { display: none; }
}

/* ------------------------------------------------------------ phones and portrait tablets */
@media (max-width: 820px) {
  body { overflow: auto; display: block; }
  .top { flex-wrap: wrap; padding: 10px 12px 6px; }
  h1 { font-size: 24px; }
  .eyebrow { font-size: 11.5px; }
  .eb-unit, .btn-icon { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .top-actions { width: 100%; justify-content: flex-start; gap: 8px; }
  .seg-btn { padding: 6px 10px; font-size: 13px; }
  .btn { padding: 8px 12px; font-size: 14px; }
  .layout { display: flex; flex-direction: column; padding: 4px 10px 16px; gap: 10px; }
  .stage { display: contents; }
  .viewport { order: 0; }
  .try-card { order: 1; }
  .timeline { order: 2; }
  .tilt-card { order: 3; }
  .panel { order: 4; }
  .dist-card { order: 5; }
  .fallback { padding: 50px 4px 64px; }
  .fb-note { top: 8px; }
  .viewport { position: relative; height: 48vh; min-height: 320px; max-height: 480px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #02060f; }
  .tilt-card, .dist-card { position: static; width: auto; }
  .scale-note { left: 8px; right: 8px; bottom: 8px; font-size: 11.5px; }
  .try-card { position: static; width: auto; display: block; }
  .try-panel { display: block; }
  .try-tabs { flex-direction: row; flex-wrap: wrap; margin: 10px 0; }
  .try-think { border-left: 0; padding-left: 0; margin-top: 10px !important; }
  .try-open .scale-note { bottom: 8px; }
  .timeline { padding: 10px; gap: 10px; }
  .panel { overflow: visible; }
  .play { width: 50px; height: 50px; }
  .mark-key, .mark-dist { font-size: 10px; }
  .mark-key:nth-child(odd), .mark-dist { }
  .legend { flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
  .tag { font-size: 11px; }
  .tag-key { font-size: 10.5px; }
}
@media (max-width: 480px) {
  .m-odd { display: none; }
  .tag-apsis { display: none; }
  .mark-key, .mark-dist { display: none; }
  .is-compare .cities { grid-template-columns: 1fr 1fr; }
  .is-compare .big { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ paint isolation: a date change must not re-raster the chart
   or the page background (measured 29 Sep 2026: raster dominated frame time while playing on a software renderer) */
.chart, #date, .stick > svg, .dist-card, .tilt-card, .city, .labels { will-change: transform; }
.panel, .timeline { contain: layout paint; }
/* Deliberate lesson surfaces: controlled comparison and evidence notebook. */
html,body{height:auto;min-height:100%;}
body{display:block;overflow:auto;line-height:1.5;}
.top{max-width:1800px;margin:auto;padding:18px 24px 14px;}
.layout{max-width:1800px;margin:auto;display:grid;grid-template-columns:minmax(0,1fr) 382px;grid-template-rows:auto minmax(620px,68vh) auto auto;gap:16px;padding:0 24px 24px;}
.investigation{grid-column:1/-1;display:grid;grid-template-columns:1.25fr 1.15fr .7fr;align-items:center;gap:28px;padding:24px 28px;border:1px solid #3c556c;background:linear-gradient(112deg,#143444,#102031 72%);border-radius:18px;}
.investigation h2{font-size:29px;line-height:1.15;letter-spacing:-.04em;margin:6px 0 10px;}
.investigation p{margin:0;color:#c8dbe8;font-size:15px;max-width:50ch;}
.investigation .eyebrow{color:#7ce8d9;font-size:12px;}
.prediction{border:0;margin:0;padding:0;min-width:0;}
.prediction legend{font-weight:600;margin-bottom:12px;font-size:16px;}
.step-no{display:inline-flex;align-items:center;justify-content:center;border:1px solid #84b8ba;border-radius:50%;width:26px;height:26px;font-size:13px;margin-right:5px;color:#8bf1dd;}
.choice-row{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 10px;}
.choice-row button,.date-stops button{background:#12293c;border:1px solid #5b768e;border-radius:9px;min-height:44px;padding:8px 13px;font-size:14px;font-weight:600;}
.choice-row button[aria-pressed=true],.date-stops button[aria-pressed=true]{background:#fbd477;color:#102131;border-color:#fbd477;}
.choice-row button:hover,.date-stops button:hover{border-color:#ffe2a0;}
.investigation .hint{font-size:13px;margin-top:8px;color:#c8dbe8;}
.investigation-start .act{background:#ffd166;color:#142432;margin-top:12px;min-height:44px;}
.stage{grid-column:1;grid-row:2;}
.panel{grid-column:2;grid-row:2;padding:20px 18px;gap:14px;overflow:visible;}
.panel,.timeline{contain:none;}
.model-heading{position:absolute;left:20px;right:20px;top:16px;display:flex;justify-content:space-between;gap:20px;color:#bfd4e3;font-size:12px;z-index:4;pointer-events:none;}
.model-heading .eyebrow{color:#76e1d4;}
.tilt-card,.dist-card{top:54px;box-shadow:none;padding:12px;}
.tilt-card{width:295px;}.dist-card{width:255px;}
.hint,.data-note{font-size:13px;line-height:1.55;}
.data-note{color:#c5d3e5;margin-top:0;}
.scale-note{font-size:13px;max-width:580px;}
.chip,.seg-btn,.btn,.toggle,.act,.try-tab,.btn-x{min-height:44px;}
.chip{padding:8px 10px;}
.facts dt{font-size:13px;}.facts dd{font-size:17px;}
.big{font-size:36px;}.season{font-size:14px;}
.cmp th,.cmp td{white-space:normal!important;font-size:14px;padding:7px 5px;}
.cmp tbody th{font-size:13px;width:28%;}.cmp .r-big td{font-size:19px;}
.stick{margin:0;}.stick > svg{height:auto;width:100%;}
.timeline{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:58px minmax(0,1fr);padding:16px 20px;}
.date-stops{grid-column:1/-1;display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:18px;}
.date-stops .lbl{margin-right:10px;}
.timeline .play{grid-column:1;align-self:center;}
.track-wrap{grid-column:2;min-width:0;}
.evidence-bench{grid-column:1/-1;grid-row:4;background:#e8efe9;color:#163131;border:1px solid #bfd3c9;border-radius:18px;padding:28px;}
.evidence-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;}
.evidence-heading h2{font-size:29px;letter-spacing:-.03em;margin:4px 0;}
.evidence-heading .eyebrow{color:#34675b;}.evidence-heading .btn{background:#f8fcf8;border-color:#8ba69c;color:#163131;}
.evidence-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:40px;margin-top:18px;}
.evidence-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;}
.evidence-table caption{text-align:left;font-size:20px;font-weight:700;margin-bottom:12px;}
.evidence-table td,.evidence-table th{padding:12px 10px;text-align:left;border-bottom:1px solid #b2c8bd;}
.evidence-table th{font-weight:600;}.evidence-table thead th{background:#d6e4dc;font-size:14px;}.evidence-table td{font-size:16px;}
.evidence-difference{font-size:20px;font-weight:700;}.evidence-bench .hint{color:#395e52;}
.reasoning{border-left:2px solid #9bbcac;padding-left:32px;}
.reasoning h3{margin:0;font-size:21px;}.evidence-bench .step-no{border-color:#48715b;color:#265740;}
.evidence-bench details{border-top:1px solid #9db9aa;margin-top:18px;padding-top:14px;}
summary{cursor:pointer;min-height:44px;font-weight:600;}
.evidence-bench .choice-row button{background:#fff;color:#1d3b32;border-color:#708d7e;}
.evidence-bench :focus-visible{outline-color:#0e6b63;}
.notes a{color:#9deee0;text-underline-offset:3px;}
.notes p,.notes li{font-size:16px;}
.try-open .scale-note{display:block;}.try-open .model-heading{display:none;}
.fallback{padding-top:95px;}.fb-note{top:42px;background:#091526;padding:6px;}
@media(min-width:821px) and (max-width:1200px){.layout{grid-template-columns:minmax(0,1fr) 344px;}.investigation{grid-template-columns:1fr 1fr;}.investigation-title{grid-column:1/-1;}.dist-card{display:none;}.tilt-card{width:270px;}.model-heading>span:last-child{display:none;}}
@media(max-width:820px){
 .top{padding:14px 12px;}.top-actions{flex-wrap:wrap;}.layout{display:flex;padding:0 12px 20px;gap:14px;}.investigation{order:0;display:block;padding:20px;}.investigation-title{margin-bottom:24px;}.investigation h2{font-size:28px;}.investigation p{font-size:16px;}.investigation .hint{font-size:14px;}.investigation-start{margin-top:22px;}
 .stage{display:contents;}.viewport{order:2;min-height:370px;max-height:none;height:480px;}.model-heading{left:12px;right:12px;top:12px;display:block;}.model-heading>span:last-child{display:block;font-size:12px;margin-top:4px;}
 .timeline{order:1;display:grid;padding:14px 12px;grid-template-columns:44px minmax(0,1fr);}.date-stops{gap:6px;margin-bottom:24px;}.date-stops .lbl{width:100%;font-size:15px;}.date-stops button{font-size:13px;padding:8px;}.play{width:44px;height:44px;}.legend{font-size:12px;}.legend span{display:block;}
 .tilt-card{order:3;width:auto;padding:18px;}.panel{order:4;padding:18px 14px;}.dist-card{order:5;width:auto;padding:18px;}.try-card{order:6;}.evidence-bench{order:7;padding:20px 14px;}.evidence-grid{display:block;}.evidence-heading{align-items:flex-start;flex-wrap:wrap;}.evidence-heading h2{font-size:26px;}.evidence-table{table-layout:fixed;}.evidence-table th,.evidence-table td{padding:10px 5px;overflow-wrap:anywhere;font-size:14px;}.evidence-table th:first-child{width:36%;}.evidence-table thead th{font-size:13px;}.reasoning{border-left:0;border-top:2px solid #9bbcac;padding:20px 0 0;margin-top:24px;}
 .hint,.data-note,.scale-note,.try-think{font-size:14px;}.scale-note{padding:8px;}.cmp .r-big td{font-size:17px;}.cmp th,.cmp td{font-size:13px;padding:6px 3px;}.cmp tbody th{font-size:12px;}.fallback{padding:96px 0 96px;}.fb-note{top:66px;font-size:13px;}.btn-x{min-width:44px;}
}
@media print{body{background:white;color:black;}.top-actions,.prediction,.investigation-start,.stage,.timeline,.notes,.transfer,.reasoning details,.evidence-heading button{display:none!important;}.layout{display:block;padding:0;}.investigation,.panel,.evidence-bench{background:white;color:black;border:1px solid #777;break-inside:avoid;margin-bottom:12px;}.investigation p,.data-note,.facts dt,.lbl,.hint,.season{color:black;}.investigation{display:block;padding:10px;}.panel{display:block;}.evidence-grid{display:block;}.reasoning{border:0;padding:0;}.evidence-table th,.evidence-table td{color:black;}.evidence-bench[hidden]{display:none!important;}}

/* Revision: put controls outside the model so the globe and axis stay visible. */
@media(min-width:821px){
 .layout{grid-template-rows:auto minmax(740px,76vh) auto auto;}
 .stage{display:grid;grid-template-columns:1.15fr 1fr;grid-template-rows:auto minmax(0,1fr);align-content:stretch;}
 .tilt-card,.dist-card{position:static;width:auto;grid-row:1;margin:14px 14px 0;padding:14px;}
 .tilt-card{grid-column:1;margin-right:7px;}.dist-card{grid-column:2;margin-left:7px;}
 .viewport{grid-column:1/-1;grid-row:2;position:relative;inset:auto;width:100%;height:100%;min-height:480px;}
 .model-heading{top:14px;}
 .try-open .tilt-card,.try-open .dist-card{display:block;}
 .try-card{bottom:14px;}
 .fallback{padding-top:80px;padding-bottom:90px;}.fb-note{top:46px;}
}
@media(min-width:821px) and (max-width:1200px){.dist-card{display:block;}.model-heading>span:last-child{display:none;}}
button:disabled{opacity:.55;cursor:default;}
@media(max-height:700px) and (min-width:821px){.hint{display:block;}}
.investigation .eyebrow,.evidence-bench .eyebrow{white-space:normal;overflow-wrap:anywhere;}
.evidence-heading>div{min-width:0;}
.comparison-settings{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.comparison-settings button{min-height:44px;padding:8px 12px;background:#f8fcf8;border:1px solid #658675;color:#173f33;border-radius:9px;font-weight:600;}
.comparison-settings button[aria-pressed=true]{background:#175847;color:white;}
.model-text{grid-column:1/-1;grid-row:3;padding:12px 18px;margin:0;border-top:1px solid #3b5169;color:#dce9f4;background:#0b1b2d;font-size:15px;}
@media(min-width:821px){.stage{grid-template-rows:auto minmax(0,1fr) auto;}.layout{grid-template-rows:auto minmax(820px,82vh) auto auto;}}
@media(max-width:820px){.model-text{order:3;border:1px solid #3b5169;border-radius:12px;font-size:16px;}}
/* Second independent pass: optional activities must never cover the model or
   its text equivalent. An open activity gets its own row and page space. */
@media(min-width:821px){
 .layout{grid-template-rows:auto auto auto auto;}
 .stage{min-height:820px;grid-template-rows:auto minmax(480px,1fr) auto auto;}
 .try-card{position:static;grid-row:4;grid-column:1/-1;margin:14px;padding:16px;}
 .fallback{padding-top:112px;}
 .try-open .model-heading{display:flex;}
 .try-scale{display:none!important;}
}
@media(min-width:821px) and (max-width:1200px){
 .try-card{display:block;}.try-tabs{flex-direction:row;flex-wrap:wrap;}
 .try-panel{display:block;}.try-think{border-left:0;padding:0;margin-top:12px!important;}
}
@media print{
 :root{color-scheme:light!important;}
 .stick,.model-text{display:none!important;}
 .comparison-settings{display:none;}
 html,body{background:#fff!important;background-image:none!important;color:#000!important;}
 .eyebrow,.investigation .eyebrow,.stick figcaption{color:#000!important;}
 .brand-mark{display:none;}.top{padding:0 0 12px;}.investigation{padding:12px;}
 .reasoning::after{content:"";display:block;height:90px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 29px,#a8a8a8 29px,#a8a8a8 30px);}
 .toggle,#predictionFeedback{display:none!important;}
 .city,.cmp,.evidence-table thead th{background:white!important;color:black!important;border-color:#777;}
 .cmp tbody th,.cmp thead small{color:#000!important;}
 .big,.big-lbl,.city-name,.lat,.src-tag,.facts dd,.date-big,.cmp .c-wpg,.cmp .c-chu,.evidence-bench .eyebrow,.evidence-bench .hint{color:black!important;background:transparent!important;}
 .swatch,.daybar{display:none;}.stick > svg{display:none;}
 .stick figcaption{position:static!important;width:auto;height:auto;clip:auto;white-space:normal;font-size:12px;}
 .evidence-table caption,.evidence-table td,.evidence-table th{color:black;}
}

/* Exact interactive geometry over an illustrative, locally bundled material. */
.stick .st-lbl{fill:#183442;stroke:#f0f5f5;stroke-width:2.5px;font-size:18px;}
.stick .art-note{font-size:12px;line-height:1.45;margin:7px 0 0;color:var(--muted);}
