/* Open DJ, TWO DECKS build: components.
   Compositing rule that every component below obeys:
   - Text and line work sit in an element with class .ink (mix-blend-mode: difference), so it inverts
     against whichever deck is behind it.
   - No ancestor of an .ink element may create a stacking context (no transform, opacity, filter,
     z-index, isolation or will-change on wrappers). A stacking context isolates the blend and the ink
     would vanish on the white deck. Motion is applied to the .ink element itself, never to a wrapper.
   - Opaque chrome (nav, dock, mobile menu) paints its own copy of the two decks (--deck-split) and
     blends its ink against that.
   - Illustration objects (.obj) use normal blending and stay the same dark object on both decks. */

/* ---------- base ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{
  -webkit-text-size-adjust:100%;
  background:var(--deck-a);
  scroll-padding-top:calc(var(--nav-h) + 12px);
  scroll-padding-bottom:calc(var(--dock-h) + var(--safe-b) + 12px);
}
body{
  margin:0; background:transparent; color:var(--ink);
  font:400 16px/1.6 var(--font-body); letter-spacing:-0.005em;
  -webkit-font-smoothing:antialiased;
  /* reserve the docked fader's band, so the last line of every page clears it */
  padding-bottom:calc(var(--dock-h) + var(--safe-b));
}
img,svg,video,canvas{ max-width:100%; }
img,video{ height:auto; }
a{ color:inherit; text-decoration-color:currentColor; text-decoration-thickness:1px; text-underline-offset:3px; }
a:hover{ text-decoration-thickness:2px; }
:focus-visible{ outline:2px solid currentColor; outline-offset:3px; border-radius:2px; }
h1,h2,h3,h4{ margin:0; font-weight:500; text-wrap:balance; letter-spacing:-0.02em; }
p{ margin:0; }
code,kbd,pre{ font-family:var(--font-mono); font-size:0.9em; }
:not(pre)>code{ border:1px solid var(--line); border-radius:3px; padding:0.04em 0.34em; background:var(--panel); display:inline-block; max-width:100%; line-height:1.45; vertical-align:baseline; }
.skip{ position:absolute; left:-9999px; }
.skip:focus{ left:16px; top:16px; z-index:100; background:#fff; color:#000; padding:8px 12px; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

.wrap{ max-width:calc(var(--max) + 2 * var(--gutter)); margin-inline:auto; padding-inline:var(--gutter); }
.prose{ max-width:68ch; display:grid; gap:1em; }
.prose h2{ font-size:clamp(22px,2.6vw,28px); margin-top:1.1em; }
.prose h3{ font-size:18px; margin-top:0.5em; }
.prose ul,.prose ol{ margin:0; padding-left:1.2em; display:grid; gap:0.45em; }
.muted{ color:var(--ink-muted); }
.mono{ font-family:var(--font-mono); }
.num{ font-variant-numeric:tabular-nums; cursor:help; text-decoration:underline dotted; text-decoration-thickness:1px; text-underline-offset:4px; }
.eyebrow{ font:400 12px/1.4 var(--font-mono); letter-spacing:0.12em; text-transform:uppercase; color:var(--ink-muted); }
.display{
  font-family:var(--font-display); font-weight:800; font-stretch:150%; text-transform:uppercase;
  letter-spacing:-0.01em; line-height:0.92;
}

/* ---------- the stage: two decks and the split between them ---------- */
.stage{ position:fixed; inset:0; z-index:-1; pointer-events:none; background:var(--deck-split); }
.ink{ mix-blend-mode:difference; color:var(--ink); }
.obj{ mix-blend-mode:normal; }

/* ---------- deck tag: which deck a section belongs to ---------- */
.deck-tag{
  display:inline-flex; align-items:center; gap:10px;
  font:500 12px/1 var(--font-mono); letter-spacing:0.12em; text-transform:uppercase;
}
.deck-tag b{
  display:inline-grid; place-items:center; width:24px; height:24px; border-radius:2px;
  background:var(--ink); color:var(--knock); font:800 13px/1 var(--font-display); font-stretch:150%; letter-spacing:0;
}
.deck-tag.ab b{ width:auto; padding-inline:6px; }

/* ---------- nav (sticky; paints its own decks) ---------- */
.nav{
  position:sticky; top:0; z-index:40; background:var(--deck-split);
}
/* hairlines that must invert with the decks: a difference-blended pseudo-element, no wrapper context */
.nav::after,.hl-top::before{
  content:""; position:absolute; left:0; right:0; height:1px; background:var(--ink); mix-blend-mode:difference; opacity:.5;
}
.nav::after{ bottom:0; }
.hl-top{ position:relative; }
.hl-top::before{ top:0; opacity:1; }
.nav-row{ display:flex; align-items:center; gap:24px; height:var(--nav-h); }
.nav-menu{ display:contents; }
.brand{ display:inline-flex; align-items:center; gap:10px; text-decoration:none; flex:none; }
.brand svg{ width:24px; height:24px; display:block; overflow:visible; }
.brand-word{ font:800 15px/1 var(--font-display); font-stretch:150%; letter-spacing:0.02em; text-transform:uppercase; }
.alpha{
  display:inline-block; font:600 10px/1 var(--font-mono); letter-spacing:0.14em; text-transform:uppercase;
  background:var(--ink); color:var(--knock); border-radius:2px; padding:4px 6px; cursor:help;
}
.nav-links{ display:flex; gap:22px; margin:0 0 0 8px; padding:0; list-style:none; font-size:14px; }
.nav-links a{ text-decoration:none; color:var(--ink-muted); transition:color var(--dur-fast) var(--ease-out); }
.nav-links a:hover,.nav-links a[aria-current="page"]{ color:var(--ink); }
.nav-links a[aria-current="page"]{ text-decoration:underline; text-underline-offset:6px; }
.nav-end{ margin-left:auto; display:flex; align-items:center; gap:12px; }
.menu-btn{
  display:none; background:none; border:1px solid var(--ink-line); color:var(--ink); border-radius:2px;
  font:500 13px/1 var(--font-mono); padding:9px 12px; cursor:pointer;
}
@media (max-width:860px){
  .menu-btn{ display:inline-flex; }
  .nav-end .btn{ display:none; }
  .nav-menu{
    display:none; position:absolute; left:0; right:0; top:var(--nav-h);
    background:var(--deck-split); padding:4px var(--gutter) 14px;
  }
  .nav[data-open="true"] .nav-menu{ display:block; }
  .nav-menu::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:1px; background:var(--ink); mix-blend-mode:difference; opacity:.5; }
  .nav-links{ flex-direction:column; gap:0; margin:0; }
  .nav-links a{ display:block; padding:12px 0; border-bottom:1px solid var(--ink-line); font-size:16px; }
}
/* very short screens (landscape phones): the nav scrolls away instead of holding a band */
@media (max-height:480px){ .nav{ position:relative; } }

