/* Hard Fork jelly — the showcase for the three editions. idlebg.com/btcjelly/
   One stylesheet, no web fonts, no framework. The page is a stage (stills, a three-way splice, or the
   editions themselves running live), three cards, a ledger and some type. */

/* the two edition colours under the stage, registered so a change of edition can ease instead of switching */
@property --ca { syntax: "<color>"; inherits: true; initial-value: #f0a52a; }
@property --cb { syntax: "<color>"; inherits: true; initial-value: #f2587f; }

:root {
  --bg: #1D1922;
  --bg-deep: #151218;
  --ink: #ede5d7;
  --muted: #b6ac9e;
  --line: rgba(237, 229, 215, 0.13);
  --line-strong: rgba(237, 229, 215, 0.36);
  --wash: rgba(237, 229, 215, 0.07);
  --glass: rgba(22, 18, 26, 0.66);
  --gold: #e3a11f;
  /* one colour per edition: the gilt of the house edition, Astra's Morello, Argon's own mint */
  --fable: #f0a52a;
  --astra: #f2587f;
  --argon: #58b6ff;
  --live: #9be15a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Hoefler Text", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3.6vw, 56px);
  --max: 1240px;
  --max-wide: 1480px;
  --bar-h: 56px;
  --out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .45, 1);
  --ca: var(--fable);
  --cb: var(--astra);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); background: var(--bg); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  color: var(--ink); font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* the room: a soft top light, a warm floor, and a little grain so the dark is not flat */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(110% 70% at 60% -12%, rgba(124, 106, 134, 0.34) 0%, rgba(60, 50, 66, 0.14) 40%, rgba(29, 25, 34, 0) 72%),
    radial-gradient(80% 60% at 0% 110%, rgba(96, 52, 58, 0.16), rgba(29, 25, 34, 0) 70%),
    linear-gradient(180deg, #1D1922 0%, #19161d 55%, #1f191e 100%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.label, .kicker, .fig, dt, th, legend, .chip, .status, .nav a, .modes [role="tab"], .tag, .mono {
  font: 500 11px/1.3 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.visually { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 200; }
.skip:focus { left: 12px; top: 12px; }
kbd {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; margin: 0 1px;
  font: 500 11px/1 var(--mono); color: var(--ink); background: var(--wash);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
}

/* ── the bar ── */
.bar {
  position: sticky; top: 0; z-index: 60; height: var(--bar-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter);
  background: rgba(29, 25, 34, 0.5); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: background .25s ease-out, border-color .25s ease-out;
}
.bar.scrolled { background: rgba(22, 19, 26, 0.82); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand b { font: 600 14px/1 var(--sans); letter-spacing: .01em; }
.brand span { font: italic 400 19px/1 var(--serif); color: var(--muted); }
.brand span::before { content: "/"; margin: 0 8px 0 2px; font-style: normal; color: var(--line-strong); }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; letter-spacing: .16em; text-decoration: none; transition: color .15s ease-out; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--out); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"]::after { transform: none; }
.status { margin: 0; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line-strong); padding: 7px 11px; white-space: nowrap; color: var(--ink); }
.status i, .modes .pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; }
.status i::after, .modes .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 60%, 100% { transform: scale(2.8); opacity: 0; } }
.status[data-state="off"] i { background: var(--muted); }
.status[data-state="off"] i::after { display: none; }

/* ── the masthead over the stage ── */
/* the stage is a 2:1 frame that has to fit the first screen with the masthead over it: the whole hero is as wide
   as twice the height that is left, so the frame shrinks with a short window instead of cropping the slice */
