/* A clean terminal: black, no panels, no boxes, no borders, numbers in a
   monospace face in right-aligned columns, labels short and dim. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--base)/1.5 var(--ui); font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono, .n { font-family: var(--mono); font-size: var(--num); }

/* States. Green / red only for market direction; one accent for a problem. */
.up { color: var(--buy); }
.down { color: var(--sell); }
.good { color: var(--buy); } /* health: green = good, red = bad (his order 23 Nov 19:05) */
.bad { color: var(--sell); }
.warn { color: var(--alert); }
.info, .muted { color: var(--dim); }

/* Top line: nav words, then the collector word, live mark, problem words. */
.top {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
}
.nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .word { color: var(--dim); font-size: 12px; letter-spacing: 0.12em; white-space: nowrap; cursor: pointer; }
/* hover colours only where a real mouse hovers (a phone keeps :hover on the last tapped word: an OFF word would
   stay white), and never on an on / off word: its colour is its state (his note of 24 Nov 11:37) */
@media (hover: hover) { .nav a:hover, .word:hover { color: var(--text); } }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.nav a.active { color: var(--strong); }
.right { margin-left: auto; display: flex; gap: 14px; align-items: baseline; }
button.word { background: none; border: 0; padding: 0; }
.word.on { color: var(--strong); }
.word.alert, .alert { color: var(--alert); }
.problems { flex-basis: 100%; color: var(--alert); font-size: 12px; letter-spacing: 0.06em; }
.top form { margin: 0; display: inline; }

.main { padding: 6px 16px 48px; min-width: 0; } /* the full window width (N8: no dead area on the right) */
section { min-width: 0; max-width: 100%; }
@media (min-width: 900px) { .main { padding: 10px 28px 56px; } .top { padding: 14px 28px 12px; } }
@media (max-width: 520px) {
  .top { gap: 8px 12px; flex-wrap: wrap; }
  .nav { gap: 12px; min-width: 0; flex: 1 1 auto; }
  .nav a, .word { font-size: 11px; letter-spacing: 0.06em; }
  .right { gap: 10px; flex: none; }
  .problems { position: absolute; left: 16px; right: 16px; top: 100%; background: var(--bg); padding-bottom: 6px; }
}

/* Old shell bits that no longer draw anything. */
.pills, .topbar h1 { display: none; }
.pill { background: none; border: 0; padding: 0; font-size: 12px; letter-spacing: 0.08em; }
.banner { color: var(--alert); padding: 0 0 12px; font-size: 12px; letter-spacing: 0.06em; }

/* Numbers with a label: no box, just a grid. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 28px; margin: 4px 0 26px; }
.card { min-width: 0; }
.card .k { font-size: var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.card .v { font: 500 var(--big)/1.25 var(--mono); color: var(--strong); overflow-wrap: anywhere; }
.card .v.small { font-size: var(--num); }
.card .v.good { color: var(--buy); }
.card .v.bad { color: var(--sell); }
.card .v.warn { color: var(--alert); }
.card .s { font: 11.5px/1.4 var(--mono); color: var(--dim); overflow-wrap: anywhere; }
.card.wide { grid-column: span 2; }
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .card .v { font-size: 16px; }
}

h2 { font-size: var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin: 26px 0 6px; }
.row { display: flex; gap: 16px 26px; align-items: baseline; flex-wrap: wrap; margin-bottom: 16px; }

/* Controls are words. */
.btn { background: none; border: 0; padding: 0; color: var(--dim); cursor: pointer; letter-spacing: 0.1em; font-size: 12px; text-transform: uppercase; }
@media (hover: hover) { .btn:not([aria-pressed]):hover { color: var(--text); } }
.btn.danger { color: var(--alert); }
.seg { display: inline-flex; gap: 14px; max-width: 100%; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; white-space: nowrap; background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--dim); font-size: 12px; letter-spacing: 0.1em; }
.seg button[aria-pressed="true"] { color: var(--strong); }
.input {
  background: transparent; border: 0; border-bottom: 1px solid var(--faint); border-radius: 0;
  padding: 2px 0; width: 140px; color: var(--text); font: var(--num) var(--mono);
}
.input:focus { outline: none; border-bottom-color: var(--dim); }
.input::placeholder { color: var(--dim); }
.input.push { margin-left: auto; }
.input.small { width: 110px; }
@media (max-width: 640px) { .input.small { width: 64px; } .row { column-gap: 14px; } }
.row { row-gap: 14px; }

