/* trilavi.com, 8 Nov 2026 (docs/superpowers/specs/2026-11-08-trilavi-redesign-design.md). The owner's pick, "mix 1 and 2":
   an instrument at the top (a warm-grey device body, one charcoal display, dot-matrix figures, hardware keys, LEDs) above
   calm notebook pages (cream paper, a sharp serif for headings, annotated charts, the rest behind Read more). Colours
   are the brand master's dictionary only (11-brand-master-visual-identity.md): warm neutrals, deep charcoal where
   darkness is needed (never black), no cool blue or purple, Trilavi yellow in every surface as the signal; sage and
   coral are the brand's accents for met and not yet. Loaded after lab.css, so these roles win. */

/* Newsreader (Production Type, SIL OFL 1.1; fonts/Newsreader-LICENSE-OFL.txt), self-hosted: the variable font cut to
   the weights the page uses (400 to 700), Latin and Latin Extended, so no font service is contacted */
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- the page: notebook paper ---------- */
:root {
  --bg: #FAF7F2; --bg2: #F3EFE8; --band: #F3EFE8; --sec: #FAF7F2; --panel: #FFFDF8; --panel-2: #F6F2EB; --line: #E8E5E0; --line-2: #D6D1C9;
  --ink: #2A2826; --ink-2: #4A4541; --dim: #6E6862; --meta: #8C8680; --hl: #FFF4B0; --edge-strong: #2A2826;
  --display: "Newsreader", "Iowan Old Style", "Charter", "Georgia", serif;
  --body: "Inter", "Nirmala UI", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono-font: var(--body);
  --dv-body: #E4E0D9; --dv-edge: #CFC9C0; --dv-key: #EFECE6; --dv-ink: #2A2826; --dv-dim: #6E6862; --dv-disp: #2A2826;
  --dv-dink: #F3EFE8; --dv-ddim: #A8A095; --dv-grid: #3A3632; --good-ink: #3F6A35; --miss-ink: #A2482A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #2A2826; --bg2: #302D2A; --band: #302D2A; --sec: #2A2826; --panel: #34312D; --panel-2: #302D2A; --line: #45403B; --line-2: #57514A;
    --ink: #F3EFE8; --ink-2: #CFC8BD; --dim: #A8A095; --meta: #8C8680; --hl: rgba(255, 224, 1, .14); --context: #57514A; --now-casing: #2A2826;
    --ord-1: #4E3F33; --ord-2: #7A4A35; --ord-3: #B85C3C; --ord-4: #F4845F; --ord-5: #FAC8AA;
    --dv-body: #3A3632; --dv-edge: #4A4540; --dv-key: #45403B; --dv-ink: #F3EFE8; --dv-dim: #A8A095; --dv-disp: #211F1D; --dv-grid: #34302C;
    --good-ink: #A3C795; --miss-ink: #F4A285;
  }
  :root:not([data-theme=light]) img.wordmark { background: #FAF7F2; }
  :root:not([data-theme=light]) section.room { --sec: #24221F; }
}
:root[data-theme=dark] {
  --bg: #2A2826; --bg2: #302D2A; --band: #302D2A; --sec: #2A2826; --panel: #34312D; --panel-2: #302D2A; --line: #45403B; --line-2: #57514A;
  --ink: #F3EFE8; --ink-2: #CFC8BD; --dim: #A8A095; --meta: #8C8680; --hl: rgba(255, 224, 1, .14); --context: #57514A; --now-casing: #2A2826;
  --ord-1: #4E3F33; --ord-2: #7A4A35; --ord-3: #B85C3C; --ord-4: #F4845F; --ord-5: #FAC8AA;
  --dv-body: #3A3632; --dv-edge: #4A4540; --dv-key: #45403B; --dv-ink: #F3EFE8; --dv-dim: #A8A095; --dv-disp: #211F1D; --dv-grid: #34302C;
  --good-ink: #A3C795; --miss-ink: #F4A285;
}
:root[data-theme=dark] img.wordmark { background: #FAF7F2; }
body { font-variant-numeric: tabular-nums; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.012em; }
#modelChip { display: none; }
section.room { --sec: #24221F; --bg: #24221F; --bg2: #302D2A; --panel: #34312D; --panel-2: #302D2A; --line: #45403B; --line-2: #57514A; --ink: #F3EFE8; --ink-2: #CFC8BD; --dim: #A8A095; --meta: #8C8680; }

/* ---------- the notebook's title page ---------- */
.nbtitle { max-width: 920px; margin: 30px 0 22px; }
.nbkick { color: var(--meta); font-size: 14px; margin: 0; }
.nbkick a { color: var(--ink-2); }
.nbtitle h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.03; margin: 8px 0 12px; color: var(--ink); max-width: 18ch; }
.nblead { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; max-width: 62ch; margin: 0; }

/* ---------- the instrument ---------- */
.dev { background: var(--dv-body); color: var(--dv-ink); border: 1px solid var(--dv-edge); border-radius: 24px; padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, .55), 0 22px 44px -30px rgba(42, 40, 38, .45); margin: 0 0 36px; }
.devbar { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; font-size: 13px; }
.devname { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.devmodel { color: var(--dv-dim); }
.devbar .led { margin-left: auto; }
.devstat { color: var(--dv-dim); font-variant-numeric: tabular-nums; }
.led { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #B9B2A8; box-shadow: inset 0 0 0 1px rgba(42, 40, 38, .25); }
.led.live { background: #FFE001; box-shadow: 0 0 0 3px rgba(255, 224, 1, .28); animation: ledpulse 2.2s infinite; }
.led.met { background: #8DB580; box-shadow: 0 0 0 3px rgba(141, 181, 128, .22); }
.led.miss { background: #F4845F; box-shadow: 0 0 0 3px rgba(244, 132, 95, .22); }
@keyframes ledpulse { 50% { box-shadow: 0 0 0 6px rgba(255, 224, 1, .05); } }

.display { background: var(--dv-disp); border-radius: 14px; padding: 16px 18px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 26px; box-shadow: inset 0 2px 12px rgba(20, 18, 16, .55); }
.dispmain { min-width: 0; }
.sonocv { width: 100%; height: clamp(120px, 15vw, 176px); display: block; }
.dispread { align-self: center; text-align: right; min-width: 150px; }
.displab { color: var(--dv-ddim); font-size: 12px; margin: 10px 0 0; }
.displine { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; border-top: 1px solid var(--dv-grid);
  padding-top: 10px; color: var(--dv-ddim); font-size: 12.5px; }
.dlk { color: #2A2826; background: #FFE001; border-radius: 4px; padding: 1px 7px; font-weight: 600; }
.displine.idle .dlk { background: var(--dv-grid); color: var(--dv-dink); }
.dlstep { color: var(--dv-dink); }
.dlbar { display: inline-flex; gap: 2px; }
.dlbar i { width: 5px; height: 10px; border-radius: 1.5px; background: var(--dv-grid); }
.dlbar i.on { background: #FFE001; }
.dlspark { width: 110px; }
.dlspark .lline { stroke: #FFE001; }
.dlspark .ldot { fill: #FFE001; stroke: var(--dv-disp); }

/* dot-matrix figures (lab/top.js dm): lit dots in the text colour, unlit dots faintly there */
.dm { display: inline-flex; align-items: flex-end; gap: .2em; line-height: 1; }
.dmg { height: 1em; width: auto; display: block; overflow: visible; }
.dmg circle.on { fill: currentColor; }
.dmg circle.off { fill: currentColor; opacity: 0; }
.display .dmg circle.off { opacity: .12; }
.dmt { font-size: .42em; font-weight: 600; margin: 0 .12em; align-self: center; }
.dm.big { font-size: 58px; color: #FFE001; }
.dmg.lit circle.on { animation: dotin .45s backwards; }
@keyframes dotin { from { opacity: .08; } }

.devctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 0; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; }
.key { background: var(--dv-key); color: var(--dv-ink); border: 1px solid var(--dv-edge); border-radius: 10px; box-shadow: 0 2px 0 var(--dv-edge);
  font: 600 13px var(--body); padding: 8px 11px; cursor: pointer; transition: transform 80ms, box-shadow 80ms; }
.key small { font-weight: 500; margin-left: 4px; opacity: .7; }
.key:hover { border-color: var(--dv-dim); }
.key:active, .key[aria-pressed=true] { transform: translateY(2px); box-shadow: 0 0 0 var(--dv-edge); }
.key[aria-pressed=true] { background: #2A2826; color: #FFE001; border-color: #2A2826; }
.key:focus-visible, .tmore summary:focus-visible { outline: 2px solid var(--dv-ink); outline-offset: 2px; }
.keyplay { background: #2A2826; color: #FFE001; border-color: #2A2826; box-shadow: 0 2px 0 #1F1D1B; display: inline-flex; gap: 9px; align-items: center; padding: 10px 18px; font-size: 14px; }
.keyplay .kicon { width: 0; height: 0; border-left: 10px solid #FFE001; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.keyplay[aria-pressed=true] .kicon { width: 10px; height: 12px; border: 0; background: linear-gradient(90deg, #FFE001 0 34%, transparent 34% 66%, #FFE001 66%); }
.devtext { margin: 12px 4px 2px; font-size: 16px; line-height: 1.45; min-height: 1.45em; }

.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; align-items: stretch; }
.module { background: var(--dv-key); border: 1px solid var(--dv-edge); border-radius: 14px; box-shadow: 0 2px 0 var(--dv-edge);
  padding: 14px 15px 10px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.mhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mhead h3 { font: 500 13px var(--body); color: var(--dv-dim); margin: 0; letter-spacing: 0; }
.mfig { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.mfig .dm { font-size: 40px; }
.mfig.two .dm { font-size: 24px; }
.munit { color: var(--dv-dim); font-size: 12.5px; padding-bottom: 2px; }
.mnote { color: var(--dv-dim); font-size: 12.5px; line-height: 1.4; margin: 4px 0 0; }
.tmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--dv-dim); min-height: 22px; }
.tch.good { color: var(--good-ink); }
.tch.worse { color: var(--miss-ink); }
.tver { padding: 1px 8px; border-radius: 999px; font-weight: 500; }
.tver.ok { background: rgba(141, 181, 128, .22); color: var(--good-ink); }
.tver.no { background: rgba(244, 132, 95, .18); color: var(--miss-ink); }
.tver.open { background: rgba(42, 40, 38, .07); color: var(--dv-dim); }
.module > .lsvg, .module > .meter, .module > .chiprow { margin-top: auto; }

.lsvg { width: 100%; height: auto; display: block; overflow: visible; }
.lline { fill: none; stroke: var(--dv-ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ldot { fill: #FFE001; stroke: var(--dv-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.lgoal { stroke: var(--dv-dim); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.lband { fill: var(--dv-edge); opacity: .7; }
.ltxt { fill: var(--dv-dim); font: 10px var(--body); }
.ltxt.lval { fill: var(--dv-ink); font-weight: 600; font-size: 12px; }
.lhit { fill: transparent; }
.lhit:hover { fill: rgba(255, 224, 1, .4); }
.meter { position: relative; height: 10px; background: var(--dv-edge); border-radius: 5px; margin: 10px 0 4px; }
.meter b { display: block; height: 100%; background: #FFE001; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(42, 40, 38, .3); }
.meter i { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--dv-ink); border-radius: 1px; }
.chiprow { display: flex; gap: 7px; padding: 4px 0 2px; }
.chiprow .cd { width: 26px; height: 26px; border-radius: 6px; background: #2A2826; position: relative; }
.chiprow .cd::after { content: ""; position: absolute; inset: 8px; border-radius: 2px; background: #FFE001; }
.chiprow .cd.no::after { background: #F4845F; }
.chiprow .cd.open { background: transparent; border: 1.5px dashed var(--dv-dim); }
.chiprow .cd.open::after { display: none; }

/* Read more on a module: the module widens to the row and opens a notebook sheet */
.tmore { border-top: 1px solid var(--dv-edge); padding-top: 8px; margin-top: 4px; }
.tmore summary { cursor: pointer; color: var(--dv-ink); font-size: 13px; font-weight: 500; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.tmore summary::-webkit-details-marker { display: none; }
.tmore summary::after { content: "+"; font-size: 15px; }
.tmore[open] summary::after { content: "\2212"; }
.module:has(> details[open]) { grid-column: 1 / -1; }
.module:has(> details[open]) > .lsvg { display: none; }
.tmorein { --dv-ink: var(--ink); --dv-dim: var(--dim); --dv-edge: var(--line-2); margin-top: 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 22px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px 34px; align-items: start; }
.tmorein > .lsvg { margin: 16px 0 22px; }
.tmorein h4 { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 0 0 8px; }
.tmorein p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.55; font-size: 14.5px; }
.tdays, .tsrc { font-size: 12px; color: var(--meta) !important; }
.trows { list-style: none; padding: 0; margin: 0 0 6px; }
.trows li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.trows b { font-weight: 500; text-align: right; }
.devfoot { color: var(--dv-dim); font-size: 12px; margin: 14px 4px 2px; }

@media (max-width: 960px) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .dev { border-radius: 18px; padding: 10px; }
  .display { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .dispread { text-align: left; }
  .dm.big { font-size: 44px; }
  .modules { grid-template-columns: minmax(0, 1fr); }
  .mfig .dm { font-size: 34px; }
  .tmorein { display: block; padding: 14px; }
  #bar { padding: 8px 12px; gap: 8px; }
  #bar .brand .wordmark { height: 22px; }
  #bar .brand .by { display: none; }
  #bar .seg button { padding: 2px 7px; }
}
@media (prefers-reduced-motion: reduce) { .led.live { animation: none; } .key { transition: none; } .dmg.lit circle.on { animation: none; } }

/* ---------- notebook sections (lab/compact.js): heading, lead, then a fold behind Read more ---------- */
.secfold { position: relative; }
section.foldable:not(.open) > .secfold { max-height: 620px; overflow: hidden; }
section.foldable:not(.open) > .secfold::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--sec, var(--bg)) 92%); }
.secmore { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 8px; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2); font: 500 14px var(--body); }
.secmore::after { content: "+"; color: var(--dim); font-size: 16px; line-height: 1; }
section.open > .secmore::after { content: "\2212"; }
.secmore:hover { border-color: var(--ink-2); }
.secmore:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.secribbon { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2);
  background: var(--panel-2); border: 1px dashed var(--line-2); max-width: 880px; }
@media print { section.foldable:not(.open) > .secfold { max-height: none; overflow: visible; } section.foldable > .secfold::after, .secmore { display: none; } }

/* ---------- the time bar: deep charcoal, the page's type, sentence-case labels ---------- */
#timebar { background: #2A2826; color: #F3EFE8; border-top: 1px solid #45403B; }
#tbLabel { font: 500 13px var(--body); text-transform: none; letter-spacing: 0; color: #FFE001; }
#tbTicks i { background: #57514A; }
#tbTicks i.round { background: #A8A095; }
#tbTicks b { background: #F4845F; }
#tbTicks .rl { font: 500 11px/12px var(--body); text-transform: none; letter-spacing: 0; color: #CFC8BD; }
#tbLive, #tbOpen { border-radius: 999px; padding: 5px 14px; }
@media (max-width: 600px) { #timebar.open, #timebar.past { background: #2A2826; } body.has-timebar::after { background: #2A2826; border-top-color: #45403B; } }

/* ---------- 8 Nov, the site-wide pass: the instrument's and the notebook's rules on every section ----------
   One control language. A play control anywhere is the instrument's key: deep charcoal with a yellow glyph. A chosen or
   primary control is charcoal with yellow type on light pages and yellow with charcoal type on dark ones. Labels are
   sentence case in the body face (no tracked capitals). Clips play in one player (lab/player.js), never the browser's. */
:root { --kp-bg: #2A2826; --kp-edge: #1F1D1B; --kp-ink: #FFE001; --sel-bg: #2A2826; --sel-ink: #FFE001; --sel-edge: #2A2826; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --kp-bg: #45403B; --kp-edge: #57514A; --sel-bg: #FFE001; --sel-ink: #2A2826; --sel-edge: #FFE001; } }
:root[data-theme=dark] { --kp-bg: #45403B; --kp-edge: #57514A; --sel-bg: #FFE001; --sel-ink: #2A2826; --sel-edge: #FFE001; }

.pill, .badge, .mchip, .entry .kind, .clip .tag, #xtip .xh, .check .v, .mapdetail .crumb, .goalhero .eyebrow, .cbar button, #cPanel h4, .cabout,
#tourCard .tc, .chsay, .dep b, .jchips .kind, .backed .bb, .cground .cgwhen, #tbLabel, #tbTicks .rl { text-transform: none; letter-spacing: 0; font-family: var(--body); }

.tkplay, .grjourney, .maptools button.primary { background: var(--kp-bg); color: var(--kp-ink); border: 1px solid var(--kp-bg); box-shadow: 0 2px 0 var(--kp-edge);
  border-radius: 10px; font: 600 14px var(--body); }
.tkplay[aria-pressed=true] { transform: translateY(2px); box-shadow: 0 0 0 var(--kp-edge); }
.grplay, .hearrow .play, .vdisc { background: var(--kp-bg); color: var(--kp-ink); border: 0; box-shadow: 0 2px 0 var(--kp-edge); border-radius: 12px; }
.grplay { width: 56px; height: 56px; font-size: 20px; }
.hearrow .play, .vdisc { border-radius: 9px; }
.grplay:active, .hearrow .play:active, .vdisc:active { transform: translateY(2px); box-shadow: none; }
.seg button[aria-pressed=true], .chip.on, .hipill.on, button.pick.chosen, .tnote button[aria-pressed=true], .grchips button[aria-pressed=true], .hiplay[aria-pressed=true] {
  background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-edge); }
.chip, .hipill, .grchips button, .cbar button, #tourCard button { border-radius: 8px; }

/* the one player: the key, a thin track that fills in yellow, the time */
.tp { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; min-width: 0; }
.tpkey { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: var(--kp-bg); border: 0; border-radius: 9px;
  box-shadow: 0 2px 0 var(--kp-edge); cursor: pointer; }
.tpkey .kicon { width: 0; height: 0; border-left: 9px solid var(--kp-ink); border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; margin-left: 2px; }
.tpkey[aria-pressed=true] .kicon { width: 9px; height: 11px; border: 0; margin: 0; background: linear-gradient(90deg, var(--kp-ink) 0 34%, transparent 34% 66%, var(--kp-ink) 66%); }
.tpkey:active { transform: translateY(2px); box-shadow: none; }
.tpkey:focus-visible, .tpbar:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tpbar { -webkit-appearance: none; appearance: none; flex: 1 1 auto; min-width: 60px; height: 6px; border-radius: 3px; cursor: pointer; margin: 0;
  background: linear-gradient(90deg, #FFE001 var(--p, 0%), var(--line-2) var(--p, 0%)); }
.tpbar::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--panel); }
.tpbar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--panel); }
.tptime { flex: none; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 32px; }

/* "Right now" is a second instrument: its own charcoal body in both themes, never the page colour */
:root[data-theme=dark] section.room { --sec: #211F1D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) section.room { --sec: #211F1D; } }
section.room { border-top: 1px solid #45403B; border-bottom: 1px solid #45403B; }

/* the sign-up's two clips: plain ink waveforms, as on the instrument */
.su-clip, .su-clip svg { color: var(--su-ink); }
section.joinband { border-top: 3px solid #FFE001; }

/* the footer: the instrument's charcoal, not a near-black slab */
footer { background: #2A2826; }

/* phones: a one-line bar, readable step and start diagrams, a journal strip that scrolls */
@media (max-width: 600px) {
  #healthPill { display: none; }
  #bar .cbar button { padding: 1px 8px; }
  #stepSvg { min-width: 820px; }
  #pipe { min-width: 760px; }
  #timeline { min-width: 760px; }
  .panel:has(> #stepSvg), .panel:has(> #timeline), .panel:has(> #pipe) { overflow-x: auto; }
}

/* the legal pages, the sponsorship terms and the 404: one notebook page, with the masthead that leads home */
.legalmain { max-width: 760px; padding: 40px 20px 40px; }
.legalhome { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; border: 0; }
.legalhome b { font: 600 22px var(--display); letter-spacing: -.01em; }
/* the small pages' menu: home and the learning book, outlined like the main menu's Learn */
.legaltop { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.legalnav { display: flex; gap: 8px; }
.legalnav a { color: var(--ink); text-decoration: none; border: 0; font: 500 14px var(--body); padding: 7px 14px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); }
.legalnav a:hover { background: var(--bg2); color: var(--ink); }
.legalmain h1 { font: 600 clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem)/1.04 var(--display); letter-spacing: -.015em; margin: 40px 0 12px; padding-bottom: 14px;
  border-bottom: 3px solid #FFE001; max-width: 18ch; color: var(--ink); }
.legalmain h2 { font: 600 22px/1.25 var(--display); margin: 34px 0 0; color: var(--ink); }
.legalmain p, .legalmain li { font-size: 17px; line-height: 1.65; max-width: 38em; color: var(--ink-2); }
.legalmain .lead { font-size: 19px; color: var(--ink); }
.legalmain .legal-updated { font-size: 14px; color: var(--meta); }
.legalmain a.tourbtn { background: var(--kp-bg); color: var(--kp-ink) !important; border: 0; border-radius: 10px; box-shadow: 0 2px 0 var(--kp-edge);
  padding: 10px 18px; font: 600 15px var(--body); margin-top: 18px; }

/* ---------- learning from real voices (lab/studio.js): the two packs as rows of a small instrument ----------
   Each row: on the left the pack's light, name, how its text is read, what it is doing since when and its voices; on the
   right its stage track lit to where it is (done filled in ink, here now in yellow with a charcoal casing, paused hatched,
   not yet open) and its hours by speaking style as one-hue columns on one baseline (rows on a phone), each with its name and
   hours under it. Yellow is only the stage a pack is at and the light of a pack that is working. */
.stdev { margin: 4px 0 22px; }
.stpacks { display: grid; gap: 10px; }
.stpack { padding: 14px 18px; display: grid; grid-template-columns: minmax(250px, .95fr) minmax(0, 2.05fr); gap: 10px 34px; align-items: start; }
.stid { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sthead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sthead .led { align-self: center; }
.sthead h3 { font: 600 20px/1.2 var(--display); color: var(--dv-ink); margin: 0; letter-spacing: -.01em; }
.streads { font-size: 12.5px; color: var(--dv-dim); }
.stsaid { margin: 0; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; font-size: 13.5px; line-height: 1.4; color: var(--dv-ink); }
.stsaid b { font-weight: 600; }
.stsaid span { color: var(--dv-dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.stvoices { list-style: none; padding: 6px 0 0; margin: 0; border-top: 1px solid var(--dv-edge); display: grid; gap: 2px; }
.stvoices li { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 12.5px; line-height: 1.5; }
.stvoices li b { font-weight: 600; color: var(--dv-ink); }
.stvoices li span { color: var(--dv-dim); font-variant-numeric: tabular-nums; }
.stcount { margin: 0; font-size: 12.5px; color: var(--dv-dim); font-variant-numeric: tabular-nums; }
.stgo { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding-top: 4px; }
.sttrack { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 10px; }
.sttrack li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sttrack li i { display: block; height: 10px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--dv-edge);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--dv-dim) 50%, transparent); }  /* an open stage reads on either theme's key */
.sttrack li.done i { background: var(--dv-ink); box-shadow: none; }
.sttrack li.now i { background: #FFE001; box-shadow: 0 0 0 1.5px var(--now-casing); }
.sttrack li.paused i { background: repeating-linear-gradient(135deg, var(--dv-dim) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1.5px var(--dv-dim); }
.sttrack li b { font: 500 12px/1.25 var(--body); color: var(--dv-ink); overflow-wrap: break-word; hyphens: manual; }
.sttrack li.next b { color: var(--dv-dim); font-weight: 400; }
.stnote { font-size: 11.5px; line-height: 1.3; color: var(--dv-dim); font-variant-numeric: tabular-nums; }
.sttrack li.now .stnote, .sttrack li.paused .stnote { color: var(--dv-ink); font-weight: 600; }
.ststyles h4 { font: 500 12.5px var(--body); color: var(--dv-dim); margin: 0 0 4px; }
.stnone { margin: 0; font-size: 12.5px; color: var(--dv-dim); }
.stbars { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.stbars li { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.stcol { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 34px; border-bottom: 1px solid var(--dv-dim); }
.stcol i { display: block; width: min(24px, 72%); height: var(--v); background: var(--dv-ink); border-radius: 4px 4px 0 0; }
.stbars b { font: 500 11.5px/1.2 var(--body); color: var(--dv-ink); margin-top: 4px; }
.stbars li > span:last-child { font-size: 11px; line-height: 1.3; color: var(--dv-dim); font-variant-numeric: tabular-nums; }
.stres h4 { font: 500 12.5px var(--body); color: var(--dv-dim); margin: 0 0 2px; }
.stkey { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11.5px; color: var(--dv-dim); }
.stkbar { display: inline-block; width: 18px; height: 8px; border-radius: 0 4px 4px 0; background: var(--dv-ink); }
.stkmark { display: inline-block; width: 2px; height: 13px; margin-left: 8px; background: var(--dv-ink); }
.stresv { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.stresv li { display: grid; grid-template-columns: minmax(8.5em, .75fr) repeat(3, minmax(0, 1fr)); gap: 4px 16px; align-items: start; padding: 7px 0; border-top: 1px solid var(--dv-edge); }
.stwho { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; line-height: 1.35; }
.stwho b { font-weight: 600; color: var(--dv-ink); }
.stwho span { color: var(--dv-dim); font-size: 11.5px; }
.stm { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stm em { font: 500 11.5px/1.25 var(--body); font-style: normal; color: var(--dv-dim); }
.stm > span:last-child { font-size: 12px; line-height: 1.3; color: var(--dv-ink); font-variant-numeric: tabular-nums; }
.stmbar { position: relative; display: block; height: 8px; border-radius: 0 4px 4px 0; box-shadow: inset 0 0 0 1px var(--dv-edge); }
.stmbar i { display: block; height: 100%; width: var(--v); background: var(--dv-ink); border-radius: 0 4px 4px 0; }
.stmbar u { position: absolute; top: -3px; left: var(--r); width: 2px; height: 14px; margin-left: -1px; background: var(--dv-ink); box-shadow: 0 0 0 2px var(--dv-body); }
.stcheck { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--dv-ink); }
.stround { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--dv-edge); }
.stround > h4 { font: 600 13px var(--body); color: var(--dv-ink); margin: 0; }
.stwhy { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--dv-dim); max-width: 68ch; }
.stround .stsaid { margin: 0; }
.sttrack.r2 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
.stmbar b.r1 { position: absolute; top: 50%; left: var(--r); width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--dv-body); box-shadow: inset 0 0 0 2px var(--dv-ink); }
.stkring { display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--dv-ink); }
.stfold { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; max-width: 1120px; }
.stfold h3 { font: 600 19px/1.25 var(--display); color: var(--ink); margin: 18px 0 4px; letter-spacing: -.01em; }
.stfold p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.stfold p.sttrial { margin-top: 18px; font-size: 14px; }
.sttable { border-collapse: collapse; margin: 16px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.sttable caption { text-align: left; font-weight: 500; color: var(--ink); padding: 0 0 6px; }
.sttable th, .sttable td { padding: 4px 14px 4px 0; border-bottom: 1px solid var(--line); text-align: left; }
.sttable td { text-align: right; color: var(--ink-2); }
.sttable thead th { color: var(--dim); font-weight: 500; }
@media (max-width: 900px) {
  .stpack { grid-template-columns: minmax(0, 1fr); }
  .stfold { grid-template-columns: minmax(0, 1fr); }
  .stresv li { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stwho { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
}
@media (max-width: 640px) {
  .stpack { padding: 12px; gap: 10px; }
  .stid, .stgo { display: contents; }
  .sthead { order: 1; } .stsaid { order: 2; } .sttrack { order: 3; } .stres { order: 3; } .stvoices { order: 4; } .stcount { order: 5; } .ststyles { order: 6; }
  .stresv li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stdev .devbar { flex-wrap: wrap; row-gap: 2px; }
  .sttrack { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 8px; margin: 2px 0 4px; }
  .sttrack li b { font-size: 11.5px; }
  .stnote { font-size: 11px; }
  .stbars { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .stbars li { display: grid; grid-template-columns: 6.4em minmax(0, 1fr) 3.4em; align-items: center; gap: 8px; text-align: left; }
  .stbars li .stcol { order: 2; height: 9px; border-bottom: 0; border-left: 1px solid var(--dv-dim); justify-content: flex-start; align-items: stretch; }
  .stcol i { width: var(--v); height: auto; border-radius: 0 4px 4px 0; }
  .stbars b { order: 1; margin: 0; }
  .stbars li > span:last-child { order: 3; text-align: right; }
}
/* tests on the lab's PC that are not voice rounds (studio.js testHtml): one card each, under the packs */
.sttests { display: grid; gap: 12px; margin-top: 16px; }
.sttest { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; background: var(--panel); color: var(--ink); }
.sttest h4 { font: 600 19px/1.25 var(--display); margin: 0 0 4px; color: var(--ink); }
.sttest p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.sttest .sttstate { color: var(--dim); font-size: 13px; margin-top: 0; }
.sttest .starms { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.sttest .starms li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 6px; font-size: 14px; color: var(--ink-2); }
.sttest .starms b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.sttest .starms em { font-style: normal; font-weight: 500; color: var(--dim); }