/* ---------- buttons, including the inert placeholder ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px; border-radius:2px; text-decoration:none;
  font:500 14px/1 var(--font-body); letter-spacing:0.01em; padding:13px 18px;
  border:1px solid var(--ink); background:var(--ink); color:var(--knock); white-space:nowrap; cursor:pointer;
  transition:background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn:hover{ background:var(--knock); color:var(--ink); }
.btn.ghost{ background:transparent; color:var(--ink); }
.btn.ghost:hover{ background:var(--ink); color:var(--knock); }
.btn.sm{ font-size:13px; padding:8px 12px; }
@media (max-width:480px){ .btn{ white-space:normal; max-width:100%; } }
/* Inert placeholder: looks like the real control, does nothing, says why on hover and focus. */
.btn.is-inert{ cursor:not-allowed; position:relative; border-style:dashed; }
.btn.is-inert:hover{ background:transparent; color:var(--ink); }
.btn.is-inert:not(.ghost){ background:transparent; color:var(--ink); }
.btn.is-inert::after{
  /* anchored to the button's right edge, so a tip on a button near the right edge never widens the page */
  content:attr(data-tip); position:absolute; right:0; bottom:calc(100% + 10px); transform:translateY(4px);
  background:var(--ink); color:var(--knock); font:400 12px/1.35 var(--font-mono); text-transform:none; letter-spacing:0;
  padding:7px 9px; border-radius:2px; white-space:normal; width:max-content; max-width:min(260px,80vw);
  opacity:0; pointer-events:none; transition:opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn.is-inert:hover::after,.btn.is-inert:focus-visible::after{ opacity:1; transform:none; }
.nav .btn.is-inert::after{ bottom:auto; top:calc(100% + 10px); }
@media (max-width:560px){ .dl-top .btn.is-inert::after{ right:auto; left:0; } }
.ctas{ display:flex; flex-wrap:wrap; gap:10px; }

/* ---------- sections ---------- */
.section{ padding-block:clamp(64px,10vw,128px) 0; }
.section-head{ display:grid; gap:14px; margin-bottom:clamp(28px,4vw,44px); max-width:62ch; }
.section-head h2{ font-family:var(--font-display); font-weight:800; font-stretch:150%; text-transform:uppercase; font-size:clamp(24px,4vw,52px); line-height:0.98; letter-spacing:-0.01em; overflow-wrap:anywhere; }
.section-head p{ color:var(--ink-muted); max-width:62ch; }
.split2{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(28px,6vw,96px); }
@media (max-width:760px){ .split2{ grid-template-columns:1fr; } }
.rule{ border:0; border-top:1px solid var(--ink-line); margin:0; }

/* ---------- page header (every page but home) ---------- */
.page-head{ padding-block:clamp(40px,7vw,88px) 0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px 32px; align-items:end; }
.page-head .ph-copy{ display:grid; gap:18px; min-width:0; container-type:inline-size; }
/* sized to the column so the longest title word (CONTRIBUTING, about 11.9em) fits on one line */
.page-head h1{ font-size:min(8.6vw, 8.2cqi, 112px); overflow-wrap:anywhere; }
.page-head .lede{ font-size:clamp(17px,1.8vw,20px); color:var(--ink-muted); max-width:60ch; }
.lede{ text-wrap:pretty; }
.ph-mark{ width:clamp(64px,10vw,128px); aspect-ratio:1; }
/* the fly-in stays inside the mark's own box (the parted halves at rest fit inside it), so it never crosses nearby text or slots */
.ph-mark svg,.decks:has(.big404) .mark svg{ overflow:hidden; }
@media (max-width:560px){ .page-head{ grid-template-columns:1fr; } .ph-mark{ display:none; } }

/* ---------- the mark: two halves of the real mark, one per deck ---------- */
.mark svg{ display:block; width:100%; height:100%; overflow:visible; }
.mark .h-a{ fill:var(--mark-dark); }
.mark .h-b{ fill:var(--mark-light); }
/* parting: the halves slide apart along their shared cut (the line x + y = 512) as the fader leaves center */
.mark .half{ transition:transform 120ms linear; }
.mark .half-a{ transform:translate(calc(var(--g) * -64px), calc(var(--g) * 64px)); }
.mark .half-b{ transform:translate(calc(var(--g) * 64px), calc(var(--g) * -64px)); }
@media (prefers-reduced-motion:no-preference){
  /* fly-in: each half arrives from its own deck along the cut */
  .mark .fly-a{ animation:fly-a var(--dur-slow) var(--ease-out) .12s both; }
  .mark .fly-b{ animation:fly-b var(--dur-slow) var(--ease-out) .12s both; }
  @keyframes fly-a{ from{ transform:translate(-620px,620px); } to{ transform:none; } }
  @keyframes fly-b{ from{ transform:translate(620px,-620px); } to{ transform:none; } }
}
@media (prefers-reduced-motion:reduce){ .mark .half{ transition:none; } }

/* ---------- hero (home) ---------- */
.hero{ padding-block:clamp(14px,2.4vw,28px) clamp(48px,8vw,96px); overflow-x:clip; }
.plate{ display:flex; justify-content:space-between; gap:8px 16px; flex-wrap:wrap; border-block:1px solid var(--ink-line); padding-block:8px; font:400 12px/1.4 var(--font-mono); letter-spacing:0.12em; text-transform:uppercase; }
.word{
  display:flex; align-items:flex-start; justify-content:space-between; gap:0.2em;
  font-size:clamp(46px,13.6vw,200px); line-height:0.82; letter-spacing:-0.02em; margin:clamp(18px,3vw,36px) 0 0; white-space:nowrap;
}
.word > span{ display:inline-block; }
.word .w-b{ position:relative; }
.word .alpha{ position:absolute; right:0.04em; top:calc(100% + 10px); font-size:clamp(10px,1.1vw,13px); letter-spacing:0.14em; }
@media (prefers-reduced-motion:no-preference){
  .word .w-a{ animation:from-a var(--dur-slow) var(--ease-out) both; }
  .word .w-b{ animation:from-b var(--dur-slow) var(--ease-out) both; }
  @keyframes from-a{ from{ transform:translateX(-40vw); } to{ transform:none; } }
  @keyframes from-b{ from{ transform:translateX(40vw); } to{ transform:none; } }
}
.decks{ display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:clamp(16px,3vw,48px); margin-top:clamp(28px,5vw,60px); }
.deck{ display:grid; gap:12px; min-width:0; }
.deck-b{ justify-items:end; text-align:right; }
.deck-b p,.deck-b ul{ margin-left:auto; }
.deck .h1{ font-family:var(--font-display); font-weight:800; font-stretch:150%; text-transform:uppercase; font-size:clamp(28px,4vw,54px); line-height:1; margin:0; letter-spacing:-0.01em; }
.deck .lede{ font-size:clamp(17px,1.6vw,21px); line-height:1.4; max-width:22rem; }
.deck ul{ list-style:none; margin:4px 0 0; padding:0; display:grid; gap:6px; max-width:23rem; font-size:14.5px; }
.hero .mark{ width:clamp(150px,24vw,330px); aspect-ratio:1; }
.hero-foot{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:end; margin-top:clamp(36px,6vw,72px); }
.hero-foot p{ font-size:clamp(16px,1.5vw,19px); max-width:42rem; }
.hero-note{ font:400 13px/1.5 var(--font-mono); color:var(--ink-muted); margin-top:12px; }
@media (max-width:759px){
  .decks{ grid-template-columns:1fr; gap:14px; }
  .deck-b{ justify-items:start; text-align:left; }
  .deck-b p,.deck-b ul{ margin-left:0; }
  .hero .mark{ justify-self:center; width:min(48vw,200px); order:-1; }
  .deck ul{ display:none; }
  .hero-foot{ grid-template-columns:1fr; }
}

/* ---------- slot: visible placeholder for content that does not exist yet ---------- */
.slot{
  border:1px dashed var(--ink); border-radius:2px; color:var(--ink-muted);
  font:400 13px/1.55 var(--font-mono); padding:14px 16px; min-width:0; overflow-wrap:anywhere;
  display:grid; gap:8px; background:var(--panel); align-content:start;
}
.slot-id{ justify-self:start; background:var(--ink); color:var(--knock); font:600 11px/1 var(--font-mono); letter-spacing:0.12em; padding:4px 6px; border-radius:2px; text-transform:uppercase; }
.slot strong{ color:var(--ink); font-weight:500; }
.slot.shot{ aspect-ratio:16/9; align-content:center; justify-items:center; text-align:center; }
.slot.shot .slot-id{ justify-self:center; }
.slot ul{ margin:0; padding-left:1.2em; display:grid; gap:4px; }

/* ---------- cards ---------- */
.cards{ display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); }
.card{ border:1px solid var(--ink-line); border-radius:2px; padding:22px; display:grid; gap:12px; align-content:start; min-width:0; }
.card h3{ font-size:19px; }
/* side by side, a one-line title keeps a second line so every body in a row starts at the same height */
@media (min-width:600px){ .cards .card h3{ min-height:2lh; } }
.card p{ color:var(--ink-muted); }
a.card{ text-decoration:none; transition:background-color var(--dur-fast) var(--ease-out); }
a.card:hover{ background:var(--panel-2); }

