/* Atlas: a full-viewport globe under a thin glass HUD. Load after tokens.css, chrome.css and mission.css. */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; }
@font-face { font-family: "Onest Fallback"; src: local("Arial"), local("Helvetica"), local("Arimo"); size-adjust: 105%; }
:root { --sans: "Onest", "Onest Fallback", ui-sans-serif, system-ui, sans-serif; --hud: 14px; }

/* ---------- the stage ---------- */
.atlas { position: relative; height: max(640px, 100svh); overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 80% at 52% 52%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--bg); }
.a-view { position: absolute; inset: 0; }
.a-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.a-view canvas:active { cursor: grabbing; }
.a-view canvas:focus-visible { outline: none; }
.a-view canvas:focus-visible ~ .glabels::after { content: ""; position: absolute; inset: 72px 12px 12px; border: 1px solid var(--accent); border-radius: var(--r-card); pointer-events: none; }
.glabels, .gl-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gl-leaders { z-index: 1; }
.gl-leaders path { stroke: var(--zc-rgba-0-102-204-5); stroke-width: 1; fill: none; transition: opacity var(--t-med); }
:root[data-theme="dark"] .gl-leaders path { stroke: var(--zc-rgba-159-183-255-75); }
.gl-leaders path.b { stroke: var(--zc-rgba-122-63-12-55); }
:root[data-theme="dark"] .gl-leaders path.b { stroke: var(--zc-rgba-233-185-140-8); }
/* K5 globe labels (the engine builds <div class="gl"><span>name</span><b>value</b></div>) */
.glabels .gl { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 980px; font: 500 var(--fs-2)/1.3 var(--sans); letter-spacing: 0; color: var(--zc-424245); background: var(--zc-rgba-255-255-255-88); border: 1px solid var(--zc-rgba-0-0-0-06); white-space: nowrap; transition: opacity var(--t-med); will-change: transform; }
:root[data-theme="dark"] .glabels .gl { color: var(--zc-f5f5f7); background: var(--zc-rgba-28-28-30-86); border-color: var(--zc-rgba-255-255-255-08); }
.glabels .gl b { font-weight: 600; color: var(--zc-1d1d1f); }
:root[data-theme="dark"] .glabels .gl b { color: var(--zc-a9beff); }
.glabels .gl.b b { color: var(--zc-7a3f0c); }
:root[data-theme="dark"] .glabels .gl.b b { color: var(--zc-e9b98c); }
.glabels .gl.hub { border-color: var(--zc-rgba-0-102-204-35); }
:root[data-theme="dark"] .glabels .gl.hub { border-color: var(--zc-rgba-169-190-255-4); }
.glabels .gl.hub.b { border-color: var(--zc-rgba-122-63-12-4); }
:root[data-theme="dark"] .glabels .gl.hub.b { border-color: var(--zc-rgba-233-185-140-45); }
.glabels .gl.off { opacity: 0; }
.glabels .gl.sun { color: var(--zc-6e6e73); }
:root[data-theme="dark"] .glabels .gl.sun { color: var(--zc-a1a1a6); }
.glabels .gl.sun b { color: var(--zc-1d1d1f); }
:root[data-theme="dark"] .glabels .gl.sun b { color: var(--zc-a9beff); }
/* terminator tag, wheel hint */
.gl-hud { position: absolute; left: 0; top: 0; z-index: 2; margin: 0; padding: 4px 8px; border-radius: 6px; font: 500 var(--fs-label)/1.3 var(--sans); letter-spacing: 0; color: var(--zc-dfe6f7); background: var(--zc-rgba-8-12-24-72); border: 1px solid var(--zc-rgba-255-255-255-12); pointer-events: none; white-space: nowrap; }
.gl-hud::before { content: ""; display: inline-block; width: 10px; height: 1px; margin: 0 7px 3px 0; background: var(--zc-dfe6f7); opacity: .7; }
.gl-hint { position: absolute; left: 50%; top: 18px; z-index: 2; transform: translate(-50%, -6px); margin: 0; padding: 6px 12px; border-radius: var(--r-pill); font: 500 var(--fs-label)/1 var(--sans); color: var(--zc-eef1f6); background: var(--zc-rgba-8-12-24-78); border: 1px solid var(--zc-rgba-255-255-255-14); opacity: 0; pointer-events: none; transition: opacity var(--t-med), transform var(--t-med) var(--ease); }
.gl-hint.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .gl-hint { transition: none; } }
.a-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