/* Tables: columns, no lines. */
.tbl-wrap { overflow-x: auto; margin-bottom: 6px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl.tight { width: auto; min-width: 320px; }
.tbl.tight td, .tbl.tight th { padding-right: 32px; }
.tbl th { text-align: left; font-weight: 500; font-size: var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); padding: 4px 14px 6px 0; white-space: nowrap; }
.tbl td { padding: 3px 14px 3px 0; white-space: nowrap; font-family: var(--mono); font-size: var(--num); }
.tbl th.n, .tbl td.n, .vt .n { text-align: right; }
.tbl tr.sub td:first-child { padding-left: 14px; color: var(--dim); }
.tbl tr.click { cursor: pointer; }
@media (hover: hover) { .tbl tr.click:hover td { color: var(--strong); } }
.empty { color: var(--dim); padding: 10px 0; font-size: 12px; letter-spacing: 0.06em; }

/* Virtual table: only the rows in view exist. */
.vt { font: var(--num) var(--mono); overflow-x: hidden; }
@media (max-width: 640px) { .vt { --vt-gap: 8px; font-size: 12px; } }
.vt-head, .vt-row { display: grid; grid-template-columns: var(--vt-cols); align-items: center; column-gap: var(--vt-gap, 12px); }
.vt-head { height: 28px; font: var(--label) var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.vt-head > div { cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-head > div[aria-sort] { color: var(--text); }
.vt-head .n { text-align: right; }
.vt-body { position: relative; contain: strict; }
.vt-row { position: absolute; left: 0; right: 0; top: 0; height: 26px; will-change: transform; cursor: pointer; }
@media (hover: hover) { .vt-row:hover { color: var(--strong); } }
.vt-row > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* N9: wider than the screen. The rows slide sideways in .vt-bodyx (no bar of
   its own: it sits under hundreds of rows); the titles in .vt-headx stay on top
   of the window (under the header) and carry the thin visible sideways bar. */
.vt.scrollx { overflow: visible; }
.vt.scrollx .vt-headx { position: sticky; top: var(--top-h, 0px); z-index: 3; background: var(--bg);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--dim) transparent; }
.vt.scrollx .vt-headx::-webkit-scrollbar { height: 5px; }
.vt.scrollx .vt-headx::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 3px; }
.vt.scrollx .vt-headx::-webkit-scrollbar-track { background: transparent; }
.vt.scrollx .vt-bodyx { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.vt.scrollx .vt-bodyx::-webkit-scrollbar { display: none; }
.vt.scrollx .vt-head, .vt.scrollx .vt-body { min-width: var(--vt-min, 100%); }
.vt.scrollx .vt-head > div:first-child, .vt.scrollx .vt-row > div:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); }
.vt.dense .vt-row { height: 22px; }
.vt.dense .vt-head { height: 26px; }
.market { display: flex; flex-wrap: wrap; gap: 4px 22px; font: var(--num) var(--mono); margin: 0 0 12px; }
.market b { font-weight: 400; font-family: var(--ui); font-size: var(--label); letter-spacing: 0.12em; color: var(--dim); margin-right: 6px; }
.chooser .btn[aria-pressed="true"] { color: var(--strong); }

.vt-foot { padding: 6px 0; color: var(--dim); font-size: 11px; }

@media (max-width: 640px) { .opt { display: none !important; } }

