/* The $WALLET terminal: the Hen Science Terminal's ink console (DESIGN.md), as an all-ink page. Instrument tiles on
   a hairline grid, each with its code, title, unit, evidence tag and "what" line; Explain shows how to read each and
   its notes. Phone first: tiles stack, pair up from a tablet and form a 12-column console on a wide screen. Nothing
   moves for show: the only motion is the live dot, and it stops for reduced motion. */

/* ------------------------------------------------------------------ Fonts -- */

@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('fonts/atkinson-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('fonts/atkinson-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('fonts/atkinson-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

/* ----------------------------------------------------------------- Tokens -- */

:root {
  color-scheme: dark;
  --page: #07070b;
  --ink: #0b0b10;
  --panel: #101016;
  --panel-2: #15151d;
  --deep: #0e0e12;
  --hair: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eef1ff;
  --text-2: rgba(238, 241, 255, .72);
  --muted: #8b90a6;
  --faint: #6f748a;
  --lime: #aaff37;
  --sky: #7cc8ff;
  --pink: #ff7ac0;
  --fuchsia: #ff3da5;
  --read: var(--lime);
  --calc: var(--sky);
  --est: var(--pink);
  --plain: #4b5064;
  --focus: #aaff37;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --display: 'Arial Black', 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --pad: 14px;
}

/* ------------------------------------------------------------------- Base -- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 12px; }
body { min-height: 100vh; background: var(--page); color: var(--text); font: 400 15px/1.5 var(--body); }
[hidden] { display: none !important; }
a { color: var(--lime); text-underline-offset: 3px; }
a:hover { color: #d4ff9a; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
table { border-collapse: separate; border-spacing: 0; }
abbr[title] { text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: var(--lime); color: var(--ink); font-weight: 700; }
.skip:focus { top: 12px; }
/* Read by screen readers, not shown. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.grow { flex: 1 1 auto; }
.lbl { font: 700 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.page { display: flex; flex-direction: column; gap: 16px; max-width: max(1360px, 80vw); margin: 0 auto; padding: 0 16px 40px; }
@media (min-width: 640px) { .page { gap: 18px; padding: 0 24px 48px; } }

/* ----------------------------------------------------------------- Header -- */

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-top: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.mark { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; width: 34px; height: 34px; padding: 5px; flex: none; border-radius: 9px;
  background: var(--panel); box-shadow: inset 0 0 0 1px rgba(170, 255, 55, .35), 0 0 18px rgba(170, 255, 55, .18); }
.mark i { border-radius: 1px; background: rgba(255, 255, 255, .05); }
.mark i.on { background: var(--lime); }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-text b { font: 800 21px/1 var(--display); letter-spacing: -.01em; }
.brand-text small { font: 700 10px/1.2 var(--mono); letter-spacing: .14em; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 360px; }
.nav a { padding: 9px 13px; border-radius: 999px; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font: 700 12px/1.2 var(--mono); text-decoration: none; white-space: nowrap; }
.nav a:hover { box-shadow: inset 0 0 0 1px var(--text); }
.nav a.is-here { background: var(--lime); color: var(--ink); box-shadow: none; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.seg button, .switch { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font: 700 12px/1 var(--mono); letter-spacing: .06em; }
.seg button[aria-pressed=true] { background: var(--lime); color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.switch::before { content: ''; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; }
.switch[aria-pressed=true] { background: var(--lime); color: var(--ink); box-shadow: none; }
.switch[aria-pressed=true]::before { background: currentColor; }
@media (pointer: coarse) { .seg button, .switch, .nav a { min-height: 44px; } .nav a { display: inline-flex; align-items: center; } }

/* ------------------------------------------------------------------- Rail -- */

.rail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 11px 16px; border-radius: 14px; background: #0d0d13;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); font: 700 11px/1.4 var(--mono); letter-spacing: .08em; color: var(--muted); }
.rail b, .rail .fig { color: var(--text); font-weight: 700; }
.rail small { font-size: 10.5px; letter-spacing: .02em; font-weight: 400; }
.rail .fig small { display: none; }
.rail-item { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.state { display: inline-flex; align-items: center; gap: 8px; color: var(--text); letter-spacing: .12em; }
.state i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.state.is-live i { background: var(--lime); box-shadow: 0 0 10px rgba(170, 255, 55, .8); animation: pulse 2s ease-out infinite; }
.state.is-still i { background: var(--lime); box-shadow: 0 0 10px rgba(170, 255, 55, .8); }
.state.is-off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fuchsia); }
.rail-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 400; letter-spacing: .02em; }
.rail-key > span { display: inline-flex; align-items: center; gap: 6px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(170, 255, 55, .7); } 80%, 100% { box-shadow: 0 0 0 9px rgba(170, 255, 55, 0); } }
@media (prefers-reduced-motion: reduce) { .state.is-live i { animation: none; } }

/* --------------------------------------------------------------- Watchlist -- */

.watch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 2px 4px; }
.watch ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.watch > small { font-size: 11.5px; color: var(--faint); }
.chip { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; border-radius: 999px; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-strong); font: 600 11.5px/1.2 var(--mono); }
.chip a { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 32px; padding: 0 4px 0 12px; color: var(--text); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip a:hover { color: var(--lime); }
.chip b { color: var(--lime); }
.chip span { color: var(--text-2); }
.chip-x { min-width: 32px; min-height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 14px/1 var(--mono); }
.chip-x:hover { color: var(--fuchsia); }
.tool[aria-pressed=true] { background: var(--lime); color: var(--ink); box-shadow: none; }
@media (pointer: coarse) { .chip a, .chip-x { min-height: 44px; } .chip-x { min-width: 44px; } }

/* --------------------------------------------------------------------- Ask -- */
/* The answer full width on top with its question and figures, the questions as a grid of chips under it: two
   columns once the tile is wide enough, one on a phone. */

.ask-answer { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--deep); box-shadow: inset 0 0 0 1px rgba(170, 255, 55, .2); }
.ask-now { font: 700 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ask-lead { font: 700 clamp(18px, 3.2cqi, 24px)/1.32 var(--body); color: var(--text); }
.ask-lead.is-unknown { color: var(--muted); }
.ask-note { font-size: 13.5px; color: var(--text-2); }
.ask-see { font: 600 12px/1.4 var(--mono); color: var(--muted); }
.ask-see a { text-decoration: none; }
.ask-qs { display: grid; gap: 6px; margin-top: 12px; }
@container (min-width: 600px) { .ask-qs { grid-template-columns: 1fr 1fr; } }
.ask-q { min-height: 44px; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--text-2); font: 600 13.5px/1.35 var(--body); text-align: left; }
.ask-q:hover { color: var(--lime); box-shadow: inset 0 0 0 1px rgba(170, 255, 55, .55); }
.ask-q[aria-pressed=true] { background: rgba(170, 255, 55, .1); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--lime); }

