/* ============================================================
   INTERVOLITION — brand guidelines document styles
   Every visual value reads from tokens.css. No hex here.
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; }
p { max-width: 65ch; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: var(--sp-2); z-index: 60;
  background: var(--accent); color: var(--surface-showcase);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-lg);
  font-weight: 700; text-decoration: none;
}
.skip:focus-visible { left: var(--sp-2); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: var(--sp-5) var(--sp-4);
  border-right: var(--border);
  background: var(--surface);
  display: flex; flex-direction: column; gap: var(--sp-5);
}
.sidebar-mark {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-display); font-weight: 800; letter-spacing: 0.02em;
}
.sidebar-mark img { width: 36px; height: 36px; border-radius: var(--r-md); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; gap: var(--sp-3); align-items: baseline;
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-2); text-decoration: none;
  font-size: var(--text-body-sm); border-radius: var(--r-lg);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav a .n { font-family: var(--font-mono); font-size: var(--text-caption); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--card); font-weight: 600; }
.sidebar-actions { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-2); }

.btn {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent); border: none;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--text-body-sm);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.btn:active { transform: scale(0.96); }
.btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.burger {
  display: none; position: fixed; top: var(--sp-3); right: var(--sp-3); z-index: 50;
}

/* ---------- Sections ---------- */
.sec { padding: var(--section-pad) clamp(var(--sp-4), 4vw, var(--sp-7)); border-top: var(--border); }
.sec--alt { background: var(--surface-2); }
.sec--showcase { background: var(--surface-showcase); }
.sec-inner { max-width: var(--max-w); margin-inline: auto; }
.sec-inner--wide { max-width: var(--max-w-wide); }

.sec-head { margin-bottom: var(--sp-6); }
.kicker {
  font-family: var(--font-mono); font-size: var(--text-label);
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-2);
  margin-bottom: var(--sp-2);
}
.kicker .status { color: var(--int-inactive); }
.sec-head h2 { font-family: var(--font-display); font-size: var(--text-h1); font-weight: 800; }
.sec-head .sub { color: var(--text-2); font-size: var(--text-body-lg); margin-top: var(--sp-3); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); align-items: start; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); align-items: start; }
.lede { font-size: var(--text-body-lg); }

/* ---------- Provenance & placeholders ---------- */
.prov {
  display: inline-block; font-family: var(--font-mono); font-size: var(--text-label);
  padding: 1px var(--sp-2); border-radius: var(--r-sm); vertical-align: middle;
}
.prov--context  { color: var(--int-active);    background: color-mix(in srgb, var(--int-active) 14%, transparent); }
.prov--derived  { color: var(--int-break);     background: color-mix(in srgb, var(--int-break) 14%, transparent); }
.prov--invented { color: var(--int-inactive);  background: color-mix(in srgb, var(--int-inactive) 16%, transparent); }

.placeholder {
  border: 2px dashed var(--int-inactive);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  color: var(--text);
  background: color-mix(in srgb, var(--int-inactive) 7%, transparent);
}
.placeholder strong { font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--int-inactive); }

/* ---------- Definition lists & spec tables ---------- */
.deflist { display: grid; gap: var(--sp-4); }
.deflist dt { font-weight: 700; font-family: var(--font-display); }
.deflist dd { color: var(--text-2); margin: 0; max-width: 60ch; }

.spec { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
.spec caption { text-align: left; font-family: var(--font-mono); font-size: var(--text-label); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); padding-bottom: var(--sp-3); }
.spec th { text-align: left; font-family: var(--font-mono); font-size: var(--text-label); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-2); font-weight: 500; padding: var(--sp-2) var(--sp-3); border-bottom: var(--border); }
.spec td { padding: var(--sp-3); border-bottom: var(--border); vertical-align: middle; }
.spec .mono, .mono { font-family: var(--font-mono); }
.pass { color: var(--int-active); font-weight: 600; }
.fail { color: var(--sem-halt); font-weight: 600; }

