/* ============================================================================
   Sections: hero · beacon scene · flow bench · library · squad · yours · more · download
   ========================================================================== */

[data-k='exam'] { --bc: var(--b-exam); }
[data-k='define'] { --bc: var(--b-define); }
[data-k='question'] { --bc: var(--b-question); }
[data-k='example'] { --bc: var(--b-example); }
[data-k='todo'] { --bc: var(--b-todo); }

/* ------------------------------------------------------------------ shared: ruled trio / list (no cards) */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin-top: clamp(56px, 8vw, 110px); }
.trio li { padding-top: 22px; border-top: 1px solid var(--border-strong); }
.trio .g-lg, .ruled .g-lg { color: var(--accent); margin-bottom: 14px; }
.trio h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 8px; }
.trio p { color: var(--text-dim); font-size: 0.98rem; max-width: 30em; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; gap: 36px; } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); padding-block: 16px 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.hero-copy .h1 { font-size: clamp(2.7rem, 0.5rem + 4.7vw, 5.1rem); line-height: 1; }
.hero-copy .lede { margin-top: 24px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 30px; }
.cta-center { justify-content: center; }
.hero-copy .fine { margin-top: 22px; }
.hero-stage { min-width: 0; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; border-radius: 50%;
  color: var(--text-faint); border: 1px solid var(--border); text-decoration: none; animation: cue 2.6s ease-in-out infinite;
  transition: color 0.2s, border-color 0.2s;
}
.scroll-cue:hover { color: var(--text); border-color: var(--border-strong); }
@keyframes cue { 50% { transform: translateY(6px); } }

/* ------------------------------------------------------------------ beacon scene (pinned, scroll-driven) */
.scene-track { position: relative; height: 400vh; }
.scene-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--nav-h); }
.scene-grid { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.scene-copy .lede { margin-top: 20px; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.18rem); }
.legend { margin-top: 26px; }
.legend li {
  display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border);
  opacity: 0.42; transition: opacity 0.5s var(--ease);
}
.legend li:last-child { border-bottom: 1px solid var(--border); }
.legend li.is-on { opacity: 1; }
.legend kbd { justify-self: start; border-color: color-mix(in srgb, var(--bc) 70%, var(--border-strong)); background: color-mix(in srgb, var(--bc) 18%, var(--surface-2)); transition: transform 0.4s var(--spring); }
.legend li.is-now kbd { transform: scale(1.12) rotate(-3deg); }
.lg-name { font-weight: 600; }
.lg-ink { font-size: 0.88rem; color: var(--text-faint); }

