:root {
  --ink: #0b1110;
  --panel: #101817;
  --paper: #edf1e9;
  --muted: #8e9e96;
  --faint: #61716b;
  --line: rgba(220, 234, 224, 0.17);
  --line-strong: rgba(220, 234, 224, 0.31);
  --teal: #79d5c0;
  --teal-dim: #356f68;
  --amber: #e3b56a;
  --amber-dim: #8e6434;
  --serif: Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body {
  min-width: 0; margin: 0; overflow-x: hidden; color: var(--paper);
  background-color: var(--ink);
  background-image: linear-gradient(rgba(116, 177, 161, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(116, 177, 161, .035) 1px, transparent 1px), radial-gradient(circle at 73% 10%, rgba(70, 131, 116, .12), transparent 30rem), radial-gradient(circle at 17% 55%, rgba(178, 127, 63, .05), transparent 26rem);
  background-size: 48px 48px, 48px 48px, auto, auto;
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
}

button, select, input { font: inherit; }
button { color: inherit; }
button:not(:disabled), select:not(:disabled), input:not(:disabled) { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; opacity: .38; }
[hidden] { display: none !important; }
a { color: inherit; }
canvas { display: block; width: 100%; max-width: 100%; height: auto; }

.atlas-shell { width: min(100% - 48px, 1600px); min-width: 0; margin: 0 auto; }
.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; border-bottom: 1px solid var(--line); }
.brand-lockup, .masthead-center, .masthead-actions { min-width: 0; }
.eyebrow, .hero-kicker, .panel-code, .section-index, .folio, .figure-unit, .toolbar-readout, .legend-scale, .loading-state { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; line-height: 1.35; text-transform: uppercase; }
.eyebrow { margin: 0 0 3px; color: var(--teal); font-size: 9px; }
.brand-name { margin: 0; color: var(--paper); font-family: var(--serif); font-size: 18px; letter-spacing: -.02em; }
.masthead-center { display: flex; align-items: center; gap: 8px; padding: 7px 13px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(121, 213, 192, .09), 0 0 12px rgba(121, 213, 192, .7); }
.masthead-actions { display: flex; justify-content: flex-end; gap: 18px; }

.text-button, .button, .mode-button { min-height: 34px; border: 1px solid transparent; border-radius: 0; background: transparent; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease; }
.text-button { padding: 4px 0; color: var(--muted); }
.text-button:hover { color: var(--paper); }
.text-button--wide { display: flex; width: 100%; align-items: center; justify-content: space-between; border-top-color: var(--line); color: var(--muted); text-align: left; }
.text-button--wide:last-child { border-bottom: 1px solid var(--line); }
.text-button--wide:hover { border-top-color: var(--teal-dim); color: var(--teal); }

.hero { padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.hero-kicker { margin: 0 0 15px; color: var(--amber); }
.hero-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-weight: 400; }
h1 { max-width: 1100px; margin-bottom: 14px; color: var(--paper); font-family: var(--serif); font-size: clamp(46px, 5vw, 84px); letter-spacing: -.065em; line-height: .92; }
.folio { padding-bottom: 18px; color: var(--faint); white-space: nowrap; }
.hero-subtitle { max-width: 640px; margin-bottom: 15px; color: #b7c1ba; font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.42; }
.scope-line { display: flex; max-width: 960px; gap: 10px; margin: 0; padding-left: 11px; border-left: 1px solid var(--amber-dim); color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; line-height: 1.55; text-transform: uppercase; }
.scope-mark { flex: 0 0 auto; color: var(--amber); font-size: 15px; line-height: 1; }

.atlas-layout { display: grid; grid-template-columns: minmax(185px, 220px) minmax(0, 1fr) minmax(270px, 340px); gap: 24px; align-items: start; padding: 30px 0 72px; }
.control-rail, .signal-column, .map-column { min-width: 0; }
.control-rail { padding-right: 23px; border-right: 1px solid var(--line); }
.signal-column { padding-left: 23px; border-left: 1px solid var(--line); }
.rail-heading, .panel-heading, .figure-heading, .timeline-meta, .legend-head, .method-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rail-heading { align-items: center; justify-content: flex-start; gap: 10px; min-height: 38px; margin-bottom: 26px; border-bottom: 1px solid var(--line-strong); }
.rail-heading h2, .panel-heading h2, .method-heading h2 { margin: 0; color: var(--paper); font-family: var(--serif); font-size: 20px; letter-spacing: -.03em; }
.section-index { color: var(--amber); font-size: 9px; }

.control-group { margin-bottom: 20px; }
.control-group--compact { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
label, .control-label { display: block; margin-bottom: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.control-group--compact label { margin-bottom: 0; }
.select-shell { position: relative; }
.select-shell::after { position: absolute; top: 50%; right: 11px; color: var(--teal); content: "⌄"; font-size: 13px; pointer-events: none; transform: translateY(-57%); }
select { width: 100%; min-height: 38px; appearance: none; border: 1px solid var(--line-strong); border-radius: 0; padding: 0 30px 0 11px; color: var(--paper); background: var(--panel); font-family: var(--mono); font-size: 11px; }
select:hover { border-color: var(--teal-dim); }
.select-shell--short { width: 83px; }
.action-row, .mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-row { margin: 28px 0 25px; }
.button { border-color: var(--line-strong); padding: 7px 9px; color: var(--paper); }
.button:hover { border-color: var(--teal); color: var(--teal); }
.button--primary { border-color: var(--teal-dim); color: var(--teal); background: rgba(53, 111, 104, .18); }
.button--primary:hover { border-color: var(--teal); background: rgba(53, 111, 104, .32); }
.mode-block { margin-bottom: 25px; }
.mode-row { gap: 0; }
.mode-button { min-height: 33px; border-color: var(--line); color: var(--muted); font-size: 9px; }
.mode-button + .mode-button { border-left: 0; }
.mode-button:hover, .mode-button.is-active, .mode-button[aria-pressed="true"] { border-color: var(--teal-dim); color: var(--teal); background: rgba(53, 111, 104, .16); }
.secondary-actions { margin-bottom: 27px; }
.timeline-block { margin-bottom: 26px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.timeline-meta { margin-bottom: 13px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.timeline-meta label { margin-bottom: 0; }
#timeLabel { color: var(--amber); }

input[type="range"] { display: block; width: 100%; height: 14px; appearance: none; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--teal) 0 22%, var(--line-strong) 22% 100%); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb { width: 11px; height: 11px; appearance: none; margin-top: -4px; border: 2px solid var(--ink); border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid var(--ink); border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.readout-list { display: grid; gap: 0; margin-bottom: 24px; }
.readout-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(220, 234, 224, .1); font-family: var(--mono); font-size: 10px; }
.readout-key { color: var(--faint); letter-spacing: .07em; text-transform: uppercase; }
.readout-value { overflow: hidden; color: var(--paper); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
#status, #moduleLabel { color: var(--teal); }
.story-note { padding: 14px 0 0 12px; border-left: 1px solid var(--amber-dim); color: #aab6ad; font-family: var(--serif); font-size: 13px; line-height: 1.45; }

.panel-heading { min-height: 38px; margin-bottom: 17px; border-bottom: 1px solid var(--line-strong); }
.panel-heading--map { align-items: flex-end; }
.panel-heading h2 { margin-top: 4px; font-size: 24px; }
.panel-code { margin: 0; color: var(--teal); font-size: 9px; }
.panel-stats { display: flex; gap: 10px; padding-bottom: 4px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.panel-stats span + span::before { margin-right: 10px; color: var(--line-strong); content: "/"; }
.map-stage { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--line-strong); background-color: #0c1513; background-image: linear-gradient(rgba(131, 200, 178, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(131, 200, 178, .06) 1px, transparent 1px), radial-gradient(circle at 50% 50%, rgba(58, 123, 107, .12), transparent 57%); background-size: 48px 48px, 48px 48px, auto; box-shadow: 0 18px 45px rgba(0, 0, 0, .26); }
.map-stage::before, .map-stage::after { position: absolute; z-index: 1; width: 18px; height: 18px; border-color: var(--amber-dim); content: ""; pointer-events: none; }
.map-stage::before { top: 10px; left: 10px; border-top: 1px solid; border-left: 1px solid; }
.map-stage::after { right: 10px; bottom: 10px; border-right: 1px solid; border-bottom: 1px solid; }
.stage-label { position: absolute; z-index: 2; color: rgba(237, 241, 233, .63); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.stage-label--top { top: 14px; left: 17px; }
.stage-label--bottom { right: 17px; bottom: 14px; color: var(--amber); }
.map-toolbar { position: absolute; z-index: 2; right: 17px; bottom: 14px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; pointer-events: none; }
.toolbar-separator { width: 1px; height: 11px; background: var(--line-strong); }
.toolbar-readout b { color: var(--amber); font-weight: 400; }

.legend-block { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); }
.legend-head { margin-bottom: 10px; }
.legend-note { color: var(--faint); font-family: var(--mono); font-size: 9px; }
.legend-scale { display: grid; grid-template-columns: auto minmax(70px, 1fr) auto; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 8px; }
.legend-bar { display: block; height: 5px; background: linear-gradient(90deg, #2b514d, #77c5a9 45%, #efc16b); }
.legend-block p { max-width: 640px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.compare-panel { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compare-figure { min-width: 0; margin: 0; }
.compare-figure canvas { border: 1px solid var(--line); background: #0c1513; }
.compare-figure figcaption, .compare-note { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; }
.compare-figure figcaption { display: block; padding-top: 7px; }
.compare-note { margin: 17px 0 0; line-height: 1.5; }

.signal-column > .rail-heading { margin-bottom: 19px; }
.signal-figure { min-width: 0; margin: 0 0 20px; }
.figure-heading { margin-bottom: 8px; }
.figure-heading figcaption { overflow: hidden; color: #c2cec5; font-family: var(--mono); font-size: 10px; letter-spacing: .055em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.figure-unit { flex: 0 0 auto; color: var(--faint); font-size: 8px; }
.canvas-frame { overflow: hidden; min-width: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(126, 215, 192, .04) 1px, transparent 1px), #0d1514; background-size: 52px 100%; }
.canvas-frame--trace { border-color: var(--teal-dim); background-color: #0d1816; }
.compact-tracks { display: grid; gap: 13px; margin-bottom: 29px; }
.rail-heading--network { margin-bottom: 19px; }

.method-panel { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(0, 1.25fr); gap: 44px; padding: 29px 0 34px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.method-heading h2 { margin-top: 8px; font-size: clamp(1.8rem, 3vw, 3rem); }
.method-copy { max-width: 750px; color: #b7c2b9; font-family: var(--serif); font-size: 15px; line-height: 1.5; }
.method-copy p { margin-bottom: 17px; }
.method-copy ul { margin: 0 0 20px; padding-left: 18px; }
.method-copy li { margin-bottom: 7px; }
.method-copy li::marker { color: var(--amber); }
.method-source { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
.method-source a, .footer a { color: var(--teal); text-decoration-color: var(--teal-dim); text-underline-offset: 3px; }
.loading-state { position: fixed; right: 24px; bottom: 20px; z-index: 5; padding: 8px 10px; border: 1px solid var(--line-strong); color: var(--teal); background: rgba(11, 17, 16, .92); box-shadow: 0 7px 28px rgba(0, 0, 0, .25); }
.footer { display: grid; grid-template-columns: 1fr auto; gap: 7px 24px; padding: 23px 0 28px; border-top: 1px solid var(--line-strong); color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .045em; line-height: 1.55; text-transform: uppercase; }
.footer p { margin: 0; }
.footer-boundary { grid-column: 1 / -1; max-width: 980px; color: var(--faint); }

@media (max-width: 1180px) {
  .atlas-layout { grid-template-columns: minmax(185px, 210px) minmax(0, 1fr); }
  .signal-column { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 21px; padding-top: 26px; padding-left: 0; border-top: 1px solid var(--line-strong); border-left: 0; }
  .signal-column > .rail-heading, .rail-heading--network { grid-column: 1 / -1; }
  .signal-column > .rail-heading { margin-bottom: 0; }
  .compact-tracks { display: contents; margin: 0; }
  .signal-column .signal-figure { margin-bottom: 0; }
}

@media (max-width: 760px) {
  .atlas-shell { width: min(100% - 28px, 640px); }
  .masthead { grid-template-columns: 1fr auto; min-height: 68px; }
  .masthead-center { display: none; }
  .masthead-actions { gap: 14px; }
  .hero { padding: 38px 0 29px; }
  .hero-title-row { display: block; }
  h1 { max-width: 650px; font-size: clamp(3rem, 15vw, 5.5rem); }
  .folio { display: block; padding: 0; }
  .atlas-layout { display: flex; flex-direction: column; padding: 21px 0 54px; }
  .map-column { order: 1; }
  .control-rail { order: 2; }
  .signal-column { order: 3; }
  .control-rail { margin-bottom: 44px; padding: 0 0 35px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .map-column { margin-bottom: 48px; }
  .signal-column { display: block; padding: 29px 0 0; border-top: 1px solid var(--line-strong); }
  .signal-column > .rail-heading, .rail-heading--network { margin-bottom: 19px; }
  .signal-column .signal-figure, .compact-tracks { margin-bottom: 20px; }
  .method-panel { display: block; padding: 26px 0 30px; }
  .method-heading { display: block; margin-bottom: 23px; }
  .footer { display: block; }
  .footer p, .footer a { display: block; margin-bottom: 8px; }
  .footer-boundary { margin-top: 15px; }
}

@media (max-width: 480px) {
  .atlas-shell { width: min(100% - 22px, 640px); }
  .hero-kicker { margin-bottom: 18px; }
  h1 { font-size: clamp(2.8rem, 15vw, 4.25rem); }
  .hero-subtitle { font-size: 1rem; }
  .scope-line { font-size: 9px; }
  .compare-grid { grid-template-columns: 1fr; }
  .panel-heading--map, .panel-heading { align-items: flex-start; }
  .panel-stats { display: none; }
  .loading-state { right: 11px; bottom: 11px; max-width: calc(100% - 22px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Observation cards are previewable even in browsers that suppress blob downloads. */
.export-dialog{width:min(960px,94vw);max-height:92vh;background:#0c1719;color:#efeede;border:1px solid #54756c;padding:16px;overflow:auto}
.export-dialog::backdrop{background:rgba(0,0,0,.8)}
.export-dialog img{display:block;width:100%;height:auto;margin-top:14px}
.export-actions{display:flex;align-items:center;gap:20px;position:sticky;top:0;background:#0c1719;padding:8px}
.export-actions strong{margin-right:auto}.export-actions a{color:#72dfc0}
.figure-unit{text-transform:none}
.export-actions button{background:#18332b;color:#f2eddd;border:1px solid #729789;padding:9px 16px;cursor:pointer}
/* Preserve scientific labels rather than truncating conditions or sample counts. */
.readout-row{display:block;font-size:11px;padding:8px 0}.readout-key{display:block;margin-bottom:3px}.readout-value{display:block;text-align:left;white-space:normal;overflow:visible;overflow-wrap:anywhere}
.stage-label--bottom{display:none}
input[type="range"]::-webkit-slider-runnable-track{background:transparent}
input[type="range"]::-moz-range-track{background:transparent}
.method-panel{display:block;max-width:900px;margin:0 auto;padding:32px 12px;color:#bccfc5;line-height:1.75}
.method-panel h2{font-size:28px;color:#f0eadb}.method-panel h3{margin:28px 0 10px;color:#7dd6bc}.method-panel button{background:#18332b;color:#f2eddd;border:1px solid #729789;padding:9px 16px}
@media(max-width:760px){.atlas-layout>.map-column,.atlas-layout>.control-rail,.atlas-layout>.signal-column{width:100%}.hero{padding-top:24px;padding-bottom:22px}.map-column{margin-bottom:12px}.control-rail{margin-bottom:12px}.readout-list{grid-template-columns:1fr 1fr;gap:12px}.map-toolbar{font-size:8px;right:10px}.map-toolbar>span:first-child{display:none}.panel-code{font-size:8px}}
.map-play{margin:0 0 12px;min-width:140px}.map-column .timeline-block{margin-top:20px}.map-column .timeline-meta{font-size:12px}
