/* Public site layout. Colours, fonts and components come from brand.css. */

.skip { position: absolute; left: var(--space-4); top: -60px; z-index: 20; background: var(--ink); color: var(--field); font: 500 14px var(--sans); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: var(--space-2); }

/* ---------- Header: quiet, and always there ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--field); border-bottom: 1px solid var(--rule); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--space-3) var(--space-6); flex-wrap: wrap; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.site-header .bv-lockup { gap: 12px; }
.site-header .bv-lockup .bv-mark { width: 34px; height: 34px; }
.lockup-text { display: flex; flex-direction: column; gap: 3px; }
.tagline { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.01em; line-height: 1.2; }
nav { display: flex; gap: var(--space-5); font-family: var(--sans); font-size: 15px; }
nav a { color: var(--ink-muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ground); }
nav { margin-left: auto; }
.signin { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); text-decoration: none; padding: 5px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); white-space: nowrap; }
.signin:hover { color: var(--ink); border-color: var(--ink-muted); }

.notice { background: var(--excited); color: var(--on-excited); font-family: var(--sans); font-size: 15px; font-weight: 500; }
.notice .wrap { padding-top: 10px; padding-bottom: 10px; }

/* ---------- Pages ---------- */
.page { padding-top: 48px; padding-bottom: 80px; min-height: 60vh; }
.page-head { max-width: 760px; margin-bottom: var(--space-6); }
.page-head h1, article h1, .about h1 { font-size: 40px; line-height: 1.12; letter-spacing: -0.012em; margin-bottom: var(--space-3); }
.page-head .sub { margin-bottom: 0; }
.crumbs { font-family: var(--sans); font-size: 14px; margin-bottom: var(--space-2); }
.crumbs a { color: var(--ink-muted); }
.section-label { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin: var(--space-7) 0 var(--space-4); }
.page-head + .section-label { margin-top: 0; }
.quiet { font-family: var(--sans); font-size: 15px; color: var(--ink-muted); margin-bottom: var(--space-4); }

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; font-weight: 400; letter-spacing: -0.015em; margin-bottom: var(--space-5); }
h2 { font-size: 34px; line-height: 1.15; font-weight: 400; letter-spacing: -0.01em; margin-bottom: var(--space-3); }
.sub { color: var(--ink-muted); max-width: 680px; margin-bottom: var(--space-6); }
h3 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-3); }

/* ---------- Home ---------- */
.intro { padding: 32px 0 48px; max-width: 800px; }
.lede { font-size: 21px; line-height: 1.55; color: var(--ink-muted); max-width: 660px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.card { display: flex; flex-direction: column; gap: var(--space-2); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: var(--space-5); color: var(--ink); text-decoration: none; transition: border-color 0.15s ease; }
.card:hover { border-color: var(--ink-muted); }
.card-kicker { font-family: var(--sans); font-size: 13px; color: var(--ink-muted); }
.card-title { font-size: 22px; line-height: 1.25; }
.card-text { font-size: 17px; line-height: 1.5; color: var(--ink-muted); flex: 1; }
.card-go { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ground); margin-top: var(--space-3); }
.card:hover .card-go { text-decoration: underline; text-underline-offset: 3px; }
.home-foot { margin-top: var(--space-6); font-family: var(--sans); font-size: 15px; }
.home-foot a { color: var(--ink-muted); }
.home-foot a:hover { color: var(--ink); }

.next { display: inline-flex; gap: var(--space-2); margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ground); text-decoration: none; }
.next:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sphere lab ---------- */
.lab { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-6); align-items: start; }
.stage { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-sm); aspect-ratio: 1 / 1; position: relative; touch-action: none; cursor: grab; }
.stage:active { cursor: grabbing; }
.stage canvas { width: 100%; height: 100%; display: block; border-radius: var(--radius-sm); }
.stage-hint { position: absolute; left: 14px; bottom: 10px; font-family: var(--sans); font-size: 13px; color: var(--ink-muted); pointer-events: none; transition: opacity 0.6s ease; }
.stage.turned .stage-hint { opacity: 0; }
/* On touch screens a vertical swipe scrolls the page; a sideways drag turns the sphere. */
@media (pointer: coarse) { .stage { touch-action: pan-y; } }

