/* Maple Grove Studio, prototype 0.1.0
   Dark control room. Bone text, one maple-red tally, one honey wood tone,
   and a colour per track the way an edit timeline colours its clips. */

:root {
  --ink-0: #0c0b0a;
  --ink-1: #141311;
  --ink-2: #1c1a17;
  --ink-3: #26231f;
  --line: #2f2b26;
  --line-2: #413b34;
  --bone: #efe8dc;
  --dim: #b3ab9d;
  --signal: #ff5b3a;
  --maple: #e3a862;

  --t-video: #7aa2ff;
  --t-voice: #6fe0b4;
  --t-sound: #f28cc2;
  --t-learning: #f5c84c;
  --t-live: #ff5b3a;
  --t-web: #5fd3e8;

  --f-sans: "Bricolage Grotesque", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --f-hand: "Caveat", "Segoe Print", cursive;
  --f-plain: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;

  --bar-h: 60px;
  --wrap: 1320px;
  --pad: clamp(16px, 4vw, 48px);
  --r: 6px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink-0); scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--bone);
  font-family: var(--f-sans);
  font-size: 18px;
  line-height: 1.55;
  font-variation-settings: "opsz" 18;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* faint grain + grid, like a monitor in a dark room */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(227,168,98,.10), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(255,91,58,.06), transparent 60%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 100% 32px;
}
img { max-width: 100%; display: block; }
a { color: var(--bone); text-decoration-color: var(--maple); text-underline-offset: .18em; text-decoration-thickness: 2px; }
a:hover { color: #fff; text-decoration-color: var(--signal); }
:focus-visible { outline: 3px solid var(--maple); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; }
.dim { color: var(--dim); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--maple); color: #1a1208; padding: 10px 14px; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 12px; }

h1, h2, h3 { line-height: 1.08; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 4.4vw, 4.4rem); font-variation-settings: "opsz" 96, "wdth" 88; font-weight: 750; }
h1 em { font-style: normal; color: var(--maple); white-space: nowrap; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); font-variation-settings: "opsz" 80, "wdth" 90; }
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 30; }

/* ---------- header bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px;
  padding: 0 var(--pad);
  background: rgba(12,11,10,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -.005em; }
.brand-short { display: none; font-family: var(--f-mono); }
.mark { width: 38px; height: 38px; flex: none; transform-origin: 50% 70%; }
.s-wing { fill: var(--signal); }
.s-vein { fill: none; stroke: rgba(12,11,10,.32); stroke-width: 1.3; stroke-linecap: round; }
.s-edge { fill: none; stroke: #c7401f; stroke-width: 1.8; stroke-linecap: round; }
.s-nut { fill: var(--maple); }
.brand:hover .mark { animation: spin 1.1s cubic-bezier(.3,.1,.2,1); }
@keyframes spin { to { transform: rotate(360deg); } }

.onair { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: .8rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.onair-k { color: var(--bone); text-transform: uppercase; letter-spacing: .08em; }
.onair-v { overflow: hidden; text-overflow: ellipsis; }
.tally { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(255,91,58,.18), 0 0 14px rgba(255,91,58,.8); flex: none; animation: tally 2.4s ease-in-out infinite; }
@keyframes tally { 50% { opacity: .45; box-shadow: 0 0 0 3px rgba(255,91,58,.08), 0 0 4px rgba(255,91,58,.4); } }

.controls { display: flex; gap: 6px; }
.ctl {
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 6px 10px; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; color: var(--dim); min-height: 36px;
}
.ctl .ctl-k { color: var(--bone); }
.ctl[aria-pressed="true"] { border-color: var(--maple); }
.ctl[aria-pressed="true"] .ctl-v { color: var(--maple); }
.ctl:hover { background: var(--ink-3); }
.tc { margin: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--maple); font-variant-numeric: tabular-nums; }
.tc-k { color: var(--dim); }

/* ---------- shared section bits ---------- */
main > section { max-width: var(--wrap); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--pad); }
.sec-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-lede { color: var(--dim); font-size: 1.15rem; margin: 14px 0 0; }
.slate, .eyebrow .slate {
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; color: var(--maple);
  margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px;
}
.slate::before { content: ""; width: 26px; height: 10px; background: repeating-linear-gradient(-45deg, var(--bone) 0 4px, var(--ink-0) 4px 8px); border-radius: 1px; }
.hand { position: absolute; font-family: var(--f-hand); font-size: 1.55rem; line-height: 1; color: var(--maple); transform: rotate(-4deg); pointer-events: none; white-space: nowrap; }
.hand svg { width: 60px; height: 30px; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; min-height: 40px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .03em; text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--maple); color: #fff; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; min-height: 48px;
  background: var(--bone); color: var(--ink-0); border: 0; border-radius: 4px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 3px 3px 0 var(--signal);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 5px 5px 0 var(--signal); }