.hero {
  position: relative;
  --hero-w: min(var(--max-wide), max(760px, calc((100vh - var(--bar-h) - 246px) * 2 + 2 * var(--gutter))));
}
@supports (height: 100svh) {
  .hero { --hero-w: min(var(--max-wide), max(760px, calc((100svh - var(--bar-h) - 246px) * 2 + 2 * var(--gutter)))); }
}
.hero-head {
  display: grid; grid-template-columns: auto minmax(15em, 28em); justify-content: space-between; gap: 14px 40px; align-items: end;
  max-width: var(--hero-w); margin: 0 auto; padding: clamp(18px, 2.2vw, 30px) var(--gutter) 0;
}
.kicker { margin: 0 0 12px; }
.nw { white-space: nowrap; }
h1 {
  margin: 0; letter-spacing: -0.02em; white-space: nowrap;
  font: italic 400 clamp(56px, min(9vw, 10.5vh), 136px)/0.86 var(--serif);
  font-size: clamp(56px, min(9vw, 10.5svh), 136px);
}
h1 span { display: inline-block; }
.cast { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; padding: 0; list-style: none; }
.cast li { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cast i, .chip i, .tag i, .dot-c {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 22%, transparent), 0 0 12px color-mix(in srgb, var(--c) 55%, transparent);
}
.lede { margin: 0; font: 400 clamp(17px, 1.45vw, 20px)/1.5 var(--serif); color: var(--muted); text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 400; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }

/* buttons */
.btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink);
  font: 500 14px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background .14s ease-out, color .14s ease-out, border-color .14s ease-out, transform .14s ease-out, box-shadow .2s ease-out;
}
.btn:hover { background: var(--wash); border-color: var(--ink); }
.btn:active { transform: scale(1.02, 0.96); transition-duration: 0s; }
.btn.primary { --c: var(--ink); background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--c); border-color: var(--c); color: #17131b; box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--c) 70%, transparent); }
.btn .arr { transition: transform .16s ease-out; }
.btn:hover .arr { transform: translateX(3px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.play-tri { width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* ── the stage ── */
.stage-wrap { position: relative; max-width: var(--hero-w); margin: clamp(16px, 1.6vw, 22px) auto 0; padding: 0 var(--gutter); }
/* the light the two editions throw on the wall behind the stage */
.stage-wrap::before {
  content: ""; position: absolute; z-index: -1; inset: 6% 2% -4%; pointer-events: none;
  background:
    radial-gradient(46% 62% at 26% 52%, color-mix(in srgb, var(--ca) 42%, transparent), transparent 72%),
    radial-gradient(46% 62% at 74% 52%, color-mix(in srgb, var(--cb) 42%, transparent), transparent 72%);
  filter: blur(64px); opacity: .5; transition: opacity .6s ease-out;
}
.stage-wrap { transition: --ca .7s ease-out, --cb .7s ease-out; }
.stage-wrap[data-mode="three"]::before {
  background:
    radial-gradient(34% 60% at 18% 52%, color-mix(in srgb, var(--fable) 40%, transparent), transparent 72%),
    radial-gradient(34% 60% at 50% 52%, color-mix(in srgb, var(--astra) 40%, transparent), transparent 72%),
    radial-gradient(34% 60% at 82% 52%, color-mix(in srgb, var(--argon) 40%, transparent), transparent 72%);
}
.modes {
  position: absolute; z-index: 8; top: 14px; left: calc(var(--gutter) + 14px);
  display: flex; gap: 2px; padding: 4px;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line);
}
.modes [role="tab"] {
  white-space: nowrap; appearance: none; -webkit-appearance: none; border: 0; border-radius: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; letter-spacing: .16em;
  transition: background .15s ease-out, color .15s ease-out;
}
.modes [role="tab"]:hover { color: var(--ink); background: var(--wash); }
.modes [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--bg); }
.stage-tools { position: absolute; z-index: 8; top: 14px; right: calc(var(--gutter) + 14px); display: flex; gap: 6px; }
.icon-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--line); border-radius: 0; color: var(--ink);
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background .15s ease-out, border-color .15s ease-out;
}
.icon-btn:hover { background: rgba(40, 34, 46, .85); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .exit { display: none; }
.stage-wrap.theater .icon-btn .enter { display: none; }
.stage-wrap.theater .icon-btn .exit { display: block; }

.frame {
  position: relative; width: 100%; aspect-ratio: 2 / 1;
  overflow: hidden; isolation: isolate; background: #17131b;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px rgba(0, 0, 0, .8);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
/* the stills are 16:10 with the slice between y 7% and 80%: a 2:1 window a quarter of the way down keeps all of it */
.frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; pointer-events: none; -webkit-user-drag: none; }
.splitter { touch-action: pan-y; cursor: ew-resize; }
.splitter.dragging { cursor: grabbing; }
.splitter .a { clip-path: inset(0 calc(100% - var(--s1, 50%)) 0 0); }
.three .b { clip-path: inset(0 calc(100% - var(--s2, 66.667%)) 0 0); }
.three .a { clip-path: inset(0 calc(100% - var(--s1, 33.333%)) 0 0); }
.wipe { --s1: 50%; }
.three { --s1: 33.333%; --s2: 66.667%; }
/* a picture arriving: it develops rather than switching */
.frame > img.swap-in { animation: develop .55s var(--out) both; }
@keyframes develop { from { opacity: 0; filter: brightness(1.25) saturate(.6); } }

.divider { position: absolute; z-index: 4; top: 0; bottom: 0; left: var(--at); width: 0; pointer-events: none; }
.divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--ink); box-shadow: 0 0 16px rgba(237, 229, 215, .38); }
.divider .knob {
  position: absolute; top: 50%; left: 0; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bg);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .55), 0 0 0 7px rgba(237, 229, 215, .12);
  transition: transform .25s var(--spring), box-shadow .2s ease-out;
}
.divider .knob svg { width: 22px; height: 22px; }
.splitter:hover .knob { box-shadow: 0 8px 26px rgba(0, 0, 0, .55), 0 0 0 9px rgba(237, 229, 215, .16); }
.splitter.dragging .divider.active .knob { transform: scale(1.12); }
.divider input { position: absolute; top: 50%; left: 0; width: 48px; height: 48px; margin: -24px 0 0 -24px; opacity: 0; pointer-events: none; }
.divider input:focus-visible + .knob { outline: 2px solid var(--ink); outline-offset: 5px; }
.d1 { --at: var(--s1); }
.d2 { --at: var(--s2); }

