/* Lipwise, second edition. An editor's proof: paper, ink and a red pencil. */


:root {
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --paper: #f3efe6;
  --paper-2: #ebe5d7;
  --card: #fbf9f4;
  --ink: #1b1a17;
  --ink-2: #57524a;
  --ink-3: #8c867b;
  --rule: rgba(27, 26, 23, 0.16);
  --rule-strong: rgba(27, 26, 23, 0.55);
  --red: #c4321c;
  --red-soft: rgba(196, 50, 28, 0.12);
  --lines: rgba(60, 100, 170, 0.13);
  --shadow: 0 1px 0 rgba(27, 26, 23, 0.06), 0 18px 40px -18px rgba(60, 40, 10, 0.28);
  --film: #191815;
  color-scheme: light;
}
:root[data-theme="ink"] {
  --paper: #14130f;
  --paper-2: #1b1a15;
  --card: #201f1a;
  --ink: #ece5d6;
  --ink-2: #b4ad9f;
  --ink-3: #7f796e;
  --rule: rgba(236, 229, 214, 0.14);
  --rule-strong: rgba(236, 229, 214, 0.5);
  --red: #ff6a50;
  --red-soft: rgba(255, 106, 80, 0.14);
  --lines: rgba(140, 170, 230, 0.1);
  --shadow: 0 0 0 1px rgba(236, 229, 214, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --film: #0c0b09;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* A faint paper grain. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0 0.25 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p, dl, dd, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--rule-strong); }
a:hover { color: var(--red); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 99; padding: 10px 14px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }

kbd {
  display: inline-block; padding: 0 0.45em; margin: 0 0.08em; border: 1px solid var(--rule-strong); border-bottom-width: 2px;
  border-radius: 5px; font: 500 0.8em/1.55 var(--mono); background: var(--card); color: var(--ink); white-space: nowrap;
}

.page { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 600px) { .page { padding-inline: 16px; } }

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.masthead-row { display: flex; align-items: center; gap: 28px; height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: italic 400 27px/1 var(--serif); text-decoration: none; letter-spacing: -0.01em; }
.toc { display: flex; gap: 22px; counter-reset: toc; font-size: 14px; }
.toc li { counter-increment: toc; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a::before { content: "§" counter(toc) " "; color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.toc a:hover { color: var(--red); }
.masthead nav { flex: 1; display: flex; justify-content: center; }
.lamp {
  margin-left: auto; padding: 6px 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: none;
  font: 500 13px var(--mono); cursor: pointer; letter-spacing: 0.02em;
}
.lamp:hover { background: var(--ink); color: var(--paper); }
:root[data-theme="ink"] .lamp-paper, :root:not([data-theme="ink"]) .lamp-ink { display: none; }
@media (max-width: 820px) { .masthead nav { display: none; } }

/* ---------------------------------------------------------------- hero */

.hero { padding-block: 40px 80px; }

/* The take: one dictation, heard in typewriter type, marked in red pencil, set in serif. */
.take { padding-block: 24px 8px; }
.take-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--rule); font: 500 13px var(--mono); color: var(--ink-2);
}
.take-rec { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink-3); transition: background-color 0.2s, border-color 0.2s; }
.take.recording .take-rec { background: var(--red); border-color: var(--red); animation: rec 1.1s ease-in-out infinite; }
@keyframes rec { 50% { opacity: 0.35; } }
.take-state { min-width: 10ch; color: var(--ink); }
.take-chord kbd { transition: transform 0.12s, background-color 0.12s, color 0.12s; }
.take.recording .take-chord kbd { transform: translateY(2px); border-bottom-width: 1px; background: var(--ink); color: var(--paper); }
.take-count { margin-left: auto; color: var(--ink-3); }

.take-stage { display: grid; align-items: start; min-height: clamp(190px, 22vw, 330px); padding-top: clamp(24px, 3.4vw, 44px); }
.take-heard, .take-typed { grid-area: 1 / 1; transition: opacity 0.5s, filter 0.5s, transform 0.5s; }
.take-heard { font: 400 clamp(19px, 2.7vw, 36px)/2.05 var(--mono); color: var(--ink); }
.take-heard .w:not(.on) { display: none; }
.take-heard .caret { display: inline-block; width: 0.5em; height: 1.05em; margin-left: 0.12em; vertical-align: -0.18em; background: var(--red); animation: blink 1s steps(1) infinite; }
.take-heard .mk-sub::after, .take-heard .mk-cmd::after, .take-heard .mk-stet::after { font-size: 1.15em; }
.take-typed {
  font: 400 clamp(46px, 9.2vw, 146px)/0.95 var(--serif); letter-spacing: -0.035em;
  opacity: 0; pointer-events: none;
}
.take-typed em { font-style: italic; color: var(--red); }
.take-typed .w { display: inline-block; opacity: 0; transform: translateY(0.12em); filter: blur(6px); transition: opacity 0.45s, transform 0.45s, filter 0.45s; }
.take-typed .w.on { opacity: 1; transform: none; filter: none; }
.take.set .take-heard { opacity: 0; filter: blur(4px); transform: translateY(-0.4em); }
.take.set .take-typed { opacity: 1; }

.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: end;
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule-strong);
}
@media (max-width: 860px) { .hero-foot { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 600px) { .take-stage { min-height: 200px; } .take-count { margin-left: 0; width: 100%; } }
.standfirst { font: 400 clamp(21px, 2.3vw, 27px)/1.38 var(--serif); max-width: 32em; }
.standfirst strong { font-weight: 400; font-style: italic; background: linear-gradient(transparent 62%, var(--red-soft) 62%); }
.hero-actions { display: grid; gap: 10px; justify-items: start; }
.button {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; min-height: 52px;
  background: var(--ink); color: var(--paper); border-radius: 999px; text-decoration: none;
  font: 600 16px var(--sans); transition: transform 0.2s, background-color 0.2s;
}
.button::after { content: "↓"; font-family: var(--mono); }
.button:hover { color: var(--paper); background: var(--red); }
.button:active { transform: translateY(1px); }
.hero-meta { font: 13px/1.5 var(--mono); color: var(--ink-2); }

/* ---------------------------------------------------------------- bands */

.band {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px;
  padding-block: 64px 96px; border-top: 1px solid var(--rule-strong);
}
@media (max-width: 960px) { .band { grid-template-columns: 1fr; gap: 28px; padding-block: 48px 72px; } }
.margin { align-self: start; }
@media (min-width: 961px) { .margin { position: sticky; top: 92px; } }
.folio { font: 500 13px var(--mono); color: var(--red); }
.margin-title { margin-top: 6px; font: 400 44px/1 var(--serif); letter-spacing: -0.02em; }
.margin-note { margin-top: 16px; color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 34em; }

/* ---------------------------------------------------------------- proof sheet */

.sheet { min-width: 0; }
.slips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 0; }
.slips::-webkit-scrollbar { display: none; }
.slips [role="tab"] {
  flex-shrink: 0; padding: 9px 16px 8px; border: 1px solid var(--rule); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: var(--paper-2); color: var(--ink-2); font: 500 13px var(--mono); cursor: pointer;
  transform: translateY(3px); transition: transform 0.15s, background-color 0.15s;
}
.slips [role="tab"][aria-selected="true"] { background: var(--card); color: var(--ink); transform: translateY(1px); position: relative; z-index: 1; }
.slips [role="tab"] .n { color: var(--red); margin-right: 6px; }