/* ---------- Principles: live demos ---------- */
.principles { display: grid; gap: var(--sp-5); counter-reset: pr; list-style: none; padding: 0; }
.principle {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--sp-5); align-items: center;
  border: var(--border); border-radius: var(--r-xl); padding: var(--sp-5);
  background: var(--card);
}
.principle h3 { font-family: var(--font-display); font-size: var(--text-h3); margin-bottom: var(--sp-2); }
.principle h3::before { counter-increment: pr; content: counter(pr, decimal-leading-zero) " · "; font-family: var(--font-mono); color: var(--text-2); font-size: var(--text-caption); }
.principle p { color: var(--text-2); font-size: var(--text-body-sm); }
.principle-demo { display: grid; place-items: center; min-height: 120px; }

/* ---------- The arc component ---------- */
.arc { width: var(--arc-size); height: var(--arc-size); }
.arc--lg { width: calc(var(--arc-size) * 1.4); height: calc(var(--arc-size) * 1.4); }
.arc--sm { width: calc(var(--arc-size) * 0.6); height: calc(var(--arc-size) * 0.6); }
.arc circle { fill: none; stroke-width: 6.667; } /* 10/150 of viewBox 100 */
.arc .track { stroke: var(--arc-track); }
.arc .fill  {
  stroke: var(--arc-fill); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  stroke-dasharray: 100; stroke-dashoffset: 25;
}
.arc-wrap { position: relative; display: inline-grid; place-items: center; }
.arc-wrap > .arc { grid-area: 1 / 1; }
.arc-wrap > .arc-num { grid-area: 1 / 1; font-family: var(--font-time); font-weight: 700; }

/* Autonomous fill loop — the cover ring breathes like the splash */
.js .arc--loop .fill { animation: arcfill 6s var(--ease-in-out) infinite; }
@keyframes arcfill {
  0%   { stroke-dashoffset: 100; }
  50%  { stroke-dashoffset: 8; }
  60%  { stroke-dashoffset: 8; }
  100% { stroke-dashoffset: 100; }
}

/* ---------- Cover ---------- */
.cover { min-height: 100vh; display: grid; align-items: center; border-top: none; }
.cover-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--sp-7); align-items: center; max-width: var(--max-w); margin-inline: auto; width: 100%; }
.cover-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--text-hero); letter-spacing: -0.01em;
}
.cover-tag { font-size: var(--text-body-lg); color: var(--text-2); margin-top: var(--sp-3); }
.cover-meta { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-2); margin-top: var(--sp-4); }
.toc { margin-top: var(--sp-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px var(--sp-5); }
.toc a { display: flex; gap: var(--sp-3); align-items: baseline; color: var(--text-2); text-decoration: none; padding: var(--sp-1) 0; font-size: var(--text-body-sm); }
.toc a:hover { color: var(--text); }
.toc .n { font-family: var(--font-mono); font-size: var(--text-caption); }
.cover-art { display: grid; place-items: center; }

/* ---------- Type-label pill (IntervalTypeLabel) ---------- */
.pillrow { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.typelabel {
  padding: 6px 12px; /* [context: .padding(h12,v6)] */
  border-radius: var(--r-lg);
  font-size: var(--text-body-sm); color: var(--text-2);
  background: transparent;
  transition: background var(--dur-normal) var(--ease-in-out), color var(--dur-normal) var(--ease-in-out);
  border: none;
}
.typelabel[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* ---------- Circular controls (CustomButton) ---------- */
.ctl {
  display: inline-grid; place-items: center; border-radius: var(--r-pill); border: none;
  width: var(--btn-md); height: var(--btn-md);
  background: color-mix(in srgb, var(--ctl-color, var(--sem-accent)) 20%, transparent);
  color: var(--ctl-color, var(--sem-accent));
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.ctl svg { width: 50%; height: 50%; fill: currentColor; }
.ctl:hover { background: color-mix(in srgb, var(--ctl-color, var(--sem-accent)) 30%, transparent); }
.ctl:active { transform: scale(0.92); }
.ctl--sm { width: var(--btn-sm); height: var(--btn-sm); }
.ctl--lg { width: var(--btn-lg); height: var(--btn-lg); }
.ctl--go     { --ctl-color: var(--sem-go); }
.ctl--halt   { --ctl-color: var(--sem-halt); }
.ctl--shift  { --ctl-color: var(--sem-shift); }
.ctl--silence { --ctl-color: var(--text); }
.ctlrow { display: flex; gap: var(--sp-4); align-items: center; flex-wrap: wrap; }
.ctl-caption { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); text-align: center; margin-top: var(--sp-2); }

/* ---------- Color section ---------- */
.swatch-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.swatch {
  border-radius: var(--r-xl); overflow: hidden; border: var(--border);
}
.swatch-chip { height: 110px; }
.swatch-meta { padding: var(--sp-3) var(--sp-4); background: var(--card); }
.swatch-meta .name { font-weight: 700; font-family: var(--font-display); }
.swatch-meta .val { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-2); }

.chip--accent    { background: var(--accent); }
.chip--po-orange { background: var(--po-orange); }
.chip--po-amber  { background: var(--po-amber); }
.chip--po-gold   { background: var(--po-gold); }
.chip--po-cream  { background: var(--po-cream); }
.chip--po-ink    { background: var(--po-ink); }
.chip--po-gray   { background: var(--po-gray); }
.chip--active    { background: var(--int-active); }
.chip--inactive  { background: var(--int-inactive); }
.chip--break     { background: var(--int-break); }
.chip--countdown { background: var(--int-countdown); }
.chip--halt      { background: var(--sem-halt); }
.chip--shift     { background: var(--sem-shift); }
.chip--gradient  { background: var(--gradient-interval); }
.chip--surface   { background: var(--field-black); }

.gradient-strip { height: 72px; border-radius: var(--r-md); background: var(--gradient-interval); }

/* Pairing demo cells */
.pair { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-weight: 600; display: inline-block; }

/* ---------- Typography section ---------- */
.type-espec { display: grid; gap: var(--sp-4); }
.type-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--sp-4); align-items: baseline; border-bottom: var(--border); padding-bottom: var(--sp-3); }
.type-row .meta { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); }
.tv-display { font-family: var(--font-display); font-weight: 800; }
.tv-time    { font-family: var(--font-time); font-weight: 700; }
.tv-body    { font-family: var(--font-body); }

