/* SolOpps, the Sun. Design read: people who watch space weather, dense and calm, an
   instrument panel at night. The approved preview's palette, type and layout are kept.
   No inline styles anywhere: the Content-Security-Policy forbids them.

   Two themes: dark by default, light when the reader picks it (js/theme.js sets the
   color-scheme meta before first paint). Panels and cards switch; the stage, where the
   Sun and the sky are drawn, stays black in both. */
:root {
  --space: #04060a; --page: #04060a; --panel: #0f131b; --panel2: #151a24; --line: rgba(140, 150, 172, .24);
  --bar: rgba(8, 10, 15, .92); --glass: rgba(15, 19, 27, .86); --card: rgba(15, 19, 27, .9); --sel: rgba(40, 28, 6, .88);
  --press: rgba(255, 176, 32, .14); --grid: rgba(140, 150, 172, .3);
  --ink: #ECEEF3; --mute: #A2A9B8; --sun: #FFB020; --ok: #2FBF71; --warn: #E0A92E; --hot: #F0603A; --cool: #A8CFFF;
  /* amber text and lines, focus rings, and the two link colours: a value opens its thing, a label or unit its term */
  --accent: #FFB020; --accent-line: #FFB020; --focus: #FFB020; --link-v: #FFB020; --link-t: #A8CFFF;
  --banner-bg: rgba(40, 30, 6, .9); --banner-line: rgba(224, 169, 46, .6);
  --stage-ink: #ECEEF3;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root:has(> head > meta[name="color-scheme"][content="light"]) {
  --page: #e9ecf1; --panel: #f7f8fa; --panel2: #eef0f4; --line: rgba(30, 38, 56, .22);
  --bar: rgba(247, 248, 250, .96); --glass: rgba(247, 248, 250, .93); --card: rgba(250, 251, 252, .97); --sel: #fff1d1;
  --press: rgba(179, 116, 0, .12); --grid: rgba(30, 38, 56, .2);
  --ink: #141821; --mute: #4a5263; --ok: #156b3d; --warn: #8a6100; --hot: #b3361b; --cool: #1f5fa8;
  --accent: #8a5a00; --accent-line: #b37400; --focus: #8a5a00; --link-v: #8a5a00; --link-t: #1f5fa8;
  --banner-bg: #fff4d6; --banner-line: #b37400;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--page); color: var(--ink); font: 13px/1.4 var(--body);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible, canvas:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* by id, so it outranks [tabindex]:focus-visible above: the stage clips anything outside the canvas */
#gl:focus-visible { outline-offset: -3px; }
a { color: var(--link-t); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
.chrome { transition: opacity .6s ease; }
body.idle .chrome { opacity: 0; pointer-events: none; }

/* links: a value opens its thing (amber, solid underline), a label or unit opens its term (blue, dotted underline) */
a.v, a.t { position: relative; z-index: 2; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a.v { color: var(--link-v); text-decoration-line: underline; text-decoration-style: solid; }
a.t { color: var(--link-t); text-decoration-line: underline; text-decoration-style: dotted; }
a.v:hover, a.t:hover { text-decoration-thickness: 2px; }
a.v:active, a.t:active { background: var(--press); }
/* a link inside a sentence keeps its line but gets a taller hit area */
p a.v, p a.t, small a.v { padding: 9px 0; }

/* a card's or a row's own link: its target is the whole card or row */
.card, .sub, .rows li, .link { position: relative; }
.sub, .rows li, .link { z-index: 1; }
a.open { color: inherit; text-decoration: none; }
a.open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
a.open:focus-visible { outline: none; }
a.open .chev { color: var(--mute); font-weight: 400; }
a.open.row { color: var(--link-v); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.card:has(> header a.open:hover), .link:has(> a.open:hover) { border-color: var(--accent-line); }
.sub:has(> .subhead a.open:hover), .rows li:has(> a.open:hover) { background: var(--press); }
.card:has(> header a.open:active), .sub:has(> .subhead a.open:active), .rows li:has(> a.open:active), .link:has(> a.open:active) { background: var(--press); }
.card:has(> header a.open:focus-visible), .sub:has(> .subhead a.open:focus-visible), .rows li:has(> a.open:focus-visible), .link:has(> a.open:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }

/* top bar: the brand, the Sun, the relay's time and the theme */
.top { display: flex; align-items: center; gap: 14px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); background: var(--bar); min-width: 0; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }
.brand i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3c4, var(--sun) 55%, #c86a10); }
.worlds { display: flex; flex: 1; min-width: 0; }
.worlds span { padding: 3px 10px; border-radius: 999px; font-size: 12px; border: 1px solid transparent; }
.worlds span.on { color: #1a1204; background: var(--sun); font-weight: 600; }
.snap { display: inline-flex; align-items: center; min-height: 44px; font: 11px var(--mono); color: var(--mute); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.snap:hover { color: var(--ink); }
.themebtn { min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--mute); white-space: nowrap; }
.themebtn:hover { color: var(--ink); background: var(--press); }
.themebtn .to-dark { display: none; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .themebtn .to-dark { display: inline; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .themebtn .to-light { display: none; }

/* stage */
.stage { position: relative; min-height: 0; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: var(--space); touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
/* the disc-shaped target over the Sun: one finger here turns it, anywhere else scrolls the page */
.grab { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 50%; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.grab:active { cursor: grabbing; }
#tags { position: absolute; inset: 0; pointer-events: none; }
/* tags sit on the black stage in both themes */
/* the pointer passes through to the Sun; main.js finds a click on a tag (tagAt) and marks the hovered one */
.tag { position: absolute; transform: translate(-50%, -135%); font: 600 10px var(--mono); color: var(--stage-ink); background: rgba(6, 8, 12, .78); border: 1px solid rgba(255, 255, 255, .3); border-radius: 4px; padding: 1px 5px; white-space: nowrap; text-decoration: none; pointer-events: none; -webkit-user-drag: none; }
.tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 8px; background: rgba(255, 255, 255, .55); }
.tag.hover { border-color: var(--sun); }
/* the amber ring with a band of the stage's black outside it, so it shows over the Sun too */
.tag:focus-visible { outline: 2px solid var(--sun); outline-offset: 0; box-shadow: 0 0 0 4px var(--space); }
#gl.on-tag, .grab.on-tag { cursor: pointer; }
.nogl-msg { display: none; position: absolute; left: 12px; top: 12px; right: 340px; margin: 0; padding: 12px 14px; max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); z-index: 2; }
body.nogl .nogl-msg { display: block; }
body.nogl #gl, body.nogl .depth, body.nogl .transport, body.nogl .capline, body.nogl .grab, body.nogl .globe-zoom, body.nogl .farcap { display: none; }

/* zoom group and the far-side caption, centred over the Sun's part of the stage (between the layer panel and the rail) */
.globe-zoom { position: absolute; top: 8px; left: calc(50% - 63px); transform: translateX(-50%); width: max-content; display: inline-flex; align-items: center; padding: 0 3px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); user-select: none; }
.globe-zoom button { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; font-size: 19px; line-height: 1; }
.globe-zoom button.txt { font-size: 12px; font-weight: 600; padding: 0 12px; }
.globe-zoom output { min-width: 4.3em; text-align: center; font-size: 12px; font-weight: 600; }
.globe-zoom button:hover:enabled { background: var(--press); }
.globe-zoom button:disabled { opacity: .45; cursor: default; }
.farcap { position: absolute; top: 60px; left: calc(50% - 63px); transform: translateX(-50%); display: flex; align-items: center; justify-content: center; min-height: 44px; width: max-content; max-width: calc(100% - 632px); margin: 0; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); font-size: 11.5px; color: var(--ink); text-align: center; text-decoration: none; }
.farcap:hover { border-color: var(--accent-line); text-decoration: underline; text-underline-offset: 2px; }

.depth { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; width: 236px; }
/* On the stage the panel's own words need a backing: the Milky Way behind them can be bright, and the stage stays black in the light theme. */
@media (min-width: 861px) { .depth { padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); } }
.depth h2, .rail h2, .dsnwrap h2 { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.sub-copy { margin: 0; font-size: 11px; color: var(--mute); }
/* a layer row: the button picks the layer, About opens its box */
.lrow { display: grid; grid-template-columns: 1fr auto; gap: 4px; }
.depth button { display: grid; grid-template-columns: 12px 1fr; gap: 8px; align-items: center; text-align: left; padding: 6px 9px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); }
.depth button b { display: block; font-size: 12px; font-weight: 600; }
.depth button small { display: block; font-size: 10.5px; color: var(--mute); line-height: 1.3; }
.depth button:hover { border-color: var(--accent-line); }
.depth button[aria-pressed="true"] { border-color: var(--accent-line); background: var(--sel); }
.about { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); font-size: 10.5px; font-weight: 600; color: var(--link-v); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.about:hover { border-color: var(--accent-line); }
.sw { width: 12px; height: 12px; border-radius: 50%; display: block; }
.sw0 { background: #f08a1c; } .sw1 { background: #e2562a; } .sw2 { background: #f2b21c; } .sw3 { background: #c9a15a; }
.hint { margin: 2px 0 0; font-size: 10.5px; color: var(--mute); }
/* short windows: the layer panel sits at the top, sheds its notes, and scrolls before it would reach the time bar */
@media (min-width: 861px) and (max-height: 700px) { .depth { top: 8px; transform: none; max-height: calc(100% - 96px); overflow-y: auto; scrollbar-width: thin; } }
@media (min-width: 861px) and (max-height: 620px) { .depth .sub-copy, .depth .hint { display: none; } }
@media (min-width: 861px) and (max-height: 560px) { .depth button small { display: none; } }

.transport { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; background: var(--glass); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; max-width: calc(100% - 360px); }
.pill { border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; min-height: 44px; min-width: 44px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill:hover { border-color: var(--accent-line); }
.pill[data-on="true"] { border-color: var(--accent-line); color: var(--accent); }
.pill:disabled { opacity: .45; cursor: default; }
.pill:disabled:hover { border-color: var(--line); }
#scrub:disabled { opacity: .45; }
#scrub { width: 170px; min-height: 44px; accent-color: var(--accent-line); }
/* the time on screen opens the frame's box; the whole time block is its target */
.tinfo { position: relative; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.when { font-weight: 600; font-size: 11px; white-space: nowrap; }
#when { color: var(--link-v); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
#when::after { content: ""; position: absolute; inset: 0; }
.what { font-size: 10.5px; color: var(--mute); max-width: 340px; }
.capline { position: absolute; left: 12px; right: 330px; bottom: 14px; margin: 0; font: 600 12px var(--mono); color: var(--stage-ink); text-shadow: 0 0 6px #000; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
body.idle .capline { opacity: 1; }

/* rail */
.rail { position: absolute; right: 10px; top: 8px; bottom: 8px; width: 304px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: thin; }
.banner { margin: 0; padding: 8px 11px; border: 1px solid var(--banner-line); border-radius: 10px; background: var(--banner-bg); font-size: 12px; color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; }
.card header, .subhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .big { font: 600 24px/1.1 var(--mono); font-variant-numeric: tabular-nums; margin: 3px 0 1px; }
.card .big small { font: 400 11.5px var(--body); color: var(--mute); }
.card .big.na { font-size: 15px; font-weight: 500; color: var(--mute); }
.card p { margin: 3px 0 0; font-size: 11.5px; color: var(--mute); }
.card p b { color: var(--ink); font-weight: 600; }
.card p.small { font-size: 10.5px; }
.card p.status { color: var(--warn); font-size: 11.5px; font-weight: 600; }
.src { font-size: 10.5px; color: var(--mute); }
.sub { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line); }
.sub h3 { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
[data-state="stale"] .big:not(.na), [data-state="stale"] > p:not(.status), [data-state="stale"] .spark, [data-state="stale"] .chips, [data-state="stale"] .rows, [data-state="stale"] .kpbar { opacity: .75; }
.chips { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.chip { font: 600 11px var(--mono); padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); }
a.chip { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 32px; min-width: 44px; justify-content: center; text-decoration: underline dotted; text-underline-offset: 2px; }
a.chip::before { content: ""; position: absolute; inset: -6px 0; } /* a 44 px tall target, drawn 32 px */
a.chip:hover { background: var(--press); }
.chip.ok { color: var(--ok); border-color: rgba(47, 191, 113, .5); }
.chip.warn { color: var(--warn); border-color: rgba(224, 169, 46, .55); }
.chip.hot { color: var(--hot); border-color: rgba(240, 96, 58, .55); }
.rows { list-style: none; margin: 5px 0 0; padding: 0; display: grid; gap: 2px; }
.rows li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; font-size: 11.5px; align-items: center; min-height: 44px; padding: 0 3px; border-radius: 4px; }
.rows li > :first-child { font: 600 11.5px var(--mono); }
.rows li span:not(:first-child) { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--mute); font-size: 11px; }
.rows li span:last-child { text-align: right; }
.rows li.pass { grid-template-columns: 1fr auto; row-gap: 0; padding: 3px; }
.rows li.pass > :first-child { grid-column: 1; }
.rows li.pass span:nth-child(2) { grid-column: 2; text-align: right; }
.rows li.pass span:nth-child(3) { grid-column: 1 / -1; text-align: left; }
.more { position: relative; z-index: 2; margin-top: 2px; min-height: 44px; padding: 0 2px; font-size: 11.5px; color: var(--link-t); text-decoration: underline; text-underline-offset: 2px; }
.kpbar { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; margin-top: 5px; }
.kpbar i { height: 6px; border-radius: 2px; background: rgba(140, 150, 172, .22); }
.kpbar i.on { background: var(--ok); } .kpbar i.on.g { background: var(--warn); } .kpbar i.on.s { background: var(--hot); }
svg.spark { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 280 / 56; margin-top: 4px; }
.spark .gl { stroke: var(--grid); } .spark .gl.hot { stroke: rgba(240, 96, 58, .6); }
.spark .gt { fill: var(--mute); font: 9px var(--mono); } .spark .gt.hot { fill: var(--hot); }
.spark .area { fill: rgba(255, 176, 32, .14); } .spark .line { fill: none; stroke: var(--accent-line); stroke-width: 1.4; } .spark .now { fill: var(--ink); }
/* backed like the panels: over the stage the Milky Way can be as bright as the text */
.credit { font-size: 10.5px; color: var(--mute); line-height: 1.45; padding: 6px 8px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.credit p { margin: 0 0 4px; }

/* Deep Space Network strip */
.dsnwrap { border-top: 1px solid var(--line); background: var(--bar); min-width: 0; }
.dsnwrap .card { background: none; border: 0; border-radius: 0; padding: 7px 14px 9px; }
.dsnwrap .card header { margin-bottom: 2px; }
.links { list-style: none; margin: 5px 0 0; padding: 0 0 2px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.link { flex: 0 0 auto; display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; background: var(--panel); min-width: 170px; }
.link > a.open { font-size: 12px; font-weight: 600; white-space: nowrap; }
.link .lt { font-weight: 600; font-size: 12px; color: var(--accent); }
.link .dist { font-size: 11px; color: var(--mute); }
.link small { font-size: 10.5px; color: var(--mute); white-space: nowrap; }

/* boxes: a panel on the right on wide screens, over the rail, so the Sun stays usable beside it; a bottom sheet on phones */
.box { position: fixed; inset: 52px 10px auto auto; margin: 0; padding: 0; width: 344px; max-width: calc(100vw - 20px); max-height: calc(100vh - 62px); max-height: calc(100dvh - 62px); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: 0 10px 32px rgba(0, 0, 0, .5); overflow: hidden; z-index: 10; }
/* :is() forgives a browser that does not know :popover-open, where the box opens with show() and [open] */
.box:is([open], :popover-open) { display: flex; flex-direction: column; animation: boxin .16s ease-out; }
@keyframes boxin { from { opacity: 0; transform: translateX(14px); } }
.boxnav { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px 0 4px; min-height: 46px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.boxnav .back { min-height: 44px; max-width: calc(100% - 54px); padding: 0 10px 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--link-v); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boxnav .x { width: 44px; height: 44px; border-radius: 6px; font-size: 22px; line-height: 1; color: var(--mute); }
.boxnav button:hover { background: var(--press); color: var(--ink); }
.boxbody { overflow-y: auto; padding: 10px 14px 16px; overscroll-behavior: contain; scrollbar-width: thin; }
.box .kind { margin: 0; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.box h2 { margin: 2px 0 6px; font-size: 17px; line-height: 1.25; }
.bhead { margin: 0 0 3px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; }
.bhead .hl, .bhead .hu { font-size: 12px; color: var(--mute); }
.bhead .hv { font: 600 24px/1.15 var(--mono); font-variant-numeric: tabular-nums; }
.bhead.na { font-size: 15px; color: var(--mute); }
.bsrc { margin: 0 0 3px; font-size: 11px; color: var(--mute); }
.box .status { margin: 2px 0 6px; font-size: 11.5px; font-weight: 600; color: var(--warn); }
.meaning { margin: 6px 0 8px; font-size: 13px; line-height: 1.45; }
.bchart { margin: 6px 0 10px; }
svg.hchart { display: block; width: 100%; height: auto; aspect-ratio: 320 / 132; }
.bload, .bchart > .bna { display: grid; place-items: center; aspect-ratio: 320 / 132; margin: 0; border: 1px dashed var(--line); border-radius: 8px; font-size: 11.5px; color: var(--mute); }
.bchart figcaption { margin-top: 3px; font-size: 10.5px; color: var(--mute); }
.hchart .gx, .hchart .gy { stroke: var(--grid); stroke-width: 1; }
.hchart .gy.hot { stroke: rgba(240, 96, 58, .65); stroke-dasharray: 3 3; }
.hchart .gy.zero { stroke: var(--mute); }
.hchart .tx, .hchart .ty { fill: var(--mute); font: 9px var(--mono); }
.hchart .ty.hot { fill: var(--hot); }
.hchart .hl { fill: none; stroke: var(--accent-line); stroke-width: 1.4; stroke-linejoin: round; }
.hchart .hnow { fill: var(--ink); }
.hchart .kb { fill: var(--ok); } .hchart .kb.g { fill: var(--warn); } .hchart .kb.s { fill: var(--hot); }
.retry { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
.retry:hover { border-color: var(--accent-line); }
.brows { margin: 6px 0 0; }
.brow { display: grid; grid-template-columns: minmax(0, 46%) 1fr; column-gap: 10px; align-items: center; min-height: 44px; border-top: 1px solid var(--line); }
.brow dt { font-size: 12px; color: var(--mute); }
.brow dd { margin: 0; padding: 4px 0; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.brow dd small { display: block; font-size: 10.5px; color: var(--mute); }
.brow .u { color: var(--mute); }
.brow dt a.t { display: flex; align-items: center; min-height: 44px; }
.brow dd a.v, .brow dd a.t { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 40px; min-width: 44px; }
.morefacts { min-height: 44px; padding: 0 2px; font-size: 12px; font-weight: 600; color: var(--link-t); text-decoration: underline; text-underline-offset: 2px; }
.bsec { margin: 12px 0 3px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.bpara { margin: 0; font-size: 12.5px; line-height: 1.5; }
.ofval { margin: 0 0 4px; font-size: 12px; color: var(--mute); }
.ofval b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.bscale { width: 100%; border-collapse: collapse; margin-top: 2px; font-size: 11.5px; }
.bscale th, .bscale td { padding: 5px 6px 5px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.bscale th { font-weight: 600; }
.bscale td:last-child { padding-right: 0; text-align: right; color: var(--mute); }
.bscale tr.on { background: var(--press); }
.nowmark { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 3px; background: var(--sun); color: #1a1204; font-size: 10px; font-weight: 700; }
.bnow { margin: 5px 0 0; font-size: 11.5px; }
.bwhere { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 14px; }
.bwhere a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12.5px; }
.bsources { list-style: none; margin: 0; padding: 0; }
.bsources li { position: relative; min-height: 44px; border-top: 1px solid var(--line); }
.bsources a::after { content: ""; position: absolute; inset: 0; } /* the whole row, at least 44 px, is the link's target */
.bsources a { display: block; padding: 8px 0 0; font-size: 12px; color: var(--link-t); text-underline-offset: 2px; }
.bsources small { display: block; padding: 0 0 8px; font-size: 10.5px; color: var(--mute); }
.bsum { margin: 0 0 4px; font-size: 12px; }
.bflares { list-style: none; margin: 0; padding: 0; font-size: 11.5px; }
.bflares li { display: flex; gap: 10px; padding: 3px 0; border-top: 1px solid var(--line); }
.bflares b { min-width: 3.6em; }

/* phones and narrow windows: one column, the Sun first */
@media (max-width: 860px) {
  body { display: block; overflow: auto; height: auto; }
  html { height: auto; }
  .stage { overflow: visible; }
  #gl { position: relative; inset: auto; height: min(100vw, 64vh); }
  .globe-zoom { left: 50%; top: calc(min(100vw, 64vh) - 52px); }
  .farcap { left: 12px; right: 12px; top: 8px; transform: none; width: auto; max-width: none; }
  .depth { position: static; transform: none; width: auto; grid-template-columns: repeat(2, 1fr); padding: 8px 12px 0; }
  .depth h2, .depth p { grid-column: 1 / -1; }
  .rail { position: static; width: auto; padding: 8px 12px; overflow: visible; }
  .transport { position: static; margin: 8px 12px 0; flex-wrap: wrap; max-width: none; }
  #scrub { flex: 1; min-width: 120px; }
  .what { max-width: none; }
  .snap { display: none; }
  .capline { display: none; }
  .nogl-msg { position: static; margin: 8px 12px 0; max-width: none; }
  .links { flex-wrap: wrap; overflow: visible; }
  .link { flex: 1 1 100%; }
  .link > a.open, .link small { white-space: normal; }
  .dsnwrap .card { padding: 8px 12px 12px; }
  /* the sheet takes the room under the Sun's canvas where there is enough, so the Sun stays in view */
  .box { inset: auto 0 0 0; width: auto; max-width: none; max-height: min(64vh, max(40vh, calc(100vh - min(100vw, 64vh)))); max-height: min(64dvh, max(40dvh, calc(100dvh - min(100vw, 64vh)))); border-radius: 12px 12px 0 0; border-bottom: 0; }
  .box:is([open], :popover-open) { animation-name: sheetin; }
  .boxbody { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@keyframes sheetin { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 420px) {
  .depth { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .chrome, .capline { transition: none; }
  .box:is([open], :popover-open) { animation: none; }
}

/* 404 */
body.plain { display: grid; place-items: center; overflow: auto; }
.notfound { padding: 24px; max-width: 420px; }
.notfound h1 { font-size: 20px; margin-bottom: 6px; }
.notfound p { color: var(--mute); }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent-line); border-radius: 8px; color: var(--accent); text-decoration: none; font-weight: 600; }