/* the flow callout: kit glass card joined to the globe by a leader */
.a-call { position: absolute; left: 0; top: 0; z-index: 4; width: 264px; pointer-events: none; transform: translate3d(-999px, 0, 0); opacity: 0; transition: opacity var(--t-med) var(--ease); }
.a-call.on { opacity: 1; }
.a-call .m-callout-t { margin-top: 5px; }
.a-call .a-call-v { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.a-call .a-call-v b { font: 600 var(--fs-h3)/1 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.a-call .a-call-v span { font: 500 var(--fs-label)/1.2 var(--sans); color: var(--accent); }

/* ---------- glass HUD pieces ---------- */
.a-top, .a-panel, .a-dock { border-radius: var(--r-card); }
.a-top { position: absolute; z-index: 5; left: var(--hud); top: 80px; width: 344px; padding: 18px 18px 16px; }
.a-top .crumbs { margin: 0 0 12px; }
.a-top h1 { margin: 12px 0 0; font: 400 var(--fs-9)/1.04 var(--sans); letter-spacing: -.04em; }
.a-lede { margin: 10px 0 0; font-size: var(--fs-label); line-height: 1.5; color: var(--ink-2); font-weight: 400; }
.a-lede a { color: var(--ink); text-underline-offset: 3px; }

.a-search { position: relative; margin-top: 14px; }
.a-search-i { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--muted); stroke-width: 1.6; pointer-events: none; }
.a-search input { width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); font: 400 var(--fs-label)/1 var(--sans); }
.a-search input::placeholder { color: var(--muted); }
.a-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.a-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none; border-radius: var(--r-inner); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); max-height: 320px; overflow: auto; }
.a-results li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: var(--fs-label); }
.a-results li small { font: 500 var(--fs-label)/1.4 var(--sans); letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.a-results li[aria-selected="true"], .a-results li:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.a-results li.none { cursor: default; color: var(--muted); background: none; }

.a-left { position: absolute; z-index: 5; left: var(--hud); top: var(--left-top, 360px); width: 344px; }
.a-cap { margin: 0 0 8px 4px; font: 500 var(--fs-label)/1.3 var(--sans); letter-spacing: 0; color: var(--muted); }
.a-hubs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.a-hub { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 6px 12px 6px 6px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink-2); font-size: var(--fs-label); text-align: left; cursor: pointer; transition: border-color var(--t-med), color var(--t-med), background-color var(--t-med); }
.a-hub b { display: grid; place-items: center; min-width: 40px; height: 28px; padding: 0 7px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font: 500 var(--fs-label)/1.3 var(--sans); letter-spacing: 0; color: var(--ink); transition: all var(--t-med); }
.a-hub:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.a-hub[aria-checked="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.a-hub[aria-checked="true"] b { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.a-desc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.atlas.a-city .a-read { display: none; }
.a-desc[hidden], .a-dbtn[hidden], .a-credit[hidden] { display: none; }
.a-dbtn { padding: 0 14px; font-size: var(--fs-caption); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.a-credit { flex-basis: 100%; margin: 4px 0 0; padding: 5px 9px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 400 var(--fs-label)/1.45 var(--sans); color: var(--ink-2); text-shadow: 0 1px 6px color-mix(in srgb, var(--bg) 80%, transparent); }
.a-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.a-cats button { height: 30px; padding: 0 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--ink-2); font-size: var(--fs-caption); cursor: pointer; }
.a-cats button[aria-checked="true"] { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.a-cats button[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

/* right panel: one card per active layer */
.a-panel { position: absolute; z-index: 5; right: var(--hud); top: 80px; bottom: var(--panel-bot, 128px); width: 372px; display: flex; flex-direction: column; overflow: hidden; }
.a-sheet-btn { display: none; }
.a-cards { overflow: auto; padding: 4px 0; overscroll-behavior: contain; scrollbar-width: thin; }
.a-card { padding: 16px 18px 16px; border-top: 1px solid var(--line); }
.a-card:first-child { border-top: 0; }
.a-card-k { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font: 500 var(--fs-label)/1.3 var(--sans); letter-spacing: 0; color: var(--accent); }
.a-card-k span:last-child { color: var(--muted); letter-spacing: .06em; }
.a-card h2 { margin: 8px 0 0; font: 400 var(--fs-lead)/1.2 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.a-metric { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin: 12px 0 0; }
.a-metric span { font-size: var(--fs-caption); color: var(--ink-2); }
.a-metric b { font: 600 var(--fs-8)/1 var(--sans); letter-spacing: -.02em; }
.a-note { margin: 8px 0 0; font-size: var(--fs-caption); line-height: 1.5; color: var(--ink-2); }
.a-rank { margin: 12px 0 0; padding: 0; list-style: none; }
.a-rank button { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 7px 6px 9px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; font-size: var(--fs-label); color: var(--ink); }
.a-rank button:hover, .a-rank button.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.a-rank .i { font: 500 var(--fs-2)/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.a-rank .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-rank .v { font: 500 var(--fs-2)/1 var(--sans); font-variant-numeric: tabular-nums; text-align: right; }
.a-rank .v small { margin-left: 6px; color: var(--muted); font-size: var(--fs-caption); }
.a-rank .bar { position: absolute; left: 38px; right: 6px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--line); }
.a-rank .bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--accent); }
.a-src { margin: 12px 0 0; font: 400 var(--fs-caption)/1.5 var(--mono); color: var(--muted); }
.a-src a { color: var(--ink-2); text-underline-offset: 3px; }
.a-more { margin-top: 10px; }
.a-more summary { cursor: pointer; width: max-content; font: 500 var(--fs-label)/1.3 var(--sans); letter-spacing: 0; color: var(--ink-2); padding: 6px 0; }
.a-more summary:hover { color: var(--ink); }
.a-more p, .a-more code { font-size: var(--fs-caption); line-height: 1.55; color: var(--ink-2); } .a-more p { font-size: var(--fs-caption); }
.a-more code { display: block; margin: 8px 0; padding: 10px; border-radius: 8px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); font: 400 var(--fs-caption)/1.55 var(--mono); word-break: break-word; }
.a-scale { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 12px; font: 500 var(--fs-caption)/1 var(--sans); color: var(--muted); }
.a-scale i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--zc-1d2f6b), var(--zc-4d6bd6), var(--zc-a8bdff)); }
.a-scale.old i { background: linear-gradient(90deg, var(--line-2), color-mix(in srgb, var(--ink) 70%, transparent)); }
.a-scale em { grid-column: 1 / -1; font-style: normal; font-family: var(--sans); font-size: var(--fs-label); }
.a-btn { margin-top: 10px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: none; color: var(--ink); font-size: var(--fs-caption); cursor: pointer; }
.a-btn:hover { border-color: var(--ink-2); }