.btn[aria-pressed="true"] { background: var(--maple); }

/* ---------- program (hero) ---------- */
.program {
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(28px, 4vw, 64px); align-items: center;
  min-height: calc(100svh - var(--bar-h));
  padding-top: clamp(28px, 5vh, 64px) !important; padding-bottom: clamp(28px, 5vh, 64px) !important;
  position: relative;
}
.eyebrow { font-family: var(--f-mono); font-size: .8rem; color: var(--dim); letter-spacing: .04em; margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.eyebrow .slate { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.4vw, 1.3rem); margin: 22px 0 0; max-width: 34em; }
.lede-2 { color: var(--dim); margin-top: 12px; }
.reels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.reels-k { font-family: var(--f-mono); font-size: .8rem; color: var(--dim); margin-right: 4px; }
.reels .chip::before { content: ""; width: 0; height: 0; border-left: 8px solid var(--signal); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

.multiview { margin: 0; position: relative; }
.mv-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  background: #050505; padding: 4px; border-radius: 8px;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.03);
}
.mv-tile { position: relative; aspect-ratio: 16 / 9; background: #0a0a0a; overflow: hidden; border-radius: 2px; }
.mv-pgm { grid-column: span 2; grid-row: span 2; outline: 2px solid var(--signal); outline-offset: -2px; }
.mv-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s linear; filter: saturate(.92) contrast(1.04); }
.mv-tile img.on { opacity: 1; }
.mv-tag {
  position: absolute; left: 6px; top: 5px; z-index: 2;
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; color: #fff;
  background: rgba(0,0,0,.66); padding: 2px 6px; border-radius: 2px; display: inline-flex; align-items: center; gap: 6px;
}
.mv-tag .tally { width: 7px; height: 7px; box-shadow: none; animation: none; }
.mv-tile::after { /* track colour tally strip under each tile */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tk, transparent); z-index: 2;
}
.mv-safe { position: absolute; inset: 5%; border: 1px dashed rgba(255,255,255,.14); pointer-events: none; z-index: 1; }
.mv-safe::after { content: ""; position: absolute; inset: 5.5%; border: 1px dashed rgba(255,255,255,.10); }
.mv-lower {
  position: absolute; left: 7%; right: 12%; bottom: 9%; z-index: 3;
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(90deg, rgba(8,8,8,.9), rgba(8,8,8,.62));
  border-left: 4px solid var(--tk, var(--signal));
  padding: 8px 12px;
}
.mv-lower-t { font-weight: 700; font-size: clamp(.85rem, 1.25vw, 1.05rem); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mv-lower-m { font-family: var(--f-mono); font-size: .7rem; color: var(--dim); letter-spacing: .04em; }
.mv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-family: var(--f-mono); font-size: .75rem; color: var(--dim); }
.mv-pause { background: none; border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 10px; min-height: 36px; cursor: pointer; font-family: var(--f-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.mv-pause:hover { border-color: var(--maple); }
.hand-mv { right: -10px; top: -42px; }

/* ---------- collections (shelves) ---------- */
.shelves { padding-bottom: 20px !important; }
.shelf { margin: 0 0 44px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 14px; padding-left: 14px; border-left: 4px solid var(--tk); }
.shelf-head h3 { font-size: 1.55rem; }
.shelf-head p { margin: 0; color: var(--dim); flex: 1 1 280px; }
.shelf-all { font-family: var(--f-mono); font-size: .8rem; }
.shelf-row { list-style: none; margin: 0; padding: 4px 2px 14px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: var(--line-2) transparent; }
.shelf-row li { scroll-snap-align: start; }
.shelf-card {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  background: var(--ink-1); border: 1px solid var(--line); border-top: 3px solid var(--tk); border-radius: 3px; padding: 0 0 12px;
}
.shelf-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.shelf-card .shelf-t { padding: 4px 12px 0; font-weight: 600; font-size: .98rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-card .shelf-m { padding: 0 12px; margin-top: auto; font-family: var(--f-mono); font-size: .72rem; color: var(--dim); }
.shelf-card:hover { border-color: var(--line-2); background: var(--ink-2); }
.shelf-card:hover img { filter: brightness(1.08); }
html[data-view="plain"] .shelf-card img { display: none; }
html[data-view="plain"] .shelf-row { display: block; }
html[data-view="plain"] .shelf-card { background: none; border: 0; padding: 4px 0; text-decoration: underline; }

/* ---------- tracks ---------- */
.track-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) { .track-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .track-list { grid-template-columns: 1fr; } }
.track-card {
  --tc: var(--t-video);
  position: relative; padding: 22px 22px 20px 26px;
  background: linear-gradient(180deg, var(--ink-1), var(--ink-0));
  border: 1px solid var(--line); border-left: 4px solid var(--tc);
  border-radius: 3px;
  display: flex; flex-direction: column; gap: 8px;
}
.track-card::before, .track-card::after { /* crop marks */
  content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--line-2); border-style: solid;
}
.track-card::before { top: 7px; right: 7px; border-width: 1px 1px 0 0; }
.track-card::after { bottom: 7px; right: 7px; border-width: 0 1px 1px 0; }
.track-card[data-track="voice"] { --tc: var(--t-voice); }
.track-card[data-track="sound"] { --tc: var(--t-sound); }
.track-card[data-track="learning"] { --tc: var(--t-learning); }
.track-card[data-track="live"] { --tc: var(--t-live); }
.track-card[data-track="web"] { --tc: var(--t-web); }
.tk-id { align-self: flex-start; font-family: var(--f-mono); font-size: .75rem; font-weight: 600; color: var(--ink-0); background: var(--tc); padding: 2px 7px; border-radius: 2px; }
.track-card h3 { font-size: 1.55rem; }
.track-card p { margin: 0; color: var(--dim); }
.tk-count { font-family: var(--f-mono); font-size: .8rem; color: var(--bone) !important; margin-top: auto !important; }
.tk-solo {
  align-self: flex-start; margin-top: 6px;
  background: transparent; border: 1px solid var(--tc); color: var(--bone);
  border-radius: 3px; padding: 7px 12px; min-height: 40px; cursor: pointer;
  font-family: var(--f-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
}
.tk-solo::before { content: "S"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; background: var(--tc); color: var(--ink-0); font-weight: 700; border-radius: 2px; }
.tk-solo:hover { background: color-mix(in srgb, var(--tc) 16%, transparent); }

/* ---------- timeline ---------- */
.timeline { position: relative; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.tl-stage {
  max-width: var(--wrap); margin: 0 auto; padding: 24px var(--pad);
  display: flex; flex-direction: column; gap: 18px;
}
.tl-head { margin-bottom: 0; }
.tl-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.tl-head .sec-lede { margin-top: 8px; font-size: 1rem; }
.tl-head .slate { margin-bottom: 8px; }

.tl-viewer { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 22px; align-items: center; }
.tl-screen { position: relative; aspect-ratio: 16 / 9; background: #070707; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.tl-screen img { width: 100%; height: 100%; object-fit: cover; }
.tl-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; }
.tl-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px 20px; text-align: center; font-weight: 700; font-size: 1.05rem; line-height: 1.3; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tk, var(--maple)) 22%, #0b0b0b), #0b0b0b 70%); }
.tl-card[hidden] { display: none; }
.tl-meta p { margin: 0; }
.tl-when { font-family: var(--f-mono); font-size: .85rem; color: var(--maple); letter-spacing: .04em; }
.tl-title { font-size: clamp(1.1rem, 1.7vw, 1.45rem); font-weight: 700; line-height: 1.25; margin: 6px 0 !important; height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-sub { font-family: var(--f-mono); font-size: .8rem; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.tl-trackdot { width: 10px; height: 10px; border-radius: 2px; background: var(--tk, var(--maple)); }
.tl-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; min-height: 40px; }
.tl-actions [hidden] { display: none; }
.tl-stats { font-size: .85rem; color: var(--bone); }

.tl-editor {
  display: grid; grid-template-columns: 150px 1fr;
  background: var(--ink-1); border: 1px solid var(--line-2); border-radius: 4px;
}
.tl-heads { display: grid; grid-auto-rows: 34px; border-right: 1px solid var(--line-2); background: var(--ink-2); }
.tl-rulerhead { height: 52px; display: flex; align-items: flex-end; padding: 0 10px 8px; font-family: var(--f-mono); font-size: .68rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
.tl-trackhead { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .72rem; }
.tl-trackhead .sw { width: 6px; align-self: stretch; background: var(--tk); }
.tl-trackhead .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-trackhead .nm b { font-weight: 600; color: var(--tk); }
.tl-trackhead button {
  width: 24px; height: 24px; padding: 0; border-radius: 3px; cursor: pointer;
  background: var(--ink-3); border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: .68rem; font-weight: 600; color: var(--dim);
}
.tl-trackhead button.s[aria-pressed="true"] { background: var(--t-learning); color: var(--ink-0); border-color: var(--t-learning); }
.tl-trackhead button.m[aria-pressed="true"] { background: var(--signal); color: var(--ink-0); border-color: var(--signal); }
.tl-trackhead.is-off .nm { color: #6d665c; text-decoration: line-through; }
.tl-lanes { position: relative; min-width: 0; }
#tl-canvas { display: block; width: 100%; height: calc(52px + 34px * 6); cursor: ew-resize; touch-action: pan-y; }
.tl-playhead {
  position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px;
  background: var(--signal); box-shadow: 0 0 12px rgba(255,91,58,.7);
  cursor: ew-resize; touch-action: none; will-change: transform;
}
.tl-playhead::before { content: ""; position: absolute; left: -10px; right: -10px; top: 0; bottom: 0; }
.tl-ph-cap {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  background: var(--signal); color: #1b0a05; font-family: var(--f-mono); font-size: .7rem; font-weight: 600;
  padding: 2px 6px; border-radius: 2px; white-space: nowrap;
}
.tl-ph-cap::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--signal); border-bottom: 0; }
.tl-playhead:focus-visible { outline: 3px solid var(--maple); outline-offset: 2px; }
.hand-ph { right: 26%; top: -30px; }
.hand-open { right: 8px; bottom: -34px; font-size: 1.35rem; }

.archive { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad) 40px; }
.archive summary {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 12px 18px; min-height: 48px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--ink-1);
  font-family: var(--f-mono); font-size: .85rem;
}
.archive summary::-webkit-details-marker { display: none; }
.archive summary::before { content: "+"; color: var(--maple); font-weight: 700; }
.archive[open] summary::before { content: "−"; }
.archive-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0 10px; }
.archive-tools label { font-family: var(--f-mono); font-size: .8rem; color: var(--dim); }
.archive-tools input { flex: 1 1 280px; max-width: 520px; }
.archive-n { margin: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--dim); }
.archive-list { columns: 2 420px; column-gap: 40px; }
.archive-year { break-inside: avoid-column; margin: 0 0 22px; }
.archive-year h3 { font-family: var(--f-mono); font-size: .95rem; color: var(--maple); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.archive-year ul { list-style: none; margin: 0; padding: 0; }
.archive-year li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: baseline; padding: 4px 0; font-size: .95rem; line-height: 1.35; }
.archive-year li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tk); transform: translateY(-1px); }
.archive-year li a { text-decoration: none; }
.archive-year li a:hover { text-decoration: underline; }
.archive-year .d { font-family: var(--f-mono); font-size: .75rem; color: var(--dim); margin-right: 8px; }

