/* LoomWatch landing page — "Obsidian & Gilt".
   Gold means you / act here. Blue means only "working now". Structure is graphite warp. */

/* ---------------------------------------------------------------- Tokens */

:root {
  --ground: #08080A;
  --ground-dot: #1E1E23;
  --panel: #101013;
  --panel-solid: #131316;
  --ink: #F5F3EE;
  --ink-2: #A9A59C;
  --ink-3: #85817A;
  --warp: #666259;
  --accent: #E9C46A;
  --accent-fill: #D8A93C;
  --accent-on-fill: #08080A;
  --accent-dim: #8C7130;
  --accent-tint: #1A1508;
  --live: #6AB8FF;
  --live-dim: #2F7DD3;
  --live-tint: #0A2038;
  --alert: #F2635C;
  --ok: #4FC98D;
  --halt: #8C8C98;
  --m-researcher: #7FC8B6;
  --m-writer: #B9A3F5;
  --hairline: rgb(255 255 255 / 0.09);
  --hairline-2: rgb(255 255 255 / 0.14);
  --slip: #F1EEE6;
  --slip-ink: #17150F;
  --slip-ink-2: #56524A;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 18px 48px rgb(0 0 0 / 0.55);
  --glass: rgb(16 16 19 / 0.66);
  --bloom-gold: drop-shadow(0 0 6px rgb(233 196 106 / 0.22));
  --bloom-live: drop-shadow(0 0 6px rgb(106 184 255 / 0.3));

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --gutter: 24px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --ground: #FAF8F3;
  --ground-dot: #DFD9CD;
  --panel: #FFFFFF;
  --panel-solid: #FFFFFF;
  --ink: #17150F;
  --ink-2: #56524A;
  --ink-3: #6E6862;
  --warp: #8B857C;
  --accent: #8A6A16;
  --accent-fill: #AD8A20;
  --accent-on-fill: #17150F;
  --accent-dim: #9C8440;
  --accent-tint: #F5F0E4;
  --live: #175CD3;
  --live-dim: #2F7DD3;
  --live-tint: #EAF2FF;
  --alert: #C0342E;
  --ok: #17724A;
  --halt: #605F6B;
  --m-researcher: #1D7563;
  --m-writer: #6B4FC4;
  --hairline: rgb(23 21 15 / 0.10);
  --hairline-2: rgb(23 21 15 / 0.16);
  --slip: #FFFFFF;
  --slip-ink: #17150F;
  --slip-ink-2: #56524A;
  --shadow: 0 1px 2px rgb(23 21 15 / 0.04), 0 10px 30px rgb(23 21 15 / 0.08);
  --glass: rgb(255 255 255 / 0.72);
  --bloom-gold: none;
  --bloom-live: none;
  color-scheme: light;
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: 'cv11', 'ss01';
  font-variant-ligatures: no-contextual;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .86em; }
code { color: var(--ink); background: var(--accent-tint); border: 1px solid var(--hairline); border-radius: 4px; padding: 0 .3em; white-space: nowrap; }
em { font-style: italic; }
::selection { background: var(--accent-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent-fill); color: var(--accent-on-fill); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.dots {
  background-color: var(--ground);
  background-image: radial-gradient(var(--ground-dot) 1px, transparent 1.2px);
  background-size: 16px 16px;
}

.micro { font: 600 11px/14px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--hairline-2); border-bottom-width: 2px; border-radius: 4px; font: 500 11px/1 var(--mono); color: var(--ink-2); vertical-align: 1px; }
.say-live { color: var(--live); font-weight: 600; }
.say-gold { color: var(--accent); font-weight: 600; }