/* ------------------------------------------------------------------- Share -- */

.share { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 18px; overflow: auto; border: 0; border-radius: 18px;
  background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong), 0 30px 80px rgba(0, 0, 0, .6); }
.share::backdrop { background: rgba(4, 4, 8, .78); }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-head h2 { min-width: 0; font: 700 15px/1.3 var(--mono); letter-spacing: .02em; }
.share-img { margin-top: 14px; }
.share-img canvas { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); }
.share-how { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.share-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn.is-quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.is-quiet:hover { background: transparent; color: var(--lime); box-shadow: inset 0 0 0 1px rgba(170, 255, 55, .55); }
.share-link { margin-top: 10px; font: 400 12px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; user-select: all; }

/* --------------------------------------------------------- Transfers strip -- */

.strip-wrap { display: grid; gap: 8px; padding: 4px 2px 0; }
.strip-wrap header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.strip-total { margin-left: auto; font: 700 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.strip { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 70px; padding: 0 1px; border-block: 1px solid rgba(255, 255, 255, .06);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 40px); }
@media (min-width: 640px) { .strip { gap: 3px; } }
.strip i { flex: 1 1 0; min-width: 1px; border-radius: 2px 2px 0 0; background: var(--lime); }
.strip i.is-peak { background: var(--fuchsia); box-shadow: 0 0 10px rgba(255, 61, 165, .7); }
.strip i.is-today { background: transparent; box-shadow: inset 0 0 0 1.2px var(--lime); }
.strip-peak { position: absolute; top: -2px; padding: 0 8px; font: 700 10px/1.2 var(--mono); letter-spacing: .08em; color: var(--fuchsia); white-space: nowrap; text-transform: uppercase; }
.strip-peak.is-left { transform: translateX(-100%); }

/* ---------------------------------------------------------------- Console -- */

.term {
  container: term / inline-size;
  border-radius: 22px;
  overflow: clip;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 3px),
    radial-gradient(120% 60% at 100% 0%, rgba(255, 0, 136, .13), transparent 55%),
    radial-gradient(90% 50% at 0% 30%, rgba(85, 183, 255, .09), transparent 60%),
    var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair), 0 30px 80px rgba(0, 0, 0, .45);
}
@container term (min-width: 640px) { .term { --pad: 20px; } }
@container term (min-width: 980px) { .term { --pad: 24px; } }