/* small charts (TEU bars, GSCPI line) */
.a-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.a-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.a-chart text { font: 500 var(--fs-caption)/1 var(--sans); fill: var(--muted); }
.a-chart .b1 { fill: var(--accent); } .a-chart .b2 { fill: color-mix(in srgb, var(--accent) 50%, var(--surface-2)); } .a-chart .b3 { fill: var(--line-2); }
.a-chart g.on rect:not(.hit) { filter: brightness(1.3); }
.a-chart g.on .b3 { fill: var(--ink-2); }
.a-chart .hit { fill: transparent; }
.a-chart .zero { stroke: var(--line-2); stroke-dasharray: 2 3; }
.a-chart .ln { fill: none; stroke: var(--warm); stroke-width: 1.6; stroke-linejoin: round; }
.a-chart .ar { fill: color-mix(in srgb, var(--warm) 14%, transparent); }
.a-chart .pt { fill: var(--warm); }
.a-chart .pt.now { stroke: var(--surface); stroke-width: 2; }
.a-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font: 500 var(--fs-label)/1.2 var(--sans); color: var(--ink-2); }
.a-key i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.a-key .b1 { background: var(--accent); } .a-key .b2 { background: color-mix(in srgb, var(--accent) 50%, var(--surface-2)); } .a-key .b3 { background: var(--line-2); }
.a-chart-read { margin: 6px 0 0; min-height: 2.6em; font: 500 var(--fs-label)/1.4 var(--sans); color: var(--ink-2); }