.scene-art { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sheet-a { transform: translateX(var(--ax, 0px)) rotate(-1.2deg); will-change: transform; }
.sheet-b { opacity: var(--bo, 0); transform: rotate(1.4deg) translateY(calc((1 - var(--bo, 0)) * 16px)); will-change: transform, opacity; }
.sheet-b .page::before { display: none; }
.sheet-a .editor { padding-top: 10px; }
.scene-caption { grid-column: 1 / -1; text-align: center; margin-top: 18px; min-height: 1.3em; font-family: var(--font-hand); font-weight: 600; font-size: 1.75rem; line-height: 1.1; color: var(--accent); transition: opacity 0.35s; }
.scene-caption.swap { opacity: 0; }

.cheat { padding: 12px 20px 16px; display: grid; gap: 2px; font-family: var(--font-serif); }
.cheat-g { --bc: var(--b-exam); }
.cheat-g h4 { display: flex; align-items: center; gap: 8px; font: 700 0.95rem/1.2 var(--font-display); letter-spacing: -0.01em; color: color-mix(in srgb, var(--bc) 78%, var(--paper-text)); margin-top: 8px; }
.cheat-g h4 .g { width: 1.1em; height: 1.1em; }
.cheat-it { margin: 2px 0 6px 0; font-size: 0.98rem; line-height: 1.4; will-change: transform, opacity; }
.cheat-it::before { display: none !important; }
.cheat-it .ink { }

/* ------------------------------------------------------------------ flow bench */
.bench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.bench-tier { display: flex; align-items: baseline; gap: 18px; }
.bench-tier-name { font: 800 clamp(3.4rem, 1.4rem + 6vw, 6rem)/0.9 var(--font-display); letter-spacing: -0.05em; color: var(--tier-color); transition: color 0.4s; text-shadow: 0 0 calc(var(--flow) * 40px) color-mix(in srgb, var(--tier-color) 55%, transparent); }
.bench-mult { font: 600 1.15rem var(--font-mono); color: var(--text-faint); }
.bench-gauge { --c: 0%; position: relative; height: 20px; margin: 38px 0 46px; border-radius: 99px; background: var(--code-bg); box-shadow: inset 0 0 0 1px var(--border); }
.bench-fill {
  position: absolute; inset: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--t1) 0%, var(--t1) 12%, var(--t2) 38%, var(--t3) 68%, var(--t4) 96%);
  clip-path: inset(0 calc(100% - var(--c)) 0 0 round 99px); transition: clip-path 0.28s linear;
}
[data-tier='2'] .bench-fill, [data-tier='3'] .bench-fill, [data-tier='4'] .bench-fill { filter: drop-shadow(0 0 9px color-mix(in srgb, var(--tier-color) 85%, transparent)); }
.bench-gauge .seg { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--bg); }
.bench-gauge .seg em { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 0.86rem; color: var(--text-faint); white-space: nowrap; transition: color 0.3s; }
.bench-gauge .seg.hit em { color: var(--text); font-weight: 600; }
.bench-hint { color: var(--text-dim); min-height: 1.6em; }
.verdicts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; min-height: 92px; align-content: flex-start; }
.verdicts li { padding: 5px 12px; border-radius: 99px; font-size: 0.94rem; background: var(--surface-2); border: 1px solid var(--border); animation: chip-in 0.45s var(--spring) both; }
.verdicts li small { margin-left: 6px; font-family: var(--font-mono); font-size: 0.74rem; }
.verdicts li.ok small { color: color-mix(in srgb, var(--b-define) 70%, var(--text)); }
.verdicts li.no { color: var(--text-faint); background: transparent; border-style: dashed; }
.verdicts li.no span { text-decoration: line-through; text-decoration-color: var(--accent); }
.verdicts li.no small { color: var(--accent); }
@keyframes chip-in { from { transform: translateY(8px) scale(0.8); opacity: 0; } }

.sheet-plain { --pad-l: 70px; }
.sheet-plain .page::before { left: 54px; }
.bench-input {
  display: block; width: 100%; height: calc(var(--lh) * 7 + 22px); border: 0; outline: 0; resize: none; background-color: transparent; color: var(--paper-text); caret-color: var(--tier-color, var(--accent));
  font-family: var(--font-serif); font-size: 1.24rem; line-height: var(--lh); padding: 8px 22px 14px var(--pad-l);
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--paper-rule) calc(var(--lh) - 1px)); background-size: 100% var(--lh); background-position: 0 8px; background-attachment: local;
}
.bench-input::placeholder { color: var(--paper-faint); }
.bench-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
.bench-actions .btn { padding: 0.75em 1.15em; font-size: 0.95rem; }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; font-size: 0.95rem; color: var(--text-dim); user-select: none; }
.toggle .g { color: var(--text-faint); transition: color 0.2s; }
.toggle[aria-pressed='true'] { color: var(--text); }
.toggle[aria-pressed='true'] .g { color: var(--accent); }
.toggle i { width: 34px; height: 20px; border-radius: 99px; background: var(--code-bg); box-shadow: inset 0 0 0 1px var(--border-strong); position: relative; transition: background-color 0.25s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-faint); transition: transform 0.3s var(--spring), background-color 0.25s; }
.toggle[aria-pressed='true'] i { background: var(--accent-soft); }
.toggle[aria-pressed='true'] i::after { transform: translateX(14px); background: var(--accent); }

/* ------------------------------------------------------------------ library */
.timetable { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: clamp(30px, 5vw, 56px); }
.timetable li { display: grid; gap: 1px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); transition: transform 0.45s var(--spring), border-color 0.3s, background-color 0.3s; }
.timetable b { font: 650 0.98rem var(--font-display); letter-spacing: -0.01em; }
.timetable span { font: 500 0.8rem var(--font-mono); color: var(--text-faint); }
.timetable em { font-style: normal; color: var(--text-dim); font-size: 0.92rem; }
.timetable li.now { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-4px); }