/* ---------- process demos ---------- */
.demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.demo {
  position: relative; background: var(--ink-1); border: 1px solid var(--line-2); border-radius: 6px;
  padding: 44px 22px 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
.demo::before { /* window chrome */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px;
  background: var(--ink-2); border-bottom: 1px solid var(--line-2);
}
.demo-k { position: absolute; top: 5px; left: 14px; margin: 0; font-family: var(--f-mono); font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.demo-k span { color: var(--maple); margin-right: 6px; }
.demo h3 { font-size: 1.3rem; }
.demo-note { margin: auto 0 0; color: var(--dim); font-size: .9rem; }
.demo-actions { display: flex; gap: 10px; }

.cut-wave { height: 56px; display: flex; align-items: center; gap: 2px; }
.cut-wave i { display: block; width: 4px; border-radius: 2px; background: var(--t-voice); transition: all .5s cubic-bezier(.6,0,.2,1); }
.cut-wave i.f { background: var(--signal); }
.demo-cut.is-cut .cut-wave i.f { width: 0; margin-left: -2px; opacity: 0; }
.cut-text { font-size: 1.2rem; line-height: 1.5; margin: 0; }
.cut-text .f { color: var(--signal); text-decoration: line-through; text-decoration-thickness: 2px; transition: opacity .35s ease; }
.demo-cut.is-cut .cut-text .f { opacity: 0; }
.demo-cut.is-gone .cut-text .f { display: none; }

.grade { position: relative; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: #000; }
.grade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.grade-after { filter: contrast(1.07) saturate(1.12) sepia(.06); }
.grade-before { filter: contrast(.62) saturate(.38) brightness(1.16) hue-rotate(-6deg); clip-path: inset(0 calc(100% - var(--cut)) 0 0); }
.grade-line { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 2px; margin-left: -1px; background: var(--bone); box-shadow: 0 0 10px rgba(0,0,0,.6); }
.grade-lab { position: absolute; bottom: 8px; font-family: var(--f-mono); font-size: .68rem; background: rgba(0,0,0,.7); padding: 3px 7px; border-radius: 2px; }
.grade-lab-a { left: 8px; }
.grade-lab-b { right: 8px; }
.grade-range-l { font-family: var(--f-mono); font-size: .75rem; color: var(--dim); }
.grade-range { width: 100%; accent-color: var(--maple); min-height: 32px; }

.mixer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.strip { --tk: var(--t-sound); background: var(--ink-2); border: 1px solid var(--line-2); border-top: 3px solid var(--tk); border-radius: 3px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.strip-n { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.meter { width: 10px; height: 76px; background: #0a0a0a; border: 1px solid var(--line); border-radius: 2px; position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: linear-gradient(0deg, var(--t-voice) 0 60%, var(--t-learning) 60% 85%, var(--signal) 85%); }
.strip-sm { display: flex; gap: 4px; }
.strip-sm button { width: 30px; height: 30px; padding: 0; border-radius: 3px; background: var(--ink-3); border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: .72rem; font-weight: 600; color: var(--dim); cursor: pointer; }
.strip-sm button.s[aria-pressed="true"] { background: var(--t-learning); color: var(--ink-0); }
.strip-sm button.m[aria-pressed="true"] { background: var(--signal); color: var(--ink-0); }
.strip input[type="range"] { width: 100%; accent-color: var(--tk); }
.strip label.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- credits ---------- */
.credit-roll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.credit a {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; height: 100%;
  background: var(--ink-1); border: 1px solid var(--line); border-radius: 3px; padding: 18px 12px 16px; position: relative;
}
.credit a::before, .credit a::after { /* film perforations */
  content: ""; position: absolute; left: 10px; right: 10px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 16px);
}
.credit a::before { top: 5px; }
.credit a::after { bottom: 5px; }
.credit img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; object-position: top; border-radius: 2px; margin-bottom: 10px; filter: grayscale(.85) brightness(.85); transition: filter .35s ease; }
.credit a:hover img, .credit a:focus-visible img { filter: none; }
.cr-role { font-family: var(--f-mono); font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.cr-name { font-size: 1.45rem; font-weight: 700; font-variation-settings: "opsz" 40; }
.credit-text a { justify-content: center; min-height: 160px; background: repeating-linear-gradient(135deg, var(--ink-1) 0 14px, var(--ink-0) 14px 28px); }
.channels { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; }
.channels-k { margin: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--maple); text-transform: uppercase; letter-spacing: .08em; }
.channels ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.channels .dim { font-family: var(--f-mono); font-size: .75rem; margin-left: 6px; }
.badge-demo { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badge-demo p { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-weight: 600; background: var(--ink-1); }
.badge .mark { width: 26px; height: 26px; }
.badge:hover .mark { animation: spin 1.1s cubic-bezier(.3,.1,.2,1); }

/* ---------- studio ---------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.studio-photo { margin: 0; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.studio-photo img { width: 100%; height: auto; }
.studio-copy .big { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.35; font-weight: 600; margin-top: 0; }
.studio-copy h3 { margin-top: 30px; font-family: var(--f-mono); font-size: .8rem; color: var(--maple); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.studio-copy p { margin: 12px 0 0; }
.more { font-weight: 700; }
.spec { margin: 26px 0 0; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: .85rem; }
.spec div { display: grid; grid-template-columns: 120px 1fr; padding: 9px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--dim); }
.spec dd { margin: 0; }
.numbers { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 26px 0 0; border-top: 2px solid var(--bone); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.numbers li { display: flex; flex-direction: column; gap: 6px; }
.numbers .n { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 750; line-height: 1; font-variation-settings: "opsz" 96, "wdth" 85; font-variant-numeric: tabular-nums; }
.numbers .l { font-family: var(--f-mono); font-size: .78rem; color: var(--dim); }
.numbers-how { margin: 18px 0 0; font-size: .9rem; }

/* ---------- open door ---------- */
.door { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.door .sec-head h2 { font-size: clamp(2.3rem, 4.6vw, 4rem); }
.door-form { background: var(--ink-1); border: 1px solid var(--line-2); border-top: 3px solid var(--signal); border-radius: 4px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.f-row { display: flex; flex-direction: column; gap: 6px; }
label, legend { font-weight: 600; }
input[type="text"], input[type="email"], input[type="search"], textarea {
  font: inherit; color: var(--bone); background: var(--ink-0);
  border: 1px solid var(--line-2); border-radius: 3px; padding: 12px 14px; min-height: 48px; width: 100%;
}
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--maple); outline-offset: 1px; border-color: var(--maple); }
.f-tracks { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.f-tracks legend { margin-bottom: 10px; }
.f-tracks label { position: relative; font-weight: 400; }
.f-tracks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.f-tracks span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 40px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-family: var(--f-mono); font-size: .8rem; }
.f-tracks input:checked + span { border-color: var(--maple); background: color-mix(in srgb, var(--maple) 18%, transparent); }
.f-tracks input:focus-visible + span { outline: 3px solid var(--maple); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.btn-go { align-self: flex-start; }
.door-sent { margin: 0; padding: 12px 14px; border-left: 4px solid var(--t-voice); background: var(--ink-2); font-weight: 600; }
.door-sent[hidden] { display: none; }
.proto-note { margin: 0; font-family: var(--f-mono); font-size: .75rem; color: var(--dim); }

/* ---------- footer ---------- */
.foot { max-width: var(--wrap); margin: 0 auto; padding: 56px var(--pad) 40px; border-top: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 30px; }
.foot-h { font-family: var(--f-mono); font-size: .8rem; color: var(--maple); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 10px; }
.foot p { margin: 0 0 10px; color: var(--dim); font-size: .95rem; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 8px; }
.foot-links .dim { font-family: var(--f-mono); font-size: .75rem; margin-left: 6px; }
.foot-legal { margin-top: 36px !important; font-family: var(--f-mono); font-size: .75rem !important; }

/* ---------- reel dialog ---------- */
.reel-dialog { width: min(1100px, 94vw); padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--ink-1); color: var(--bone); }
.reel-dialog::backdrop { background: rgba(0,0,0,.8); }
.reel-dialog-in { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.reel-dialog-t { margin: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--maple); text-transform: uppercase; letter-spacing: .08em; }
.reel-frame { aspect-ratio: 16 / 9; background: #000; }
.reel-frame iframe { width: 100%; height: 100%; border: 0; }
.reel-close { align-self: flex-end; }

/* ---------- motion off ---------- */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] .hand { display: none; }
@media (prefers-reduced-motion: reduce) { .tally { animation: none; } }

/* ---------- plain view ---------- */
html[data-view="plain"] body { font-family: var(--f-plain); font-size: 20px; line-height: 1.6; }
html[data-view="plain"] body::before,
html[data-view="plain"] .multiview,
html[data-view="plain"] .tl-editor,
html[data-view="plain"] .tl-screen,
html[data-view="plain"] .hand,
html[data-view="plain"] .slate,
html[data-view="plain"] .cut-wave,
html[data-view="plain"] .grade,
html[data-view="plain"] .grade-range-l,
html[data-view="plain"] .grade-range,
html[data-view="plain"] .mixer,
html[data-view="plain"] #mix-play,
html[data-view="plain"] .credit img,
html[data-view="plain"] .studio-photo,
html[data-view="plain"] .tc,
html[data-view="plain"] .tk-solo,
html[data-view="plain"] .tk-id { display: none !important; }
html[data-view="plain"] main > section,
html[data-view="plain"] .tl-stage,
html[data-view="plain"] .foot,
html[data-view="plain"] .archive { max-width: 46rem; margin: 0 auto; padding: 32px 20px; height: auto !important; min-height: 0; position: static !important; display: block; }
html[data-view="plain"] .timeline, html[data-view="plain"] .tl-run { height: auto !important; }
html[data-view="plain"] h1, html[data-view="plain"] h2, html[data-view="plain"] h3 { font-family: var(--f-plain); font-variation-settings: normal; letter-spacing: 0; }
html[data-view="plain"] h1 { font-size: 2.2rem; }
html[data-view="plain"] h2 { font-size: 1.7rem; }
html[data-view="plain"] h1 em { color: inherit; }
html[data-view="plain"] .track-list, html[data-view="plain"] .credit-roll, html[data-view="plain"] .demos, html[data-view="plain"] .numbers, html[data-view="plain"] .foot-cols, html[data-view="plain"] .studio-grid, html[data-view="plain"] .door { display: block; }
html[data-view="plain"] .track-card, html[data-view="plain"] .demo, html[data-view="plain"] .credit a, html[data-view="plain"] .door-form { background: none; border: 0; padding: 0; margin: 0 0 24px; }
html[data-view="plain"] .track-card::before, html[data-view="plain"] .track-card::after, html[data-view="plain"] .demo::before, html[data-view="plain"] .credit a::before, html[data-view="plain"] .credit a::after { display: none; }
html[data-view="plain"] .demo-k { position: static; }
html[data-view="plain"] .numbers li { display: block; margin-bottom: 8px; }
html[data-view="plain"] .numbers .n { font-size: 1.2rem; display: inline; margin-right: 8px; }
html[data-view="plain"] .numbers .l, html[data-view="plain"] .cr-role, html[data-view="plain"] .spec, html[data-view="plain"] .tl-when, html[data-view="plain"] .tl-sub { font-family: var(--f-plain); font-size: 1rem; text-transform: none; letter-spacing: 0; }
html[data-view="plain"] .cut-text .f { display: inline; max-width: none; }
html[data-view="plain"] .program { min-height: 0; }
html[data-view="plain"] .ctl-plain { border-color: var(--maple); color: var(--maple); }
html[data-view="plain"] .archive-list { columns: auto; }
html[data-view="plain"] .archive-year li::before { display: none; }
html[data-view="plain"] .archive-year li { display: block; }
@media (prefers-color-scheme: light) {
  html[data-view="plain"] { color-scheme: light; background: #fff; }
  html[data-view="plain"] body { background: #fff; color: #111; }
  html[data-view="plain"] a { color: #0b3aa6; }
  html[data-view="plain"] .dim, html[data-view="plain"] .sec-lede, html[data-view="plain"] .track-card p, html[data-view="plain"] .demo-note, html[data-view="plain"] .foot p { color: #333; }
  html[data-view="plain"] .bar { background: #fff; border-color: #ccc; }
  html[data-view="plain"] .ctl { background: #fff; color: #111; }
  html[data-view="plain"] .ctl .ctl-k, html[data-view="plain"] .onair-k, html[data-view="plain"] .brand { color: #111; }
  html[data-view="plain"] input, html[data-view="plain"] textarea { background: #fff; color: #111; border-color: #777; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .program { grid-template-columns: 1fr; min-height: 0; }
  .demos { grid-template-columns: 1fr; }
  .studio-grid, .door { grid-template-columns: 1fr; }
  .numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hand-mv { display: none; }
}
@media (max-width: 860px) {
  .tc { display: none; }
  .bar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .onair-k { display: none; }
  .tl-viewer { grid-template-columns: 1fr; }
  .tl-screen { max-width: 520px; }
  .tl-editor { grid-template-columns: 96px 1fr; }
  .tl-trackhead .nm { font-size: .66rem; }
  .foot-cols { grid-template-columns: 1fr; }
  .hand-ph, .hand-open { display: none; }
}
@media (max-width: 640px) {
  :root { --bar-h: 56px; }
  body { font-size: 17px; }
  .brand-name { display: none; }
  .brand-short { display: inline; }
  .onair { font-size: .72rem; }
  .ctl { padding: 6px 8px; font-size: .68rem; }
  .ctl-motion-hide, #ctl-motion .ctl-v { display: none; }
  .mv-grid { grid-template-columns: repeat(2, 1fr); }
  .mv-pgm { grid-column: span 2; grid-row: auto; }
  .mv-tile[data-slot="5"], .mv-tile[data-slot="6"], .mv-tile[data-slot="7"], .mv-tile[data-slot="8"] { display: none; }
  .mv-note { display: none; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mixer { grid-template-columns: repeat(2, 1fr); }
  .tl-stage { gap: 12px; }
  .tl-head .sec-lede { display: none; }
  .tl-title { font-size: 1.05rem; }
  .tl-screen { max-width: 100%; }
  html[data-motion="on"] .tl-viewer { grid-template-columns: 140px 1fr; gap: 12px; align-items: start; }
  .tl-editor { grid-template-columns: 92px 1fr; }
  .tl-trackhead { gap: 4px; }
  .tl-trackhead .nm-t { display: none; }
  .tl-trackhead button { width: 26px; height: 26px; }
  .tl-card { font-size: .78rem; padding: 8px; line-height: 1.25; }
  .tl-stats { display: none; }
}