/* ---------- feature row ---------- */
.feature{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:clamp(20px,4vw,56px);
  padding-block:36px; align-items:start; position:relative;
}
/* the row divider sits on a wrapper that is not ink, so it is its own difference-blended hairline */
.feature::before{ content:""; position:absolute; left:0; right:0; top:0; height:1px; background:var(--ink); mix-blend-mode:difference; opacity:.28; }
.feature-copy{ display:grid; gap:12px; min-width:0; }
.feature-copy h3{ font-size:clamp(20px,2.2vw,26px); }
.feature-copy p{ color:var(--ink-muted); max-width:54ch; }
.feature-media{ min-width:0; display:grid; gap:10px; }
.req{ font:400 12px/1.5 var(--font-mono); color:var(--ink-muted); }
.req span{ display:inline-block; max-width:100%; overflow-wrap:anywhere; }
@media (max-width:760px){ .feature{ grid-template-columns:1fr; } }

/* ---------- status chip: monochrome, coded by shape so it survives the inversion ---------- */
.chip{
  display:inline-flex; align-items:center; gap:7px; width:max-content;
  font:500 11px/1 var(--font-mono); letter-spacing:0.1em; text-transform:uppercase;
  border:1px solid var(--ink-line); border-radius:999px; padding:5px 10px 5px 8px; cursor:help;
}
.chip::before{ content:""; width:9px; height:9px; border-radius:50%; box-sizing:border-box; flex:none; }
.chip.works::before{ background:var(--ink); }
.chip.partial::before{ border:1.5px solid var(--ink); background:linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.chip.notyet::before{ border:1.5px solid var(--ink); }
.chip.draft::before{ border:1.5px dashed var(--ink); }
.legend{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; }

/* ---------- code block ---------- */
.code{ border:1px solid var(--ink-line); border-radius:2px; overflow:hidden; min-width:0; }
.code-head{ display:flex; justify-content:space-between; gap:12px; padding:9px 14px; border-bottom:1px solid var(--ink-line); font:400 12px/1.4 var(--font-mono); color:var(--ink-muted); }
.code pre{ margin:0; padding:16px; overflow-x:auto; font-size:13px; line-height:1.7; }
.code .c{ color:var(--ink-muted); }

/* ---------- stats (each carries a hover title saying how it was measured) ---------- */
.stats{ display:grid; gap:0; border-top:1px solid var(--ink-line); grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); }
.stat{ padding:20px 20px 20px 0; display:grid; gap:6px; cursor:help; border-bottom:1px solid var(--ink-line); }
.stat-n{ font:800 clamp(28px,3.8vw,46px)/1 var(--font-display); font-stretch:150%; font-variant-numeric:tabular-nums; }
.stat-l{ color:var(--ink-muted); font-size:14px; }
.stat-s{ font:400 11px/1.4 var(--font-mono); color:var(--ink-muted); }