/* bottom dock: layer chips, sun, tools */
.a-dock { position: absolute; z-index: 6; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; padding: 10px 12px; max-width: calc(100vw - 2 * var(--hud)); }
.a-layers { flex-wrap: nowrap; }
.a-layers .m-chip { height: 34px; white-space: nowrap; }
.a-layers .m-chip[aria-pressed="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.a-layers .m-chip[aria-pressed="true"] .m-chip-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.a-sun { width: 286px; }
.a-sun-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a-sun-k { margin: 0; font: 500 var(--fs-label)/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-sun-k b { font-weight: 500; color: var(--ink); }
.a-sun-ph { color: var(--warm); }
.a-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: none; font: 500 var(--fs-label)/1.3 var(--sans); letter-spacing: 0; color: var(--ink-2); cursor: pointer; }
.a-live span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.a-live[aria-pressed="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.a-live[aria-pressed="true"] span { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.a-range { width: 100%; height: 18px; margin: 6px 0 0; accent-color: var(--warm); background: none; -webkit-appearance: none; appearance: none; }
.a-range::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--line-2) var(--a, 25%), color-mix(in srgb, var(--warm) 70%, transparent) var(--a, 25%) var(--b, 75%), var(--line-2) var(--b, 75%)); }
.a-range::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--line-2) var(--a, 25%), color-mix(in srgb, var(--warm) 70%, transparent) var(--a, 25%) var(--b, 75%), var(--line-2) var(--b, 75%)); }
.a-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; background: var(--warm); border: 2px solid var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warm) 25%, transparent); }
.a-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--warm); border: 2px solid var(--surface); }
.a-rail { padding-top: 10px; }
.a-rail > li { font-size: var(--fs-caption); }
.a-tools { display: flex; gap: 6px; }
.a-tool { min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink); font: 500 var(--fs-small)/1 var(--sans); cursor: pointer; }
.a-tool:hover { border-color: var(--ink-2); }
.a-share { font-size: var(--fs-caption); letter-spacing: .04em; }

.a-read { position: absolute; z-index: 5; left: calc(var(--hud) + 4px); bottom: 124px; justify-items: start; text-align: left; pointer-events: none; }
.a-nojs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--ink-2); }