.panel { display: flex; flex-direction: column; gap: var(--space-6); }
.row { display: flex; flex-wrap: wrap; gap: 6px; }
.slider { display: flex; align-items: center; gap: var(--space-3); font-family: var(--sans); font-size: 15px; color: var(--ink-muted); margin-bottom: var(--space-3); }
.slider input { flex: 1; accent-color: var(--decohered); min-height: 32px; }
.slider output { color: var(--ink); width: 44px; text-align: right; font-family: var(--serif); }

details.maths { margin-top: var(--space-3); }
details.maths summary { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); cursor: pointer; width: fit-content; }
details.maths summary:hover { color: var(--ink); }
.formulas { font-size: 15px; color: var(--ink-muted); margin-top: var(--space-2); line-height: 1.75; }

table.read { width: 100%; border-collapse: collapse; font-size: 17px; }
table.read td { padding: 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.read td:first-child { color: var(--ink-muted); font-family: var(--sans); font-size: 14px; width: 36%; padding-top: 10px; padding-right: var(--space-3); }
table.read tr:last-child td { border-bottom: none; }
.rho { display: inline-grid; grid-template-columns: auto auto; gap: 2px 16px; border-left: 1.5px solid var(--ink-muted); border-right: 1.5px solid var(--ink-muted); padding: 2px 10px; }
.mixed { color: var(--decohered-text); }
.ket-note { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink-muted); }
.path { font-size: 16px; color: var(--ink-muted); line-height: 1.7; word-break: break-word; }

.reset { margin-top: var(--space-3); font-family: var(--sans); font-size: 14px; color: var(--ink-muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.reset:hover { color: var(--ink); }

.note { margin-top: var(--space-7); max-width: 760px; color: var(--ink-muted); font-size: 18px; }
.note-title { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: var(--space-4); }
.note ol { margin: 0 0 var(--space-4) 22px; }
.note li { margin-bottom: var(--space-3); padding-left: 4px; }
.note strong { color: var(--ink); font-weight: 700; }

/* ---------- Watch ---------- */
.watch-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-5); font-family: var(--sans); font-size: 14px; color: var(--ink-muted); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend .bv-tag { font-size: 12px; padding: 4px 8px; }
table.watch { width: 100%; border-collapse: collapse; font-size: 17px; }
table.watch th { text-align: left; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink-muted); }
table.watch td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.watch td:first-child { font-weight: 700; width: 24%; }
table.watch td:last-child { width: 1%; white-space: nowrap; }
.row-src { display: block; margin-top: 6px; font-family: var(--sans); font-size: 13px; color: var(--ink-muted); }
.row-src a { color: var(--ink-muted); }
.row-src a:hover { color: var(--ink); }

/* ---------- Notebook ---------- */
article { max-width: 700px; }
article .meta { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); margin-bottom: var(--space-2); }
article h2 { margin-bottom: var(--space-5); }
article p { margin-bottom: var(--space-4); }
article ul { margin: 0 0 var(--space-4) 22px; }
article li { margin-bottom: 6px; }
.sources { font-family: var(--sans); font-size: 15px; color: var(--ink-muted); border-top: 1px solid var(--rule); padding-top: var(--space-4); margin-top: var(--space-5); padding-left: 20px; }
.sources li { margin-bottom: 4px; }

/* ---------- Learn ---------- */
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.links { list-style: none; }
.links li { padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); }
.links li:last-child { border-bottom: none; }
.links span { display: block; font-size: 16px; color: var(--ink-muted); margin-top: 2px; }