/* ---------- callout ---------- */
.callout{ border:1px solid var(--ink-line); border-left:3px solid var(--ink); border-radius:2px; padding:16px 18px; display:grid; gap:6px; }
.callout strong{ font-weight:600; }

/* ---------- table with divider lines ---------- */
.table-wrap{ max-width:100%; overflow-x:auto; border:1px solid var(--ink-line); border-radius:2px; min-width:0; }
table{ width:100%; border-collapse:collapse; font-size:14px; }
th,td{ text-align:left; padding:11px 14px; border-bottom:1px solid var(--ink-line); vertical-align:top; }
th{ font:500 11px/1.4 var(--font-mono); letter-spacing:0.1em; text-transform:uppercase; color:var(--ink-muted); background:var(--panel); }
tr:last-child td{ border-bottom:0; }
td+td,th+th{ border-left:1px solid var(--ink-line); }
td.num,td .num{ font-variant-numeric:tabular-nums; }
td code{ white-space:nowrap; }
@media (max-width:620px){ td code{ white-space:normal; } }
td.wrap-code code{ white-space:normal; overflow-wrap:anywhere; }

/* ---------- bar chart (to scale; widths set inline as a share of the max) ---------- */
.bars{ display:grid; gap:8px; }
.bar{ display:grid; grid-template-columns:5.5em minmax(0,1fr) 4.6em; gap:12px; align-items:center; font:400 13px/1 var(--font-mono); cursor:help; }
.bar-track{ height:14px; border:1px solid var(--ink-line); }
.bar-fill{ display:block; height:100%; background:var(--ink); width:var(--w); transform-origin:left; }
.bar-v{ text-align:right; font-variant-numeric:tabular-nums; color:var(--ink-muted); }
@media (prefers-reduced-motion:no-preference){
  .bars.is-in .bar-fill{ animation:grow var(--dur-slow) var(--ease-out) both; }
  .bars.is-in .bar:nth-child(2) .bar-fill{ animation-delay:60ms; }
  .bars.is-in .bar:nth-child(3) .bar-fill{ animation-delay:120ms; }
  .bars.is-in .bar:nth-child(4) .bar-fill{ animation-delay:180ms; }
  .bars.is-in .bar:nth-child(5) .bar-fill{ animation-delay:240ms; }
  .bars.is-in .bar:nth-child(6) .bar-fill{ animation-delay:300ms; }
  .bars.is-in .bar:nth-child(7) .bar-fill{ animation-delay:360ms; }
  @keyframes grow{ from{ transform:scaleX(0); } to{ transform:none; } }
}