.shelf-wrap { position: relative; perspective: 1500px; perspective-origin: 50% 40%; padding-top: 96px; }
.shelf-3d { position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, -7deg)); transition: transform 0.6s var(--ease-out); }
.shelf { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 0 28px; transform-style: preserve-3d; }
.plank {
  position: relative; height: 30px; margin-top: -2px; border-radius: 5px; transform: translateZ(18px);
  background: repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.05) 0 3px, transparent 3px 11px), linear-gradient(#b0804f, #85592f 62%, #5c3c1f);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 28px 30px -14px rgba(0, 0, 0, 0.5);
}
.binder {
  --bw: 84px; --h: 282px; --th: 34px;
  position: relative; width: var(--bw); height: var(--h); padding: 12px 0 12px; margin: 0; border: 0; cursor: pointer; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 7px 7px 3px 3px; color: #1d1308; transform-style: preserve-3d; transform: translateZ(0);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bc) 72%, #000) 0, var(--bc) 14%, color-mix(in srgb, var(--bc) 84%, #fff) 52%, var(--bc) 86%, color-mix(in srgb, var(--bc) 74%, #000) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 -26px 30px -22px rgba(0, 0, 0, 0.35);
  transition: transform 0.55s var(--spring), filter 0.3s;
}
.binder::before, .binder::after { content: ''; position: absolute; top: 0; bottom: 0; width: var(--th); backface-visibility: hidden; }
.binder::after { /* the page block on the right */
  left: 100%; transform-origin: 0 50%; transform: rotateY(90deg);
  background: repeating-linear-gradient(180deg, #f7efde 0 2px, #e3d6bb 2px 3px); border-radius: 0 2px 2px 0; box-shadow: inset -6px 0 8px rgba(0, 0, 0, 0.12);
}
.binder::before { /* the cover edge on the left */
  right: 100%; transform-origin: 100% 50%; transform: rotateY(-90deg);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bc) 55%, #000), color-mix(in srgb, var(--bc) 78%, #000)); border-radius: 2px 0 0 2px;
}
.binder:hover, .binder:focus-visible, .binder.pulled { transform: translateZ(34px) translateY(-18px); filter: brightness(1.06); }
.binder .g { width: 26px; height: 26px; stroke-width: 2; margin-top: 6px; color: #1d1308; opacity: 0.88; }
.b-band { align-self: stretch; height: 12px; margin-top: -12px; background: linear-gradient(rgba(255, 255, 255, 0.7) 0 3px, transparent 3px 6px, rgba(255, 255, 255, 0.7) 6px 9px); opacity: 0.9; }
.b-band-low { margin-top: 0; margin-bottom: -12px; order: 9; }
.b-title { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 1.34rem/1 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; flex: 1; text-align: left; display: flex; align-items: center; margin-bottom: 2px; }
.b-code { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 0.74rem var(--font-mono); opacity: 0.7; white-space: nowrap; margin-bottom: 14px; }
.b-count { position: absolute; top: -12px; right: -10px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font: 700 0.82rem var(--font-mono); font-style: normal; background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 2px var(--bg), 0 6px 12px -4px rgba(0, 0, 0, 0.4); transform: translateZ(2px) scale(0); transition: transform 0.4s var(--spring); }
.shelf-scene.in .b-count, .rm .b-count { transform: translateZ(2px) scale(1); }
.b-count.bump { animation: count-bump 0.6s var(--spring); }
@keyframes count-bump { 40% { transform: translateZ(2px) scale(1.5); background: var(--accent); color: var(--accent-ink); } }
.binder-new { flex: none; width: 66px; height: 236px; border: 2px dashed var(--border-strong); border-radius: 8px; display: grid; place-items: center; font: 300 2rem var(--font-ui); color: var(--text-faint); }
.binder.glow { animation: binder-glow 1.1s var(--ease-out); }
@keyframes binder-glow { 30% { filter: brightness(1.18) drop-shadow(0 0 22px var(--bc)); transform: translateZ(26px) translateY(-12px); } }

.filing { position: absolute; left: 0; top: 0; width: 132px; pointer-events: none; opacity: 0; z-index: 4; will-change: transform, opacity; }
.filing-sheet {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 6px; background: var(--paper-bg); color: var(--paper-text); font-size: 0.86rem;
  box-shadow: 0 0 0 1px var(--paper-edge), 0 18px 28px -10px rgba(0, 0, 0, 0.5); background-image: linear-gradient(to bottom, transparent 15px, var(--paper-rule) 15px); background-size: 100% 16px;
}
.filing-sheet b { font: 700 0.95rem var(--font-display); letter-spacing: -0.01em; }
.filing-sheet span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--paper-dim); }
.shelf-caption { margin-top: 26px; text-align: center; font-family: var(--font-hand); font-weight: 600; font-size: 1.75rem; color: var(--accent); min-height: 1.2em; }