.time-demo { font-family: var(--font-time); font-weight: 700; font-size: var(--text-time-lg); line-height: 1; font-variant-numeric: tabular-nums; }
.time-demo--md { font-size: var(--text-time-md); }

/* ---------- Do / Don't ---------- */
.dosdonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.dd { border-radius: var(--r-xl); border: var(--border); overflow: hidden; }
.dd h3 { font-family: var(--font-mono); font-size: var(--text-label); letter-spacing: 0.12em; text-transform: uppercase; padding: var(--sp-3) var(--sp-4); }
.dd--do h3 { color: var(--int-active); background: color-mix(in srgb, var(--int-active) 10%, transparent); }
.dd--dont h3 { color: var(--sem-halt); background: color-mix(in srgb, var(--sem-halt) 10%, transparent); }
.dd ul { margin: 0; padding: var(--sp-4) var(--sp-5); display: grid; gap: var(--sp-2); }
.dd li { color: var(--text-2); font-size: var(--text-body-sm); }
.dd li::marker { color: var(--text-2); }

/* ---------- Logo section ---------- */
.mark-stage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.mark-tile { border: var(--border); border-radius: var(--r-xl); display: grid; place-items: center; padding: var(--sp-5); min-height: 180px; }
.mark-tile img { width: 120px; height: 120px; border-radius: 22.5%; } /* iOS squircle approximation */
.mark-tile--cream { background: var(--po-cream); }
.mark-tile--gradient { background: var(--gradient-interval); }
.mark-tile figcaption { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); margin-top: var(--sp-3); text-align: center; }
.mark-tile figure { margin: 0; display: grid; justify-items: center; }
.clearspace { position: relative; display: inline-block; padding: 30px; border: 1px dashed var(--text-2); }
.clearspace img { width: 120px; height: 120px; border-radius: 22.5%; }
.clearspace .cs-note { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); }

