@font-face{font-family:'Instrument Serif';src:url(fonts/instrument-serif-regular.woff2) format('woff2');font-display:swap}
@font-face{font-family:'Instrument Serif';font-style:italic;src:url(fonts/instrument-serif-italic.woff2) format('woff2');font-display:swap}
@font-face{font-family:'Plex Mono';src:url(fonts/IBMPlexMono-400.woff2) format('woff2');font-display:swap}
:root{color-scheme:light;--paper:#f7f5f0;--card:#fffdf9;--ink:#1e2023;--muted:#5d5f63;--line:rgba(30,32,35,.16);--accent:#b4553b;--accent-btn:#a84a31;--night:#1b1d2e;--exploration-footer-bg:#f7f5f0;--exploration-footer-ink:#5d5f63;--exploration-footer-border:rgba(30,32,35,.16);scroll-behavior:smooth}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.65 system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif}
a{color:inherit;text-underline-offset:5px}
button,input{font:inherit}
button,a,input{touch-action:manipulation}
:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
button{cursor:pointer}
img{display:block;max-width:100%;height:auto}
video{width:100%;display:block;background:var(--night);aspect-ratio:16/9;border:1px solid var(--line)}
.pixel{image-rendering:pixelated}
h1,h2,h3,p,figure{margin:0}
h1,h2,h3{font-family:'Instrument Serif',Georgia,'Times New Roman',serif;font-weight:400;line-height:1.02}
h1{font-size:clamp(64px,8.4vw,128px);letter-spacing:-.03em}
h2{font-size:clamp(40px,5vw,72px);letter-spacing:-.02em}
h3{font-size:28px;line-height:1.1;margin-bottom:14px}
em{color:var(--accent);font-style:italic}
p{max-width:60ch}
.eyebrow,.micro,.masthead,.number,footer,.chapter-list small,.compare-label,figcaption span,.compare-control,.sounds span,.hero-frame figcaption{font-family:'Plex Mono','Courier New',monospace;font-size:12px;letter-spacing:.2em}
.eyebrow{margin-bottom:22px;color:var(--accent)}
.masthead{position:sticky;top:0;z-index:10;min-height:72px;padding:14px 4vw;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);background:rgba(247,245,240,.94);backdrop-filter:blur(8px)}
.masthead a{text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.wordmark{font-size:15px;letter-spacing:.17em}
.wordmark span{font-size:10px;margin-left:22px;color:var(--muted)}
nav{display:flex;gap:28px}
.masthead nav a{font-size:12px;letter-spacing:.12em;white-space:nowrap}
.create-yours{color:var(--accent)}
.hero{max-width:1440px;margin:auto;display:grid;grid-template-columns:1fr 1.25fr;gap:64px;align-items:center;padding:88px 7vw 96px;border-bottom:1px solid var(--line)}
.lede{margin:26px 0 34px;font-family:'Instrument Serif',Georgia,serif;font-size:25px;line-height:1.35;max-width:30ch}
.hero-actions{display:flex;flex-wrap:wrap;gap:14px}
.hero-frame img{width:100%;border:1px solid var(--line);box-shadow:0 30px 60px -30px rgba(30,32,35,.45)}
.hero-frame figcaption{color:var(--muted);font-size:11px;letter-spacing:.12em;padding:14px 0 0}
.button{display:inline-flex;justify-content:space-between;align-items:center;gap:28px;padding:13px 22px;min-height:50px;text-decoration:none;border:1px solid var(--ink);font-size:14px;background:transparent}
.button.dark{background:var(--ink);color:var(--paper)}
.button.dark:hover{background:var(--accent-btn);border-color:var(--accent-btn)}
.section{max-width:1440px;margin:auto;padding:100px 7vw;border-bottom:1px solid var(--line);scroll-margin-top:72px}
.section-heading{display:grid;grid-template-columns:1.2fr 1fr;gap:60px;align-items:end;margin-bottom:42px}
.section-heading>p{color:var(--muted);max-width:44ch}
.chapter-list{display:grid;grid-template-columns:repeat(6,1fr);border:1px solid var(--line);border-top:0;background:var(--card)}
.chapter-list button{color:var(--muted);border:0;border-right:1px solid var(--line);background:none;display:grid;text-align:left;padding:16px 18px;gap:4px;font-size:11px;font-family:'Plex Mono','Courier New',monospace}
.chapter-list button:last-child{border-right:0}
.chapter-list button:hover,.chapter-list button[aria-current=true]{background:var(--ink);color:var(--paper)}
.chapter-list button:hover span,.chapter-list button[aria-current=true] span{color:var(--paper)}
.chapter-list span{font-family:'Instrument Serif',Georgia,serif;font-size:21px;color:var(--ink);letter-spacing:0;line-height:1.15}
.chapter-list small{letter-spacing:.1em}
.micro{color:var(--muted);font-size:11px;letter-spacing:.06em;margin-top:15px;max-width:none}
.micro a{margin-left:15px;display:inline-flex;align-items:center;min-height:44px}
.pair-figure,.sync{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.pair-figure img{width:100%;aspect-ratio:16/9;object-fit:cover;border:1px solid var(--line);background:var(--card)}
figcaption{font-size:14px;color:var(--muted);padding:14px 0}
figcaption span{display:block;margin-bottom:6px;color:var(--accent);font-size:11px}
.sync-control{margin-top:6px}
.text-button{display:inline-flex;align-items:center;padding:0;min-height:44px;border:0;background:none;color:var(--accent);text-decoration:underline;text-underline-offset:5px;font-size:15px}
.notes-grid,.fix-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-top:56px}
.fix-grid{grid-template-columns:repeat(3,1fr);margin-top:40px}
.number{display:block;color:var(--accent);padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:22px;font-size:11px}
.notes-grid p,.fix-grid p{font-size:15px;color:var(--muted)}
.compare{position:relative;overflow:hidden;aspect-ratio:16/9;background:var(--night);border:1px solid var(--line)}
.compare>img,.before,.before img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.before{clip-path:inset(0 calc(100% - var(--reveal)) 0 0)}
.before:after{content:'';position:absolute;top:0;bottom:0;left:var(--reveal);width:2px;background:var(--paper);transform:translateX(-1px)}
.compare-label{position:absolute;top:14px;padding:5px 10px;background:var(--paper);font-size:10px}
.compare-label.left{left:14px}
.compare-label.right{right:14px;color:var(--accent)}
.compare-control{display:grid;grid-template-columns:auto 1fr 52px;gap:16px;align-items:center;margin-top:14px;color:var(--muted);font-size:11px;letter-spacing:.1em}
.compare-control output{text-align:right}
input[type=range]{display:block;width:100%;min-height:44px;accent-color:var(--accent)}
.lineup{width:100%;border:1px solid var(--line);background:var(--card)}
.wide-loop{margin-top:48px}
.sounds{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.sounds li{display:grid;grid-template-columns:260px 1fr;gap:24px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}
.sounds span{font-size:11px;color:var(--accent)}
.sounds audio{width:100%;min-height:44px}
.stage{position:relative;aspect-ratio:16/9;max-height:84vh;width:100%;border:1px solid var(--line);overflow:hidden;background:var(--night);box-shadow:0 30px 60px -30px rgba(30,32,35,.45)}
.stage-poster{width:100%;height:100%;object-fit:cover;filter:brightness(.62)}
.stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.stage.live .stage-poster,.stage.live .stage-play,.stage.live .stage-full{display:none}
.stage-play{position:absolute;left:50%;top:50%;translate:-50% -50%;display:inline-flex;align-items:center;gap:12px;padding:16px 28px;border:0;background:var(--paper);color:var(--ink);font:400 clamp(22px,2.6vw,32px)/1 'Instrument Serif',Georgia,serif;white-space:nowrap}
.stage-play:hover{background:var(--card)}
.stage-play svg{width:24px;height:24px;fill:var(--accent)}
.stage-full{position:absolute;right:12px;top:12px;z-index:3;width:44px;height:44px;display:grid;place-items:center;border:0;background:rgba(247,245,240,.9);color:var(--ink)}
.stage-full svg{width:22px;height:22px;stroke:currentColor;stroke-width:2}
.stage:fullscreen{border:0;max-height:none;box-shadow:none}
/* On phones and narrow windows the game puts its buttons or help under the canvas and keeps up to 110px for
   them (fit() in game/index.html): while it plays, the frame is the full-width 16:9 canvas plus that row. */
@media(max-width:760px),(pointer:coarse){.stage.live{aspect-ratio:auto}.stage.live::before{content:"";display:block;padding-top:calc(56.25% + 96px)}}
.endnote{max-width:none;background:var(--card);text-align:center}
.endnote h2{margin:auto}
.endnote p{margin:24px auto;color:var(--muted)}
.end-links{display:flex;align-items:center;justify-content:center;gap:26px;flex-wrap:wrap;font-size:14px}
.end-links a{min-height:44px;display:inline-flex;align-items:center}
footer{padding:30px 5vw;color:var(--muted);display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border-top:1px solid var(--line);font-size:11px}
footer [data-exploration-controls]{border-top:0;background:none}
.skip{position:absolute;left:12px;top:-100px;z-index:20;padding:12px;background:var(--ink);color:var(--paper)}
.skip:focus{top:12px}
/* ---------- Hero: the game itself ---------- */
.hero{display:block;padding:40px 7vw 72px}
.hero-head{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:end;margin-bottom:24px}
.hero-head h1{font-size:clamp(56px,7vw,112px)}
.hero-head .lede{margin:0 0 10px;font-size:21px}
.hero-help{color:var(--muted);font-size:14px;margin:0}
.hero-down{margin-top:24px}
.cast-proof+.cast-proof{margin-top:24px}
.cast-proof .prompt{margin-top:0}
.loop-sprite{background:#e9e5dc}
/* ---------- Process: routes, prompts, workflows, sheets, toolkit ---------- */
.section-heading.sub{margin:64px 0 28px;align-items:start}
.section-heading.sub h3{font-size:clamp(28px,3vw,40px);margin:0}
.routes{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
.routes li{font-size:13px;color:var(--muted);line-height:1.5}
.routes img{width:100%;aspect-ratio:1;object-fit:cover;border:1px solid var(--line);background:var(--card);margin-bottom:12px}
.routes span{display:block;font-family:'Plex Mono','Courier New',monospace;font-size:10px;letter-spacing:.14em;color:var(--ink);margin-bottom:6px}
.routes .win img{outline:3px solid var(--accent);outline-offset:-3px}
.routes .win span{color:var(--accent)}
.prompt{margin-top:32px;background:var(--card);border:1px solid var(--line);border-left:3px solid var(--accent);padding:20px 24px}
.prompt figcaption{padding:0 0 12px;font-size:13px}
.prompt blockquote,.wrap blockquote{margin:0;font-family:'Plex Mono','Courier New',monospace;font-size:12.5px;line-height:1.7;color:var(--ink);white-space:normal;overflow-wrap:anywhere}
mark{background:rgba(180,85,59,.14);color:inherit;padding:1px 0}
.prompt-pair{display:grid;grid-template-columns:1.4fr 1fr;gap:20px;align-items:start}
.prompt-pair.three{grid-template-columns:repeat(3,1fr)}
.prompt-pair .prompt,.prompt-stack .prompt{margin-top:24px}
.triptych{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.triptych img{width:100%;aspect-ratio:1;object-fit:cover;border:1px solid var(--line);background:var(--card)}
.triptych.anim img{background:#2b2d3a}
.heat{margin-top:32px;max-width:784px}
.heat img{width:100%;border:1px solid var(--line)}
.raw-wide{margin-top:40px}
.raw-wide img{width:100%;border:1px solid var(--line)}
.cast-proof{display:grid;grid-template-columns:minmax(220px,.7fr) 1.6fr;gap:28px;margin-top:48px;align-items:start}
.cast-proof img{width:100%;aspect-ratio:1;object-fit:cover;border:1px solid var(--line)}
.cast-proof .prompt-stack .prompt:first-child{margin-top:0}
.wf-list{display:grid;grid-template-columns:minmax(0,1fr);gap:28px}
.wf{min-width:0;border:1px solid var(--line);background:var(--card);padding:24px}
.wf header{display:grid;grid-template-columns:200px 1fr;gap:4px 28px;align-items:baseline;margin-bottom:20px}
.wf header .number{grid-row:span 2;border:0;padding:0;margin:0}
.wf header h3{margin:0;font-size:24px}
.wf header p{margin:0;color:var(--muted);font-size:14px}
.nodes{list-style:none;margin:0;padding:4px 0 8px;display:flex;gap:28px;overflow-x:auto;scrollbar-width:thin}
.nodes li{position:relative;flex:0 0 auto;min-width:150px;max-width:210px;padding:12px 14px;background:var(--paper);border:1px solid var(--line);border-top:4px solid var(--muted);font-size:14px;line-height:1.35;display:grid;gap:4px}
.nodes li:not(:last-child):after{content:'';position:absolute;right:-24px;top:50%;width:20px;height:1px;background:var(--ink)}
.nodes li:not(:last-child):before{content:'';position:absolute;right:-24px;top:calc(50% - 3px);border:3px solid transparent;border-left:5px solid var(--ink);border-right:0}
.nodes b{font-family:'Plex Mono','Courier New',monospace;font-weight:400;font-size:9.5px;letter-spacing:.16em;color:var(--muted)}
.nodes small{font-size:12px;color:var(--muted)}
.nodes .in{border-top-color:#8f8a80}
.nodes .pr{border-top-color:#c8a35a}
.nodes .md{border-top-color:var(--accent)}
.nodes .tl{border-top-color:#3f5f8a}
.nodes .lp{border-top-color:#3f5f8a;background:rgba(63,95,138,.07);border-style:dashed;border-top-style:solid}
.nodes .gt{border-top-color:var(--ink)}
.wrap{margin-top:16px}
.wrap summary,.runlog summary{cursor:pointer;color:var(--accent);font-size:14px;min-height:32px;display:flex;align-items:center}
.wrap blockquote{padding:14px 16px;border-left:3px solid var(--accent);background:var(--paper);margin-top:8px}
.table-title{margin:64px 0 8px;font-size:30px}
.table-note{color:var(--muted);font-size:15px;margin-bottom:20px}
.table-wrap{overflow-x:auto;border:1px solid var(--line);background:var(--card)}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;vertical-align:top;padding:14px 16px;border-bottom:1px solid var(--line)}
thead th{font-family:'Plex Mono','Courier New',monospace;font-weight:400;font-size:10.5px;letter-spacing:.16em;color:var(--muted);text-transform:uppercase}
.runlog td:first-child{font-family:'Plex Mono','Courier New',monospace;font-size:12px;color:var(--muted);white-space:nowrap}
.runlog td:nth-child(2){white-space:nowrap}
.runlog td:last-child{white-space:nowrap;color:var(--accent)}
.runlog tr.replaced td:last-child{color:var(--muted)}
.runlog tr.replaced strong{text-decoration:line-through;text-decoration-thickness:1px;color:var(--muted)}
.runlog details p{margin:6px 0 4px;font-family:'Plex Mono','Courier New',monospace;font-size:12px;line-height:1.6;max-width:70ch}
.runs{list-style:none;margin:0;padding:0;columns:2;column-gap:40px;border-top:1px solid var(--line);font-size:13.5px}
.runs li{break-inside:avoid;display:grid;grid-template-columns:44px 40px 1fr;gap:10px;align-items:baseline;padding:5px 0;border-bottom:1px solid var(--line)}
.runs time,.runs b{font-family:'Plex Mono','Courier New',monospace;font-size:11px;color:var(--muted);font-weight:400}
.runs b{letter-spacing:.08em;color:var(--accent)}
.runs summary{cursor:pointer;list-style:none;color:var(--ink)}
.runs summary::-webkit-details-marker{display:none}
.runs summary:hover{color:var(--accent)}
.runs i{font-style:normal;font-size:11px;color:var(--muted);margin-left:8px}
.runs .replaced summary{color:var(--muted);text-decoration:line-through;text-decoration-thickness:1px}
.runs .replaced i{text-decoration:none;display:inline-block}
.runs details p{margin:6px 0 4px;font-family:'Plex Mono','Courier New',monospace;font-size:11.5px;line-height:1.55;color:var(--muted)}
.toolkit tbody th{font-weight:500;white-space:nowrap}
.toolkit tr.group th{background:var(--paper);font-family:'Plex Mono','Courier New',monospace;font-weight:400;font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--accent)}
.toolkit td:last-child{color:var(--muted);white-space:nowrap}
.sheet-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}
.sheet-tabs button{min-height:44px;padding:8px 18px;border:1px solid var(--ink);background:transparent;color:var(--ink);font-size:14px}
.sheet-tabs button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
.sheet-pair{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.sheet-view{background:var(--card);border:1px solid var(--line);padding:18px}
.sheet-view figcaption{padding:0 0 14px}
.sheet-view figcaption b{font-weight:400;color:var(--ink)}
.sheet-stage{display:grid;grid-template-columns:minmax(96px,160px) 1fr;gap:16px;align-items:start}
.sheet-stage canvas{width:100%;height:auto;background:#e9e5dc;border:1px solid var(--line)}
.sheet-controls{display:grid;grid-template-columns:auto auto 1fr 40px;gap:16px;align-items:center;margin-top:16px;color:var(--muted);font-family:'Plex Mono','Courier New',monospace;font-size:11px;letter-spacing:.1em}
.sheet-controls .text-button{font-family:system-ui,sans-serif;letter-spacing:0}
@media(max-width:1000px){.routes{grid-template-columns:repeat(3,1fr)}.prompt-pair,.prompt-pair.three{grid-template-columns:1fr}.sheet-pair{grid-template-columns:1fr}.wf header{grid-template-columns:1fr}.wf header .number{grid-row:auto}}
@media(max-width:760px){.runs{columns:1}.hero-head{grid-template-columns:1fr;gap:16px}.routes{grid-template-columns:1fr 1fr}.triptych{grid-template-columns:1fr}.cast-proof{grid-template-columns:1fr}.prompt{padding:16px}.prompt blockquote{font-size:12px}.sheet-stage{grid-template-columns:1fr}.sheet-stage canvas[data-play]{max-width:180px}.sheet-controls{grid-template-columns:auto 1fr 32px}.sheet-controls label{display:none}.wf{padding:16px}.table-title{font-size:26px}}
@media(max-width:1000px){.wordmark span{display:none}.hero{grid-template-columns:1fr;gap:40px;padding:56px 7vw 64px}.chapter-list{grid-template-columns:repeat(3,1fr)}.chapter-list button:nth-child(3){border-right:0}.chapter-list button:nth-child(-n+3){border-bottom:1px solid var(--line)}.fix-grid{grid-template-columns:1fr;gap:24px}}
@media(max-width:760px){.wordmark span{display:none}.masthead{padding:10px 5vw;min-height:64px}.wordmark{font-size:13px}nav{gap:14px}.masthead nav a{font-size:11px;letter-spacing:.06em}nav a[href='#process'],nav a[href='#film']{display:none}.lede{font-size:21px}.section{padding:60px 6vw;scroll-margin-top:64px}.section-heading{grid-template-columns:1fr;gap:20px}.chapter-list{grid-template-columns:1fr 1fr}.chapter-list button{border-bottom:1px solid var(--line)}.chapter-list button:nth-child(odd){border-right:1px solid var(--line)}.chapter-list button:nth-child(even){border-right:0}.pair-figure,.sync,.notes-grid{grid-template-columns:1fr;gap:12px}.notes-grid{gap:32px;margin-top:40px}.compare-control{grid-template-columns:1fr 52px}.compare-control label{grid-column:1/-1}.compare-label{font-size:9px;padding:4px 6px;letter-spacing:.1em}.sounds li{grid-template-columns:1fr;gap:8px}.micro a{display:flex;width:fit-content;margin:0}.end-links{flex-direction:column}footer{font-size:10px}.stage-play{padding:12px 20px}}
@media(max-width:360px){h1{font-size:56px}nav{gap:10px}}
@media(prefers-reduced-motion:reduce){:root{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}