.detail { margin: 6px 0 22px; }
.detail .row { justify-content: space-between; }
.facts { font: 12px/1.5 var(--mono); color: var(--dim); white-space: normal; overflow-wrap: anywhere; }
.facts.pre { white-space: pre-wrap; color: var(--text); }
.verdict { font: 600 22px/1.3 var(--ui); letter-spacing: 0.12em; color: var(--buy); margin: 4px 0 14px; }
.verdict.bad { color: var(--sell); }
/* the dot in the top bar on every page: green = all good, red = a problem (its word is in the line under the bar) */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); align-self: center; flex: none; }
.dot.ok { background: var(--buy); }
.dot.bad { background: var(--sell); }
.alerts { display: grid; gap: 2px; font: 12px var(--mono); }

/* The tape. */
.tape-bar { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; margin: 2px 0 10px; }
.tape-stats { display: flex; flex-wrap: wrap; gap: 4px 22px; font: var(--num) var(--mono); margin-bottom: 8px; }
.tape-stats span b { font-weight: 400; color: var(--dim); font-family: var(--ui); font-size: var(--label); letter-spacing: 0.12em; margin-right: 6px; }
canvas.tape { display: block; width: 100%; }

/* Login. */
.login-body { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 300px; display: grid; gap: 18px; }
.login-card .brand { color: var(--dim); font-size: 12px; letter-spacing: 0.3em; text-align: center; }
.login-card .brand img { display: none; }
.login-card label { display: grid; gap: 4px; font-size: var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.login-card .input { width: 100%; font-size: 16px; text-transform: none; letter-spacing: normal; }
.login-card .btn { justify-self: start; color: var(--strong); font-size: 13px; }
.login-err { color: var(--alert); font-size: 12px; min-height: 18px; }

/* Button families (dom.js fam / bar), his order of 23 Nov 19:12: one row
   spread over the whole width, a short thin vertical line (as tall as the
   text) between two families, choices close together inside one. A phone
   keeps the one row and slides it sideways. The same separator splits the
   live number rows (tape counters, the COINS market line, BULLSEYE's top). */
.bar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 0; margin: 2px 0 12px;
  overflow-x: auto; scrollbar-width: none; }