/* ---------- lists ---------- */
.a-lists { padding: var(--sec-y) var(--gut); }
.a-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--sp3); }
.a-table { padding: 18px 20px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.a-table h3 { margin: 6px 0 0; font: 400 var(--fs-body)/1.25 var(--sans); letter-spacing: -.02em; }
.a-table table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: var(--fs-label); }
.a-table th, .a-table td { padding: 7px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.a-table th[scope="col"] { font: 500 var(--fs-label)/1.2 var(--sans); letter-spacing: 0; color: var(--muted); border-top: 0; }
.a-table td.num, .a-table th.num { text-align: right; font-family: var(--sans); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.a-table caption { caption-side: bottom; padding-top: 10px; text-align: left; font: 400 var(--fs-caption)/1.5 var(--mono); color: var(--muted); }
.a-table caption a { color: var(--ink-2); }
.a-loading { color: var(--muted); }

/* ---------- narrower desktops: slimmer side columns ---------- */
@media (max-width: 1240px) and (min-width: 861px) {
  .a-top, .a-left { width: 300px; }
  .a-top h1 { font-size: var(--fs-8); }
  .a-panel { width: 330px; }
  .a-sun { width: 210px; }
  .a-layers .m-chip-t { font-size: var(--fs-caption); }
}
@media (max-height: 760px) and (min-width: 861px) {
  .a-lede { display: none; }
}

/* ---------- phones and small tablets: a lighter globe, a bottom sheet for the panel ---------- */
@media (max-width: 860px) {
  .atlas { height: max(600px, 100svh); }
  .a-top { left: 12px; right: 12px; top: 70px; width: auto; padding: 12px 14px; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .a-top::after { display: none; }
  .a-top .m-eyebrow, .a-top .crumbs { display: none; }
  .a-top h1 { margin: 0; font-size: var(--fs-8); }
  .a-lede { display: none; }
  .a-search { margin-top: 10px; }
  .a-left { left: 0; right: 0; top: 168px; width: auto; }
  .a-cap { display: none; }
  .a-hubs { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 4px; scrollbar-width: none; }
  .a-hubs::-webkit-scrollbar { display: none; }
  .a-hub { flex: none; min-height: 36px; padding-right: 10px; }
  .a-hub span { display: none; }
  .a-hub b { min-width: 0; height: 24px; }
  .a-desc { padding: 0 12px; }
  .a-cats { flex-wrap: nowrap; overflow-x: auto; padding: 0 12px 2px; scrollbar-width: none; }
  .a-cats::-webkit-scrollbar { display: none; }
  .a-cats button { flex: none; }
  .a-dock { left: 0; right: 0; top: auto; transform: none; position: absolute; flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 12px; border-radius: 0; max-width: none; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; bottom: var(--sheet-h, 168px); }
  .a-dock::after { display: none; }
  .a-layers { overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .a-layers::-webkit-scrollbar { display: none; }
  .a-layers .m-chip { flex: none; }
  .a-sun, .a-tools .a-tool:not(.a-share):not(.a-tg) { display: none; }
  .a-tools { position: absolute; right: 12px; top: -40px; }
  .a-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--sheet-h, 168px); border-radius: var(--r-card) var(--r-card) 0 0; border-bottom: 0; transition: height var(--t-med) var(--ease); }
  .a-panel.open { height: min(76svh, 620px); z-index: 8; }
  .a-sheet-btn { display: block; flex: none; height: 26px; border: 0; background: none; cursor: pointer; }
  .a-sheet-btn i { display: block; width: 40px; height: 4px; margin: 0 auto; border-radius: 2px; background: var(--line-2); }
  .a-cards { padding-top: 0; }
  .a-panel:not(.open) .a-cards { overflow: hidden; }
  .a-read { display: none; }
  .a-call { width: 230px; }
  .a-view canvas:focus-visible ~ .glabels::after { inset: 160px 8px 180px; }
}

/* ================= K1 (Oct 7): the tables as instrument panels, the LA hub as the lead ================= */
.a-table.m-panel { padding: 18px 20px 16px; }
.a-table th[scope="row"] { font-size: var(--fs-label); padding-right: 14px; }
.a-table tbody tr > * { padding-left: 6px; padding-right: 6px; }
.a-table .m-bar { max-width: 180px; }
.a-table td.num { font-size: var(--fs-caption); color: var(--ink); }
.a-table td.num + td.num { color: var(--ink-2); }
@media (min-width: 900px) {
  .a-tables > .a-table:first-child { grid-column: span 2; }
}
.a-tables > .a-table:first-child { background: radial-gradient(120% 120% at 100% 0%, var(--zc-1a2a58) 0%, var(--zc-0b1228) 60%, var(--zc-070a14) 100%); border-color: var(--zc-rgba-159-183-255-26); }
:root[data-theme="light"] .a-tables > .a-table:first-child { box-shadow: var(--shadow); }

/* K3b (Oct 7): at 1024 to 1280 the globe reaches under the Hubs label; in Daylight the label sits on a small glass pill so it stays AA */
:root[data-theme="light"] .a-cap:not([hidden]) { width: fit-content; padding: 4px 9px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 0 0 1px var(--line); }


/* ================= K5 globe port (Oct 8): month scrubber, shading and lanes toggles, arc and shading legends ================= */
.a-tool { white-space: nowrap; }
.a-tg { font-size: var(--fs-caption); letter-spacing: .04em; }
.a-tg[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.a-tg:disabled { opacity: .45; cursor: not-allowed; }
.a-months { position: absolute; z-index: 6; left: 50%; bottom: 142px; transform: translateX(-50%); display: grid; grid-template-columns: auto minmax(160px, 320px) auto; gap: 4px 12px; align-items: center; padding: 8px 14px; border-radius: var(--r-card); max-width: calc(100vw - 2 * var(--hud)); }
.a-months[hidden] { display: none; }
.a-months b { min-width: 74px; font: 500 var(--fs-label)/1 var(--sans); text-align: right; }
.a-mnote { grid-column: 1 / -1; margin: 0; font: 500 var(--fs-label)/1.3 var(--sans); color: var(--ink-2); text-align: center; }
.a-play { width: 34px; padding: 0; display: grid; place-items: center; }
.a-play i { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.a-play[aria-pressed="true"] i { width: 10px; height: 12px; border: 0; margin: 0; background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%); }
.a-mrange { width: 100%; height: 18px; accent-color: var(--accent); }
.a-arcl { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; font: 400 var(--fs-label)/1.45 var(--sans); color: var(--muted); text-wrap: pretty; }
.a-arcw { flex: none; width: 26px; height: 6px; margin-top: 5px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent) 30%); clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 55%); }
.a-legend { margin: 10px 0 0; }
.a-cap2 { margin: 0 0 6px; font: 500 var(--fs-label)/1.2 var(--sans); letter-spacing: 0; color: var(--muted); }
.a-ramp { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--zc-1d2f6b), var(--zc-4d6bd6), var(--zc-a8bdff)); box-shadow: 0 0 0 1px var(--line) inset; }
.a-ticks { display: flex; justify-content: space-between; margin: 5px 0 0; font: 400 var(--fs-caption)/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-2); }
@media (max-width: 860px) {
  .a-months { left: 12px; right: 12px; transform: none; bottom: calc(var(--sheet-h, 168px) + 108px); max-width: none; grid-template-columns: auto 1fr auto; padding: 6px 10px; }
  .a-mnote { font-size: var(--fs-label); }
}