.sheet-body {
  position: relative; padding: 34px clamp(20px, 4vw, 48px) 40px clamp(28px, 5vw, 64px);
  background: var(--card); border: 1px solid var(--rule); border-radius: 2px 12px 12px 12px; box-shadow: var(--shadow);
}
/* A margin rule, like an exercise book. */
.sheet-body::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(14px, 2.5vw, 36px); border-left: 1.5px solid var(--red-soft); }
.sheet-body:focus-visible { outline-offset: -4px; }
.sheet-label { font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

.heard {
  margin-top: 8px; min-height: 5.6em;
  font: 400 clamp(15px, 1.7vw, 18px)/2.65 var(--mono); color: var(--ink);
  background-image: repeating-linear-gradient(transparent 0 calc(2.65em - 1px), var(--lines) calc(2.65em - 1px) 2.65em);
}

/* Marks. Each is invisible until the slider (or the legend) turns it on. */
.mk { position: relative; white-space: nowrap; transition: color 0.3s; }
.mk-del, .mk-sub {
  background: linear-gradient(var(--red), var(--red)) no-repeat 0 58% / 0% 2px;
  transition: background-size 0.35s cubic-bezier(0.6, 0, 0.3, 1), color 0.3s;
}
.mk-del.on, .mk-sub.on, .legend .mk-del, .legend .mk-sub { background-size: 100% 2px; color: var(--ink-3); }
.mk-sub::after, .mk-cmd::after, .mk-stet::after {
  position: absolute; left: 50%; bottom: 72%; transform: translate(-50%, 4px); opacity: 0;
  font: italic 400 1.35em/1 var(--serif); color: var(--red); white-space: nowrap; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.mk-sub::after { content: attr(data-sub); }
.mk-cmd::after { content: attr(data-note); font-size: 1.05em; }
.mk-stet::after { content: "stet"; font-size: 1.05em; }
.mk.on::after, .legend .mk::after { opacity: 1; transform: translate(-50%, 0); }
.mk-cmd::before {
  content: ""; position: absolute; inset: 0.32em -0.45em 0.28em; border: 1.5px solid var(--red); border-radius: 50% 46% 52% 44% / 60% 50% 56% 48%;
  transform: rotate(-1.2deg) scale(0.92); opacity: 0; transition: opacity 0.3s, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.mk-cmd.on::before, .legend .mk-cmd::before { opacity: 1; transform: rotate(-1.2deg) scale(1); }
.mk-stet { text-decoration: underline dotted transparent 2px; text-underline-offset: 0.35em; transition: text-decoration-color 0.3s; }
.mk-stet.on, .legend .mk-stet { text-decoration-color: var(--red); }

.progress { display: flex; align-items: center; gap: 14px; margin: 26px 0 22px; font: 500 12px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; }
.progress i { position: relative; flex: 1; height: 2px; background: var(--rule-strong); }
.progress b { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--red); transition: width 0.45s cubic-bezier(0.6, 0, 0.3, 1); }
.progress b::after { content: ""; position: absolute; right: -8px; top: -7px; width: 16px; height: 16px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--card); }
.typed { margin-top: 8px; min-height: 5.4em; font: 400 clamp(24px, 3vw, 34px)/1.28 var(--serif); }
.typed p + p { margin-top: 0.15em; }
.typed p.gap { height: 0.5em; }
.typed .w { opacity: 0.08; filter: blur(3px); transition: opacity 0.35s, filter 0.35s; }
.typed .w.on { opacity: 1; filter: none; }

.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px 32px; margin-top: 36px; padding-top: 18px; color: var(--ink-2); font-size: 14px; }
.legend li { line-height: 2.4; }
.legend .mk { font: 14px var(--mono); color: var(--ink); margin-right: 6px; }
.legend .mk-del, .legend .mk-sub { color: var(--ink-3); }