.bar::-webkit-scrollbar { display: none; }
.fam { display: inline-flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.fam .seg { gap: 10px; overflow: visible; }
.sep { flex: none; display: inline-block; width: 1px; height: 1em; background: var(--dim); opacity: 0.5; margin: 0 16px; }
.tape-stats > span + span::before, .market > span + span::before {
  content: ""; display: inline-block; width: 1px; height: 1em; background: var(--dim); opacity: 0.5;
  margin: 0 18px 0 0; vertical-align: -0.12em; }
.tape-stats, .market { column-gap: 18px; }
@media (max-width: 640px) {
  .bar { justify-content: flex-start; gap: 0; }
  .sep { margin: 0 12px; }
  .fam .seg button, .fam .btn { min-height: 40px; }
  .tape-stats, .market { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
}
.fam .tape-stats { margin: 0; flex-wrap: nowrap; }
.tape-stats > span[hidden] { display: none; }

/* His order of 23 Nov 21:10. H1: one thin line under the header. */
.top { border-bottom: 1px solid var(--line); }
.main { padding-top: 12px; }
/* H2: the market line in the header, right side, split from the page names by
   a short vertical line; 24H and the chosen span side by side. */
.mkt { margin-left: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; font: 12px var(--mono); min-width: 0; }
.mkt::before, .mset + .mset::before, .right::before {
  content: ""; display: inline-block; width: 1px; height: 1em; background: var(--dim); opacity: 0.5; margin: 0 14px; vertical-align: -0.12em; }
.mkt + .right { margin-left: 0; }
.right { align-items: center; }
.right::before { margin: 0 4px 0 0; }
.mset { display: inline-flex; align-items: baseline; gap: 10px; white-space: nowrap; }
/* his note of 24 Nov 14:05: the words and their numbers the same size (12 px, like the clock and the page names) */
.mset b { font: 12px var(--ui); letter-spacing: 0.08em; color: var(--dim); margin-right: 5px; font-weight: 400; }
.mset b.tag { color: var(--text); margin-right: 0; }
@media (max-width: 640px) { .mkt { display: none; } }
@media (max-width: 900px) {
  .mkt { order: 3; flex-basis: 100%; margin-left: 0; row-gap: 4px; }
  .mkt::before { display: none; }
  .mset + .mset::before { display: none; }
  .mset { flex-basis: 100%; gap: 8px; font-size: 11px; }
  .mset b { font-size: 11px; } /* the words as small as their numbers here too */
  .right::before { display: none; }
  .right { margin-left: auto; }
}

/* Lines that split controls from data (C2, T1, D1, K5). */
.rule { height: 1px; background: var(--line); margin: 0 0 10px; }
.rule.spaced { margin-top: 14px; }

/* Typed spans (spans.js): a typed button with a small x on hover (always on
   a touch screen); the field shakes red on a wrong entry. */
.fam.spans { gap: 10px; }
.chip { display: inline-flex; align-items: baseline; flex: none; }
.seg .chip button.x { visibility: hidden; color: var(--dim); font-size: 11px; padding: 0 0 0 3px; letter-spacing: 0; }
@media (hover: hover) { .seg .chip:hover button.x { visibility: visible; } .seg .chip button.x:hover { color: var(--sell); } }
.seg .chip:focus-within button.x { visibility: visible; }
@media (hover: none) { .seg .chip button.x { visibility: visible; } }
/* N1: the word CUSTOM, thin underline, no box; a click types right there */
.input.span-in { width: 62px; padding: 2px 0 1px; text-transform: uppercase; font: 12px var(--ui); letter-spacing: 0.1em;
  color: var(--strong); border-bottom: 1px solid var(--dim); cursor: pointer; }
.input.span-in:focus { cursor: text; border-bottom-color: var(--text); }
.input.span-in::placeholder { color: var(--dim); opacity: 1; letter-spacing: 0.1em; }
.input.bad-in { border-bottom-color: var(--sell); color: var(--sell); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* COLUMNS drop-down (C1): its families split by the same short lines. */
/* THE PICKERS (COINS COLUMNS and the chart's "+" list), his note of 24 Nov 11:41: the phone's layout on every
   screen: the families one under the other, split by a thin line, the words in even columns, the panel centred
   and scrolling inside itself when it is taller than the screen. One look for both. */
.chooser { display: flex; flex-direction: column; gap: 8px; width: min(100%, 820px); margin: 0 auto 14px;
  max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.chooser .cfam { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 18px; align-items: center; }
.chooser .cfam .btn { text-align: left; }
.chooser .sep { flex: none; width: 100%; height: 1px; margin: 2px 0; opacity: 0.35; }
/* His notes of 24 Nov 14:05 and 14:31, a wide screen: the picker starts at the left edge of the page (no empty
   sides) and stands clear of the row of words above it; COMPACT: the words of one family stand next to each
   other in one row (they wrap only when the row is full), family under family, no lines between them; it never
   scrolls inside itself. */
@media (min-width: 641px) {
  .chooser, .chooser.panes-pick { width: 100%; margin: 14px 0 18px; gap: 8px; max-height: none; overflow: visible; }
  .chooser .cfam { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; }
  .chooser .sep { display: none; }
}


/* Column titles above a canvas list (T1 TAPE, K5 the chart's trades). */
.tape-head { position: relative; height: 18px; font: var(--label) var(--ui); letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; margin-top: 2px; }
.tape-head span { position: absolute; top: 0; white-space: nowrap; }
.tape-head + .rule { margin-bottom: 4px; }

/* HEALTH: the DATA part (D1, D2). */
.dataok { color: var(--buy); font-size: 12px; letter-spacing: 0.1em; padding: 4px 0; }
.dataprob { display: grid; gap: 2px; font: 12px var(--mono); color: var(--sell); padding: 4px 0; }
.datarow { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 0 0 6px; }

/* CHART top (K1) and its right-side controls (K2, K6). */
.coinhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin: 0 0 8px; }
/* N3: the coin name in its old face (the page before 23 Nov 21:52: a .mono span) */
.coinhead .title { font-family: var(--mono); font-size: var(--num); }
.coinhead .day { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 12px var(--mono); color: var(--text); }
.coinhead .day b { font: 10.5px var(--ui); letter-spacing: 0.1em; color: var(--dim); margin-right: 5px; font-weight: 400; }
.bar.right-bar { justify-content: flex-end; }
@media (max-width: 640px) { .bar.right-bar { justify-content: flex-start; } }
.panes { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: flex-end; margin: -4px 0 10px; }
.panes button[aria-pressed="true"] { color: var(--strong); }
@media (max-width: 640px) {
  /* a phone stacks the column families: the short vertical line becomes a thin horizontal one */
  .chooser .cfam { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 14px; }
  .chooser .cfam .btn { min-height: 36px; }
}
.coinhead .day b.tag { color: var(--text); }
.coinhead .day b.tag.warn, .mset b.tag.warn { color: var(--alert); }
/* N4: the candle read-out at the end of the top row, after a short line */
.coinhead .candle { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 12px var(--mono); color: var(--text); }
.coinhead .candle b { font: 12px var(--ui); letter-spacing: 0.08em; color: var(--dim); margin-right: 5px; font-weight: 400; }
.coinhead .sep { margin: 0; align-self: center; }
.coinhead .candle .ghost { visibility: hidden; }
@media (max-width: 640px) { .coinhead .sep { display: none; } .coinhead { gap: 4px 14px; } }
/* THE PHONE HEAD of the coin page (coin.js): two lines, the price and the 24 h change large, the newest candle's
   O H L and PERP-IDX / SPOT-IDX small; the wide row above it is for wider screens */
.phead { display: none; }
@media (max-width: 640px) {
  .coinhead { display: none; }
  .phead { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px;
    align-items: baseline; margin: 0 0 8px; font-family: var(--mono); }
  .phead .ptop { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; min-width: 0; overflow: hidden; }
  .phead .pname { font-size: 15px; color: var(--strong); }
  .phead .ppx { font-size: 17px; color: var(--strong); }
  .phead .pchg { font-size: 15px; }
  .phead .pohl { grid-column: 1; grid-row: 2; display: flex; gap: 12px; font-size: 11.5px; color: var(--text); white-space: nowrap; min-width: 0; overflow: hidden; }
  .phead .pidx { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 3px; justify-items: end; font-size: 11.5px; color: var(--text); white-space: nowrap; }
  .phead b { font: 10px var(--ui); letter-spacing: 0.08em; color: var(--dim); margin-right: 4px; font-weight: 400; }
}
/* HEALTH's data block on top: how much is stored and since when (the feeds in two columns on a wide screen). */
.hstore { display: grid; gap: 10px; }
.hstore .hline b { width: 120px; }
.hfeeds { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); column-gap: 36px; }
@media (max-width: 640px) { .hstore .hline b { width: 108px; } .hfeeds { grid-template-columns: 1fr; } }
/* N6: HEALTH = two halves, system | data, one vertical line between them
   (a phone stacks them and the line lies down). */
.hsplit { display: grid; grid-template-columns: 1fr 1px 1fr; column-gap: 36px; align-items: start; }
.hsplit::before { content: ""; grid-column: 2; grid-row: 1; align-self: stretch; background: var(--line); }
.hsplit > .hhalf:first-child { grid-column: 1; grid-row: 1; }
.hsplit > .hhalf:last-child { grid-column: 3; grid-row: 1; }
.hhalf { min-width: 0; }
.hlines { display: grid; gap: 3px; font: 12px var(--mono); }
.hline { display: flex; gap: 14px; align-items: baseline; min-width: 0; }
.hline b { flex: none; width: 108px; font: 10.5px var(--ui); letter-spacing: 0.1em; color: var(--dim); font-weight: 400; }
.hline span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .hsplit { grid-template-columns: 1fr; row-gap: 18px; }
  .hsplit::before { grid-column: 1; grid-row: 2; height: 1px; }
  .hsplit > .hhalf:first-child { grid-column: 1; grid-row: 1; }
  .hsplit > .hhalf:last-child { grid-column: 1; grid-row: 3; }
  .hline b { width: 96px; }
}
/* The chart's "+" pane list: a drop-down like COLUMNS, families split by the short lines, on the right. */
@media (max-width: 640px) { .chooser.panes-pick { margin: -4px auto 10px; } } /* a wide screen: the block of 24 Nov 14:05 above */
/* A finger on the chart scrolls the page and never moves the chart (his order of 24 Nov 11:04); a mouse drags it. */
canvas.tape.chart { touch-action: pan-x pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* A phone: the chart's control row (time | layers | panes) wraps instead of hiding buttons off the edge. */
@media (max-width: 640px) {
  .bar.right-bar { flex-wrap: wrap; gap: 0 22px; overflow: visible; }
  .bar.right-bar > .sep { display: none; } /* wrapped rows: the families stand apart by their gap, no line left hanging at a row's end */
  .bar.right-bar .fam { flex: 0 1 auto; min-width: 0; }
  .bar.right-bar .fam .seg { flex-wrap: wrap; row-gap: 0; }
  /* the typed candle size: as easy to hit with a thumb as the buttons, its thin line kept under the word */
  #page-coin .bar.right-bar .input.span-in { min-height: 40px; border-bottom: 0; background: linear-gradient(var(--dim), var(--dim)) left calc(100% - 11px) / 100% 1px no-repeat; }
  #page-coin .bar.right-bar .input.span-in:focus { background-image: linear-gradient(var(--text), var(--text)); }
  /* LIVE / CUSTOM on their row; the clock words, "+" (and the reset arrow) together on the next one, "+" at the right */
  #page-coin .bar.right-bar > .fam.spans { flex-basis: 100%; }
  #page-coin .bar.right-bar { column-gap: 14px; }
  #page-coin .bar.right-bar > .fam[aria-label="CLOCK"] { flex: 1 1 0; min-width: 0; }
  #page-coin .bar.right-bar > .fam[aria-label="CLOCK"] .seg { flex-wrap: nowrap; overflow-x: auto; }
  #page-coin .bar.right-bar > .fam[aria-label="OPTIONS"] { margin-left: auto; }
}
/* the tape's control row under the chart on a phone (main's note of 24 Nov 13:33: it ran off the right edge):
   its families wrap onto a second line instead of hiding off the screen; the TAPE page keeps its own row */
@media (max-width: 640px) {
  #page-coin .bar:not(.right-bar) { flex-wrap: wrap; overflow: visible; row-gap: 6px; column-gap: 16px; }
  #page-coin .bar:not(.right-bar) > .sep { display: none; }
  #page-coin .bar:not(.right-bar) .fam { flex: 0 1 auto; min-width: 0; white-space: normal; flex-wrap: wrap; }
  #page-coin .bar:not(.right-bar) .tape-stats { flex-wrap: wrap; overflow: visible; white-space: nowrap; row-gap: 4px; column-gap: 14px; }
  #page-coin .bar:not(.right-bar) .tape-stats > span + span::before { display: none; }
}
/* "+" and the reset arrow: the same box, the same level */
#page-coin .fam[aria-label="OPTIONS"] .btn, #page-coin .fam[aria-label="RESET"] .btn { display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; line-height: 1; font-size: 15px; letter-spacing: 0; }
@media (max-width: 640px) { #page-coin .fam[aria-label="OPTIONS"] .btn, #page-coin .fam[aria-label="RESET"] .btn { height: 40px; min-width: 32px; } }
/* the page clock (Barcelona time) in the header, before the status dot */
.top .clock { font: 12px var(--mono); color: var(--dim); letter-spacing: 0.04em; margin-right: 12px; white-space: nowrap; }
/* BULLSEYE, the split of 26 Nov: a thin line at 70 % from the left over the page height; left = THE STRATEGY (blank
   paper for now), right = VERIFIED over CANDIDATE as quiet rows. One floating pop-up (times, info, edit, add,
   rejected) on the page background with a faint line round it. Phone: lists first, the paper under. */
.bz-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); min-height: calc(100vh - 92px); }
.bz-paper { padding: 0 28px 24px 0; min-width: 0; }
.bz-paper h2 { margin-top: 2px; }
.bz-side { border-left: 1px solid var(--line); padding: 0 0 24px 22px; min-width: 0; }
.bz-head { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; min-height: 22px; }
.bz-head:first-child { margin-top: 2px; }
.bz-head h2 { margin: 0; }
.bz-head .bz-lag { font-size: var(--label); letter-spacing: 0.1em; margin-left: auto; text-align: right; }
.bz-icon { background: none; border: 0; padding: 0; margin: 0; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; min-width: 22px; height: 22px; font: 13px/1 var(--ui); letter-spacing: 0; }
.bz-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bz-icon[aria-expanded="true"] { color: var(--strong); }
@media (hover: hover) { .bz-icon:hover { color: var(--strong); } }
.bz-icon.bz-i { border: 1px solid currentColor; border-radius: 50%; min-width: 16px; width: 16px; height: 16px; font: italic 600 10px/1 Georgia, serif; }
.bz-icon.bz-ok { color: var(--buy); }
.bz-icon.bz-no { color: var(--sell); }
.bz-rows { display: flex; flex-direction: column; }
.bz-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px 22px 22px 22px; align-items: center; column-gap: 6px; min-height: 28px; }
.bz-row .bz-coin { font: var(--num) var(--mono); color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .bz-row .bz-coin:hover { color: var(--strong); } }
.bz-row .bz-st { font-size: var(--label); letter-spacing: 0.12em; color: var(--dim); text-align: right; white-space: nowrap; padding-right: 4px; }
.bz-row .bz-st.n { font: var(--num) var(--mono); color: var(--text); letter-spacing: 0; }
.bz-row .bz-st.up { color: var(--buy); }
.bz-empty { color: var(--dim); font-size: 12px; letter-spacing: 0.1em; padding: 4px 0; }
.bz-rej { margin-top: 10px; }
.bz-pop { position: absolute; z-index: 20; background: var(--bg); border: 1px solid var(--line); padding: 12px 14px; width: max-content;
  max-width: min(420px, calc(100vw - 32px)); font-size: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6); }