/* ---------- News ---------- */
.filters { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-5); }
.filters button { font: 500 14px var(--sans); color: var(--ink-muted); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-pill); padding: 6px 14px; cursor: pointer; }
.filters button:hover { border-color: var(--ink-muted); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--field); }
.news { max-width: 760px; }
.news .month { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin: var(--space-6) 0 var(--space-2); }
.news .month:first-child { margin-top: 0; }
.news-items { list-style: none; }
.news-item { padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); }
.news-item:last-child { border-bottom: none; }
.news-meta { font-family: var(--sans); font-size: 13px; color: var(--ink-muted); margin-bottom: 4px; }
.news-title { font-size: 21px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.news-title:hover { text-decoration: underline; }
.news-note { color: var(--ink-muted); font-size: 17px; margin-top: 6px; }
.news-source { font-family: var(--sans); font-size: 13px; color: var(--ink-muted); margin-top: 6px; }

/* ---------- About ---------- */
.about { max-width: 700px; }
.about h2 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin: var(--space-6) 0 var(--space-3); }
.about p { margin-bottom: var(--space-4); }
.about-lede { font-size: 21px; line-height: 1.55; color: var(--ink-muted); }
.principles { list-style: none; }
.principles li { padding: var(--space-2) 0; border-bottom: 1px solid var(--rule); }
.principles li:last-child { border-bottom: none; }
.mark-figure { display: flex; align-items: center; gap: var(--space-6); }
.mark-figure p { margin: 0; }
.mark-large { width: 88px; height: 88px; flex: none; }

footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-family: var(--sans); font-size: 14px; color: var(--ink-muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px var(--space-5); }
.foot-name { color: var(--ink); font-weight: 600; }

/* ---------- Not-found page ---------- */
.lost { padding: 96px 0 120px; max-width: 640px; }
.lost p { color: var(--ink-muted); margin-bottom: var(--space-5); }

@media (max-width: 860px) {
  .lab { grid-template-columns: 1fr; }
  .cards, .cards.two, .reading { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 var(--space-4); }
  .topbar { min-height: 0; padding-top: var(--space-3); padding-bottom: 0; gap: var(--space-2); }
  /* The section links become one row that scrolls sideways if it must. */
  nav { width: 100%; gap: var(--space-5); font-size: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  nav::-webkit-scrollbar { display: none; }
  nav a { padding: 8px 0 10px; }
  .page { padding-top: 32px; padding-bottom: 56px; }
  .page-head h1, article h1, .about h1 { font-size: 30px; }
  .signin { margin-left: auto; }
  nav { order: 3; margin-left: 0; }
  .intro { padding: 8px 0 32px; }
  .lede, .about-lede { font-size: 19px; }
  h2 { font-size: 28px; }
  .mark-figure { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .mark-large { width: 64px; height: 64px; }
  table.watch, table.watch tbody, table.watch tr, table.watch td { display: block; width: 100% !important; }
  table.watch thead { display: none; }
  table.watch tr { border-bottom: 1px solid var(--rule); padding: 12px 0; }
  table.watch td { border: none; padding: 2px 0; white-space: normal !important; }
  table.watch td:last-child { padding-top: 8px; }
}

/* =====================================================================
   Playful layer (Nov 2026): eyebrows, hero, illustrated cards, the dark
   band, comics, toys, glossary and the illustration classes (.a-*).
   ===================================================================== */

/* Eyebrow: a short saffron dash, then a tracked label */
.eyebrow { font-family: var(--sans); font-size: 13px; line-height: 1.5; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-3); }
.eyebrow::before { content: ""; display: inline-block; width: 20px; height: 3px; background: var(--excited); vertical-align: middle; margin: -2px 10px 0 0; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-6); align-items: center; padding: 16px 0 56px; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.3rem); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: var(--space-5); }
.hero .lede { font-size: 21px; max-width: 600px; }
.cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero-pic svg { width: 100%; height: auto; max-width: 440px; display: block; margin-left: auto; }

/* Sections */
.block { padding: 64px 0 8px; }
.block.tight { padding-top: 8px; }
.section-head { max-width: 720px; margin-bottom: var(--space-5); }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: var(--space-2); }
.section-head .sub { margin-bottom: 0; }
.page-head.with-pic { max-width: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); }
.page-head.with-pic > div:first-child { max-width: 720px; }
.head-pic svg { width: 120px; height: 120px; flex: none; }