/* ---------------------------------------------------------------- Buttons and chips */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--hairline-2); border-radius: 8px;
  background: transparent; color: var(--ink-2);
  font: 500 13px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .09s var(--ease), color .09s var(--ease), border-color .09s var(--ease);
}
.btn:hover { background: var(--accent-tint); color: var(--ink); border-color: var(--accent-dim); }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-on-fill); font-weight: 600; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-on-fill); }
:root[data-theme="light"] .btn-primary:hover { background: #9C7C1C; border-color: #9C7C1C; }
.btn-lg { height: 46px; padding: 0 26px; border-radius: 10px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; font-size: 15px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.iconbtn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { color: var(--accent); border-color: var(--hairline-2); }
.iconbtn svg { width: 18px; height: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  font: 600 13px/1 var(--sans); color: var(--ink); white-space: nowrap; vertical-align: 2px;
}
.chip.outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.chip.dashed { background: transparent; border: 1px dashed var(--accent); }
.to { color: var(--warp); margin: 0 4px; }

/* ---------------------------------------------------------------- Header */

.top { position: fixed; inset: 0 0 auto 0; z-index: 30; background: var(--glass); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); border-bottom: 1px solid var(--hairline); }
.top-row { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); height: 58px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 13px; color: var(--accent); }
.top-nav { display: flex; gap: 22px; margin-left: 8px; }
.top-nav a { color: var(--ink-2); text-decoration: none; font: 500 13px/1 var(--sans); }
.top-nav a:hover { color: var(--ink); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-get .short { display: none; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: var(--accent); filter: var(--bloom-gold); }

/* ---------------------------------------------------------------- Cold open */

.open { position: relative; height: 260vh; }
.open-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 40px; align-items: center; max-width: 1240px; margin: 0 auto; padding: 72px var(--gutter) 40px; }
.open-copy { display: grid; position: relative; z-index: 2; }
.open-before, .open-after { grid-area: 1 / 1; align-self: center; }
.open-copy .micro { display: block; margin-bottom: 18px; text-wrap: balance; }
.open-line, .open h1 { font: 400 clamp(40px, 5.4vw, 72px)/1.02 var(--serif); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.open-line em, .open h1 em { color: var(--accent); }
.open-sub { margin: 22px 0 0; max-width: 470px; color: var(--ink-2); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.cta { display: flex; align-items: center; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.js .open-after { opacity: var(--after, 0); pointer-events: var(--after-pe, none); }
.js .open-before { opacity: var(--before, 1); }
html:not(.js) .open-before, html:not(.js) .open-field, html:not(.js) .open-cue { display: none; }
html:not(.js) .open, .open.still { height: auto; }
html:not(.js) .open-stage, .open.still .open-stage { position: relative; height: auto; min-height: 88vh; }

.open-field { position: relative; height: min(560px, 72vh); }
.term {
  position: absolute; left: 0; top: 0; width: 260px; height: 150px; overflow: hidden;
  background: var(--panel-solid); border: 1px solid var(--hairline-2); border-radius: 10px; box-shadow: var(--shadow);
  will-change: transform, width, height;
}
.term::after { content: ''; position: absolute; inset: 0; background: var(--warp); opacity: var(--thread, 0); pointer-events: none; }
.term-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid var(--hairline); opacity: var(--content, 1); }
.term-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--hairline-2); }
.term-bar span { margin-left: 8px; font: 500 11px/1 var(--mono); color: var(--ink-2); }
.term pre { margin: 0; padding: 10px 12px; font: 400 11.5px/1.65 var(--mono); color: var(--ink-2); white-space: pre-wrap; opacity: var(--content, 1); }
.term pre b { color: var(--accent); font-weight: 400; }
.term .dim { color: var(--ink-3); }
.caret { display: inline-block; width: 7px; height: 13px; background: var(--ink-2); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-tag { position: absolute; font: 500 11px/1 var(--mono); color: var(--ink-2); transform: translateX(-50%); white-space: nowrap; }
.open-you { position: absolute; font: 600 11px/1 var(--mono); color: var(--accent); opacity: 0; transform: translateX(-50%); }
.open-paste { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.open-paste path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 5; opacity: .7; }
.open-paste circle { fill: var(--accent); filter: var(--bloom-gold); }
.paste-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; max-width: 46%; font: 400 15px/1.3 var(--serif); font-style: italic; color: var(--accent); }
.open-weft { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.open-weft .w-weft { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; filter: var(--bloom-gold); }
.open-weft .w-halo { stroke: var(--ground); stroke-width: 7; }
.open-weft .w-warp { stroke: var(--warp); stroke-width: 2; }
.open-weft .w-you { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 5; }
.open-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 400 15px/1 var(--serif); font-style: italic; color: var(--ink-3); opacity: var(--before, 1); }
.open-cue i { width: 1px; height: 34px; background: linear-gradient(var(--ink-3), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------------------------------------------------------------- The run (story) */

.story { position: relative; max-width: 1240px; margin: 0 auto; padding: 40px var(--gutter) 40px; --threads: 3; }
.story-intro { max-width: 760px; padding: 80px 0 40px; }
.eyebrow { color: var(--accent); }
.story-lede { font: 400 clamp(26px, 3.1vw, 38px)/1.22 var(--serif); margin: 14px 0 0; text-wrap: balance; }
.story-note { color: var(--ink-3); font-size: 14px; margin: 18px 0 0; }

.chapter { position: relative; display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding: 11vh 0; min-height: 92vh; border-top: 1px solid var(--hairline); }
.ch-copy { padding-top: 24px; }
.ch-panel { position: sticky; top: 92px; }
.ch-n { display: flex; align-items: center; gap: 12px; font: 600 11px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.ch-n b { font: 400 15px/1 var(--mono); letter-spacing: 0; color: var(--accent); }
.ch-n::after { content: ''; flex: 0 0 48px; height: 2px; border-radius: 2px; background: var(--warp); transition: background .32s var(--ease); }
.chapter.seen .ch-n::after, .band-head .ch-n::after { background: var(--accent); }
.chapter h2, .band h2 { font: 400 clamp(32px, 3.6vw, 48px)/1.08 var(--serif); letter-spacing: -.012em; margin: 18px 0 0; text-wrap: balance; }
.band h2 em { color: var(--accent); }
.ch-body { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; margin: 20px 0 0; text-wrap: pretty; }
.fine { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.fine div { padding: 12px 0; border-bottom: 1px solid var(--hairline); display: grid; grid-template-columns: 11px 1fr; column-gap: 12px; }
.fine div::before { content: ''; grid-row: span 2; width: 11px; height: 2px; margin-top: 10px; background: var(--accent); border-radius: 2px; }
.fine dt { font: 600 14px/1.45 var(--sans); color: var(--ink); }
.fine dd { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

/* The window every panel shares, so it reads as one app moving forward. */
.win { background: var(--panel-solid); border: 1px solid var(--hairline-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--hairline); }
.win-bar > svg { width: 24px; height: 11px; color: var(--accent); flex: none; }
.win-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 13.5px; }
.win-title b { font-weight: 600; white-space: nowrap; }
.win-title .mono { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-body { padding: 20px; }
.badge { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--hairline-2); font: 600 10.5px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; flex: none; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; }
.badge[data-state="running"] { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.badge[data-state="running"]::before { background: currentColor; animation: breathe 2.4s ease-in-out infinite; }
.badge[data-state="waiting"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge[data-state="waiting"]::before { border-radius: 1px; transform: rotate(45deg); }
.badge[data-state="done"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge[data-state="done"]::before { background: currentColor; }
@keyframes breathe { 50% { opacity: .35; } }

/* 01 · Threads */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 12px; text-align: left; border: 1px solid var(--hairline-2); border-radius: 10px; background: transparent; cursor: pointer; transition: background .09s var(--ease), border-color .09s var(--ease); }
.app:hover { border-color: var(--accent-dim); }
.app[aria-checked="true"] { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.mono-tile { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--hairline-2); font: 600 12px/1 var(--mono); color: var(--ink); background: var(--ground); }
.app-text { display: grid; gap: 2px; min-width: 0; }
.app-name { font: 600 14px/1.2 var(--sans); }
.app-meta { font: 400 11.5px/1.2 var(--mono); color: var(--ink-3); }
.app-check { margin-left: auto; flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--hairline-2); display: grid; place-items: center; }
.app[aria-checked="true"] .app-check { background: var(--accent-fill); border-color: var(--accent-fill); }
.app-check svg { width: 11px; height: 11px; stroke: var(--accent-on-fill); opacity: 0; }
.app[aria-checked="true"] .app-check svg { opacity: 1; }
.warp-preview { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.warp-preview svg { width: 100%; height: auto; display: block; overflow: visible; }
.wp-warp { stroke: var(--warp); stroke-width: 2; }
.wp-you { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 5; }
.wp-label { font: 500 11px var(--mono); fill: var(--ink-2); text-anchor: middle; }
.wp-label.you { fill: var(--accent); }
.wp-weft { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; filter: var(--bloom-gold); }
.wp-halo { stroke: var(--panel-solid); stroke-width: 7; }

/* 02 · Build */
.sentence { margin: 0; font: 400 22px/1.75 var(--serif); color: var(--ink); text-wrap: pretty; }
.sentence .chip { font-size: 13px; height: 28px; vertical-align: 3px; padding: 0 4px 0 10px; }
.sentence .chip.dashed { padding: 0 4px 0 10px; }
.chip select {
  appearance: none; -webkit-appearance: none; border: 0; border-left: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23A9A59C' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 6px center / 9px 6px;
  color: var(--ink-2); font: 400 12px/1 var(--mono); height: 22px; padding: 0 20px 0 8px; margin-left: 4px; cursor: pointer; border-radius: 0 999px 999px 0;
}
.chip select:hover { color: var(--accent); }
.chip select option { background: var(--panel-solid); color: var(--ink); }
.chip .x { display: grid; place-items: center; width: 20px; height: 20px; margin-left: 2px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font: 400 15px/1 var(--sans); }
.chip .x:hover { color: var(--alert); background: color-mix(in srgb, var(--alert) 12%, transparent); }
.repair { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; margin-left: 4px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: 500 12.5px/1 var(--sans); cursor: pointer; vertical-align: 3px; }
.repair:hover { background: var(--accent-tint); }
.propose { margin-top: 16px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-tint); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.propose .said { font: 400 14px/1.5 var(--sans); color: var(--ink); }
.propose .said::before { content: 'You: '; color: var(--ink-3); }
.propose .what { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.propose .what .micro { color: var(--accent); }
.propose .acts { display: flex; gap: 8px; margin-left: auto; }
.team-views { margin-top: 18px; }
.canvas { position: relative; border: 1px solid var(--hairline); border-radius: 10px; padding: 34px 18px 22px; display: flex; align-items: center; justify-content: center; gap: 0; min-height: 170px; overflow-x: auto; }
.card { position: relative; flex: 0 1 158px; min-width: 132px; padding: 10px 12px 11px; background: var(--panel-solid); border: 1px solid var(--hairline-2); border-radius: 7px; box-shadow: 0 6px 18px rgb(0 0 0 / .25); transition: border-color .24s var(--ease), box-shadow .24s var(--ease); }
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgb(23 21 15 / .05), 0 6px 16px rgb(23 21 15 / .06); }
.card .step { position: absolute; left: -8px; top: -8px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ground); border: 1px solid var(--accent); color: var(--accent); font: 600 10px/1 var(--mono); }
.card .kind { font: 600 10px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; gap: 6px; }
.card .start { color: var(--accent); }
.card .nm { font: 600 13.5px/1.2 var(--sans); margin-top: 7px; letter-spacing: -.01em; }
.card .ln { font-size: 11.5px; line-height: 1.35; color: var(--ink-2); margin-top: 3px; }
.card .ap { font: 400 11px/1 var(--mono); color: var(--accent); margin-top: 8px; }
.card.you { border: 1.5px dashed var(--accent); background: var(--accent-tint); }
.card.flash { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.edge { flex: 0 0 34px; height: 2px; background: var(--warp); position: relative; }
.edge::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--warp); border-right: 0; }
.canvas-note { position: absolute; left: 14px; top: 10px; font: 400 11px/1 var(--mono); color: var(--ink-3); }
.yaml { margin: 0; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--ground); font: 400 12px/1.65 var(--mono); color: var(--ink); overflow: auto; max-height: 300px; white-space: pre; }
.yaml .k { color: var(--ink-2); }
.yaml .c { color: var(--ink-3); }
.yaml .v { color: var(--ink); }
.yaml .hl { background: var(--accent-tint); box-shadow: -18px 0 0 var(--accent-tint), 18px 0 0 var(--accent-tint); color: var(--accent); }
/* The Build panel shows the team as its sentence only, the canvas, or the team file. */
.team-views[data-view="story"] { display: none; }
.team-views[data-view="team"] .yaml, .team-views[data-view="trace"] .canvas { display: none; }
.build-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.dial, .seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--hairline-2); border-radius: 9px; background: var(--ground); }
.dial button, .seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font: 500 12.5px/1 var(--sans); cursor: pointer; }
.dial button:hover, .seg button:hover { color: var(--ink); }
.dial button[aria-checked="true"], .seg button[aria-checked="true"] { background: var(--accent-tint); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }

/* 04–07 · The team's chat: one chat, four views of it, and one message box that goes where the work is. */
.chat-body { display: grid; gap: 14px; }
.chat-body > *, .watch-body > * { min-width: 0; }
.members { list-style: none; margin: 0; padding: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; border-bottom: 1px solid var(--hairline); }
.mem { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1 var(--sans); color: var(--ink); }
.mem .tc-av { width: 22px; height: 22px; font-size: 8.5px; }
.mem em { font: 400 12px/1 var(--sans); font-style: normal; color: var(--ink-3); }
.mem.working em { color: var(--live); }
.mem.waiting em { color: var(--accent); }
.tc-av.working { border-color: var(--live); animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 28%, transparent); } }
.clog { display: grid; align-content: start; gap: 10px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.tc-empty { text-align: center; padding: 6px 8px 2px; }
.tc-empty h3 { margin: 0; font: 400 26px/1.15 var(--serif); letter-spacing: -.01em; }
.tc-empty p { margin: 8px auto 0; max-width: 420px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.tc-empty b { color: var(--accent); font-weight: 600; }
.ask-piece { display: grid; gap: 6px; }
.piece-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
.piece-line b { color: var(--ink); font-weight: 600; }
.piece-line .link { font-size: 12.5px; }
/* The team on a piece of work as a thread on the loom: each agent a knot on one gold line. */
.weft { position: relative; display: inline-flex; gap: 8px; flex: none; }
.weft::before { content: ''; position: absolute; left: 11px; right: 11px; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--accent-dim); }
.weft .tc-av { position: relative; width: 22px; height: 22px; font-size: 8.5px; }
.tc-to { font-size: 12px; color: var(--ink-3); }
.req-h { margin-bottom: -6px; }
.req-h[hidden], .requests[hidden] { display: none; }
.requests { display: grid; gap: 8px; }
.req { display: grid; grid-template-columns: 18px 1fr; gap: 2px 12px; align-items: start; width: 100%; padding: 10px 14px; text-align: left; border: 1px solid var(--hairline-2); border-radius: 10px; background: transparent; cursor: pointer; }
.req:hover { border-color: var(--accent-dim); }
.req[aria-checked="true"] { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.req .dot { grid-row: span 2; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--hairline-2); margin-top: 2px; display: grid; place-items: center; }
.req[aria-checked="true"] .dot { border-color: var(--accent); }
.req[aria-checked="true"] .dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.req .t { font: 500 14.5px/1.4 var(--sans); color: var(--ink); }
.req .m { font: 400 12px/1.4 var(--sans); color: var(--ink-3); }
.req .m b { font-weight: 500; color: var(--ink-2); }
.sim-note { margin: 0; font-size: 12px; color: var(--ink-3); }

/* The message box. The line above it says where a message goes before it is sent. */
.box { display: grid; gap: 8px; padding: 10px 10px 10px 14px; border: 1px solid var(--hairline-2); border-radius: 14px; background: var(--panel); animation: ev-in .24s var(--ease); }
.box:focus-within { border-color: var(--accent-dim); }
.box-where { margin: 0; display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: start; gap: 2px 8px; font: 500 12.5px/1.35 var(--sans); color: var(--ink-2); }
.box-where svg { width: 14px; height: 14px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.box-where em { grid-column: 2; }
.box[data-route="team"] .box-where, .box[data-route="agent"] .box-where { color: var(--accent); }
.box[data-route="note"] .box-where { color: var(--live); }
.box-where em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.box-where em.off { color: var(--alert); }
.box-try { display: flex; flex-wrap: wrap; gap: 6px; }
.box-try[hidden] { display: none; }
.try { max-width: 100%; height: 26px; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px dashed var(--hairline-2); border-radius: 999px; background: transparent; color: var(--ink-2); font: 400 12px/1 var(--sans); cursor: pointer; }
.try:hover { border-color: var(--accent-dim); color: var(--ink); }
.box-field { display: flex; align-items: flex-end; gap: 10px; }
.box textarea { flex: 1; min-width: 0; padding: 2px 0; border: 0; background: transparent; resize: none; color: var(--ink); font: 400 15px/1.5 var(--sans); outline: none; }
.box textarea::placeholder { color: var(--ink-3); }
.box-send { display: flex; gap: 6px; flex: none; }
.box-send [hidden] { display: none; }
.box-now { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.box-away { margin: 0; padding: 10px 12px; border: 1px dashed var(--hairline-2); border-radius: 10px; font-size: 12.5px; color: var(--ink-3); }
.box-away .link { font-size: 12.5px; }
.box-slot:empty { display: none; }

/* 05 · Watch: the piece of work, what the agents say, and Details beside it. */
.watch-body { display: grid; gap: 12px; }
.piece { display: grid; gap: 10px; }
.piece-head { display: grid; gap: 8px; }
.piece-head:empty { display: none; }
.picked { margin: 0; justify-self: end; font-size: 12px; font-style: italic; color: var(--ink-3); }
.talk { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--hairline-2); }
.talk-line { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.talk-line b { color: var(--ink); font-weight: 600; }
.talk-line .tc-dots { margin-left: 6px; color: var(--live); vertical-align: 1px; }
.tlink { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink-2); font: 500 12.5px/1 var(--sans); cursor: pointer; }
.tlink svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.tlink:hover { color: var(--ink); border-color: var(--hairline-2); }
.tlink[aria-expanded="true"] { color: var(--accent); }
.details { padding-top: 12px; border-top: 1px solid var(--hairline); }
.details[hidden] { display: none; }
.details-head { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.details-head b { font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.details-head span { font-size: 12px; color: var(--ink-3); }
.narration { margin: 10px 0 4px; font: 400 19px/1.35 var(--serif); color: var(--ink); min-height: 1.35em; text-wrap: pretty; }
.lanes-wrap { margin-top: 8px; }
.lanes { width: 100%; height: auto; display: block; overflow: visible; }
.ln-name { font: 600 11.5px var(--sans); fill: var(--ink-2); }
.ln-name.you { fill: var(--accent); }
.ln-warp { stroke: var(--warp); stroke-width: 1; opacity: .8; }
.ln-work { fill: var(--accent-fill); }
.ln-work.live { fill: var(--live); filter: var(--bloom-live); }
.ln-wait { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ln-wait.live { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.ln-stitch { stroke: var(--ink-2); stroke-width: 1.4; }
.ln-hand { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 3; fill: none; }
.ln-dot { fill: var(--accent); }
.ln-note { fill: var(--accent); stroke: var(--panel-solid); stroke-width: 1.5; }
.ln-cut { stroke: var(--ink); stroke-width: 1.6; }
.ln-head { stroke: var(--accent); stroke-width: 1.5; }
.ln-axis { font: 400 10px var(--mono); fill: var(--ink-3); }
.scrub { margin-top: 10px; }
.scrub label { display: flex; align-items: center; gap: 12px; }
.scrub input { flex: 1; accent-color: var(--accent-fill); height: 24px; }
.tchat-log { list-style: none; margin: 0; padding: 2px 2px 4px; display: grid; align-content: start; gap: 9px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
/* Scrolled down: earlier messages fade out at the top, so there is plainly more above. */
.tchat-log.clipped { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 36px); mask-image: linear-gradient(to bottom, transparent, #000 36px); }
.tchat-none { color: var(--ink-3); font: italic 400 15px/1.4 var(--serif); }
/* Each member keeps one colour: neither gold, which is you, nor blue, which is working now. */
.m-researcher { --m: var(--m-researcher); }
.m-writer { --m: var(--m-writer); }
.m-you { --m: var(--accent); }
.tc-av { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--m) 45%, transparent); background: color-mix(in srgb, var(--m) 16%, var(--panel-solid)); color: var(--m); font: 600 10px/1 var(--sans); letter-spacing: .02em; }
.tc-msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; }
.tc-msg.continued { margin-top: -5px; }
.tc-main { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.tc-meta { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.tc-meta b { font-weight: 600; color: var(--m); }
.tc-meta time, .tc-notice time { font: 400 11px/1 var(--mono); color: var(--ink-3); }
.tc-bubble { max-width: min(100%, 440px); padding: 8px 11px; border-radius: 4px 14px 14px 14px; border: 1px solid color-mix(in srgb, var(--m) 24%, transparent); background: color-mix(in srgb, var(--m) 8%, var(--panel-solid)); font-size: 13.5px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.tc-msg.continued .tc-bubble { border-radius: 14px; }
.tc-bubble p { margin: 0; }
.tc-at { font-weight: 600; color: var(--m); }
.tc-quote { display: grid; margin: 0 0 6px; padding: 2px 0 2px 8px; border-left: 2px solid var(--m); font-size: 12px; line-height: 1.4; color: var(--ink-2); text-align: left; }
.tc-quote b { font-weight: 600; color: var(--m); }
.tc-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-file { display: grid; gap: 6px; }
.tc-file-to { font-size: 12px; color: var(--ink-2); }
.tc-doc { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--hairline-2); background: var(--panel); }
.tc-doc svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.3; stroke-linejoin: round; }
.tc-doc > span { display: grid; min-width: 0; }
.tc-doc b { font: 500 12.5px/1.35 var(--mono); color: var(--ink); }
.tc-doc span span { font-size: 12px; color: var(--ink-3); }
.tc-under { font-size: 11.5px; color: var(--ink-3); }
/* Yours sit on the right, in gold. */
.tc-msg.mine { grid-template-columns: minmax(0, 1fr); }
.tc-msg.mine .tc-gutter { display: none; }
.tc-msg.mine .tc-main { justify-items: end; }
.tc-msg.mine .tc-bubble { border-radius: 14px 4px 14px 14px; border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-tint); }
.tc-msg.mine.continued .tc-bubble { border-radius: 14px; }
/* An answer still owed: blue while an agent writes it, a dashed gold outline while it waits for you. */
.tc-bubble.typing { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--live); }
.tc-msg.mine .tc-bubble.typing { border-style: dashed; border-color: var(--accent); color: var(--accent); }
.tc-dots { display: inline-flex; gap: 3px; }
.tc-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: tc-dot 1.2s ease-in-out infinite; }
.tc-dots i:nth-child(2) { animation-delay: .15s; }
.tc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tc-dot { 30% { opacity: 1; transform: translateY(-2px); } }
.tc-notice { justify-self: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--hairline-2); font-size: 12px; color: var(--ink-2); text-align: center; }
.tchat-log .fresh { animation: ev-in .24s var(--ease); }
@keyframes ev-in { from { opacity: 0; transform: translateY(4px); } }
.needs-you { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; height: 40px; border-radius: 9px; border: 1px dashed var(--accent); color: var(--accent); background: var(--accent-tint); text-decoration: none; font: 500 14px/1 var(--sans); }
.needs-you:hover { border-style: solid; }
.piece .needs-you, .piece .ask-perm { margin-top: 0; }
/* Your notes: a team note starts nothing, so its outline is dashed; a note to an agent says when it was taken. */
.tc-msg.teamnote .tc-bubble { border-style: dashed; }
.tc-msg.note .tc-under { color: var(--live); }
.tc-msg.note.taken .tc-under { color: var(--ok); }


/* 06 · Review: decided on the message that asks */
.win-review[data-state="waiting"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.rv-q { margin: 0; font: 400 19px/1.3 var(--serif); text-wrap: pretty; }
.rv-msg .tc-main, .ans-msg .tc-main { justify-items: stretch; }
.rv-msg .tc-bubble, .ans-msg .tc-bubble { max-width: 100%; padding: 12px 14px; }
.tc-turn { display: grid; gap: 6px; justify-items: end; margin-top: 6px; }
.tc-turn .rv-acts { margin-top: 0; }
.tc-tip { margin: 0; font-size: 12px; color: var(--ink-3); }
.tc-tip[hidden] { display: none; }
.rv-box { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--ground); }
.rv-box ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; }
.rv-box li::marker { font: 500 12px var(--mono); color: var(--ink-3); }
.src { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; margin-left: 6px; border-radius: 4px; border: 1px solid var(--hairline-2); font: 400 10.5px/1 var(--mono); color: var(--ink-2); vertical-align: 1px; white-space: nowrap; }
.src.missing { border: 1px dashed var(--alert); color: var(--alert); }
.src.fixed { border-color: var(--accent); color: var(--accent); }
.dropped { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.rv-flag { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.rv-flag b { color: var(--alert); font-weight: 600; }
.rv-flag.good b { color: var(--ok); }
.rv-note { margin-top: 16px; display: grid; gap: 6px; }
.rv-note textarea { width: 100%; border: 1px solid var(--hairline-2); border-radius: 8px; background: var(--ground); color: var(--ink); font: 400 14px/1.5 var(--sans); padding: 9px 12px; resize: vertical; min-height: 44px; }
.rv-note textarea:focus { outline: none; border-color: var(--accent); }
.rv-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.rv-quiet { text-align: center; padding: 28px 10px; }
.rv-quiet .big { margin: 0; font: 400 26px/1.25 var(--serif); }
.rv-quiet p { color: var(--ink-2); font-size: 14px; margin: 10px auto 0; max-width: 380px; }
.rv-quiet .btn { margin-top: 18px; }
.rv-shape { width: 46px; height: 46px; margin: 0 auto 18px; display: grid; place-items: center; }
.rv-shape i { width: 24px; height: 24px; border: 2px solid var(--halt); border-radius: 3px; transform: rotate(45deg); }
.rv-shape.live i { border-radius: 50%; border-color: var(--live); background: var(--live); transform: none; width: 14px; height: 14px; animation: breathe 2.4s ease-in-out infinite; }
.rv-shape.gold i { border-color: var(--accent); }
.rv-shape.done i { border-color: var(--ok); background: var(--ok); border-radius: 50%; transform: none; width: 18px; height: 18px; }
.rv-shape.warn i { border-color: var(--alert); border-style: dashed; border-radius: 50%; transform: none; }
.rv-log { margin: 18px 0 0; padding: 0; list-style: none; text-align: left; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--hairline); padding-top: 14px; }
.rv-log b { color: var(--accent); font-weight: 600; }

/* 07 · Result: the answer in the chat, and its record in Details */
.res-empty { text-align: center; padding: 40px 10px; }
.res-empty .big { margin: 0; font: 400 26px/1.25 var(--serif); }
.res-empty p { color: var(--ink-2); font-size: 14px; margin: 10px auto 0; max-width: 360px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.res-chat { display: grid; gap: 12px; }
.res-chat > .piece-line { padding-left: 2px; }
.ans-msg .reader h3 { margin-top: 0; font-size: 28px; }
.ans-doc { display: grid; gap: 4px; }
.ans-doc b { font: 400 20px/1.2 var(--serif); }
.ans-doc span { font-size: 13px; color: var(--ink-2); }
.ans-doc .m { font: 400 11px/1.3 var(--mono); color: var(--ink-3); }
.ans-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.ans-tools .copied { font-size: 12px; color: var(--ok); }
.verdict, .tbtn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--hairline-2); background: transparent; font: 500 12px/1 var(--sans); cursor: pointer; }
.verdict { border-radius: 999px; }
.verdict::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.verdict.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.verdict.warn { color: var(--alert); border: 1px dashed var(--alert); }
.tbtn { border-radius: 7px; color: var(--ink-2); }
.tbtn:hover { color: var(--ink); border-color: var(--accent-dim); }
.res-details { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.slip .worth.flash { animation: worth 1.2s var(--ease); }
@keyframes worth { 30% { background: color-mix(in srgb, var(--accent) 30%, transparent); } }
.reader .micro { color: var(--ink-3); }
.reader h3 { margin: 8px 0 0; font: 400 32px/1.1 var(--serif); letter-spacing: -.01em; }
.reader .intro { margin: 8px 0 0; font: 400 18px/1.45 var(--serif); color: var(--ink-2); }
.reader ul { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.55; }
.reader li::marker { color: var(--accent); }
.reader .unchecked { color: var(--ink); }
.reader .written { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.filecard { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--hairline-2); border-radius: 10px; }
.filecard .ico { width: 30px; height: 36px; border: 1px solid var(--hairline-2); border-radius: 4px 9px 4px 4px; display: grid; place-items: end center; padding-bottom: 5px; font: 600 8.5px/1 var(--mono); color: var(--ink-3); flex: none; }
.filecard .fn { font: 500 13px/1.3 var(--sans); }
.filecard .fm { font: 400 11.5px/1.3 var(--sans); color: var(--ink-3); }
.filecard .acts { margin-left: auto; display: flex; gap: 6px; }
.filecard .acts span { font: 500 12px/1 var(--sans); color: var(--ink-2); padding: 6px 8px; border-radius: 6px; border: 1px solid var(--hairline); }
.slip-wrap { padding: 4px 6px 10px; }
.slip { position: relative; background: var(--slip); color: var(--slip-ink); padding: 18px 20px 26px; transform: rotate(-1.1deg); font: 400 12px/1.6 var(--mono); box-shadow: 0 14px 34px rgb(0 0 0 / .35); --tooth: 7px; -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tooth)) 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tooth)) 100%; }
:root[data-theme="light"] .slip { box-shadow: 0 1px 2px rgb(23 21 15 / .08), 0 12px 30px rgb(23 21 15 / .12); border: 1px solid var(--hairline); }
.slip .head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; padding-bottom: 10px; border-bottom: 1px dashed color-mix(in srgb, var(--slip-ink) 30%, transparent); }
.slip dl { margin: 10px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 3px 16px; }
.slip dt { color: var(--slip-ink-2); }
.slip dd { margin: 0; }
.slip .worth { margin-top: 10px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--slip-ink) 30%, transparent); }
.slip .worth b { font-weight: 600; }
.slip .worth .bad { color: #B42E28; }
.slip .slip-foot { margin-top: 10px; color: var(--slip-ink-2); font-size: 10.5px; }
.res-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.res-acts .copied { font-size: 12.5px; color: var(--ok); }

/* ---------------------------------------------------------------- Bands after the run */

.band { padding: 18vh 0 14vh; border-top: 1px solid var(--hairline); }
.band-head { max-width: 640px; }

/* 07 · Tomorrow */
.fabric-wrap { margin-top: 44px; border: 1px solid var(--hairline-2); border-radius: 14px; background: var(--panel-solid); box-shadow: var(--shadow); padding: 22px 24px 24px; }
.fabric-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sched { display: inline-flex; align-items: center; flex-wrap: wrap; row-gap: 6px; }
.sched .chip { height: 24px; font-size: 12px; }
.press { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
/* The pile is handled, not read: dragging a page never selects its words. */
.pile { position: relative; height: 470px; touch-action: pan-y; outline: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pile:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 10px; }
.issue { position: absolute; top: 16px; left: 58%; width: 320px; height: 430px; margin-left: -160px; overflow: hidden; padding: 20px 22px; border-radius: 4px; background: var(--slip); color: var(--slip-ink); box-shadow: 0 1px 0 rgb(255 255 255 / .5) inset, 0 14px 30px rgb(0 0 0 / .45); cursor: pointer; transition: transform .43s var(--ease), filter .3s var(--ease); }
/* The paper you point at says which issue it is. */
.pile-tag { position: absolute; z-index: 400; pointer-events: none; display: grid; gap: 1px; padding: 6px 9px; transform: translate(-50%, calc(-100% - 14px)); border: 1px solid var(--hairline-2); border-radius: 7px; background: var(--panel-solid); box-shadow: 0 8px 22px rgb(0 0 0 / .35); white-space: nowrap; }
.pile-tag b { font: 500 12px/1.2 var(--mono); color: var(--accent); }
.pile-tag span { font: 400 11px/1.3 var(--sans); color: var(--ink-2); }
.pile-hint { margin: 2px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.pile-hint .for-touch { display: none; }
@media (hover: none) { .pile-hint .for-pointer { display: none; } .pile-hint .for-touch { display: inline; } }
:root[data-theme="light"] .issue { border: 1px solid rgb(23 21 15 / .1); box-shadow: 0 1px 2px rgb(23 21 15 / .06), 0 12px 28px rgb(23 21 15 / .12); }
.issue .mast { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--slip-ink); }
.issue .mast b { font: 400 25px/1 var(--serif); }
.issue .mast span, .issue .sub { font: 400 10.5px var(--mono); color: var(--slip-ink-2); }
.issue .sub { display: flex; justify-content: space-between; margin: 6px 0 12px; }
/* Ten headlines don't fit a page: the list fades out above the colophon, and the count says how many. */
.issue ol { list-style: none; margin: 0; padding: 0; counter-reset: item; display: grid; gap: 7px; max-height: 292px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.issue ol.writing { -webkit-mask-image: none; mask-image: none; }
.issue li { counter-increment: item; display: grid; grid-template-columns: 16px 1fr; gap: 6px; font: 500 12px/1.35 var(--sans); }
.issue li::before { content: counter(item); font: 400 10px/1.6 var(--mono); color: var(--slip-ink-2); }
.issue li small { display: block; font: 400 10.5px/1.35 var(--sans); color: var(--slip-ink-2); }
.issue .writing { gap: 12px; }
.issue .writing li { display: block; height: 30px; border-radius: 3px; background: linear-gradient(90deg, rgb(23 21 15 / .07), rgb(23 21 15 / .15), rgb(23 21 15 / .07)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.issue .writing li::before { content: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.issue .colophon { position: absolute; left: 22px; right: 30px; bottom: 14px; display: flex; justify-content: space-between; gap: 10px; padding: 6px 0 0; border-top: 1px solid rgb(23 21 15 / .15); font: 400 9.5px var(--mono); color: var(--slip-ink-2); }
.issue .colophon span { white-space: nowrap; }
.issue .colophon span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.issue .stamp { position: absolute; right: 16px; bottom: 54px; transform: rotate(-9deg); padding: 4px 8px; border: 2px solid currentColor; border-radius: 6px; background: rgb(241 238 230 / .7); font: 700 10.5px/1.25 var(--mono); letter-spacing: .04em; text-transform: uppercase; text-align: center; opacity: .85; }
.stamp.ok, .stamp.wait { color: #8A6A16; }
.stamp.wait { border-style: dashed; }
.stamp.bad { color: #B4372E; }
.stamp.live { color: #175CD3; }
.issue .note { position: absolute; left: 20px; bottom: 46px; width: 150px; transform: rotate(-3deg); padding: 10px 12px 12px; background: #E9C46A; color: #17150F; font: 400 17px/1.15 var(--serif); box-shadow: 0 6px 14px rgb(0 0 0 / .25); }
.issue .note small { display: block; margin-bottom: 4px; font: 600 9px var(--sans); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.press-side .day-story { margin-top: 0; padding-top: 0; border-top: 0; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.press-side .day-story p { font-size: 25px; line-height: 1.32; min-height: 4.2em; }
.press-acts { margin-top: 18px; }
.press-count { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }
.day-story { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: 170px 1fr; gap: 6px 24px; align-items: baseline; min-height: 96px; }
.day-story .when { font: 400 12px/1.5 var(--mono); color: var(--ink-3); }
.day-story .when b { display: block; font: 600 11px/1.4 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.day-story p { margin: 0; font: 400 22px/1.4 var(--serif); text-wrap: pretty; }
.day-story p .q { color: var(--accent); }

/* 08 · Why a loom */
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: center; }
.band-why h2 { font-size: clamp(34px, 4vw, 54px); }
.seg { margin-top: 28px; }
.seg button { height: 34px; padding: 0 16px; font-size: 13px; }
.swatch { margin: 0; padding: 22px; border: 1px solid var(--hairline-2); border-radius: 14px; background: var(--panel-solid); box-shadow: var(--shadow); }
.swatch svg { width: 100%; height: auto; display: block; overflow: visible; }
.swatch figcaption { margin-top: 12px; font: 400 18px/1.4 var(--serif); color: var(--ink-2); min-height: 2.8em; }
.sw-warp { stroke: var(--warp); stroke-width: 3; stroke-linecap: round; transition: opacity .32s var(--ease); }
.sw-warp.you { stroke: var(--accent); stroke-dasharray: 6 6; stroke-width: 2.5; }
.sw-warp.off { opacity: .22; stroke-dasharray: 2 6; }
.sw-weft { fill: none; stroke: var(--accent); stroke-width: 4.5; stroke-linecap: round; filter: var(--bloom-gold); }
.sw-halo { stroke: var(--panel-solid); stroke-width: 9; }
.sw-weft:nth-of-type(3n) { stroke: var(--accent-dim); }
.sw-tag { font: 500 11.5px var(--mono); fill: var(--ink-2); text-anchor: middle; transition: opacity .32s var(--ease); }
.sw-tag.you { fill: var(--accent); }
.sw-tag.off { opacity: .35; }
.sw-x { font: 400 11px var(--sans); fill: var(--ink-3); text-anchor: middle; font-style: italic; }
.pillars { list-style: none; margin: 72px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.pillars li { padding: 26px 28px 30px 0; border-bottom: 1px solid var(--hairline); display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-content: start; }
.pillars li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--hairline); }
.p-n { grid-row: span 2; font: 400 22px/1 var(--serif); font-style: italic; color: var(--accent); }
.pillars h3 { margin: 0; font: 600 16px/1.4 var(--sans); letter-spacing: -.01em; }
.pillars p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.footnote { margin: 22px 0 0; font-size: 13px; color: var(--ink-3); max-width: 720px; }

/* 09 · Start */
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; align-items: start; }
.needs { margin: 28px 0 0; display: grid; border-top: 1px solid var(--hairline); }
.needs div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.needs dt { font-weight: 600; }
.needs dd { margin: 0; color: var(--ink-2); }
.termbox { border: 1px solid var(--hairline-2); border-radius: 14px; background: var(--panel-solid); box-shadow: var(--shadow); overflow: hidden; margin-top: 30px; }
.termbox-bar { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--hairline); }
.termbox-bar .btn { height: 28px; }
/* The command never breaks: it scrolls sideways when it is wider than the box. What it prints wraps. */
.termbox pre { margin: 0; padding: 20px 20px 22px; font: 400 13.5px/1.9 var(--mono); font-variant-ligatures: none; color: var(--ink); white-space: pre; overflow-x: auto; min-height: 168px; }
.termbox .p { color: var(--accent); }
.termbox .c { color: var(--ink-3); white-space: pre-wrap; }
.termbox .c b { color: var(--ink-2); font-weight: 400; }
.termbox .typing::after { content: ''; display: inline-block; width: 8px; height: 15px; margin-left: 1px; background: var(--ink); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.termbox-foot { margin: 0; padding: 14px 20px 18px; border-top: 1px solid var(--hairline); font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.start-alt { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-3); }
.start-alt a { color: var(--accent); text-decoration: none; font-weight: 500; }
.start-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.real { margin-top: 96px; }
.real-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.real-line { margin: 0; font: 400 clamp(28px, 3vw, 40px)/1.15 var(--serif); }
.real-line em { color: var(--accent); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hairline); }
.tabs button { height: 38px; padding: 0 2px; border: 0; background: transparent; color: var(--ink-2); font: 500 14px/1 var(--sans); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.real-shot { margin: 22px 0 0; }
.real-shot img { width: 100%; border-radius: 12px; border: 1px solid var(--hairline-2); box-shadow: var(--shadow); background: var(--panel-solid); }
.real-shot figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-2); max-width: 760px; }

/* Closing */
.close { padding: 20vh 0 18vh; border-top: 1px solid var(--hairline); text-align: center; }
.stanza { margin: 0; font: 400 clamp(40px, 7vw, 96px)/1.04 var(--serif); letter-spacing: -.02em; display: grid; justify-items: center; }
.stanza span { display: block; }
.stanza s { text-decoration-color: var(--accent); text-decoration-thickness: .06em; color: var(--ink-3); }
.stanza-end { margin: 36px 0 40px; font: 400 clamp(28px, 3.6vw, 48px)/1.15 var(--serif); }
.stanza-end em { color: var(--accent); }
.js .stanza span, .js .stanza-end { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .close.seen .stanza span, .js .close.seen .stanza-end { opacity: 1; transform: none; }
.js .close.seen .stanza span:nth-child(2) { transition-delay: .18s; }
.js .close.seen .stanza span:nth-child(3) { transition-delay: .36s; }
.js .close.seen .stanza span:nth-child(4) { transition-delay: .54s; }
.js .close.seen .stanza-end { transition-delay: .9s; }

/* Footer */
.foot { border-top: 1px solid var(--hairline); padding: 32px 0 96px; }
.foot-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-size: 13px; }
.foot nav a:hover { color: var(--accent); }
.foot-line { margin: 0 0 0 auto; font: 400 15px/1.3 var(--serif); font-style: italic; color: var(--ink-3); }
.foot-legal { flex-basis: 100%; margin: 0; max-width: 760px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

/* ---------------------------------------------------------------- Responsive */

/* ---------------------------------------------------------------- 03 · Give
   Cards for what an agent is handed, a gold thread from each agent to each card it reads, and the
   packet: where it works, what it holds, what it may do. One card can carry several threads. */

.chapter h2 em { color: var(--accent); }
.give { position: relative; border: 1px solid var(--hairline); border-radius: 10px; padding: 20px 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); column-gap: 52px; align-items: center; }
.give-threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.g-thread { fill: none; stroke: var(--accent-dim); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 5 4; transition: stroke .2s var(--ease); }
.g-thread.lit { stroke: var(--accent); stroke-width: 2; stroke-dasharray: none; filter: var(--bloom-gold); }
.give-agents { position: relative; display: grid; gap: 16px; }
.g-agent { position: relative; display: grid; gap: 2px; min-width: 0; padding: 10px 12px 11px; text-align: left; background: var(--panel-solid); border: 1px solid var(--hairline-2); border-radius: 8px; box-shadow: 0 6px 18px rgb(0 0 0 / .25); cursor: pointer; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); }
:root[data-theme="light"] .g-agent { box-shadow: 0 1px 2px rgb(23 21 15 / .05), 0 6px 16px rgb(23 21 15 / .06); }
.g-agent:hover { border-color: var(--accent-dim); }
.g-agent.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgb(0 0 0 / .25); }
.g-agent .kind { font: 600 10px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.g-agent .nm { font: 600 14px/1.25 var(--sans); margin-top: 4px; }
.g-agent .ap { font: 400 11px/1.2 var(--mono); color: var(--ink-3); }
.g-agent .wk { display: flex; align-items: center; gap: 5px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--hairline); font: 400 10.5px/1.2 var(--mono); color: var(--ink-2); min-width: 0; }
.g-agent .wk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-agent .wk svg { width: 12px; height: 12px; flex: none; color: var(--ink-3); }
.give.dragging .g-agent, .give.picking .g-agent.takes { border-style: dashed; border-color: var(--accent); }
.give.picking .g-agent.takes { animation: takes 2.4s ease-in-out infinite; }
@keyframes takes { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); } }
.g-agent.over { background: var(--accent-tint); border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.give-shelf { position: relative; display: grid; gap: 8px; }
.g-src { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; text-align: left; background: var(--ground); border: 1px solid var(--hairline-2); border-radius: 8px; color: var(--ink); cursor: grab; user-select: none; -webkit-user-select: none; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.g-src:hover { border-color: var(--accent-dim); }
.g-src:active { cursor: grabbing; }
.g-src.given { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.g-src.picked { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 24px rgb(0 0 0 / .3), 0 0 0 1px var(--accent); }
.g-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--hairline-2); background: var(--panel-solid); color: var(--ink-2); }
.g-ico svg { width: 15px; height: 15px; }
.g-src.given .g-ico { color: var(--accent); }
.g-txt { display: grid; gap: 2px; min-width: 0; }
.g-nm { font: 600 12.5px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-mt { font: 400 10.5px/1.2 var(--sans); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-shared { position: absolute; top: -9px; right: 8px; padding: 2px 6px; border-radius: 999px; border: 1px solid var(--accent-dim); background: var(--panel-solid); font: 500 9.5px/1.2 var(--mono); color: var(--accent); }
/* The ghost is a copy of the card, so it would inherit the card's 200ms transform transition and
   trail 15–30px behind the pointer for as long as it moves. It follows exactly. */
.g-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; margin: 0; border-color: var(--accent); box-shadow: 0 18px 40px rgb(0 0 0 / .45), 0 0 0 1px var(--accent); transition: none; will-change: transform; }
.g-cut { position: absolute; z-index: 2; transform: translate(-50%, -50%); display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--hairline-2); background: var(--panel-solid); color: var(--ink-3); font: 400 13px/1 var(--sans); cursor: pointer; transition: color .15s var(--ease), border-color .15s var(--ease); }
.g-cut:hover, .g-cut:focus-visible { color: var(--alert); border-color: var(--alert); }
.give-hint { margin: 12px 2px 0; min-height: 1.5em; font-size: 12.5px; color: var(--ink-3); }
.packet { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.pk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pk-head b { font: 400 21px/1.2 var(--serif); }
.pk { margin: 12px 0 0; display: grid; gap: 10px; }
.pk > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.pk dt { font: 600 10.5px/1.6 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.pk dd { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); min-width: 0; }
.pk-note { color: var(--ink-3); font-size: 12.5px; }
.pk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pk-list li { display: grid; grid-template-columns: 13px minmax(0, 1fr); column-gap: 8px; align-items: start; }
.pk-list svg { width: 13px; height: 13px; margin-top: 4px; color: var(--accent); }
.pk-list b { display: block; font-weight: 600; }
.pk-list small { display: block; color: var(--ink-2); font-size: 12.5px; }
.pk-allow { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 7px; border: 1px solid var(--hairline-2); border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 12.5px/1 var(--sans); cursor: pointer; }
.sw i { position: relative; width: 26px; height: 16px; border-radius: 999px; background: var(--hairline-2); flex: none; transition: background .2s var(--ease); }
.sw i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); transition: transform .2s var(--ease), background .2s var(--ease); }
.sw[aria-checked="true"] { color: var(--ink); border-color: var(--accent-dim); }
.sw[aria-checked="true"] i { background: var(--accent-fill); }
.sw[aria-checked="true"] i::after { transform: translateX(10px); background: var(--accent-on-fill); }
.pk-foot { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); }
.card .gv { display: inline-block; margin-top: 6px; font: 500 10.5px/1 var(--mono); color: var(--accent); text-decoration: none; }
.card .gv:hover { text-decoration: underline; text-underline-offset: 2px; }

/* The run stops to ask: an agent wants something its switches don't allow. */
.ask-perm { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-tint); display: grid; gap: 10px; animation: ev-in .24s var(--ease); }
.ap-q { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ap-q b { color: var(--accent); font-weight: 600; }
.ap-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .why-grid, .start-grid { grid-template-columns: minmax(0, 1fr); }
  .swatch { max-width: 620px; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .pillars li:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--hairline); }
}

@media (max-width: 900px) {
  .top-nav { display: none; }
  .open { height: 240vh; }
  .open-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; gap: 18px; padding-top: 84px; padding-bottom: 64px; }
  .open-field { height: 100%; min-height: 260px; }
  .open-line, .open h1 { font-size: clamp(36px, 9vw, 52px); }
  .open-sub { font-size: 15.5px; margin-top: 14px; }
  .cta { margin-top: 22px; }
  .term { width: 210px; height: 120px; }
  .term pre { font-size: 10.5px; }
  .paste-label { font-size: 13px; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; padding: 72px 0; }
  .ch-panel { position: static; }
  .ch-copy { padding-top: 0; }
  .story-intro { padding-top: 48px; }
  .day-story { grid-template-columns: minmax(0, 1fr); }
  .press { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* The papers behind fan upward here: room above the top paper for all of their edges. */
  .pile { height: 590px; }
  .issue { left: 50%; top: 134px; }
  /* The papers keep the pile's pan-y: a swipe up or down over them scrolls the page, and a tap
     on one behind brings it to the top. */
  .foot-line { margin-left: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .top-row { gap: 12px; }
  /* The nav is gone, so the way to the install command stays, short. */
  .top-get { padding: 0 12px; }
  .top-get .long { display: none; }
  .top-get .short { display: inline; }
  .open-stage { padding-top: 76px; }
  .open-line, .open h1 { font-size: clamp(32px, 9.4vw, 44px); }
  .open-copy .micro { margin-bottom: 12px; }
  .term { width: 168px; height: 104px; }
  .term pre { padding: 8px 9px; font-size: 9.5px; }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .win-body { padding: 16px; }
  .win-bar { padding: 0 12px; }
  .win-title .mono { display: none; }
  .sentence { font-size: 19px; }
  .canvas { flex-direction: column; align-items: stretch; padding: 24px 18px 20px 26px; }
  .card { flex-basis: auto; min-width: 0; }
  .edge { flex: 0 0 22px; width: 2px; height: 22px; align-self: center; }
  .edge::after { right: auto; top: auto; left: -4px; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--warp); border-bottom: 0; }
  .narration { font-size: 17px; }
  .members { gap: 6px 12px; }
  .box { padding: 10px; }
  .box-field { flex-wrap: wrap; }
  .box-send { width: 100%; justify-content: flex-end; }
  .talk { flex-wrap: wrap; }
  .tchat-log { max-height: 340px; }
  .tc-notice { border-radius: 12px; }
  .btn, .dial button, .seg button, .tabs button { min-height: 44px; }
  .chip select { height: 30px; }
  .fabric-wrap { padding: 16px; }
  .issue { width: 286px; margin-left: -143px; height: 420px; padding: 18px; }
  .issue ol { max-height: 278px; }
  .issue li { font-size: 11.5px; }
  .issue .colophon { left: 18px; right: 28px; justify-content: flex-end; }
  .issue .colophon span:first-child { display: none; }
  .press-side .day-story p { font-size: 21px; min-height: 0; }
  .needs div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .termbox pre { padding: 16px; font-size: 12px; line-height: 1.75; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillars li, .pillars li:nth-child(even) { padding-left: 0; border-left: 0; }
  .filecard .acts { display: none; }
  .open-cue { display: none; }
  .rv-acts .btn { flex: 1; }
  .give { padding: 16px 10px; column-gap: 30px; }
  .g-agent .wk { display: none; }
  .g-nm { white-space: normal; overflow-wrap: anywhere; }
  .pk > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sw { min-height: 44px; }
  .ap-acts .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .caret, .open-cue i { animation: none; }
  :root { --bloom-gold: none; --bloom-live: none; }
}