/* ---------- FAQ (details/summary) ---------- */
.faq{ border-top:1px solid var(--ink-line); }
.faq details{ border-bottom:1px solid var(--ink-line); }
.faq summary{ cursor:pointer; list-style:none; padding:20px 0; display:flex; justify-content:space-between; gap:16px; font-size:clamp(17px,1.9vw,20px); font-weight:500; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{ content:"+"; font-family:var(--font-mono); color:var(--ink-muted); transition:transform var(--dur-fast) var(--ease-out); }
.faq details[open] summary::after{ transform:rotate(45deg); }
.faq .answer{ padding:0 0 22px; color:var(--ink-muted); display:grid; gap:12px; max-width:68ch; }
.faq .answer strong,.faq .answer a{ color:var(--ink); }
.faq .answer ol,.faq .answer ul{ margin:0; padding-left:1.2em; display:grid; gap:6px; }

/* ---------- download card ---------- */
.dl{ border:1px solid var(--ink-line); border-radius:2px; padding:clamp(18px,3vw,30px); display:grid; gap:20px; }
.dl-top{ display:flex; flex-wrap:wrap; gap:16px; justify-content:space-between; align-items:center; }
.dl-top h3{ font-size:24px; }
.dl dl{ margin:0; display:grid; grid-template-columns:max-content minmax(0,1fr); gap:10px 20px; font-size:14px; }
.dl dt{ font:400 12px/1.6 var(--font-mono); color:var(--ink-muted); text-transform:uppercase; letter-spacing:0.08em; }
.dl dd{ margin:0; min-width:0; overflow-wrap:anywhere; }
@media (max-width:480px){ .dl dl{ grid-template-columns:1fr; gap:4px; } .dl dd{ margin-bottom:8px; } }

/* ---------- build pipeline + timeline ---------- */
.pipeline{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-top:1px solid var(--ink); counter-reset:step; }
.pipeline li{ padding:18px; display:grid; gap:8px; align-content:start; counter-increment:step; min-width:0; transition:background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.pipeline li + li{ border-left:1px solid var(--ink-line); }
.pipeline li::before{ content:counter(step,decimal-leading-zero); font:400 12px/1 var(--font-mono); color:var(--ink-muted); }
.pipeline b{ font:800 clamp(15px,0.6vw + 11px,18px)/1.1 var(--font-display); font-stretch:150%; text-transform:uppercase; }
.pipeline small{ color:var(--ink-muted); font-size:14px; line-height:1.5; }
.pipeline li.is-lit{ background:var(--ink); color:var(--knock); }
.pipeline li.is-lit small,.pipeline li.is-lit::before{ color:var(--knock); }
@media (max-width:899px){
  .pipeline{ grid-template-columns:1fr; }
  .pipeline li,.pipeline li + li{ padding:16px 12px; border-left:0; border-bottom:1px solid var(--ink-line); }
}
.timeline{ list-style:none; margin:0; padding:0; border-left:1px solid var(--ink); display:grid; gap:28px; }
.timeline li{ padding-left:22px; position:relative; display:grid; gap:6px; min-width:0; }
.timeline li > *{ max-width:68ch; }
.timeline li::before{ content:""; position:absolute; left:-5px; top:7px; width:9px; height:9px; background:var(--ink); }
.timeline time{ font:400 12px/1.4 var(--font-mono); color:var(--ink-muted); letter-spacing:0.08em; text-transform:uppercase; }
.timeline b{ font-weight:600; }

/* ---------- attributed quote ---------- */
.quote{ margin:0; display:grid; gap:16px; }
.quote blockquote{ margin:0; font-family:var(--font-display); font-weight:800; font-stretch:150%; text-transform:uppercase; font-size:clamp(24px,4.2vw,56px); line-height:1.02; max-width:20ch; text-wrap:balance; }
.quote figcaption{ font:400 13px/1.5 var(--font-mono); color:var(--ink-muted); max-width:62ch; }

/* ---------- house rule band ---------- */
.rule-line{ font-family:var(--font-display); font-weight:800; font-stretch:150%; text-transform:uppercase; font-size:clamp(32px,8vw,118px); line-height:0.9; letter-spacing:-0.015em; text-wrap:balance; }

/* ---------- footer ---------- */
.foot{ margin-top:clamp(64px,9vw,112px); padding-block:44px 36px; font-size:14px; }
.foot-brand{ display:grid; gap:12px; align-content:start; }
.foot-grid{ display:grid; gap:32px; grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr)); }
.foot h4{ font:400 12px/1.4 var(--font-mono); letter-spacing:0.12em; text-transform:uppercase; color:var(--ink-muted); margin-bottom:12px; }
.foot ul{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.foot a{ text-decoration:none; }
.foot a:hover{ text-decoration:underline; }
.disclaimer{ margin-top:36px; padding-top:20px; border-top:1px solid var(--ink-line); color:var(--ink-muted); font-size:12.5px; line-height:1.6; max-width:92ch; display:grid; gap:6px; }
@media (max-width:760px){ .foot-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } .foot-grid > :first-child{ grid-column:1 / -1; } }