.bz-pop h3 { margin: 0 0 8px; font: 500 var(--label) var(--ui); letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; }
.bz-pop h3 + h3 { margin-top: -4px; }
.bz-pop .bz-sub { margin-top: 10px; }
.bz-pop .bz-l { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; padding: 1px 0; }
.bz-pop .bz-l b { font: 500 var(--label) var(--ui); letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; padding-top: 2px; }
.bz-pop .bz-l span { font: 12px var(--mono); color: var(--text); overflow-wrap: anywhere; }
.bz-pop .bz-l.r span { font-family: var(--ui); }
.bz-pop .bz-l.r b { color: var(--text); }
.bz-pop .bz-mark { font: 12px var(--mono); color: var(--text); padding: 1px 0; }
.bz-pop .bz-f { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 3px 0; }
.bz-pop .bz-f .input { width: 100%; font-size: 12px; }
.bz-pop .bz-f label { font: 500 var(--label) var(--ui); letter-spacing: 0.12em; color: var(--dim); }
.bz-pop .bz-act { display: flex; gap: 18px; align-items: baseline; margin-top: 10px; }
.bz-pop .bz-err { color: var(--alert); font-size: 11px; letter-spacing: 0.06em; }
.bz-pop .bz-rrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 14px; align-items: baseline; padding: 2px 0; font: 12px var(--mono); }
@media (max-width: 900px) {
  .bz-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bz-side { order: -1; border-left: 0; padding: 0 0 18px; }
  .bz-paper { border-top: 1px solid var(--line); padding: 14px 0 0; min-height: 50vh; }
  .bz-row { min-height: 36px; grid-template-columns: minmax(0, 1fr) auto 32px 32px 32px 32px; }
  .bz-icon { min-width: 32px; height: 32px; }
  .bz-icon.bz-i { min-width: 18px; width: 18px; height: 18px; }
  .bz-pop .bz-l, .bz-pop .bz-f { grid-template-columns: 96px minmax(0, 1fr); }
}