/* ---------- Iconography ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.icon-cell { border: var(--border); border-radius: var(--r-md); padding: var(--sp-4); display: grid; gap: var(--sp-2); justify-items: center; }
.icon-cell svg { width: 28px; height: 28px; fill: currentColor; }
.icon-cell .lbl { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); text-align: center; }

/* ---------- Sounds ---------- */
.soundlist { columns: 4; gap: var(--sp-5); font-family: var(--font-mono); font-size: var(--text-body-sm); color: var(--text-2); list-style: none; padding: 0; }
.soundlist li { padding: var(--sp-1) 0; break-inside: avoid; }
.soundlist .cue { color: var(--text); font-weight: 600; }

/* ---------- Device frame (08 composite) ---------- */
.device {
  width: min(320px, 100%); margin-inline: auto;
  border: 8px solid var(--card); border-radius: 44px;
  background: var(--surface-showcase);
  padding: var(--sp-6) var(--sp-4); display: grid; gap: var(--sp-5);
  justify-items: center; min-height: 560px; align-content: space-between;
}
.device .statusbar { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); width: 100%; display: flex; justify-content: space-between; }

/* ---------- Motion section ---------- */
.timeline { display: grid; gap: var(--sp-3); }
.tl-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--sp-4); align-items: center; }
.tl-row .lbl { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-2); }
.tl-track { position: relative; height: 22px; background: var(--surface-2); border-radius: var(--r-sm); }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 45%, transparent); }
.tl-bar--fill { left: 0; width: 87.5%; }
.tl-bar--name { left: 25%; width: 25%; background: color-mix(in srgb, var(--int-active) 45%, transparent); }
.tl-bar--dismiss { left: 87.5%; width: 12.5%; background: color-mix(in srgb, var(--int-countdown) 45%, transparent); }

.splash-demo { display: grid; place-items: center; gap: var(--sp-4); padding: var(--sp-6); background: var(--surface-showcase); border-radius: var(--r-xl); }
.splash-demo .splash-name { font-family: var(--font-display); font-weight: 800; font-size: var(--text-h2); opacity: 1; }
.js .splash-demo.play .fill { animation: splashfill var(--dur-fill) var(--ease-in-out) forwards; }
.js .splash-demo.play .splash-name { animation: namein var(--dur-slow) var(--ease-in-out) 1s backwards; }
@keyframes splashfill { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes namein { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

.easing-demo { display: grid; gap: var(--sp-3); }
.easing-lane { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: var(--sp-4); align-items: center; }
.easing-lane .lbl { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-2); }
.easing-track { height: 34px; background: var(--surface-2); border-radius: var(--r-pill); position: relative; }
.easing-dot { position: absolute; top: 5px; left: 5px; width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--accent); }
.js .play .easing-dot { animation-name: slide; animation-fill-mode: forwards; }
.js .play .easing-dot--inout { animation-duration: var(--dur-normal); animation-timing-function: var(--ease-in-out); }
.js .play .easing-dot--out { animation-duration: var(--dur-slow); animation-timing-function: var(--ease-out); }
.js .play .easing-dot--fast { animation-duration: var(--dur-fast); animation-timing-function: var(--ease-out); }
@keyframes slide { to { left: calc(100% - 29px); } }

/* ---------- Layout section ---------- */
.container-diagram { display: grid; gap: var(--sp-2); }
.cd-bar { height: 34px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 22%, transparent); display: flex; align-items: center; padding-inline: var(--sp-3); font-family: var(--font-mono); font-size: var(--text-label); color: var(--text); }
.cd-bar--narrow { width: 52%; }
.cd-bar--default { width: 78%; }
.cd-bar--wide { width: 100%; }
.space-ruler { display: flex; align-items: flex-end; gap: var(--sp-3); }
.space-step { background: color-mix(in srgb, var(--int-active) 30%, transparent); border-radius: var(--r-sm) var(--r-sm) 0 0; width: var(--sp-6); }
.space-step span { display: block; transform: translateY(calc(100% + 4px)); font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); text-align: center; }