.sec { scroll-margin-top: 12px; }
.sec-head { display: flex; align-items: flex-start; gap: 12px; padding: 26px var(--pad) 14px; border-top: 1px solid var(--hair); }
.sec-no { flex: none; margin-top: 1px; padding: 4px 7px 3px; border: 1.5px solid var(--lime); border-radius: 6px; color: var(--lime); font: 700 13px/1 var(--mono); }
.sec-head h2 { font: 800 22px/1.05 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.sec-head h2:focus { outline: none; }
.sec-head p { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--text-2); }

/* Hairlines between tiles: the grid's background shows through 1px gaps. Every row is filled at every width. */
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1px; border-top: 1px solid var(--hair); background: var(--hair); }
.tiles > * { grid-column: span 12; }
@container term (min-width: 720px) { .tiles > .s-6 { grid-column: span 6; } }
@container term (min-width: 980px) {
  .tiles > .s-4 { grid-column: span 4; }
  .tiles > .s-8 { grid-column: span 8; }
}
.hero { border-top: 0; }

/* ------------------------------------------------------------------ Tiles -- */

.tile {
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px var(--pad) 18px;
  background: rgba(16, 16, 22, .92);
  scroll-margin-top: 12px;
}
@container term (min-width: 640px) { .tile { padding: 20px 22px 22px; } }
/* Registration marks in two corners, as on a plotter's sheet. */
.tile::before, .tile::after { content: ''; position: absolute; width: 7px; height: 7px; border: 0 solid rgba(170, 255, 55, .5); pointer-events: none; }
.tile::before { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.tile::after { right: 4px; bottom: 4px; border-width: 0 1px 1px 0; }
.tile:target { box-shadow: inset 0 0 0 1.5px rgba(170, 255, 55, .6); }

.tile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.code { flex: none; padding: 3px 7px; border-radius: 6px; background: var(--lime); color: var(--ink); font: 700 10.5px/1.2 var(--mono); letter-spacing: .04em; }
.tile-head h3 { font: 800 16px/1.15 var(--display); letter-spacing: -.005em; text-transform: uppercase; }
.unit { font: 600 11.5px/1.3 var(--mono); color: var(--muted); }
.tile-link { padding: 2px 6px; border-radius: 4px; color: var(--faint); font: 700 12px/1 var(--mono); text-decoration: none; }
.tile-link:hover { color: var(--lime); }
.what { max-width: 72ch; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tile-body { display: grid; gap: 14px; min-width: 0; }
.read, .notes { display: none; max-width: 80ch; font-size: 13px; line-height: 1.5; }
.read { color: var(--text-2); }
.read span { font: 700 10px var(--mono); letter-spacing: .12em; color: var(--muted); }
.notes { padding: 10px 12px; border: 1px solid rgba(124, 200, 255, .22); border-radius: 8px; background: rgba(124, 200, 255, .05); color: #d9ecff; }
.notes li + li { margin-top: 6px; }
.is-explain .read { display: block; }
.is-explain .notes { display: grid; }
.asof { font: 600 11px/1.3 var(--mono); color: var(--faint); }
.tile-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; }
.tile-foot .asof { padding-top: 8px; }
.tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.tool { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2); font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; list-style: none; }
.tool:hover { color: var(--lime); box-shadow: inset 0 0 0 1px rgba(170, 255, 55, .55); }
.tool-menu { display: inline-grid; justify-items: end; }
.tool-menu > summary::-webkit-details-marker { display: none; }
.tool-menu > summary::after { content: '▾'; margin-left: 6px; }
.tool-menu[open] > summary { background: var(--lime); color: var(--ink); box-shadow: none; }
.tool-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.tool-list .tool { text-transform: none; letter-spacing: .02em; }
@media (pointer: coarse) { .tool { min-height: 44px; } }
.empty { padding: 10px 0; font-size: 14px; color: var(--muted); }
.lead-fig { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; }
.lead-fig > span:last-child { padding-bottom: 4px; font-size: 15px; color: var(--text-2); }
.lead-fig .fig-big { font-size: clamp(30px, 6cqi, 44px); letter-spacing: -.02em; }
h4.lbl { margin-top: 2px; }

/* ------------------------------------------------------------ Tags, figures -- */

.tag { display: inline-block; flex: none; padding: 2px 6px 1px; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor; font: 700 9.5px/1.3 var(--mono);
  letter-spacing: .06em; cursor: help; vertical-align: .1em; }
.t-read { color: var(--read); }
.t-calc { color: var(--calc); }
.t-est { color: var(--est); }
.t-feed { color: var(--text); }
.t-ens { color: var(--lime); font-size: 8.5px; padding: 1px 5px; }
.fig { font: 700 15px/1.2 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fig-big { font-size: 24px; line-height: 1.05; letter-spacing: -.01em; }
.fig-small { font-size: 12px; }
.fig.is-unknown { display: inline-grid; gap: 4px; font: 600 14px/1.3 var(--body); color: var(--muted); }
.fig.is-unknown small { font: 400 12px/1.4 var(--body); color: var(--faint); }
.is-unknown { color: var(--muted); }
.delta { display: inline-flex; align-items: baseline; gap: 4px; font: 700 12.5px/1.2 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta i { font-style: normal; font-size: .8em; }
.delta.is-up { color: var(--lime); }
.delta.is-down { color: var(--fuchsia); }
.delta.is-flat { color: var(--muted); }
.delta.is-unknown { color: var(--faint); font-weight: 600; cursor: help; }

.stats { display: flex; flex-wrap: wrap; gap: 1px; border-radius: 12px; overflow: clip; background: rgba(255, 255, 255, .07); }
.stats > div { flex: 1 1 132px; min-width: 0; padding: 10px 12px 11px; background: var(--panel); }
.stats dt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px; font: 700 10px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats dt .tag { padding: 1px 4px 0; font-size: 8px; }
.stats dd { margin-top: 5px; font: 700 16px/1.25 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats dd small { display: block; margin-top: 3px; font: 400 12px/1.35 var(--body); color: var(--muted); }
.stats dd .is-unknown { font: 600 14px var(--body); }

/* ----------------------------------------------------------------- Cluster -- */

.cluster { min-width: 0; background: var(--hair); }
.cluster > .no-signal { height: 100%; margin: 0; border-radius: 0; background-color: var(--panel); }
.inst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; height: 100%; }
@container term (min-width: 720px) and (max-width: 979px) { .inst-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.inst { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; background: rgba(16, 16, 22, .92); }
.inst dt { display: flex; align-items: center; justify-content: space-between; gap: 6px; font: 700 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.inst dt .tag { font-size: 8.5px; padding: 1px 5px 0; }
.inst dd { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inst-read { display: flex; align-items: center; gap: 10px; min-width: 0; }
.inst .fig-big { font-size: 22px; }
@container term (min-width: 980px) { .inst .fig-big { font-size: 26px; } }
.inst-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.inst .spark { margin-top: auto; }
@container term (max-width: 379px) { .inst { padding: 12px 10px; } .inst .fig-big { font-size: 18px; } .inst .ring { width: 40px; height: 40px; } }

.spark { display: block; width: 100%; height: 30px; overflow: visible; }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px currentColor); }
.ring { flex: none; width: 52px; height: 52px; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 6; }
.ring-arc { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 5px currentColor); }
.tone-lime { color: var(--lime); }
.tone-sky { color: var(--sky); }
.tone-fuchsia { color: var(--fuchsia); }
.tone-white { color: var(--text); }
.tone-muted { color: var(--muted); }

/* ------------------------------------------------------------ Billion grid -- */

.billion { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 2px; padding: 10px; border-radius: 14px; background: var(--deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
@container (min-width: 400px) { .billion { grid-template-columns: repeat(40, minmax(0, 1fr)); } }
@container (min-width: 560px) { .billion { grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 3px; padding: 14px; } }
.billion i, .grid-key i { aspect-ratio: 1; border-radius: 2px; }
.is-pool { background: var(--text); box-shadow: 0 0 6px rgba(238, 241, 255, .35); }
.is-vault { background: var(--lime); box-shadow: 0 0 6px rgba(170, 255, 55, .45); }
.is-lending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--lime); }
.is-treasury { background: var(--muted); }
.is-smart { background: var(--sky); box-shadow: 0 0 5px rgba(124, 200, 255, .3); }
.is-plain { background: var(--plain); }
.is-contract { background: #2c2f3d; }
.is-unread { background: transparent; box-shadow: inset 0 0 0 1px rgba(238, 241, 255, .25); }
.is-dead { background: transparent; box-shadow: inset 0 0 0 1.2px var(--fuchsia); }
.grid-key { display: flex; flex-wrap: wrap; gap: 1px; border-radius: 12px; overflow: clip; background: rgba(255, 255, 255, .07); }
.grid-key li { flex: 1 1 118px; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 11px 12px 12px; background: var(--panel); }
.key-code { display: flex; align-items: center; gap: 7px; font: 700 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.key-code i { width: 10px; height: 10px; flex: none; }
.grid-key b { font: 700 19px/1.15 var(--mono); font-variant-numeric: tabular-nums; }
.grid-key span:not(.key-code) { font-size: 12.5px; color: var(--text-2); }
.grid-key small { font: 600 11px/1.35 var(--mono); color: var(--muted); }

/* ------------------------------------------------------------------- Moves -- */

.moves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 1px; border-radius: 12px; overflow: clip; background: rgba(255, 255, 255, .07); }
.moves a { display: grid; align-content: start; gap: 8px; height: 100%; padding: 12px 14px 14px; background: var(--panel); color: var(--text); text-decoration: none; }
.moves a:hover { background: var(--panel-2); }
.move-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.move-top .delta { font-size: 22px; }
.move-say { font-size: 13.5px; line-height: 1.4; color: var(--text-2); }

/* ----------------------------------------------------------------- Tables -- */

.scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hair); }
.scroll.tall { max-height: 560px; overflow: auto; }
.grid-table { width: 100%; font: 500 12.5px/1.35 var(--mono); font-variant-numeric: tabular-nums; }
.grid-table th, .grid-table td { padding: 9px 10px; border-bottom: 1px solid var(--hair); text-align: right; vertical-align: top; white-space: nowrap; }
.grid-table thead th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); font: 700 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.grid-table tbody th { text-align: left; font-weight: 700; }
.grid-table .left, .grid-table thead th:first-child { text-align: left; }
.grid-table small { display: block; margin-top: 3px; font: 500 11px/1.3 var(--mono); color: var(--muted); }
.grid-table small .delta { font-size: 11px; }
.grid-table tbody tr:last-child > * { border-bottom: 0; }
.grid-table tbody tr:hover > * { background: rgba(255, 255, 255, .02); }
.pool-name { font-family: var(--body); font-weight: 700; font-size: 13px; }
.side { display: inline-block; padding: 2px 6px; border-radius: 4px; font: 700 10px/1.2 var(--mono); letter-spacing: .08em; }
.side.is-buy { color: var(--lime); box-shadow: inset 0 0 0 1px rgba(170, 255, 55, .6); }
.side.is-sell { color: var(--fuchsia); box-shadow: inset 0 0 0 1px rgba(255, 61, 165, .6); }
.trades .who-sub { white-space: nowrap; }
.ext { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(139, 144, 166, .4); }
.ext:hover { color: var(--lime); }
.ledger thead th:first-child, .ledger tbody th { position: sticky; left: 0; z-index: 2; background: var(--panel); }
.ledger thead th:first-child { z-index: 3; background: var(--panel-2); }
.tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; }
.btn { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font: 700 12.5px/1 var(--mono); letter-spacing: .04em; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.btn:hover { background: #c4ff73; color: var(--ink); }
.mark-img { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 0 18px rgba(170, 255, 55, .18); }
@media (pointer: coarse) { .btn { min-height: 44px; } }

/* Pulse board: one row per platform and part, now and its changes. */
.pulse tbody th { white-space: normal; min-width: 180px; }
.pulse td { font-size: 15px; font-weight: 700; }
.pulse-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font: 700 14px/1.3 var(--body); }
.role { padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .06); font: 700 9.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: help; }
.pulse tr.is-unidentified .pulse-what b { color: var(--muted); }
.ev { display: inline-block; font: 600 10.5px/1.3 var(--mono); color: var(--lime); }
.ev::before { content: '✓ '; }
.ev.is-reported { color: var(--muted); }
.ev.is-reported::before { content: '? '; }
.idle { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.idle .lbl { margin-right: 8px; }

/* Vaults and bridges: the name a tile is about with its evidence, and a heading over a tile's own list. */
.ev-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.ev-line b { font: 700 15px/1.3 var(--body); }
.sub-head { margin-top: 4px; font: 700 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.grid-table th .who + small { margin-top: 5px; }
details summary { min-height: 32px; display: flex; align-items: center; gap: 8px; cursor: pointer; font: 600 12px/1.3 var(--mono); color: var(--muted); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--lime); border-radius: 5px; color: var(--lime); font: 700 13px/1 var(--mono); }
details[open] summary::before { content: '−'; }
details summary:hover { color: var(--text); }
details.more { display: grid; gap: 10px; }

/* ------------------------------------------------------------ Bars, stacks -- */

.bars { display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) minmax(56px, auto); align-items: center; gap: 4px 12px; }
.bar-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-weight: 700; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.bar-label small { font: 500 11px/1.35 var(--mono); color: var(--muted); }
.bar-track { position: relative; height: 12px; border-radius: 4px; background: rgba(255, 255, 255, .05); overflow: clip; }
.bar-track i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.bar-track i.tone-muted, .bar-track i.tone-white { box-shadow: none; }
.bar-value { text-align: right; font: 700 14px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
@container (max-width: 420px) {
  .bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .bars .bar-track { grid-column: 1 / -1; grid-row: 2; }
}
.stack { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: clip; }
.stack i { min-width: 3px; background: currentColor; }
.stack-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.stack-key li { display: inline-flex; align-items: center; gap: 7px; }
.stack-key i { width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.stack-key b { font: 700 13px var(--mono); color: var(--text); }

/* Top holders: glyph and name, a bar against the largest, the balance and share. */
.top-rows { display: grid; }
.top-rows li { display: grid; grid-template-columns: 26px minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(90px, auto); align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.top-rows .rank { font: 700 12px var(--mono); color: var(--faint); text-align: right; }
.top-rows .bar-track { height: 8px; border-radius: 3px; }
.top-rows .bar-track i { box-shadow: none; }
.top-value { text-align: right; font: 700 13.5px/1.25 var(--mono); font-variant-numeric: tabular-nums; }
.top-value small { display: block; font-size: 11px; color: var(--muted); }
@container (max-width: 520px) {
  .top-rows li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .top-rows .bar-track { grid-column: 2 / -1; grid-row: 2; }
}
.k-pool { color: #eef1ff; } .k-vault { color: #aaff37; } .k-smart { color: #7cc8ff; } .k-plain { color: #c3c7d8; }
.k-burn { color: #ff3da5; } .k-contract { color: #8b90a6; } .k-token { color: #aaff37; }

/* -------------------------------------------------------- Glyphs and names -- */

.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; text-align: left; }
.glyph { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5px; width: 30px; height: 30px; padding: 4px; flex: none; border-radius: 7px;
  background: var(--deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.glyph i { border-radius: 1px; background: rgba(255, 255, 255, .05); }
.glyph i.on { background: currentColor; }
.who-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-lead { display: flex; align-items: center; gap: 7px; min-width: 0; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13.5px/1.3 var(--body); }
.who-addr { font: 700 13px/1.3 var(--mono); }
.who-sub { font: 500 11.5px/1.3 var(--mono); }
.who-sub .ext { color: inherit; }

/* ------------------------------------------------------------ Status, checks -- */

.checks { display: grid; gap: 1px; border-radius: 10px; overflow: clip; background: rgba(255, 255, 255, .07); }
.checks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 10px 12px; background: var(--panel); font-size: 13px; }
.checks li::before { content: ''; grid-row: span 3; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px rgba(170, 255, 55, .7); }
.checks li.is-bad::before { background: var(--fuchsia); box-shadow: 0 0 8px rgba(255, 61, 165, .7); }
.checks b { font-weight: 700; }
.checks span, .checks small { font: 500 12px/1.4 var(--mono); color: var(--muted); }
.checks .is-bad span { color: var(--fuchsia); }

/* --------------------------------------------------------------- No signal -- */

.no-signal { display: grid; place-content: center; justify-items: center; gap: 8px; min-height: 180px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 10px;
  background-color: var(--deep);
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 20px 20px; }
.no-signal span { font: 700 10.5px var(--mono); letter-spacing: .14em; color: var(--lime); }
.no-signal p { max-width: 42ch; text-align: center; font: 600 13px/1.5 var(--mono); color: var(--muted); }

/* ------------------------------------------------------------- Glow charts -- */

/* glowchart.js: day-by-day curves on a deep screen. Lines glow in their own colour; the crosshair's day reads
   out above the plot, which keeps its height while a finger scrubs. From henlabs-terminal.css. */
.glow { display: grid; gap: 8px; min-width: 0; }
.g-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 2.7em; align-content: start; font-size: 13px; line-height: 1.35; color: var(--muted); }
.g-read span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.g-read i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
@container (max-width: 559px) {
  .g-read { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); gap: 4px 14px; font-size: 12.5px; }
  .g-read span { flex-wrap: wrap; column-gap: 6px; min-width: 0; white-space: normal; }
  .g-read .g-read-day { grid-column: 1 / -1; }
}
.g-read strong { color: var(--text); font: 700 13px var(--mono); font-variant-numeric: tabular-nums; }
.g-read .g-read-day { color: var(--text); font: 700 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.g-svg { display: block; max-width: 100%; height: auto; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.g-svg:focus:not(:focus-visible) { outline: none; }
.g-svg:focus-visible { outline-offset: 4px; border-radius: 6px; }
.g-well { fill: rgba(124, 200, 255, .045); stroke: rgba(255, 255, 255, .08); }
.g-minor { stroke: rgba(255, 255, 255, .04); }
.g-grid { stroke: rgba(255, 255, 255, .1); }
.g-grid.is-zero { stroke: rgba(238, 241, 255, .55); filter: drop-shadow(0 0 3px rgba(238, 241, 255, .6)); }
.g-tick, .g-day { fill: var(--faint); font: 500 11px var(--mono); font-variant-numeric: tabular-nums; }
.g-day.is-today { fill: var(--text); font-weight: 700; }
.g-fill { stroke: none; }
.g-line { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px currentColor); }
.g-line.is-today { stroke-dasharray: 4 4; stroke-width: 2; }
.g-line.is-ahead { stroke-dasharray: 1.5 5; stroke-width: 2; opacity: .75; filter: none; }
.g-ahead { fill: rgba(238, 241, 255, .035); }
.g-ahead-label { fill: var(--faint); font: 700 10px var(--mono); letter-spacing: .12em; }
.g-point { opacity: .9; }
.g-open { fill: var(--panel); stroke-width: 2; }
.g-bar { stroke: none; }
.g-bar.is-today { opacity: .5; }
.g-cap { stroke: currentColor; stroke-width: 2; filter: drop-shadow(0 0 3px currentColor); }
.g-cap.is-today { stroke-dasharray: 3 2; }
.g-band { fill: rgba(124, 200, 255, .09); }
.g-ref { stroke: rgba(238, 241, 255, .6); stroke-width: 1.25; stroke-dasharray: 6 4; }
.g-trend { stroke: rgba(255, 255, 255, .78); stroke-width: 1.5; stroke-dasharray: 1.5 4; stroke-linecap: round; }
.g-ref-label { fill: #eef1ff; font: 700 10.5px var(--mono); paint-order: stroke; stroke: #101016; stroke-width: 4px; stroke-linejoin: round; }
.g-ref-label.is-band { fill: var(--calc); }
.g-flag line { stroke: rgba(255, 255, 255, .3); stroke-dasharray: 3 3; }
.g-flag rect { fill: #1b1b22; stroke: rgba(255, 255, 255, .45); }
.g-flag text { fill: var(--text); font: 700 10.5px var(--mono); }
.g-cross { stroke: rgba(255, 255, 255, .6); stroke-width: 1; }
.g-dot { stroke: var(--panel); stroke-width: 2; filter: drop-shadow(0 0 5px currentColor); }
.g-tag text { fill: #0e0e12; font: 700 11px var(--mono); font-variant-numeric: tabular-nums; }
.g-when { fill: #ffffff; }
.g-when-text { fill: #0e0e12; font: 700 11px var(--mono); }
.term-empty { padding: 14px 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ Lookup -- */

.lookup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0 var(--pad) 22px; }
.lookup-row { display: flex; gap: 8px; max-width: 760px; }
.lookup input { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--deep); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong); font: 500 14px/1 var(--mono); }
.lookup input::placeholder { color: var(--faint); }
.lookup button { flex: none; min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--lime); color: var(--ink);
  font: 700 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.lookup button:hover { box-shadow: 0 0 18px rgba(170, 255, 55, .45); }
#lookup-out { border-top: 1px solid var(--hair); }
.lookup-who { display: grid; gap: 8px; }
.lookup-who .who-name, .lookup-who .who-addr { font-size: 18px; }
.lookup-addr { font: 500 11.5px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.lookup-result { display: grid; gap: 6px; }
.lookup-latest { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 900px) { .lookup-latest { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lookup-latest > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.side-buy { color: var(--lime); }
.side-sell { color: var(--fuchsia); }

/* -------------------------------------------------------------- Real token -- */

.real { display: grid; gap: 10px; justify-items: start; padding: 0 var(--pad) 18px; }
.real-addr { display: flex; flex-wrap: wrap; gap: 2px 14px; font: 700 clamp(20px, 4.2vw, 34px)/1.25 var(--mono); letter-spacing: .02em; color: var(--lime);
  text-shadow: 0 0 22px rgba(170, 255, 55, .25); }
.real-addr span { white-space: nowrap; }
.real-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13px; }
.real-answer { display: grid; gap: 8px; max-width: 760px; margin: 0 var(--pad) 22px; padding: 14px 16px; border-radius: 14px; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-strong); }
.real-answer.is-real { box-shadow: inset 0 0 0 1px var(--lime); }
.real-answer.is-not { box-shadow: inset 0 0 0 1px var(--fuchsia); }
.real-say { font: 800 clamp(18px, 3vw, 22px)/1.2 var(--display); text-transform: uppercase; }
.is-real .real-say { color: var(--lime); }
.is-not .real-say { color: var(--fuchsia); }
.real-diff { display: grid; gap: 4px; font: 500 13px/1.5 var(--mono); overflow-wrap: anywhere; }
.real-diff mark { border-radius: 2px; background: rgba(255, 61, 165, .22); color: var(--fuchsia); }
.real-note { max-width: 70ch; font-size: 14px; color: var(--text-2); }
.real-flag { color: var(--pink); }
#real-tiles { border-top: 1px solid var(--hair); }

/* ----------------------------------------------------------------- Footer -- */

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 8px 4px 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.foot p:first-child { max-width: 720px; }
.foot .mono { font: 500 11px/1.6 var(--mono); overflow-wrap: anywhere; }

/* --------------------------------------------------------------------- 404 -- */

.lost { display: grid; gap: 16px; justify-items: start; padding: 40px var(--pad); }
.lost h1 { font: 800 clamp(24px, 4vw, 36px)/1.1 var(--display); text-transform: uppercase; }
.lost p { max-width: 52ch; color: var(--text-2); }