/* ------------------------------------------------------------------ squad */
.send { display: grid; gap: clamp(26px, 4vw, 44px); }
.send-ctl { display: inline-flex; gap: 4px; padding: 4px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--border); justify-self: start; }
.send-ctl button { padding: 11px 20px; border: 0; background: none; border-radius: 11px; font-weight: 600; font-size: 0.98rem; cursor: pointer; color: var(--text-dim); transition: color 0.25s, background-color 0.25s, transform 0.3s var(--spring); }
.send-ctl button:hover { color: var(--text); }
.send-ctl button[aria-checked='true'] { color: var(--accent-ink); background: var(--accent); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.send-art { display: grid; grid-template-columns: minmax(0, 1fr) clamp(70px, 12vw, 150px) minmax(0, 1fr); align-items: center; }
.send-art .sheet-mini:first-child { transform: rotate(-1deg); }
.send-art .sheet-mini:last-child { transform: rotate(1deg); }
.wire { position: relative; height: 110px; display: grid; place-items: center; }
.wire-line { position: absolute; left: -6px; right: -6px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 7px, transparent 7px 14px); background-size: 14px 2px; }
.wire.active .wire-line { background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 14px); animation: wire-run 0.5s linear infinite; }
@keyframes wire-run { to { background-position: 14px 0; } }
.wire-cipher { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font: 600 0.74rem var(--font-mono); color: var(--accent); white-space: nowrap; opacity: 0; transition: opacity 0.3s; }
.wire.active .wire-cipher { opacity: 1; }
.wire-lock { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border-strong); color: var(--text-dim); transition: color 0.3s, border-color 0.3s, transform 0.5s var(--spring); }
.wire.active .wire-lock { color: var(--accent); border-color: var(--accent); transform: scale(1.12); }
.sig { font-family: var(--font-hand); font-size: 1.4rem; color: var(--paper-dim); margin-top: 6px; transition: opacity 0.4s; }
.sig b { font-weight: 700; color: var(--paper-text); }
.send[data-mode='anon'] #sigLine span { text-decoration: line-through; text-decoration-color: var(--accent); opacity: 0.55; }
.cipher { font-family: var(--font-mono); color: var(--accent); letter-spacing: 0.02em; }
.thanks { position: absolute; right: 18px; bottom: -22px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface-3); color: var(--text); font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px) scale(0.9); transition: opacity 0.4s, transform 0.5s var(--spring); }
.thanks .g { color: var(--b-todo); fill: var(--b-todo); }
.thanks.on { opacity: 1; transform: none; }
#sendTo { position: relative; }

.serverview { position: relative; max-width: 560px; padding: 20px 24px 22px; background: var(--paper-bg); color: var(--paper-text); border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge), var(--shadow); transform: rotate(0.5deg); background-image: linear-gradient(to bottom, transparent 31px, var(--paper-rule) 31px); background-size: 100% 32px; background-position: 0 42px; }
.serverview-h { font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; line-height: 1; margin-bottom: 14px; color: var(--paper-text); }
.serverview dl { margin: 0; display: grid; }
.serverview dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; min-height: 32px; align-items: center; font-family: var(--font-mono); font-size: 0.84rem; }
.serverview dt { color: var(--paper-faint); }
.serverview dd { margin: 0; transition: opacity 0.3s; overflow-wrap: anywhere; }
.serverview dd.mono { color: var(--accent); }

.live { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: clamp(64px, 9vw, 130px); padding-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--border-strong); }
.live-copy p { margin-top: 14px; color: var(--text-dim); max-width: 28em; }
.roster li { display: grid; grid-template-columns: 50px minmax(0, 1fr) minmax(70px, 150px) 78px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.roster li:first-child { border-top: 1px solid var(--border); }
.roster .nib-slot { width: 44px; position: static; }
.r-name { font-weight: 600; line-height: 1.2; }
.r-tier { display: block; font-size: 0.88rem; font-weight: 500; color: var(--tier-color); transition: color 0.4s; }
.r-bar { height: 8px; border-radius: 99px; background: var(--code-bg); overflow: hidden; }
.r-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: var(--tier-color); transition: width 0.9s var(--ease), background-color 0.4s; box-shadow: 0 0 10px color-mix(in srgb, var(--tier-color) 70%, transparent); }
.r-wpm { text-align: right; font: 600 0.9rem var(--font-mono); color: var(--text-dim); }
.roster li.off { opacity: 0.55; }
.roster li.off .r-tier { color: var(--text-faint); }
.roster li.off .r-bar i { box-shadow: none; }