.tag {
  position: absolute; z-index: 5; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; max-width: calc(50% - 40px);
  padding: 9px 12px; background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line);
  letter-spacing: .18em; color: var(--ink); pointer-events: none; white-space: nowrap; transition: opacity .2s ease-out;
}
.tag b { font-weight: 500; }
.tag small { font-size: 10px; letter-spacing: .14em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tag.l { left: 16px; }
.tag.r { right: 16px; }
.three .tag { top: auto; bottom: 12px; left: var(--x); transform: translateX(-50%); max-width: 30%; }
.three .tag small { display: none; }
.splitter.dragging .tag { opacity: .55; }

/* the dock under the stage */
.dock { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: 0; padding: 16px 0 0; border: 0; min-width: 0; }
.dock fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.dock legend { float: left; margin: 0 8px 0 0; padding: 0; }
.dock .grow { flex: 1 1 auto; }
.live-dock legend .one, .live-dock[data-count="1"] legend .two { display: none; }
.live-dock[data-count="1"] .sync > .label { display: none; }
.live-dock[data-count="1"] legend .one { display: inline; }
.chip { position: relative; display: inline-flex; cursor: pointer; letter-spacing: .15em; }
.chip .face {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 13px;
  border: 1px solid var(--line-strong); color: var(--ink); background: transparent;
  transition: background .14s ease-out, color .14s ease-out, border-color .14s ease-out;
}
.chip input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip:hover .face { background: var(--wash); }
.chip input:checked + .face { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + .face { outline: 2px solid var(--ink); outline-offset: 3px; }
.chip input:disabled { cursor: default; }
.chip input:disabled + .face { opacity: .32; }
/* a mint: the candy, ringed by its gilded rim */
.sw {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; vertical-align: -2px;
  background: radial-gradient(circle, var(--sw) 0 50%, var(--rim, var(--sw)) 57% 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .35);
}
.sw.multi { background: var(--sw); }
.swap {
  appearance: none; -webkit-appearance: none; cursor: pointer; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink);
  transition: background .14s ease-out, transform .35s var(--spring);
}
.swap:hover { background: var(--wash); }
.swap:active { transform: rotate(180deg); }
.swap svg { width: 16px; height: 16px; }
.stage-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); max-width: 70em; }