/* ---------- the docked crossfader ---------- */
.dock{
  position:fixed; left:0; right:0; bottom:0; z-index:45;
  height:calc(var(--dock-h) + var(--safe-b)); padding-bottom:var(--safe-b);
  background:var(--deck-split);
  user-select:none; -webkit-user-select:none;
}
.dock-row{ height:var(--dock-h); display:grid; grid-template-columns:auto minmax(0,1fr) auto auto auto; align-items:center; gap:14px; border-top:1px solid var(--ink-line); }
.dock-lab{ font:500 11px/1 var(--font-mono); letter-spacing:0.12em; text-transform:uppercase; white-space:nowrap; }
.dock-lab b{ font:800 14px/1 var(--font-display); font-stretch:150%; letter-spacing:0; }
.dock-track{ position:relative; height:34px; cursor:ew-resize; touch-action:none; outline-offset:4px; }
.dock-track::before{ content:""; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--ink); }
.dock-track::after{ content:""; position:absolute; left:50%; top:9px; bottom:9px; width:1px; background:var(--ink); }
.dock-target{ position:absolute; top:4px; width:0; height:0; margin-left:-5px; left:calc(var(--target, .5) * 100%); border:5px solid transparent; border-top-color:var(--ink); opacity:0; transition:left var(--dur) var(--ease-out), opacity var(--dur-fast); }
.dock[data-mode="auto"] .dock-target{ opacity:1; }
.dock-thumb{ position:absolute; top:5px; bottom:5px; width:18px; margin-left:-9px; left:calc(var(--x) * 100%); background:var(--ink); border-radius:1px; }
.dock-thumb::after{ content:""; position:absolute; left:8px; top:5px; bottom:5px; width:2px; background:var(--knock); }
.dock-x{ font:400 12px/1 var(--font-mono); white-space:nowrap; font-variant-numeric:tabular-nums; cursor:help; min-width:3.2em; text-align:right; }
.dx-long{ display:none; }
@media (min-width:1100px){ .dx-long{ display:inline; } }
.dock-auto{
  font:500 11px/1 var(--font-mono); letter-spacing:0.12em; text-transform:uppercase; cursor:pointer;
  border:1px solid var(--ink); border-radius:2px; padding:8px 9px; background:transparent; color:var(--ink);
}
.dock-auto[aria-pressed="true"]{ background:var(--ink); color:var(--knock); }
@media (max-width:520px){
  .dock-row{ gap:10px; grid-template-columns:auto minmax(0,1fr) auto auto; }
  .dock .lab-long,.dock-x{ display:none; }
}