/* Cards, now softer and illustrated */
.card { border-radius: var(--radius-md); }
.card.tint-x { background: var(--tint-excited); border-color: transparent; }
.card.tint-g { background: var(--tint-ground); border-color: transparent; }
.card.tint-x:hover, .card.tint-g:hover { border-color: var(--ink-muted); }
.card-pic svg { width: 64px; height: 64px; display: block; margin-bottom: var(--space-2); transition: transform 0.25s ease; }
.card:hover .card-pic svg { transform: translateY(-3px) rotate(-3deg); }

/* The dark band: always dark, whatever the theme */
.band { --ink: var(--on-vacuum); --ink-muted: var(--on-vacuum-muted); --rule: var(--vacuum-rule); --ground: var(--ground-on-vacuum); --on-ground: var(--vacuum);
  --excited-text: var(--excited); --decohered: #A88673; --decohered-text: #C9A999;
  background: var(--vacuum); color: var(--ink); margin-top: 72px;
  box-shadow: 0 0 0 100vmax var(--vacuum); clip-path: inset(0 -100vmax); }
.band-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-7); align-items: center; padding: 64px 0; }
.band h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: var(--space-4); }
.band-text p:not(.eyebrow) { color: var(--ink-muted); margin-bottom: var(--space-5); max-width: 560px; }
.band-stats { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.band-stats li { border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.band-stats .num { font-size: 56px; line-height: 1; }
.band-stats .what { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); }
.page > .home-foot { margin-top: 48px; }

/* Comic strips */
/* Two panels a row, so the lettering stays readable; read left to right, then down. */
.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin: 0; max-width: 880px; }
.nb { white-space: nowrap; }
.panel { margin: 0; }
.panel svg { width: 100%; height: auto; display: block; }
.strip-foot { margin-top: var(--space-4); font-family: var(--sans); font-size: 15px; font-weight: 500; }
.strip-foot a { color: var(--ground); }
.transcript { margin-top: var(--space-5); font-family: var(--sans); font-size: 15px; color: var(--ink-muted); max-width: 760px; }
.transcript summary { cursor: pointer; width: fit-content; }
.transcript ol { margin: var(--space-3) 0 0 22px; }
.transcript li { margin-bottom: 6px; }

/* Nerd note: the exact physics behind the joke */
.nerd { background: var(--tint-ground); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); margin-top: var(--space-6); max-width: 820px; color: var(--ink); font-size: 18px; }
.nerd p + p { margin-top: var(--space-3); }
.nerd-label { display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; background: var(--ink); color: var(--field); padding: 4px 10px; border-radius: var(--radius-pill); margin-bottom: var(--space-3); }
.nerd strong { font-weight: 700; }
.note.nerd ol { margin-left: 22px; }
.note.nerd { color: var(--ink); }

/* Toys */
.toy { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--space-6); align-items: start; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-6); }
.toy.wide { grid-template-columns: 1fr; }
.toy-pic svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }
.toy .slider { flex-wrap: wrap; }
.toy .slider label { flex: 1 1 100%; color: var(--ink); font-weight: 500; }
.toy .slider output { width: auto; min-width: 72px; }
.toy-mood { font-size: 18px; margin: var(--space-2) 0 var(--space-4); color: var(--ink); min-height: 1.6em; }
.toy-buttons { margin: var(--space-5) 0 var(--space-4); align-items: center; }
.toy-buttons .reset { margin: 0 0 0 var(--space-2); }
.tally-row { display: grid; grid-template-columns: 24px 1fr 56px; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); font-family: var(--serif); font-size: 18px; }
.tally-bar { height: 14px; background: var(--field); border-radius: var(--radius-pill); overflow: hidden; }
.tally-bar .fill { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); transition: width 0.35s ease; }
.fill.zero { background: var(--ground); }
.fill.one { background: var(--excited); }
.tally-n { text-align: right; }
.timeline { margin-top: var(--space-5); font-family: var(--sans); font-size: 14px; }
.tl-row { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); color: var(--ink-muted); }
.tl-track { position: relative; height: 18px; background: var(--field); border-radius: var(--radius-pill); }
.tl-bar { position: absolute; top: 0; left: 0; height: 100%; border-radius: var(--radius-pill); transition: width 0.3s ease, margin-left 0.3s ease; }
.tl-bar.mig { background: var(--ground); }
.tl-bar.shelf { position: relative; display: block; background: var(--excited); }
.tl-mark { position: absolute; top: -6px; width: 4px; height: 30px; margin-left: -2px; background: var(--decohered); border-radius: 2px; transition: left 0.3s ease; }
.tl-axis { display: flex; justify-content: space-between; margin-left: calc(180px + var(--space-3)); color: var(--ink-muted); font-size: 13px; }
.verdict { margin-top: var(--space-5); padding: var(--space-5); border-radius: var(--radius-md); }
.verdict.ok { background: var(--tint-ground); }
.verdict.late { background: var(--tint-excited); }
.verdict-h { font-size: 22px; margin-bottom: var(--space-2); }
.verdict p:not(.verdict-h) { color: var(--ink-muted); }