/* ---------------------------------------------------------------- try */

.desk { display: grid; gap: 18px; min-width: 0; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .modes { grid-template-columns: 1fr; } }
.mode {
  display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--paper-2); transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.mode.active { background: var(--card); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mode kbd { transition: transform 0.12s, background-color 0.12s, color 0.12s; }
.mode.pressed kbd { transform: translateY(2px); border-bottom-width: 1px; background: var(--ink); color: var(--paper); }
.mode-name { font: italic 400 26px/1 var(--serif); }
.mode-what { color: var(--ink-2); font-size: 14px; }
.chord { display: flex; flex-wrap: wrap; gap: 2px; }

.notepad { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.notepad-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--rule); font: 500 12px var(--mono); color: var(--ink-3); }
.pad {
  min-height: 9.6em; padding: 14px 20px 16px; white-space: pre-wrap; font: 400 18px/1.6em var(--sans);
  background-image: repeating-linear-gradient(transparent 0 calc(1.6em - 1px), var(--lines) calc(1.6em - 1px) 1.6em);
  background-position: 0 14px;
}
.pad .sel { background: rgba(80, 130, 255, 0.28); }
.pad .fresh { animation: ink-in 1.4s ease-out; }
@keyframes ink-in { from { background: var(--red-soft); } }
.pad .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.15em; background: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.ribbon { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.indicator {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 14px; min-height: 52px; min-width: 156px;
  border: 1px solid var(--ink); border-radius: 999px; background: var(--card); font: 600 15px var(--sans);
  transition: background-color 0.2s, color 0.2s;
}
.talk-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--ink-3); box-shadow: inset 0 0 0 4px var(--card), 0 0 0 1px var(--ink-3); transition: background-color 0.2s, box-shadow 0.2s; }
.indicator.live { background: var(--ink); color: var(--paper); }
.indicator.live .talk-dot { background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); animation: pulse 1.2s ease-in-out infinite; }
.indicator.done .talk-dot { background: var(--red); box-shadow: inset 0 0 0 4px var(--card), 0 0 0 1px var(--red); }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px transparent; } }
.meter { display: flex; align-items: center; gap: 3px; height: 32px; }
.meter i { width: 3px; height: 3px; border-radius: 2px; background: var(--ink-3); transition: height 0.09s ease-out, background-color 0.2s; }
.meter.live i { background: var(--red); }
.status { flex: 1; min-width: 220px; min-height: 3em; font: 13px/1.5 var(--mono); color: var(--ink-2); }
.status b { color: var(--ink); font-weight: 600; }
.hint { color: var(--ink-3); font-size: 14px; }
.hint:has(q:empty) { visibility: hidden; }
.hint q { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- route */

.route { display: grid; gap: 28px; min-width: 0; }
.switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.switch-label { margin-right: 8px; font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.chip { padding: 8px 16px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.map { position: relative; display: grid; gap: 0; }
.zone { position: absolute; top: -0.75em; left: 18px; padding: 0 8px; background: var(--paper); font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.home { position: relative; padding: 32px 20px 24px; border: 2px dashed var(--ink); border-radius: 16px; }
.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.node {
  position: relative; display: grid; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--rule); box-shadow: var(--shadow); transition: opacity 0.3s, border-color 0.3s;
}
.node b { font: italic 400 23px/1.1 var(--serif); }
.node span { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.path .node:not(:last-child)::after {
  content: "→"; position: absolute; right: -22px; top: 50%; transform: translateY(-50%);
  font: 18px var(--mono); color: var(--ink-3);
}
.node-ai .ai-cloud, .node-ai .ai-off { display: none; }
.map[data-ai="cloud"] .node-ai .ai-local, .map[data-ai="off"] .node-ai .ai-local { display: none; }
.map[data-ai="cloud"] .node-ai .ai-cloud, .map[data-ai="off"] .node-ai .ai-off { display: block; }
.map[data-ai="cloud"] .node-ai { border: 1.5px dashed var(--red); }
.map[data-ai="off"] .node-ai { opacity: 0.45; }
.map[data-ai="off"] .node-ai b { text-decoration: line-through 2px var(--red); }

/* The line out of the house: drawn only when the editor is a provider. It shares the
   path's grid so it drops straight down from the AI editor. */
.wire, .away-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.wire { height: 76px; padding-inline: 22px; }
.wire-line { grid-column: 3; position: relative; }
.wire-line::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid var(--red);
  transform-origin: top; transform: scaleY(0); transition: transform 0.45s cubic-bezier(0.6, 0, 0.3, 1);
}
.wire-label {
  position: absolute; left: calc(50% + 14px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  font: italic 400 21px var(--serif); color: var(--red); opacity: 0; transition: opacity 0.3s 0.2s;
}
.map[data-ai="cloud"] .wire-line::before { transform: scaleY(1); }
.map[data-ai="cloud"] .wire-label { opacity: 1; }
.away { position: relative; padding: 28px 20px 20px; border: 1px solid var(--rule-strong); border-radius: 16px; }
.node-provider { grid-column: 3 / span 2; opacity: 0.4; transition: opacity 0.3s, border-color 0.3s; }
.provider-on { display: none; }
.map[data-ai="cloud"] .node-provider { opacity: 1; border-color: var(--red); }
.map[data-ai="cloud"] .provider-on { display: block; }
.map[data-ai="cloud"] .provider-off { display: none; }
@media (max-width: 760px) {
  .path { grid-template-columns: 1fr; gap: 22px; }
  .path .node:not(:last-child)::after { content: "↓"; right: auto; left: 22px; top: auto; bottom: -22px; transform: none; }
  .wire, .away-grid { grid-template-columns: 1fr; }
  .wire-line, .node-provider { grid-column: 1; }
  .wire-line::before { left: 24px; }
  .wire-label { left: 40px; font-size: 18px; }
}
.verdict { min-height: 2.3em; font: 400 clamp(26px, 3.4vw, 40px)/1.15 var(--serif); }
.verdict strong { font-weight: 400; font-style: italic; color: var(--red); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 36px; color: var(--ink-2); font-size: 15px; }
.facts li { padding-top: 12px; border-top: 1px solid var(--rule); }

/* ---------------------------------------------------------------- phrasebook */

.dictionary { columns: 2 340px; column-gap: 56px; }
.entry { break-inside: avoid; padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.entry dt { display: flex; align-items: baseline; gap: 10px; }
.entry dfn { font: italic 400 30px/1.1 var(--serif); }
.pos { font: 500 12px var(--mono); color: var(--red); }
.entry dd { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; }
.usage { display: block; margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--rule-strong); font: 13.5px/1.6 var(--mono); color: var(--ink-2); }
.gives { display: block; margin-top: 4px; font: 400 19px/1.35 var(--serif); color: var(--ink); }
.gives::before { content: "→ "; color: var(--red); font-family: var(--mono); font-size: 14px; }
.see { display: block; margin-top: 8px; font-size: 14px; }

/* ---------------------------------------------------------------- contact sheet */

.contact {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 34px 14px;
  background:
    radial-gradient(circle at 50% 50%, var(--paper) 3.5px, transparent 4px) 0 8px / 18px 18px repeat-x,
    radial-gradient(circle at 50% 50%, var(--paper) 3.5px, transparent 4px) 0 calc(100% - 8px) / 18px 18px repeat-x,
    var(--film);
  border-radius: 6px; min-width: 0;
}
@media (max-width: 960px) { .contact { grid-template-columns: repeat(5, 72%); overflow-x: auto; scroll-snap-type: x mandatory; } .contact li { scroll-snap-align: center; } }
.contact button { display: grid; gap: 8px; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.contact img { width: 100%; aspect-ratio: 640 / 459; border-radius: 3px; transition: transform 0.25s; }
.contact button:hover img { transform: scale(1.03); }
.contact span { font: 500 12px var(--mono); color: #c9c1b0; }
.contact button:focus-visible { outline-color: #ff8a70; outline-offset: 4px; }

.loupe { width: min(1200px, 94vw); max-height: 94vh; padding: 18px 18px 14px; border: 0; border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.loupe::backdrop { background: rgba(20, 19, 15, 0.72); }
.loupe img { width: 100%; height: auto; max-height: calc(94vh - 90px); object-fit: contain; }
.loupe p { margin-top: 10px; font: italic 400 21px var(--serif); text-align: center; }
.loupe form { position: absolute; top: 8px; right: 10px; z-index: 1; }
.loupe-close { width: 40px; height: 40px; border: 1px solid var(--rule-strong); border-radius: 50%; background: var(--card); font-size: 22px; line-height: 1; cursor: pointer; }

/* ---------------------------------------------------------------- specs */

.specs { border-top: 2px solid var(--ink); }
.specs div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.specs dt { font: 600 12px/1.9 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.specs dd { font: 400 21px/1.4 var(--serif); }
@media (max-width: 600px) { .specs div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------------------------------------------------------------- downloads */

.downloads { display: grid; gap: 32px; min-width: 0; }
.files { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.files th, .files td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; }
.files thead th { font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.files tbody th { font: italic 400 22px/1.2 var(--serif); }
.files .file { font: 13px var(--mono); color: var(--ink-2); word-break: break-all; }
.files td[data-size] { font: 13px var(--mono); color: var(--ink-2); white-space: nowrap; }
.files td:last-child { text-align: right; padding-right: 0; }
.dl { display: inline-block; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dl:hover { background: var(--ink); color: var(--paper); }
.files tr.yours th::after { content: " ← yours"; font: 500 12px var(--mono); color: var(--red); font-style: normal; }
.files tr.yours .dl { background: var(--red); border-color: var(--red); color: #fff; }
@media (max-width: 680px) {
  .files thead { display: none; }
  .files tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .files th, .files td { border: 0; padding: 2px 0; }
  .files td.file { grid-column: 1; }
  .files td[data-size] { grid-column: 1; }
  .files td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
.first-run { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: run; }
@media (max-width: 760px) { .first-run { grid-template-columns: 1fr; } }
.first-run li { counter-increment: run; color: var(--ink-2); font-size: 15px; }
.first-run li::before { content: counter(run, lower-roman) "."; display: block; font: italic 400 34px/1 var(--serif); color: var(--red); margin-bottom: 8px; }
.first-run b { color: var(--ink); }
.footnote { color: var(--ink-3); font-size: 13.5px; max-width: 60em; }

/* ---------------------------------------------------------------- questions */

.qa { border-top: 2px solid var(--ink); }
.qa details { border-bottom: 1px solid var(--rule); }
.qa summary { display: flex; gap: 14px; padding: 18px 0; cursor: pointer; list-style: none; font: 400 25px/1.25 var(--serif); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "Q."; font-style: italic; color: var(--red); }
.qa summary::after { content: "+"; margin-left: auto; font: 20px var(--mono); color: var(--ink-3); transition: transform 0.2s; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { padding: 0 0 22px 38px; color: var(--ink-2); max-width: 46em; }

/* ---------------------------------------------------------------- colophon */

.colophon { padding-block: 56px 72px; border-top: 1px solid var(--rule-strong); background: var(--paper-2); }
.colophon .page { display: grid; gap: 12px; color: var(--ink-2); font-size: 14px; max-width: 760px; text-align: center; justify-items: center; }
.colophon-mark { display: flex; align-items: center; gap: 12px; font: italic 400 34px var(--serif); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