/* ── live: the editions themselves, side by side ── */
.live { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #0d0b10; cursor: auto; }
.live[data-count="1"] { grid-template-columns: 1fr; }
.live[data-count="1"] .pane[data-slot="b"] { display: none; }
.pane { position: relative; overflow: hidden; background: #17131b; min-width: 0; }
.pane .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: brightness(.45) saturate(.7) blur(6px); transform: scale(1.06); transition: opacity .8s ease-out; }
.pane iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: transparent; opacity: 0; transition: opacity .3s ease-out; }
.pane.ready .poster { opacity: 0; transition: opacity .25s ease-in; }
.pane.ready iframe { opacity: 1; transition: opacity .6s ease-out .2s; }
.pane .tag { pointer-events: none; }
.pane .tag.l { max-width: calc(100% - 150px); }
.pane .open {
  position: absolute; z-index: 6; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line);
  transition: background .15s ease-out, border-color .15s ease-out;
}
.pane .open:hover { background: rgba(40, 34, 46, .9); border-color: var(--line-strong); }
.pane .hud {
  position: absolute; z-index: 5; left: 16px; top: auto; bottom: 62px; display: flex; gap: 14px; margin: 0; padding: 6px 9px;
  font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #cfc6b8;
  background: rgba(22, 18, 26, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: none; opacity: 0; transition: opacity .4s ease-out;
}
.pane.ready .hud { opacity: 1; }
.pane .hud b { font-weight: 500; color: var(--ink); }
.pane .load {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 14px;
  text-align: center; pointer-events: none; transition: opacity .4s ease-out;
}
.pane.ready .load { opacity: 0; }
.pane .load .ring { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(237, 229, 215, .18); border-top-color: var(--c, var(--ink)); animation: spin 1s linear infinite; }
.pane .load .msg { font: 500 11px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); max-width: 24em; }
.pane.failed .load .ring { display: none; }
.pane.failed .load { pointer-events: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.pane::after { content: ""; position: absolute; inset: 0; z-index: 7; pointer-events: none; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s ease-out; }
/* the slice that has the keys (set from the frame's own focus: the frame never matches :focus-within), or a focused link */
.pane.has-focus::after, .pane:focus-within::after { box-shadow: inset 0 0 0 2px var(--c, var(--ink)); }
.live.no-gl .load, .live.no-gl .hud { display: none; }
/* where the browser has no WebGL 2 */
.gate { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 24px; text-align: center; background: radial-gradient(60% 70% at 50% 50%, rgba(22, 18, 26, .55), rgba(22, 18, 26, .9)); }
.gate-in { display: grid; justify-items: center; gap: 12px; max-width: 30em; }
.gate p { margin: 0; color: var(--muted); font-size: 14px; }
.gate .gate-title { font: italic 400 clamp(26px, 3vw, 38px)/1.1 var(--serif); color: var(--ink); }

.sync { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sync .sep { width: 1px; height: 26px; background: var(--line-strong); margin: 0 6px; }
.tool-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.live-hint { flex-basis: 100%; margin: 0; font-size: 13.5px; color: var(--muted); }
.live-hint b { font-weight: 500; color: var(--ink); }
.live-hint .by-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .live-hint .by-mouse { display: none; }
  .live-hint .by-touch { display: inline; }
}
.live-hint kbd { height: 20px; min-width: 20px; font-size: 10px; }

/* the stage on its own: a theatre that fills the window, under the browser's own full screen where it gives one */
.stage-wrap.theater {
  position: fixed; inset: 0; z-index: 120; max-width: none; margin: 0; padding: 0; background: var(--bg-deep);
  display: flex; flex-direction: column; overflow: auto; animation: none;
}
.stage-wrap.theater .view:not([hidden]) { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.stage-wrap.theater .frame { flex: 1; aspect-ratio: auto; max-height: none; min-height: 0; box-shadow: none; }
.stage-wrap.theater .dock { padding: 12px 20px 16px; }
.stage-wrap.theater .stage-note { display: none; }
.stage-wrap.theater .modes { left: 14px; }
.stage-wrap.theater .stage-tools { right: 14px; }
.stage-wrap.theater::before { display: none; }
/* the stills keep a frame between 1:1 and 2:1 there, where a cover fit still shows the whole slice (a tall frame
   would crop a 16:10 picture to a blurred close-up); the live slices fill it, framing themselves */
@media (orientation: portrait) {
  .stage-wrap.theater .splitter.frame { flex: 0 1 auto; aspect-ratio: 1 / 1; margin-block: auto; }
}
@media (orientation: landscape) {
  .stage-wrap.theater .splitter.frame { flex: 1 1 0; width: auto; max-width: 100%; align-self: center; aspect-ratio: 2 / 1; }
}
.stage-wrap:fullscreen { background: var(--bg-deep); }
html.locked { overflow: hidden; }

/* ── sections under the fold ── */
.band { max-width: var(--max); margin: clamp(80px, 10vw, 140px) auto 0; padding: 0 var(--gutter); }
.band-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 48px; align-items: end; margin-bottom: 30px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.band-head h2 { margin: 10px 0 0; font: italic 400 clamp(34px, 4.6vw, 60px)/1.02 var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
.band-head p { margin: 0; color: var(--muted); font: 400 17px/1.55 var(--serif); max-width: 34em; text-wrap: pretty; }
.band-head .label { margin: 0; display: flex; align-items: center; gap: 12px; }
.band-head .label .n { color: var(--ink); }

/* the fork: a handle of shared history, three tines */
.fork-wrap { margin-top: 6px; }
.fork { display: block; width: 100%; height: auto; overflow: visible; }
.fork .trunk, .fork .tine { fill: none; stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fork .trunk { stroke: var(--line-strong); }
.fork .tine { stroke: var(--c); }
.js .fork .tine { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .fork.drawn .tine { animation: draw 1.1s cubic-bezier(.3, 0, .2, 1) .1s forwards; }
.js .fork.drawn .tine.t2 { animation-delay: .25s; }
.js .fork.drawn .tine.t3 { animation-delay: .4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fork .glow { fill: none; stroke: var(--c); stroke-width: 6; opacity: .14; filter: blur(4px); vector-effect: non-scaling-stroke; }
.fork .block { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fork .block.last { fill: var(--ink); stroke: var(--ink); }
.fork text { font: 500 13.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; fill: var(--muted); }
.fork text.em { fill: var(--ink); }
.fork .coin { opacity: 0; }
.js .fork .coin.on { opacity: 1; }
.fork .coin circle { fill: var(--gold); stroke: #7a5510; stroke-width: 1; }
.fork .coin text { fill: #4a3206; font: 700 11px/1 var(--sans); letter-spacing: 0; text-transform: none; }

/* the three editions */
.editions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5%; }
.editions > li { min-width: 0; }
.edition { --c: var(--ink); position: relative; display: flex; flex-direction: column; height: 100%; border-top: 2px solid var(--c); padding-top: 14px; }
[data-edition="fable"] { --c: var(--fable); }
[data-edition="astra"] { --c: var(--astra); }
[data-edition="argon"] { --c: var(--argon); }
.edition .fig { display: flex; justify-content: space-between; margin: 0 0 12px; }
.edition .fig b { font-weight: 500; color: var(--c); }

.thumb {
  --mx: 50%; --my: 40%;
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #17131b;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .35s ease-out, transform .45s var(--out);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--out); }
.thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s ease-out;
  background: radial-gradient(40% 55% at var(--mx) var(--my), rgba(255, 245, 230, .16), transparent 70%);
  mix-blend-mode: screen;
}
.thumb .wobble { position: absolute; inset: 0; z-index: 1; background-repeat: no-repeat; background-size: 2400% 100%; background-position: 0 0; opacity: 0; }
.thumb .wobble.on { opacity: 1; }
.thumb::after {
  content: "open \2192"; position: absolute; z-index: 3; right: 10px; bottom: 10px; font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  padding: 8px 10px; background: var(--ink); color: var(--bg); opacity: 0; transform: translateY(4px); transition: opacity .16s ease-out, transform .16s ease-out;
}
.thumb:hover, .thumb:focus-visible { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 26px 60px -24px color-mix(in srgb, var(--c) 60%, transparent); }
.thumb:hover::before { opacity: 1; }
.thumb:hover img { transform: scale(1.035); }
.thumb:hover::after, .thumb:focus-visible::after { opacity: 1; transform: none; }
.thumb:active img, .thumb:active .wobble { transform: scale(1.03, 0.975); transition-duration: .08s; }

.edition h3 { margin: 18px 0 0; font: italic 400 clamp(36px, 3.8vw, 52px)/1 var(--serif); letter-spacing: -0.01em; }
.edition h3 a { text-decoration: none; }
.edition h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--c); }
.edition .by { margin: 8px 0 0; font: 500 11px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.edition .by strong { color: var(--c); font-weight: 500; }
.edition .what { margin: 14px 0 0; font: 400 17px/1.5 var(--serif); text-wrap: pretty; }
.adds { list-style: none; margin: 14px 0 0; padding: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.adds li { position: relative; padding: 6px 0 6px 18px; border-top: 1px solid var(--line); }
.adds li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.mints { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: auto 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; }
.adds { margin-bottom: 14px; }
.mints .label { margin-right: 6px; }
.mints li { display: contents; }
.mints .sw { width: 18px; height: 18px; }
.mints .sw.open { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink); }
.mints .opens { margin-left: 4px; font: 500 10px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px 14px; margin: 0; padding: 18px 0 0; }
.spec div { min-width: 0; }
.spec dt { margin: 0 0 4px; white-space: nowrap; }
.spec dd { margin: 0; font: 400 20px/1.1 var(--mono); letter-spacing: -0.02em; white-space: nowrap; }
.spec dd small { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.go { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.go .btn.primary { flex: 1 1 auto; }
.go .btn { padding: 0 14px; }

/* the ledger */
.ledger-scroll { overflow-x: auto; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 680px; table-layout: fixed; }
.ledger thead td { width: 16%; }
.ledger th, .ledger td { text-align: left; vertical-align: top; padding: 15px 20px 15px 0; border-bottom: 1px solid var(--line); }
.ledger thead th, .ledger thead td { border-bottom-color: var(--line-strong); padding-bottom: 12px; }
.ledger thead th span { display: block; margin-top: 6px; font: italic 400 26px/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--c); }
.ledger tbody th { width: 16%; white-space: nowrap; }
.ledger td { color: var(--ink); width: 28%; }
.ledger td small, .ledger-note { color: var(--muted); font-size: 13.5px; }
.ledger .num { font: 400 17px/1.2 var(--mono); letter-spacing: -0.02em; }
.ledger .sws { display: flex; gap: 5px; margin-top: 8px; }
.ledger .sw { width: 13px; height: 13px; }
.meter { position: relative; display: block; height: 4px; margin-top: 10px; background: var(--wash); overflow: hidden; }
.meter i { position: absolute; top: 0; bottom: 0; left: 0; width: var(--v); background: var(--c); transform-origin: left; }
.meter i.hi { opacity: .38; }
.reveal-on .ledger-scroll .meter i { transform: scaleX(0); transition: transform 1.2s var(--out) .15s; }
.reveal-on .ledger-scroll.in .meter i { transform: none; }
.ledger-note { margin: 16px 0 0; max-width: 64em; }

/* inside: what each one is made of */
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 22px 20px 22px 0; min-width: 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { margin: 0; }
.facts dd { margin: 10px 0 0; }
.facts .big { display: block; font: italic 400 clamp(34px, 3.6vw, 50px)/1 var(--serif); letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.facts .big small { font-size: .62em; margin-left: .06em; color: var(--muted); }
.facts .sub { display: block; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.keys-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5%; margin-top: 36px; }
.keys-card { border-top: 2px solid var(--c, var(--ink)); padding-top: 14px; }
.keys-card h3 { margin: 0 0 12px; font: italic 400 26px/1.1 var(--serif); color: var(--c); }
.keys-card ul { list-style: none; margin: 0; padding: 0; }
.keys-card li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.keys-card li span:first-child { color: var(--ink); }
.keys-card .new { color: var(--c); font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-left: 8px; }
.inside-note { margin: 18px 0 0; color: var(--muted); font-size: 13.5px; max-width: 64em; }

/* ── colophon ── */
footer {
  max-width: var(--max); margin: clamp(80px, 10vw, 140px) auto 0; padding: 26px var(--gutter) calc(44px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 48px; color: var(--muted); font-size: 14px;
}
footer::before { content: ""; grid-column: 1 / -1; height: 1px; margin: -26px 0 6px; background: var(--line-strong); }
footer p { margin: 0 0 10px; max-width: 40em; }
footer .made { font: italic 400 28px/1.2 var(--serif); color: var(--ink); }
footer .made a { text-decoration-color: var(--gold); }
footer .heart { color: var(--astra); font-style: normal; display: inline-block; animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: none; } 10% { transform: scale(1.18); } 20% { transform: scale(.96); } 30% { transform: scale(1.1); } }
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.socials a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink); transition: background .14s ease-out, border-color .14s ease-out; }
.socials a:hover { background: var(--wash); border-color: var(--ink); }
.to-top { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .14s ease-out, border-color .14s ease-out; }
.to-top:hover { border-color: var(--ink); }
.to-top:hover { color: var(--ink); }

/* ── arrival ── */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes settle { from { transform: scale(1.02); filter: brightness(.55) saturate(.7); } }
.hero .kicker { animation: fade .8s ease-out .05s both; }
h1 span { animation: rise 1s var(--out) both; }
h1 span:nth-child(1) { animation-delay: .08s; }
h1 span:nth-child(2) { animation-delay: .2s; }
.cast { animation: fade .9s ease-out .45s both; }
.hero-copy { animation: rise .9s var(--out) .3s both; }
.stage-wrap .frame { animation: settle 1.2s var(--out) .15s both; }
.stage-wrap .modes, .stage-wrap .stage-tools { animation: fade .8s ease-out .45s both; }
.stage-wrap .dock { animation: fade .9s ease-out .6s both; }
.stage-wrap.settled .frame, .stage-wrap.settled .modes, .stage-wrap.settled .stage-tools, .stage-wrap.settled .dock { animation: none; }
.reveal-on .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--out), transform .9s var(--out); }
.reveal-on .reveal.in { opacity: 1; transform: none; }
.reveal-on .editions > li.reveal:nth-child(2) { transition-delay: .1s; }
.reveal-on .editions > li.reveal:nth-child(3) { transition-delay: .2s; }

/* ── narrower ── */
@media (max-width: 1120px) {
  .band-head, footer { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts div:nth-child(4) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .spec dd { font-size: 17px; }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .bar .status { margin-left: auto; }
}
@media (max-width: 900px) {
  .fork { display: none; }
  /* stacked, the fork is a line down the left with a branch to each edition */
  .editions { grid-template-columns: 1fr; gap: 48px; margin-top: 10px; padding-left: 22px; border-left: 1px solid var(--line-strong); }
  .edition { border-top: 0; padding-top: 0; }
  .edition::before { content: ""; position: absolute; left: -22px; top: 6px; width: 16px; height: 1px; background: var(--c); }
  .edition::after { content: ""; position: absolute; left: -26px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
  .spec dd { font-size: 20px; }
  .keys-grid { grid-template-columns: 1fr; gap: 28px; }
}
/* the ledger's labels may wrap once their column is narrower than the longest of them */
@media (max-width: 1020px) {
  .ledger tbody th { white-space: normal; }
}
@media (max-width: 760px) {
  :root { --bar-h: 52px; }
  .brand span { display: none; }
  .hero-head { grid-template-columns: 1fr; justify-content: stretch; align-items: start; padding-top: 22px; }
  .stage-wrap { padding: 0; margin-top: 18px; }
  .stage-wrap::before { inset: 10% 0 0; }
  .frame { aspect-ratio: 1 / 1; box-shadow: 0 0 0 1px var(--line); }
  .frame > img, .pane .poster { object-position: 50% 40%; }
  .modes { position: static; margin: 0 calc(var(--gutter) + 54px) 10px var(--gutter); width: auto; justify-content: stretch; }
  .modes [role="tab"] { flex: 1 1 auto; justify-content: center; padding: 0 8px; letter-spacing: .08em; white-space: nowrap; }
  .stage-tools { top: 0; right: var(--gutter); }
  .stage-wrap.theater .modes { margin: 10px 66px 10px 10px; }
  .stage-wrap.theater .stage-tools { top: 10px; right: 10px; }
  .dock { padding: 14px var(--gutter) 0; gap: 12px 16px; }
  .dock fieldset { flex: 1 1 100%; }
  .dock legend { float: none; margin: 0 0 7px; }
  .chip .face { padding: 0 11px; }
  .stage-note { padding: 0 var(--gutter); }
  .tag { bottom: 10px; padding: 7px 9px; gap: 7px; letter-spacing: .14em; }
  .wipe .tag, .pane .tag { top: 10px; bottom: auto; }
  .tag small { display: none; }
  .tag.l { left: 10px; }
  .tag.r { right: 10px; }
  .three .tag { top: 12px; bottom: auto; }
  .divider .knob { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .pane .hud { left: 10px; bottom: 54px; }
  .pane .open { right: 10px; bottom: 10px; }
  .sync .sep { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div, .facts div + div { padding: 18px 14px 18px 0; border-left: 0; }
  .facts div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts div:nth-child(4) { padding-left: 14px; border-left: 1px solid var(--line); }
}
/* a phone: the dock becomes a grid (the swap between the two rows it swaps), the ledger a list of rows */
@media (max-width: 760px) {
  .dock { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; }
  .dock > * { grid-column: 1 / -1; }
  .dock > fieldset[data-side], #wipe-dock > fieldset:nth-of-type(1), #wipe-dock > fieldset:nth-of-type(2) { grid-column: 1; }
  .dock > .swap { grid-column: 2; grid-row: 1 / span 2; }
  .live-dock[data-count="1"] > [data-side="b"], .live-dock[data-count="1"] > .swap { display: none; }
  .ledger-scroll { overflow: visible; }
  .ledger table { min-width: 0; }
  .ledger thead { display: none; }
  .ledger tbody, .ledger tbody tr { display: block; }
  .ledger tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .ledger tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 10px; border: 0; }
  .ledger td { width: auto; padding: 0; border: 0; font-size: 14px; overflow-wrap: anywhere; }
  .ledger td::before { display: block; margin-bottom: 4px; font: italic 400 18px/1.1 var(--serif); color: var(--c); }
  .ledger td[data-edition="fable"]::before { content: "Fable"; }
  .ledger td[data-edition="astra"]::before { content: "Astra"; }
  .ledger td[data-edition="argon"]::before { content: "Argon"; }
  .ledger .num { font-size: 15px; }
}
@media (max-width: 480px) {
  h1 { font-size: clamp(50px, 16vw, 76px); }
  .cast { flex-direction: column; gap: 5px; margin-top: 14px; }
  .bar .status { padding: 6px 9px; letter-spacing: .14em; }
  .spec { grid-template-columns: repeat(3, auto); }
  .spec dd { font-size: 17px; }
  .go .btn.primary { flex-basis: 100%; }
  .go .btn { flex: 1 1 auto; }
}

@media (hover: none) {
  .thumb::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .js .fork .tine { stroke-dashoffset: 0; }
  .status i::after, .modes .pulse::after, footer .heart { animation: none; }
  .pane .poster, .pane iframe, .pane.ready .poster, .pane.ready iframe { transition: none; }
  .thumb img, .btn, .btn .arr, .thumb, .divider .knob, .swap { transition: none; }
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-on .ledger-scroll .meter i { transform: none; transition: none; }
  .pane .load .ring { animation: none; border-top-color: var(--line-strong); }
}
html:not(.js) .modes, html:not(.js) .stage-tools, html:not(.js) .dock, html:not(.js) .divider,
html:not(.js) [data-live-start], html:not(.js) [data-play], html:not(.js) .go .nudge { display: none !important; }
html:not(.js) .splitter { cursor: auto; }

@media print {
  body::before, .bar, .modes, .stage-tools, .dock, .gate, .go button, .skip, .fork { display: none !important; }
  body { background: #fff; color: #000; }
}