/* Pocket glossary */
.gloss { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.gloss-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-5); }
.gloss-card svg { width: 56px; height: 56px; display: block; margin-bottom: var(--space-2); }
.gloss-card h3 { font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: var(--space-2); }
.gloss-card p { font-size: 17px; color: var(--ink-muted); }
.gloss-card details { margin-top: var(--space-3); }
.gloss-card summary { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ground); cursor: pointer; width: fit-content; }
.gloss-card details p { color: var(--ink); font-size: 16px; margin-top: var(--space-2); }
.reading-h { margin-bottom: var(--space-2); }

/* About: the cast */
.cast { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.cast > div { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-4); }
.cast svg { width: 56px; height: 56px; display: block; margin-bottom: var(--space-2); }
.cast p { font-size: 16px; margin: 0; }

/* ---------- Illustration classes: every drawing uses tokens, so it follows the theme ---------- */
.a-frame { fill: var(--sheet); stroke: var(--rule); stroke-width: 1.5; }
.a-capbox { fill: var(--tint-excited); }
.a-cap { font: 600 11px var(--sans); letter-spacing: 0.08em; fill: var(--ink); }
.a-bubble { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.a-text { font: 500 15px var(--sans); fill: var(--ink); }
.a-small { font: 600 12px var(--sans); fill: var(--ink-muted); }
.a-tiny { font: 700 9px var(--sans); letter-spacing: 0.04em; fill: var(--ink); }
.a-ket { font: 18px var(--serif); fill: var(--ground); }
.a-ket.big { font-size: 24px; }
.a-ket.ex { fill: var(--excited-text); }
.a-label { font: 600 11px var(--sans); letter-spacing: 0.1em; fill: var(--ink-muted); }
.a-shadow { fill: var(--rule); opacity: 0.7; }
.a-body { fill: var(--tint-ground); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.a-body.noisy { fill: var(--tint-noise); stroke: var(--decohered); }
.a-equator, .a-meridian { fill: none; stroke: var(--ink-muted); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: 0.75; }
.a-eye, .a-mouth, .a-mask { fill: var(--ink); }
.a-eye-light, .a-glint { fill: var(--sheet); }
.a-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.a-line.thin { stroke-width: 1.5; }
.a-vector { fill: none; stroke: var(--ground); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.a-vector.noisy { stroke: var(--decohered); }
.a-vector.sm { stroke-width: 3; }
.a-vector.hero { stroke-width: 6; }
.a-pivot, .a-dot, .a-knob, .a-chip { fill: var(--ground); }
.a-pivot.noisy { fill: var(--decohered); }
.a-tip { fill: var(--excited); stroke: var(--ink); stroke-width: 1.5; }
.a-gate, .a-meter, .a-env, .a-clip { fill: var(--sheet); stroke: var(--ink); stroke-width: 2.25; stroke-linejoin: round; }
.a-gate-label { font: 700 30px var(--serif); fill: var(--ink); }
.a-motion, .a-spark { fill: none; stroke: var(--excited-text); stroke-width: 2.5; stroke-linecap: round; }
.a-noise { fill: var(--tint-noise); stroke: var(--decohered); stroke-width: 2.5; stroke-linejoin: round; }
.a-wave { fill: none; stroke: var(--decohered); stroke-width: 2.5; stroke-linecap: round; }
.a-wave2 { fill: none; stroke: var(--excited-text); stroke-width: 2.5; stroke-linecap: round; }
.a-lock { fill: var(--decohered); stroke: var(--ink); stroke-width: 1.5; }
.a-lock.new { fill: var(--excited); }
.a-paper { fill: var(--tint-noise); stroke: var(--ink); stroke-width: 1.5; }
.a-vault { fill: var(--tint-ground); stroke: var(--ink); stroke-width: 2.5; }
.a-qpu { fill: var(--excited); stroke: var(--ink); stroke-width: 1.5; }
.a-person { fill: var(--tint-excited); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.a-orbit { fill: none; stroke: var(--excited-text); stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.a-axis { stroke: var(--ink-muted); stroke-width: 1.2; stroke-dasharray: 3 5; }
.a-cheek { fill: var(--excited); opacity: 0.35; }
.a-swing { transform-box: view-box; transform-origin: 220px 200px; animation: bv-swing 7s ease-in-out infinite alternate; }
.a-peek { transform-box: view-box; animation: bv-peek 9s ease-in-out infinite; }
@keyframes bv-swing { from { transform: rotate(-38deg); } to { transform: rotate(38deg); } }
@keyframes bv-peek { 0%, 70%, 100% { transform: translateY(0); } 80%, 90% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .a-swing, .a-peek { animation: none; } .card:hover .card-pic svg { transform: none; } }

@media (max-width: 960px) {
  .gloss, .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero, .band-inner, .toy { grid-template-columns: 1fr; }
  .hero-pic svg { margin: 0 auto; max-width: 340px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 0; }
  .hero h1 { font-size: 2.4rem; }
  .hero .lede { font-size: 19px; }
  .head-pic { display: none; }
  .gloss, .cast { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .toy { padding: var(--space-4); }
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
  .tl-axis { margin-left: 0; }
  .nerd { padding: var(--space-4); font-size: 17px; }
  .band-stats .num { font-size: 44px; }
}

/* Colour scheme switch */
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm); color: var(--ink-muted); cursor: pointer; }
.theme-btn:hover { color: var(--ink); border-color: var(--ink-muted); }
.theme-btn .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: none; }
.theme-btn .ico .fill { fill: currentColor; stroke: none; }
.theme-btn[data-mode="system"] .ico-system, .theme-btn[data-mode="light"] .ico-light, .theme-btn[data-mode="dark"] .ico-dark { display: block; }
@media (max-width: 640px) { .theme-btn { margin-left: auto; } .theme-btn + .signin { margin-left: 0; } }

/* Bit: the classical bit, our layman. A light switch that only knows on and off. */
.a-plate { fill: var(--sheet); stroke: var(--ink); stroke-width: 2.25; }
.a-slot { fill: var(--tint-ground); stroke: var(--ink); stroke-width: 1.5; }
.a-lever { fill: var(--excited); stroke: var(--ink); stroke-width: 1.5; }
.bit { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); align-items: start; background: var(--tint-excited); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); max-width: 820px; margin: var(--space-5) 0; }
.bit svg { width: 56px; height: 56px; display: block; }
.bit-label { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.bit p:not(.bit-label) { font-size: 18px; line-height: 1.55; color: var(--ink); }
.bit-line { margin-top: var(--space-3); padding: var(--space-3); background: var(--tint-excited); border-radius: var(--radius-sm); font-size: 16px !important; color: var(--ink) !important; }
.bit-line strong { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); display: block; margin-bottom: 2px; }

/* Freshness: when a page was last checked, and when the next check is due */
.fresh { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); margin-top: var(--space-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fresh::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ground); flex: none; }
.fresh.overdue::before { background: var(--excited); }
.fresh .late { color: var(--excited-text); font-weight: 600; }