.radius-grid { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.radius-cell { width: 108px; height: 82px; border: 2px solid var(--accent); display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.radius-cell--sm { border-radius: var(--r-sm); }
.radius-cell--md { border-radius: var(--r-md); }
.radius-cell--lg { border-radius: var(--r-lg); }
.radius-cell--xl { border-radius: var(--r-xl); }
.radius-cell--pill { border-radius: var(--r-pill); }

/* ---------- Voice ---------- */
.voice-samples { display: grid; gap: var(--sp-4); }
.voice-card { border-left: 3px solid var(--accent); padding: var(--sp-3) var(--sp-5); background: var(--card); border-radius: 0 var(--r-md) var(--r-md) 0; }
.voice-card .ctx { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); text-transform: uppercase; letter-spacing: 0.1em; }
.voice-card blockquote { margin: var(--sp-2) 0 0; font-size: var(--text-body-lg); }
.vocab { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-5); }

/* ---------- AI policy ---------- */
.stance { font-family: var(--font-display); font-size: var(--text-h2); font-weight: 800; max-width: 24ch; }

/* ---------- Ecosystem ---------- */
.eco { display: grid; gap: var(--sp-3); }
.eco-node { border: var(--border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); display: flex; justify-content: space-between; gap: var(--sp-4); align-items: baseline; }
.eco-node .rel { font-family: var(--font-mono); font-size: var(--text-label); color: var(--text-2); }
.eco-node--child { margin-left: var(--sp-6); }

/* ---------- Invitation zones (interview scaffolding) ---------- */
.invite {
  border: 1px dashed var(--text-2); border-radius: var(--r-md);
  padding: var(--sp-4); color: var(--text-2);
  font-family: var(--font-mono); font-size: var(--text-caption);
}
.js .invite { opacity: 0; }
.js .invite.vis { animation: invitefade var(--dur-slow) var(--ease-out) 2s forwards; }
@keyframes invitefade { to { opacity: 1; } }

/* ---------- Scroll reveal — js-gated, fails visible ---------- */
.rv { /* visible by default; JS opts in */ }
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js .rv.vis { opacity: 1; transform: none; }
.js .rv-d1.vis { transition-delay: 80ms; }
.js .rv-d2.vis { transition-delay: 160ms; }
.js .rv-d3.vis { transition-delay: 240ms; }
.js .rv-d4.vis { transition-delay: 320ms; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .invite { opacity: 1; animation: none; }
  .js .arc--loop .fill,
  .js .splash-demo.play .fill,
  .js .splash-demo.play .splash-name,
  .js .play .easing-dot { animation: none; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-102%); transition: transform var(--dur-normal) var(--ease-in-out); box-shadow: var(--sh-none); }
  .sidebar.open { transform: none; }
  .burger { display: inline-grid; }
  .duo, .trio, .dosdonts, .vocab, .swatch-row, .mark-stage { grid-template-columns: 1fr; }
  .cover-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .principle { grid-template-columns: 1fr; }
  .icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soundlist { columns: 2; }
  .toc { grid-template-columns: 1fr; }
  .type-row { grid-template-columns: 1fr; gap: var(--sp-1); }
}

/* ---------- Print ---------- */
@media print {
  /* Remap the surface/text tokens to the light set so every page reads
     on paper — the dark skin is a screen phenomenon. */
  :root {
    --surface: var(--po-cream);
    --surface-2: var(--po-cream);
    --surface-showcase: var(--po-cream);
    --card: var(--po-cream);
    --text: var(--po-ink);
    --text-2: var(--po-gray);
    --line: var(--po-gray);
    --arc-track: rgba(28, 25, 23, 0.15);
  }
  .sidebar, .burger, .skip, .invite, [data-alt-toggle], .replay { display: none !important; }
  .shell { display: block; }
  .sec { break-before: page; border-top: none; padding: 1.2cm 0; }
  .cover { min-height: auto; break-before: auto; }
  .rv, .js .rv { opacity: 1 !important; transform: none !important; }
  body { background: none; }
  .swatch-chip, .gradient-strip, .pair, .chip--surface, .mark-tile,
  .typelabel[aria-pressed="true"], .ctl, .radius-cell, .tl-bar,
  .cd-bar, .space-step {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  a { color: inherit; text-decoration: none; }
}