/* ---------- illustrations: normal-blend dark objects with an honest label ---------- */
.ill{ background:var(--rig-bg); color:var(--rig-fg); border:1px solid var(--rig-line); border-radius:4px; overflow:hidden; font:400 12px/1.4 var(--font-mono); max-width:100%; box-shadow:0 30px 90px -40px rgba(0,0,0,.65); }
.ill-bar{ display:flex; justify-content:space-between; gap:12px; padding:8px 12px; border-bottom:1px solid var(--rig-line); color:var(--rig-dim); letter-spacing:0.08em; text-transform:uppercase; font-size:11px; }
.ill-bar b{ color:var(--rig-fg); font-weight:500; }
.ill-tag{ border:1px solid var(--rig-dim); border-radius:2px; padding:1px 5px; color:var(--rig-fg); }
.ill-body{ padding:14px; display:grid; gap:12px; }
.ill canvas{ display:block; width:100%; }
.ill button,.ill .tbtn{
  font:500 11px/1 var(--font-mono); letter-spacing:0.08em; text-transform:uppercase; cursor:pointer;
  background:transparent; color:var(--rig-dim); border:1px solid var(--rig-line); border-radius:3px; padding:7px 9px;
}
.ill button[aria-pressed="true"]{ color:#0d0d0e; background:var(--rig-fg); border-color:var(--rig-fg); }
.ill button:focus-visible,.ill input:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.ill .row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.ill .lbl{ color:var(--rig-dim); }
.ill-cap{ margin-top:10px; font:400 12.5px/1.5 var(--font-mono); color:var(--ink-muted); max-width:70ch; }

/* rig (home): the four-deck screen, drawn */
.rig-over{ display:grid; gap:2px; padding:8px; border-bottom:1px solid var(--rig-line); }
.rig-over canvas{ height:24px; }
.rig-grid{ display:grid; grid-template-columns:minmax(0,1fr) 148px minmax(0,1fr); grid-template-areas:"d1 mx d2" "d3 mx d4"; }
.d1{ grid-area:d1; } .d2{ grid-area:d2; } .d3{ grid-area:d3; } .d4{ grid-area:d4; }
.mx{ grid-area:mx; border-left:1px solid var(--rig-line); border-right:1px solid var(--rig-line); padding:12px 10px; display:grid; grid-template-rows:1fr auto; gap:12px; }
.rdeck{ padding:10px 12px 12px; display:grid; gap:8px; min-width:0; border-bottom:1px solid var(--rig-line); }
.rdeck-top{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:start; }
.rdeck-n{ font:800 22px/1 var(--font-display); font-stretch:150%; color:var(--rig-fg); }
.rdeck-t{ min-width:0; }
.rdeck-t div{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rdeck-t .t{ color:var(--rig-fg); font:500 13px/1.3 var(--font-body); }
.rdeck-t .a{ color:var(--rig-dim); }
.rdeck-num{ text-align:right; font-variant-numeric:tabular-nums; }
.rdeck-num .bpm{ font-size:15px; color:var(--rig-fg); }
.rdeck canvas{ height:52px; }
.rkey{ border:1px solid var(--rig-line); border-radius:3px; padding:4px 7px; color:var(--rig-dim); font-size:11px; }
.rkey.on{ color:var(--rig-fg); border-color:#4a4a50; }
.pads{ display:grid; grid-template-columns:repeat(8,1fr); gap:4px; }
.pads i{ height:13px; border-radius:2px; background:#1b1b1e; border:1px solid var(--rig-line); }
.pads i.set{ background:#2e2e33; }
.faders{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; justify-items:center; }
.ch{ display:grid; justify-items:center; gap:6px; color:var(--rig-dim); }
.ch-track{ width:4px; height:116px; background:#1e1e22; border-radius:2px; position:relative; }
.ch-cap{ position:absolute; left:50%; width:22px; height:10px; margin-left:-11px; background:#d9d9dc; border-radius:2px; }
.xf{ display:grid; gap:6px; }
.xf-track{ position:relative; height:4px; background:#1e1e22; border-radius:2px; margin-inline:6px; }
.xf-cap{ position:absolute; top:50%; width:12px; height:22px; margin:-11px 0 0 -6px; background:#d9d9dc; border-radius:2px; left:calc(var(--x) * 100%); }
.xf-l{ display:flex; justify-content:space-between; color:var(--rig-dim); font-size:10px; }
.lib-row{ display:grid; grid-template-columns:24px minmax(0,2fr) minmax(0,1.3fr) 54px 108px; gap:10px; padding:6px 12px; border-top:1px solid #17171a; align-items:center; font-variant-numeric:tabular-nums; }
.lib-row > span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.lib-row.h{ color:var(--rig-dim); text-transform:uppercase; letter-spacing:0.08em; font-size:10px; }
.lib-row.missing{ color:var(--rig-dim); }
.fchip{ justify-self:start; border:1px solid #6a4a3e; color:#ecb49c; border-radius:3px; padding:2px 6px; font-size:10px; letter-spacing:0.04em; }
.fchip.ok{ border-color:var(--rig-line); color:var(--rig-dim); }
.fchip.dry{ border-style:dashed; color:var(--rig-fg); border-color:var(--rig-dim); }
@media (max-width:759px){
  .rig-grid{ grid-template-columns:minmax(0,1fr); grid-template-areas:"d1" "d2" "mx"; }
  .d3,.d4,.rig-over canvas:nth-child(n+3){ display:none; }
  .mx{ border:0; border-bottom:1px solid var(--rig-line); grid-template-rows:auto; }
  .ch-track{ height:60px; }
  .lib-row{ grid-template-columns:20px minmax(0,1fr) 46px 100px; }
  .lib-row .art{ display:none; }
}

/* typed-command channel strip */
.cs-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px 16px; }
.cs-ctl{ display:grid; gap:6px; color:var(--rig-dim); min-width:0; }
.cs-ctl span{ display:flex; justify-content:space-between; gap:8px; }
.cs-ctl output{ color:var(--rig-fg); font-variant-numeric:tabular-nums; cursor:help; }
.ill input[type="range"]{ width:100%; accent-color:var(--rig-fg); margin:0; height:22px; }
.cs-log{ margin:0; border-top:1px solid var(--rig-line); padding:12px 14px; min-height:7.6em; overflow-x:auto; font-size:12.5px; line-height:1.6; white-space:pre; color:var(--rig-dim); }
.cs-log .now{ color:var(--rig-fg); }
@media (max-width:620px){ .cs-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* stems + lyrics + sync lanes */
.lanes{ display:grid; gap:6px; }
.lane{ display:grid; grid-template-columns:82px minmax(0,1fr); gap:10px; align-items:center; }
.lane .lbl{ font-size:11px; letter-spacing:0.08em; text-transform:uppercase; }
.lane canvas{ height:30px; transition:opacity var(--dur-fast) linear; }
.lane.is-muted canvas{ opacity:.18; }
.lane.is-muted .lbl{ text-decoration:line-through; }
.lyr{ display:flex; flex-wrap:wrap; gap:4px 8px; font:500 clamp(16px,2.2vw,22px)/1.35 var(--font-body); color:var(--rig-dim); min-height:3.2em; }
.lyr span{ transition:color 80ms linear; }
.lyr span.sung{ color:var(--rig-wave); }
.lyr span.now{ color:var(--rig-fg); }

/* ---------- 404 ---------- */
/* the numeral fits its own deck (about 2.75em wide), so it never runs under the mark or deck B's copy */
.deck:has(> .big404){ container-type:inline-size; }
.big404{ font-size:min(35cqi,360px); cursor:help; }

/* ---------- three-column tables stack into labeled rows on phones ---------- */
@media (max-width:620px){
  /* every three-column table stacks, whether or not it carries .stack */
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) :is(thead){ display:none; }
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)),
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) :is(tbody, tr, td){ display:block; width:100%; }
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) tr{ padding:8px 0; border-bottom:1px solid var(--ink-line); }
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) tr:last-child{ border-bottom:0; }
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) :is(td, td + td){ border:0; padding:3px 14px; }
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) td:first-child{ font-weight:600; }
  :is(table.stack, table:has(> thead > tr > th:nth-child(3):last-child)) td code{ white-space:normal; overflow-wrap:anywhere; }
}


/* ---------- print: everything visible, no dock ---------- */
@media print{
  .js .reveal.is-pending{ opacity:1; transform:none; }
  .dock{ display:none; }
}

/* ---------- reveal on scroll: visible at rest; motion only when allowed ---------- */
@media (prefers-reduced-motion:no-preference){
  .js .reveal{ transition:opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
  .js .reveal.is-pending{ opacity:0; transform:translateY(14px); }
}