/* Past States */
.past-banner { background: var(--tint-noise); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-6); font-family: var(--sans); font-size: 15px; color: var(--ink); max-width: 820px; }
.past-banner a { color: var(--ground); font-weight: 500; }
.past-list { list-style: none; max-width: 760px; }
.past-list li { padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.past-list li > a { font-size: 19px; color: var(--ink); }
.past-list span { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); }
.past-list span a { color: var(--ink-muted); }
.foot-links a { color: var(--ink-muted); }
@media (max-width: 640px) { .bit { grid-template-columns: 44px 1fr; padding: var(--space-4); } .bit svg { width: 44px; height: 44px; } }

/* Sign-in page */
.signin-page { max-width: 560px; padding: 24px 0 40px; }
.signin-form { display: flex; flex-direction: column; gap: var(--space-4); margin: var(--space-5) 0 var(--space-6); }
.signin-form .bv-btn { align-self: flex-start; }
.signin-status { font-family: var(--sans); font-size: 15px; color: var(--ink-muted); min-height: 1.4em; }
.signin-status.err { color: var(--decohered-text); }
.signin-status:empty { display: none; }
.foot-links #contactLink { color: var(--ink-muted); }

/* Feedback: "Did this click?" at the end of every reader-facing page */
.feedback { margin-top: 72px; padding: var(--space-5); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md); max-width: 620px; }
.fb-head { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.fb-head svg { width: 44px; height: 44px; display: block; }
.fb-q { font-size: 21px; line-height: 1.2; }
.fb-sub { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); }
.fb-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fb-row .bv-btn[aria-pressed="true"] { background: var(--ink); color: var(--field); border-color: var(--ink); opacity: 1; cursor: default; }
.fb-row .bv-btn[aria-pressed="false"][disabled] { opacity: 0.45; }
.fb-form { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); font-family: var(--sans); }
.fb-form label { font-size: 14px; font-weight: 600; margin-top: var(--space-2); }
.fb-form textarea { resize: vertical; min-height: 84px; }
.fb-thanks { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.fb-actions { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.fb-status { font-size: 14px; color: var(--ink-muted); }
.fb-status.err { color: var(--decohered-text); }
.fb-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-note { font-family: var(--sans); font-size: 13px; color: var(--ink-muted); margin-top: var(--space-4); }

/* Footer: three quiet items, spread across the line; stacked on phones */
footer .wrap.foot { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3) var(--space-6); }
footer .foot a { color: var(--ink-muted); text-underline-offset: 3px; }
footer .foot a:hover { color: var(--ink); }
@media (max-width: 640px) { footer .wrap.foot { flex-direction: column; align-items: flex-start; gap: var(--space-2); } }

/* ---------- Header, v2: its own band, and capsules that say what's inside ----------
   The header sits on the raised surface (sheet), with a 4px indigo strip on top and a
   short saffron segment under the mark: the Ket's two colours, side by side, never blended. */
.site-header { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.site-header::before { --mx: max(var(--space-5), calc((100% - 1120px) / 2 + var(--space-5))); content: ""; display: block; height: 4px;
  background: linear-gradient(to right, var(--ground) 0 var(--mx), var(--excited) var(--mx) calc(var(--mx) + 34px), var(--ground) calc(var(--mx) + 34px)); }
.topbar { min-height: 80px; }
nav { gap: var(--space-2); align-items: center; }
nav a { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 16px 8px; border: 1px solid transparent; border-bottom: 1px solid transparent; border-radius: var(--radius-pill); background: var(--tint-ground); color: var(--ink); line-height: 1.15; transition: background 0.15s ease, border-color 0.15s ease; }
nav a:hover { border-color: var(--ink-muted); color: var(--ink); }
nav a .np-name { font-size: 15px; font-weight: 600; }
nav a .np-sub { font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink-muted); }
nav a[aria-current="page"] { background: var(--ground); border-color: var(--ground); color: var(--on-ground); }
nav a[aria-current="page"] .np-sub { color: var(--on-ground); opacity: 0.85; }
@media (max-width: 640px) {
  .site-header::before { --mx: var(--space-4); }
  .topbar { min-height: 0; padding-bottom: var(--space-3); }
  nav { gap: 6px; padding-bottom: 2px; }
  nav a { padding: 6px 12px 7px; }
  nav a .np-name { font-size: 14px; }
  nav a .np-sub { font-size: 11px; }
}