/* ------------------------------------------------------------------ yours */
.yours-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.yours-copy { position: sticky; top: calc(var(--nav-h) + 40px); }
.yours-copy .lede { margin-top: 22px; }
.nib-stage { margin-top: clamp(24px, 5vw, 56px); display: grid; place-items: start; }
.nib-big { position: relative; width: 168px; }
.opt { padding: 20px 0 22px; border-top: 1px solid var(--border); }
.opt:last-child { border-bottom: 1px solid var(--border); }
.opt legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; font: 650 1.02rem var(--font-display); letter-spacing: -0.01em; display: flex; justify-content: space-between; gap: 12px; }
.opt legend + * { clear: both; }
.opt-val { font: 500 0.9rem var(--font-ui); color: var(--text-faint); letter-spacing: 0; }
.swatches, .chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { position: relative; width: 40px; height: 40px; border: 0; padding: 0; border-radius: 50%; cursor: pointer; flex: none; box-shadow: 0 0 0 1px var(--border-strong); transition: transform 0.35s var(--spring), box-shadow 0.25s; overflow: hidden; }
.sw:hover { transform: scale(1.14) rotate(-4deg); }
.sw[aria-checked='true'] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.sw-theme { background: linear-gradient(135deg, var(--sw-bg) 0 54%, var(--sw-paper) 54% 100%); }
.sw-theme::after { content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--sw-accent); box-shadow: 0 0 0 2px var(--sw-bg); }
.sw-paper { width: 36px; height: 44px; border-radius: 6px; background-color: var(--sw-bg); background-image: linear-gradient(to bottom, transparent 8px, var(--sw-rule) 8px); background-size: 100% 9px; }
.sw-paper::after { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px; background: var(--sw-margin); }
.sw-skin { background: radial-gradient(circle at 32% 26%, var(--sa), var(--sb) 55%, var(--sc)); }
.sw-accent { background: var(--sw-bg); }
.sw-custom { background: conic-gradient(#ff5a36, #ffc83d, #38e5a5, #5bb8ff, #9b6bff, #ff5da2, #ff5a36); }
.sw-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chip { padding: 9px 15px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; font-weight: 500; font-size: 0.94rem; color: var(--text-dim); transition: background-color 0.2s, color 0.2s, transform 0.3s var(--spring); }
.chip:hover { color: var(--text); transform: translateY(-1px); }
.chip[aria-checked='true'] { background: var(--text); color: var(--bg); border-color: transparent; }

/* ------------------------------------------------------------------ more */
.ruled { border-bottom: 1px solid var(--border-strong); }
.ruled li { display: grid; grid-template-columns: 56px minmax(150px, 0.7fr) minmax(0, 2fr); gap: 8px clamp(18px, 3vw, 40px); align-items: baseline; padding: clamp(22px, 3vw, 34px) 0; border-top: 1px solid var(--border-strong); }
.ruled .g-lg { margin: 0; align-self: start; }
.ruled h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); font-weight: 650; letter-spacing: -0.025em; }
.ruled p { color: var(--text-dim); max-width: 38em; }
@media (max-width: 720px) { .ruled li { grid-template-columns: 44px 1fr; } .ruled p { grid-column: 2; } }