/* ---------- R11 Simple view: the globe is a still per hub and theme; globe-only controls step aside ---------- */
.a-still { display: none; position: absolute; z-index: 0; max-width: none; pointer-events: none; user-select: none; transition: opacity var(--t-fast) var(--ease); }
:is(.simple, .poster) .a-still.d { display: block; }
:root[data-theme="light"]:is(.simple, .poster) .a-still.d { display: none; }
:root[data-theme="light"]:is(.simple, .poster) .a-still.l { display: block; }
.a-still.swap { opacity: 0; }
:is(.simple, .poster) #globe, :is(.simple, .poster) #glabels, :is(.simple, .poster) #gleaders, :is(.simple, .poster) #hud, :is(.simple, .poster) #wheelHint, :is(.simple, .poster) #leaders, :is(.simple, .poster) #call, :is(.simple, .poster) #read,
:is(.simple, .poster) #zoomIn, :is(.simple, .poster) #zoomOut, :is(.simple, .poster) #tLanes, :is(.simple, .poster) #tShade, :is(.simple, .poster) #desc { display: none !important; }
@media (prefers-reduced-motion: reduce) { .a-still { transition: none; } }
/* M1 (demo): the Atlas on phones. Loads after atlas.css and shared/sheet.css. Desktop is untouched: everything is inside the phone query. */
@media (max-width: 860px) {
  .atlas { height: max(600px, 100svh); }
  /* only the title stays at the top; search, hubs, layers, month bar, goods, tools and the card all live in the sheet */
  .a-top { top: 66px; padding: 4px 14px; }
  .a-top h1 { font-size: var(--fs-7); }
  .a-left, .a-dock, .a-panel { display: none; }
  .zsheet { --zs-bg: var(--surface); }
  .a-gl-label, .a-call { z-index: 4; }

  .zsheet .a-hubs { padding: 0 2px 2px; }
  .zsheet .a-layers { padding: 0 0 2px; }
  .zsheet .a-months { position: static; transform: none; left: auto; right: auto; bottom: auto; max-width: none; margin: 0; background: none; border: 0; box-shadow: none; padding: 4px 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .zsheet .a-months::after, .zsheet .a-search::after { display: none; }
  .zsheet .a-cats { padding: 0 0 2px; }
  .zsheet .a-desc { padding: 0; }
  .zsheet .a-cards { overflow: visible; padding: 0; }
  .zsheet .a-card { padding: 4px 0 14px; }
  .zsheet .a-card:first-child { border-top: 0; }
  /* the peek bar carries the kicker and title: the first card keeps them for screen readers only (it is the same text) */
  .zsheet .a-card:first-child .a-card-k, .zsheet .a-card:first-child h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
  .zsheet .a-tools { position: static; right: auto; top: auto; flex-wrap: wrap; justify-content: flex-start; }
  .zsheet .a-search { margin: 0; }
  .zsheet .a-results { max-height: 40svh; }
  .zsheet[data-d="full"] .a-card .a-more[open] { max-height: none; }
  .atlas[data-zs="full"] .glabels, .atlas[data-zs="full"] .gl-leaders, .atlas[data-zs="full"] .a-call { opacity: 0; }
  .glabels, .gl-leaders { transition: opacity var(--t-med) var(--ease); }
}

/* U9 (Round 3): country shading in light mode, pale grey-blue to deep blue (atlas.js sets the same three stops on the globe's uniforms) */
:root[data-theme="light"] .a-ramp, :root[data-theme="light"] .a-scale i { background: linear-gradient(90deg, var(--zc-d5deea), var(--zc-8fa9d6), var(--zc-2a5db0)); }
/* U9: the phone row for Live sun + Pause motion (atlas.js moves #liveBtn and the pause button here at <= 860 px) */
.a-tools { align-items: center; }
/* "Live sun" is longer than "Live": the pill never wraps, the sun card is wider where the dock has room, and below 1380 px the pill drops under the label instead of cutting the phase off */
.a-live { white-space: nowrap; flex: none; }
@media (min-width: 1381px) { .a-sun { width: 314px; } }
@media (min-width: 861px) and (max-width: 1380px) { .a-sun-top { flex-wrap: wrap; row-gap: 4px; } }
.a-mo { display: none; }
@media (max-width: 1380px) { .a-mo { position: absolute; top: 80px; right: 400px; z-index: 6; display: flex; gap: 8px; align-items: center; } }   /* the pause button, beside the panel, where the dock has no room for it */
@media (max-width: 1240px) { .a-mo { right: 358px; } }
@media (max-width: 860px) {
  .a-mo { top: 112px; right: 12px; min-width: 142px; justify-content: flex-start; }   /* room for both items from the first paint: the pause button joins after the globe loads and must not push the Live sun pill (CLS) */
  .a-mo .a-live { height: 40px; padding: 0 14px; border: 0; background: var(--zc-rgba-255-255-255-78); color: var(--zc-1d1d1f); box-shadow: 0 0 0 1px var(--zc-rgba-0-0-0-06); font-size: var(--fs-label); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  :root[data-theme="dark"] .a-mo .a-live { background: var(--zc-rgba-28-28-30-74); color: var(--zc-f5f5f7); box-shadow: 0 0 0 1px var(--zc-rgba-255-255-255-08); }
  .a-mo .a-live:focus-visible { outline: 2px solid var(--zc-0066cc); outline-offset: 3px; }
  :root[data-theme="dark"] .a-mo .a-live:focus-visible { outline-color: var(--zc-a9beff); }
}

/* U9 (Round 3): Pause motion. The look is .pq2-pz from dashboard/_analysis/port.css at 40 px: ink icon on white glass in light, #f5f5f7 on dark glass in
   dark (.u9-pz-dk = always dark). Paused = nothing moves by itself; the page script sets .u9-paused on the stage. */
.u9-pz { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--zc-rgba-255-255-255-78); color: var(--zc-1d1d1f); box-shadow: 0 0 0 1px var(--zc-rgba-0-0-0-06); cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .24s cubic-bezier(.4, 0, .6, 1); }
:root[data-theme="dark"] .u9-pz, .u9-pz.u9-pz-dk { background: var(--zc-rgba-28-28-30-74); color: var(--zc-f5f5f7); box-shadow: 0 0 0 1px var(--zc-rgba-255-255-255-08); }
.u9-pz:hover { background: var(--zc-rgba-255-255-255-95); }
:root[data-theme="dark"] .u9-pz:hover, .u9-pz.u9-pz-dk:hover { background: var(--zc-rgba-60-60-64-85); }
.u9-pz:focus-visible { outline: 2px solid var(--zc-0066cc); outline-offset: 3px; }
:root[data-theme="dark"] .u9-pz:focus-visible, .u9-pz.u9-pz-dk:focus-visible { outline-color: var(--zc-a9beff); }
.u9-pz-i { position: relative; width: 11px; height: 12px; }
.u9-pz-i::before, .u9-pz-i::after { content: ""; position: absolute; top: 0; width: 3.5px; height: 12px; border-radius: 1px; background: currentColor; }
.u9-pz-i::before { left: 0; } .u9-pz-i::after { right: 0; }
.u9-pz[aria-pressed="true"] .u9-pz-i::before { left: 1px; width: 10px; clip-path: polygon(0 0, 100% 50%, 0 100%); border-radius: 0; }
.u9-pz[aria-pressed="true"] .u9-pz-i::after { display: none; }
.u9-paused, .u9-paused *, .u9-paused *::before, .u9-paused *::after { animation-play-state: paused !important; }
:is(.simple, .poster) .u9-pz, :is(.simple, .poster) #tClouds { display: none !important; }
@media (prefers-reduced-motion: reduce) { .u9-pz { display: none; } }

/* Clouds toggle (18 Oct 2026): on phones it sits in the .a-mo row beside Live sun and Pause, in their 40 px glass look; pressed = a ring */
@media (max-width: 860px) {
  .a-mo { min-width: 224px; }
  .a-mo .a-tg { height: 40px; padding: 0 14px; border: 0; background: var(--zc-rgba-255-255-255-78); color: var(--zc-1d1d1f); box-shadow: 0 0 0 1px var(--zc-rgba-0-0-0-06); font-size: var(--fs-label); letter-spacing: 0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .a-mo .a-tg[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--zc-0066cc); }
  :root[data-theme="dark"] .a-mo .a-tg { background: var(--zc-rgba-28-28-30-74); color: var(--zc-f5f5f7); box-shadow: 0 0 0 1px var(--zc-rgba-255-255-255-08); }
  :root[data-theme="dark"] .a-mo .a-tg[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--zc-a9beff); }
  .a-mo .a-tg:focus-visible { outline: 2px solid var(--zc-0066cc); outline-offset: 3px; }
  :root[data-theme="dark"] .a-mo .a-tg:focus-visible { outline-color: var(--zc-a9beff); }
}

/* Dock fit (18 Oct 2026): with the Clouds button the dock needs 10 px more than it has at 1440 ("Copy link" sat past the rounded box), and below about 1205 px it has
   never fitted. Tighter gaps and button padding first; 1381 to 1439 px uses the narrower sun card the 861 to 1380 px layout already has; at 1200 px and below the
   layer chips take their own row. No label is hidden and no target gets smaller. */
@media (min-width: 861px) {
  .a-dock { gap: 12px; }
  .a-tools { gap: 4px; }
  .a-tg, .a-share { padding: 0 8px; }
}
@media (min-width: 1381px) and (max-width: 1439px) {
  .a-sun { width: 286px; }
  .a-sun-top { flex-wrap: wrap; row-gap: 4px; }
}
@media (min-width: 861px) and (max-width: 1200px) {
  .a-dock { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
}
@media (max-width: 860px) and (pointer: coarse) { .a-mo .a-tg { min-height: 44px; } }