/* ------------------------------------------------------------------ download */
.dl { text-align: center; overflow: hidden; padding-block: clamp(100px, 14vw, 200px) clamp(110px, 15vw, 210px); }
.dl::before { content: ''; position: absolute; left: 50%; bottom: -34%; width: min(1400px, 140vw); aspect-ratio: 1.5; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 24%, transparent), transparent); pointer-events: none; }
.dl-in { position: relative; display: grid; justify-items: center; gap: 22px; }
.h-dl { font-size: clamp(3.1rem, 0.8rem + 8.6vw, 8rem); line-height: 0.92; letter-spacing: -0.05em; }
.dl .lede { margin-inline: auto; }
.dl-nib .nib-slot { width: clamp(130px, 17vw, 184px); }
.dl .cta-row { margin-top: 10px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy .h1 { font-size: clamp(2.7rem, 1rem + 8vw, 4.6rem); }
  .bench, .live, .yours-grid { grid-template-columns: 1fr; }
  .yours-copy { position: static; }
  .scroll-cue { display: none; }
  .timetable { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .timetable li { padding: 10px 8px; }
  .timetable em { font-size: 0.78rem; }
}
@media (max-width: 860px) {
  .scene-track { height: 380vh; }
  .scene-grid { grid-template-columns: 1fr; gap: 18px; align-content: center; }
  .scene-copy .lede, .legend { display: none; }
  .scene-copy .h2 { font-size: clamp(1.9rem, 1rem + 4.4vw, 2.6rem); }
  .scene-art { grid-template-columns: 1fr; }
  .sheet-a, .sheet-b { grid-area: 1 / 1; }
  .sheet-b { margin-top: 28px; margin-left: 8%; }
  .scene-caption { grid-area: 2 / 1; font-size: 1.5rem; margin-top: 10px; }
  .scene-stage { padding-top: calc(var(--nav-h) + 6px); }
}
@media (max-width: 720px) {
  .send-art { grid-template-columns: 1fr; gap: 8px; }
  .wire { height: 74px; }
  .wire-line { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--border-strong) 0 7px, transparent 7px 14px); }
  .wire.active .wire-line { background: repeating-linear-gradient(180deg, var(--accent) 0 7px, transparent 7px 14px); animation: none; }
  .wire-cipher { top: 50%; left: calc(50% + 34px); transform: translateY(-50%); }
  .roster li { grid-template-columns: 44px minmax(0, 1fr) 70px; }
  .roster .r-bar { display: none; }
  .serverview dl > div { grid-template-columns: 96px 1fr; }
  .shelf { gap: 8px; padding: 0 12px; }
  .binder { --bw: 52px; --h: 214px; --th: 22px; }
  .binder .g { width: 20px; height: 20px; }
  .b-title { font-size: 1rem; }
  .b-code { font-size: 0.62rem; }
  .binder:nth-child(n + 6):not(.binder-new) { display: none; }
  .binder-new { width: 40px; height: 180px; }
  .shelf-wrap { padding-top: 78px; }
}

/* ------------------------------------------------------------------ reduced motion: the scene is simply its final state */
:is(.rm, .no-js) .scene-track { height: auto; }
:is(.rm, .no-js) .scene-stage { position: static; height: auto; padding-block: clamp(72px, 10vw, 140px); }
:is(.rm, .no-js) .scene-art { --bo: 1; --ax: 0px; }
:is(.rm, .no-js) .cheat-it { opacity: 1 !important; transform: none !important; }

/* ------------------------------------------------------------------ the crate */
.crate-btn { margin-top: 14px; font-size: 0.98rem; }
.ruled .tip {
  margin-top: 16px; max-width: 32em; padding: 14px 20px 14px 30px; color: #2b2118; background: #fff6df; border-radius: 4px;
  font: 500 1.08rem/1.45 var(--font-serif); position: relative; transform-origin: 0 0; --rot: -0.8deg;
  box-shadow: 0 14px 28px -12px rgba(40, 24, 8, 0.45), 0 2px 4px rgba(40, 24, 8, 0.16);
  -webkit-mask: radial-gradient(circle 4.5px at 0 50%, #0000 97%, #000) 0 0 / 14px 14px repeat-y, linear-gradient(#000, #000) 12px 0 / calc(100% - 12px) 100% no-repeat;
  mask: radial-gradient(circle 4.5px at 0 50%, #0000 97%, #000) 0 0 / 14px 14px repeat-y, linear-gradient(#000, #000) 12px 0 / calc(100% - 12px) 100% no-repeat;
}
.ruled .tip:not([hidden]) { animation: tip-in 0.7s var(--spring) both; }
.ruled .tip b { display: block; font: 700 1.25rem/1 var(--font-hand); margin-bottom: 4px; color: #b3481f; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-14px) scale(0.86) rotate(-5deg); } to { opacity: 1; transform: rotate(var(--rot)); } }

/* a small tag next to a heading, and links inside the ruled list */
.tag { display: inline-block; margin-left: 10px; padding: 2px 11px; border-radius: 99px; border: 1px solid var(--border-strong); font: 500 0.8rem/1.5 var(--font-ui); letter-spacing: 0; color: var(--text-dim); vertical-align: 0.18em; white-space: nowrap; }
.ruled p a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 0.1em; text-underline-offset: 0.2em; }
.ruled p a:hover { text-decoration-style: wavy; }
