/* Superhit website: the app's own palette (styles/app.css): frosted white and
   grey glass, graphite buttons, and the element colours from its toolbar.
   Fonts are self-hosted (SIL Open Font Licence). */

@font-face { font-family: 'Lora'; src: url('/assets/fonts/lora-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/assets/fonts/lora-latin-wght-italic.woff2') format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
& format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/assets/fonts/newsreader-latin-wght-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/assets/fonts/instrument-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
& format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/assets/fonts/courier-prime-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* light (from the app) */
  --bg: #e9ebef;
  --panel: rgba(255, 255, 255, 0.62);
  --surface: #f6f7f9;
  --bar: rgba(255, 255, 255, 0.72);
  --page: #ffffff;
  --ink: #1c1e22;
  --ink-2: #474c55;
  --muted: #747a84;
  --border: rgba(18, 24, 38, 0.08);
  --border-strong: rgba(18, 24, 38, 0.13);
  --glass-blur: blur(24px) saturate(1.6);
  /* amaranth red accent */
  --brick: #d3212d;
  --brick-hover: #b3182a;
  --brick-soft: rgba(211, 33, 45, 0.09);
  --brick-light: #f2707a;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px -12px rgba(16, 24, 40, 0.12);
  --shadow-shot: 0 1px 2px rgba(16, 24, 40, 0.06), 0 30px 60px -30px rgba(16, 24, 40, 0.3);
  --backdrop:
    radial-gradient(70vmax 60vmax at 0% 0%, rgba(205, 214, 230, 0.95), transparent 62%),
    radial-gradient(60vmax 60vmax at 100% 100%, rgba(222, 218, 234, 0.85), transparent 60%),
    radial-gradient(40vmax 40vmax at 70% 20%, rgba(255, 255, 255, 0.9), transparent 70%);
  /* element colours */
  --rust: #b0573a;
  --umber: #737985;
  --navy: #2f4a6e;
  --teal: #2f6b62;
  --plum: #6a4a7a;
  --ochre: #a9852c;
  /* dark (from the app) */
  --d-bg: #0e1013;
  --d-surface: #181b20;
  --d-ink: #eceef1;
  --d-ink-2: #c3c7ce;
  --d-muted: #8c929c;
  --d-border: rgba(255, 255, 255, 0.08);

  /* one type scale */
  --t-small: 14px;
  --t-note: 16px;
  --t-body: 17px;
  --t-lead: 19px;
  --t-h4: 22px;
  --t-h3s: 26px;
  --t-h3: clamp(28px, 3.4vw, 38px);
  --t-h2: clamp(32px, 5vw, 54px);
  --t-h1: clamp(30px, 8.4vw, 82px);

  --radius: 18px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --serif: 'Lora', 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --mono: 'Courier Prime', 'Courier New', Courier, monospace;
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 68px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.6 var(--ui); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.92em; background: rgba(18, 24, 38, 0.06); padding: 0.05em 0.35em; border-radius: 5px; }
kbd { font: 600 0.8em var(--ui); padding: 0.1em 0.5em; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--page); }
:focus-visible { outline: 3px solid rgba(211, 33, 45, 0.45); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 30; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font: 600 var(--t-note) var(--ui); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font: 600 var(--t-note)/1 var(--ui); text-decoration: none; border: 0; transition: transform .15s var(--ease-out), background .2s ease, color .2s ease; cursor: pointer; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-hover); }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .78); }
.btn-ghost:hover { background: #fff; color: var(--brick); }
.btn-disabled { background: rgba(18, 24, 38, .06); color: var(--muted); cursor: default; }
.btn-disabled:hover, .btn-disabled:active { transform: none; }
.btn-sm { padding: 10px 18px; }
.btn-block { width: 100%; }
.size-tag { font-weight: 500; opacity: .7; font-size: var(--t-small); }

/* ── nav ── */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bar); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 108px; }
/* a slow amaranth sweep across the wordmark; the logo itself is the mask, so only the letters catch it */
.logo-shine { position: relative; display: block; }
.logo-shine::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(211, 33, 45, .25) 44%, rgba(226, 52, 64, .95) 50%, rgba(211, 33, 45, .25) 56%, transparent 62%) 0 0 / 300% 100% no-repeat;
  -webkit-mask: url('/assets/img/logo.png') center / 100% 100% no-repeat; mask: url('/assets/img/logo.png') center / 100% 100% no-repeat;
  animation: logo-sweep 5.5s linear infinite; }
@keyframes logo-sweep { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@media (prefers-reduced-motion: reduce) { .logo-shine::after { animation: none; opacity: 0; } }
/* "Writer" sits under the wordmark, right-aligned */
.lockup { display: inline-flex; flex-direction: column; align-items: flex-end; }
.lockup-sub { margin: -3px -.36em 0 0; font: 500 8px/1 var(--ui); letter-spacing: .36em; text-transform: uppercase; color: var(--ink-2); }
.beta { font: 600 12px/1 var(--ui); letter-spacing: .02em; color: var(--brick-hover); background: var(--brick-soft); padding: 6px 9px; border-radius: 999px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: var(--t-note); font-weight: 500; transition: color .2s ease; }
.nav-links a:hover { color: var(--brick); }

/* screenplay scene headings, used as section openers */
.slug { font: 700 var(--t-note)/1.2 var(--mono); letter-spacing: .02em; color: var(--brick); margin-bottom: 18px; text-transform: uppercase; }

/* ── hero ── */
.hero { position: relative; overflow: hidden; background: var(--backdrop), var(--bg); padding: 64px 0 0; }
.hero-inner { position: relative; text-align: center; max-width: 1000px; }
.hero h1 { font-family: 'Instrument Sans', var(--ui); font-size: clamp(26px, 6.9vw, 80px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; }
.hero h1 em { font-style: italic; color: var(--brick); }
/* the name in headings and subheadings: amaranth (the lighter tint on dark sections) */
.sh { color: var(--brick); }
.ai .sh, .on-dark .sh { color: var(--brick-light); }
.lede { margin: 22px auto 0; max-width: 700px; font-size: var(--t-lead); color: var(--ink-2); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.shot-hero { position: relative; width: min(1280px, 100% - 32px); margin-top: 48px; margin-bottom: -2px; }
.shot-hero .window { position: relative; container-type: inline-size; border-radius: 16px 16px 0 0; }
.shot-hero .window > img { transition: opacity .6s ease; }
.shot-hero .window.is-assembling > img { opacity: 0; }

/* hero assembly (site.js): pieces of the real screenshot come in one by one */
.asm { position: absolute; inset: 0; background: linear-gradient(135deg, #e2e6ee, #ebe9f1); }
.asm > * { position: absolute; opacity: 0; transition: opacity .5s var(--ease-out), translate .7s var(--ease-out), scale .45s cubic-bezier(.3, 1.5, .5, 1), clip-path 1.4s var(--ease-out); transition-delay: var(--d, 0ms); }
.asm-shell { border-radius: 1.2cqw; background: rgba(255, 255, 255, .62); }
.asm-shell.asm-page { background: #fff; border-radius: .8cqw .8cqw 0 0; }
.asm-clip { inset: 0; background: url('/assets/img/editor.jpg') 0 0 / 100% 100% no-repeat; clip-path: var(--clip); }
.asm .from-left { translate: -2cqw 0; }
.asm .from-top { translate: 0 -1.5cqw; }
.asm .from-below { translate: 0 2.5cqw; }
.asm .from-pop { scale: .7; }
.asm .from-wipe { clip-path: var(--clip0); opacity: 1; }
.asm.is-go > * { opacity: 1; translate: 0 0; scale: 1; }
.asm.is-go > .from-wipe { clip-path: var(--clip); }

/* frame around screenshots: just a rounded edge, the app shows its own chrome */
.window { margin: 0; background: var(--page); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-shot); }
.window-dark { background: #17191d; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); }
.paper { margin: 0; border-radius: 6px; overflow: hidden; background: var(--page); box-shadow: 0 1px 1px rgba(16, 24, 40, .04), 0 4px 10px rgba(16, 24, 40, .05), 0 18px 40px rgba(16, 24, 40, .09), 0 40px 90px rgba(16, 24, 40, .1); transform: rotate(-0.6deg); }
.feature.flip .paper { transform: rotate(0.6deg); }

/* Extracts: one wide card in the app's style, one tab at a time (site.js turns it) */
.xs { margin: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-shot); overflow: hidden; font-family: var(--ui); color: var(--ink); }
.xs-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px 14px; }
.xs-head b { display: block; font: 500 24px/1.1 var(--serif); }
.xs-head small { font-size: 13px; color: var(--muted); }
.xs-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #e9ebef; font-size: 13px; }
.xs-tabs > * { padding: 7px 11px; border-radius: 9px; color: var(--ink-2); font: 500 13px/1 var(--ui); }
.xs-tabs button { border: 0; background: none; cursor: pointer; transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.xs-tabs span { color: var(--muted); }
.xs-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.xs-stage { overflow: hidden; }
.xs-slides { display: flex; width: 300%; transform: translateX(calc(var(--i, 0) * -33.3334%)); transition: transform .7s var(--ease-out); }
.xs-slide { width: 33.3334%; padding: 6px 22px 18px; display: grid; gap: 22px; align-content: start; }
.xs-overview { grid-template-columns: 1fr 1.25fr; }
.xs-cast { grid-template-columns: 1.5fr 1fr; }
.xs-props { grid-template-columns: repeat(3, 1fr); }
.xs-h { margin: 12px 0 7px; font: 600 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.xs-h:first-child { margin-top: 2px; }
.xs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; }
.xs-stats p { padding: 12px; border-radius: 12px; background: #fff; font-size: 12px; color: var(--muted); }
.xs-stats b { display: block; margin-bottom: 2px; font: 500 28px/1 var(--serif); }
.c-navy { color: var(--navy); } .c-rust { color: var(--rust); } .c-teal { color: var(--teal); } .c-plum { color: var(--plum); } .c-umber { color: var(--umber); } .c-ochre { color: var(--ochre); }
.xs-split { display: flex; gap: 3px; height: 8px; }
.xs-split i { border-radius: 9px; }
.bg-navy { background: var(--navy); } .bg-teal { background: var(--teal); }
.xs-key { margin-top: 6px; font-size: 12px; color: var(--muted); }
.xs-key span { margin-right: 4px; color: var(--ink-2); font-weight: 500; }
.xs-key span + span { margin-left: 10px; }
.xs-row { display: grid; grid-template-columns: 96px 1fr 22px; align-items: center; gap: 10px; margin: 6px 0; font-size: 12.5px; }
.xs-row small { text-align: right; color: var(--muted); }
.xs-bar { display: block; height: 6px; border-radius: 9px; background: #e6e8ec; overflow: hidden; }
.xs-bar i { display: block; height: 100%; border-radius: 9px; background: var(--rust); }
.xs-bar.warm i { background: linear-gradient(90deg, var(--rust), var(--ochre)); }
.xs-person { padding: 8px 0 9px; }
.xs-person + .xs-person { border-top: 1px solid var(--border); }
.xs-person p:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.xs-person small, .xs-meta { color: var(--muted); font-size: 12px; }
.xs-meta { margin-top: 5px; }
.xs-item { display: flex; align-items: center; gap: 5px; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; background: #fff; font-size: 13px; }
.xs-item b { font-weight: 600; margin-right: auto; }
.xs-item small { color: var(--muted); margin-right: auto; margin-left: -2px; }
.xs-item em { min-width: 22px; padding: 2px 6px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--border-strong); font: 500 11.5px/1.4 var(--ui); font-style: normal; text-align: center; color: var(--ink-2); }
.xs-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 22px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.xs-btns { display: flex; gap: 8px; }
.xs-btns i { padding: 7px 14px; border-radius: 10px; background: #fff; font: 600 12.5px/1 var(--ui); font-style: normal; color: var(--ink); box-shadow: inset 0 0 0 1px var(--border-strong); }
.xs-btns .xs-report { background: var(--rust); color: #fff; box-shadow: none; }

/* live pages:a screenplay page drawn in HTML that writes itself (site.js).
   Sized in container units so it keeps the real page proportions:
   60 characters of action, character at +22, dialogue at +10, 35 wide. */
.live-page { position: relative; aspect-ratio: 4 / 3; container-type: inline-size; }
.lp { position: absolute; inset: 0; transition: opacity .4s ease; padding: 6.4cqw 0 0 12.9cqw; font: 400 2.14cqw/1.17 var(--mono); color: #1c1e22; }
.lp p { margin: 0; width: 60ch; text-wrap: wrap; }
.lp-gap1 { margin-top: 1.17em !important; }
.lp-gap2 { margin-top: 2.34em !important; }
.lp-scene { position: relative; font-weight: 700; color: var(--navy); }
.lp-num { position: absolute; left: -3.9ch; }
.lp-num-r { left: 62ch; }
.lp-char { padding-left: 22ch; color: var(--rust); }
.lp-dial { padding-left: 10ch; width: 45ch !important; }
/* typing: the rest of each line is laid out but hidden, so nothing reflows */
.lp-rest { visibility: hidden; }
.lp.is-fading { opacity: 0; }
.lp-caret { position: relative; }
.lp-caret::after { content: ''; position: absolute; left: 0; top: 0; width: 0.12em; height: 1.05em; background: var(--brick); animation: lp-blink 1s steps(1) infinite; }
.lp-num.is-hidden { opacity: 0; }
.lp-num { transition: opacity .3s ease; }
@keyframes lp-blink { 50% { opacity: 0; } }

/* the element chip, like the app's toolbar */
.lp-chip { position: absolute; right: 3.5cqw; bottom: 3.5cqw; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; background: #24272d; color: #fff; font: 600 clamp(10px, 2cqw, 13px)/1 var(--ui); box-shadow: 0 6px 18px -8px rgba(16, 24, 40, .5); opacity: 0; transition: opacity .3s ease; }
.lp-chip.is-on { opacity: 1; }
.lp-key { font: 600 1em/1 var(--ui); padding: 4px 7px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; transition: transform .15s var(--ease-out), background .15s ease; }
.lp-key:empty { display: none; }
.lp-key.is-pressed { transform: scale(.88); background: var(--brick); }


/* sticky note demo */
.live-notes .lp { padding: 7cqw 0 0 10cqw; }
.lp-plus { position: absolute; left: 81.9cqw; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: #eef0f3; color: #6b717a; font: 500 2.6cqw/1 var(--ui); transition: transform .15s var(--ease-out), background .2s ease, color .2s ease; }
.lp-plus.is-hot { background: var(--brick-soft); color: var(--brick); box-shadow: 0 0 0 .8cqw rgba(211, 33, 45, .12); }
.lp-plus.is-pressed { transform: scale(.85); }
.lp-note-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.lp-note-wrap.is-open { grid-template-rows: 1fr; }
.lp-note-clip { overflow: hidden; }
.lp .lp-note { width: 40ch; margin: 1.2cqw 0 .6cqw; padding: 1.6cqw 2cqw; border-radius: 1cqw; background: #fdec95; color: #3a3420; font: 400 2.5cqw/1.5 var(--ui); box-shadow: 0 1.2cqw 2.4cqw -1.4cqw rgba(120, 90, 0, .45); }
.lp-note .lp-caret::after { background: #3a3420; }

/* ── promises ── */
.promises { background: rgba(255, 255, 255, .55); }
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; padding: 56px 0; }
.promise-grid h3 { font-size: var(--t-h4); margin-bottom: 8px; }
.promise-grid p { color: var(--ink-2); font-size: var(--t-note); }

/* short separators between the four promises */
.promise-grid > div { position: relative; }
.promise-grid > div + div::before { content: ""; position: absolute; left: -18px; top: 4px; width: 1px; height: 44px; background: rgba(18, 24, 38, .14); }

/* ── sections ── */
.section { padding: 112px 0 120px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 72px; }
.section-head h2 { font-size: var(--t-h2); }
.section-head .sub { margin-top: 16px; font-size: var(--t-lead); color: var(--ink-2); }
.on-dark .slug { color: var(--brick-light); }
.on-dark h2 { color: var(--d-ink); }
.on-dark .sub { color: var(--d-ink-2); }

#features { background: radial-gradient(60vmax 50vmax at 100% 30%, rgba(222, 218, 234, .6), transparent 65%), radial-gradient(60vmax 50vmax at 0% 80%, rgba(205, 214, 230, .7), transparent 65%), var(--bg); }
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; margin-bottom: 112px; }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .feature-text { order: 2; }
.feature-text h3 { font-size: var(--t-h3); margin-bottom: 16px; }
.feature-text > p { color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: var(--t-note); }
.ticks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--brick) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* the everyday things: a two-column list on computers, a swipe row on phones */
.essentials { display: block; }
.essentials-title { font-size: var(--t-h3); margin-bottom: 28px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini { padding: 26px 26px 28px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.mini svg { display: block; width: 26px; height: 26px; fill: none; stroke: var(--c, var(--umber)); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.mini:nth-child(1) { --c: var(--rust); }
.mini:nth-child(2) { --c: var(--plum); }
.mini:nth-child(3) { --c: var(--navy); }
.mini:nth-child(4) { --c: var(--teal); }
.mini:nth-child(5) { --c: var(--umber); }
.mini:nth-child(6) { --c: var(--ochre); }
.mini h4 { font-size: var(--t-h4); margin-bottom: 6px; }
.mini p { color: var(--ink-2); font-size: var(--t-note); }

/* ── Local AI (the app's dark mode) ── */
.ai { background: radial-gradient(70vmax 60vmax at 0% 0%, rgba(46, 54, 70, .55), transparent 62%), radial-gradient(60vmax 60vmax at 100% 100%, rgba(52, 46, 66, .5), transparent 60%), var(--d-bg); color: var(--d-ink); }

/* the details open on request, so the section stays short */
.ai-details { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ai-card { border-radius: var(--radius); background: var(--d-surface); transition: background .2s ease; }
.ai-card:hover { background: #1d2026; }
.ai-card > summary { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; padding: 26px 28px; list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ai-card > summary::-webkit-details-marker { display: none; }
.ai-card > summary::after { content: ''; grid-column: 2; grid-row: 1 / 3; width: 10px; height: 10px; border-right: 2px solid var(--brick-light); border-bottom: 2px solid var(--brick-light); transform: rotate(45deg) translateY(-3px); transition: transform .2s var(--ease-out); }
.ai-card[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ai-card h3 { font-size: var(--t-h3s); color: var(--d-ink); }
.ai-card-hint { grid-column: 1; margin-top: 6px; font: 400 var(--t-note)/1.4 var(--ui); letter-spacing: 0; color: var(--d-muted); }
.ai-card > :not(summary) { margin: 0 28px 28px; }
.stack { margin: 0; display: grid; gap: 16px; }
.stack div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; }
.stack dt { font: 600 var(--t-small)/1.75 var(--ui); color: var(--brick-light); }
.stack dd { margin: 0; color: var(--d-ink-2); font-size: var(--t-note); }
.stack strong, .safety strong { color: var(--d-ink); font-weight: 600; }
.safety { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.safety li { position: relative; padding-left: 28px; color: var(--d-ink-2); font-size: var(--t-note); }
.safety li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2707a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 5 6v6c0 4.5 3 7.5 7 9 4-1.5 7-4.5 7-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat; }

/* a real Local AI answer, set out wide in the app's dark panel style */
.aw { max-width: 980px; margin: 8px auto 0; padding: 22px 24px 18px; border-radius: 22px; background: #16181c; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05); color: var(--d-ink); font-family: var(--ui); }
.aw-head { display: flex; align-items: center; gap: 12px; }
.aw-head b { display: block; font: 500 22px/1.1 var(--serif); }
.aw-head small { font-size: 12.5px; color: #7fcfb5; }
.aw-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #c81e35 0%, #e2532f 42%, #f3b63a 100%); color: #fff; flex: none; }
.aw-icon svg, .ai-icons svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.aw-model { margin-left: auto; padding: 7px 12px; border-radius: 10px; background: #1f2228; font-size: 12.5px; color: var(--d-ink-2); }
.aw-q { width: fit-content; max-width: 80%; margin: 18px 0 16px auto; padding: 10px 16px; border-radius: 14px 14px 4px 14px; background: #eceef1; color: #1c1e22; font-size: 14.5px; }
.aw-body { display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; padding: 16px 18px; border-radius: 16px; background: #1b1e23; }
.aw-h { margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.aw-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--d-ink-2); }
.aw-table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--d-ink-2); }
.aw-table td { padding: 8px 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
.aw-table td:first-child { white-space: nowrap; color: var(--d-ink); }
.aw-table td:last-child { text-align: right; }
.aw em { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: rgba(120, 160, 230, .14); color: #9fbdf0; font: 500 12px/1.5 var(--ui); font-style: normal; white-space: nowrap; }
.aw-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 12px; letter-spacing: .04em; color: var(--d-muted); }
.aw-btns { display: flex; gap: 6px; }
.aw-btns i { padding: 6px 12px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font: 500 12.5px/1 var(--ui); font-style: normal; color: var(--d-ink-2); letter-spacing: 0; }
.aw-cap { max-width: 980px; margin: 12px auto 0; text-align: center; font-size: var(--t-small); color: var(--d-muted); }
/* four short points, each with a line icon */
.ai-icons { list-style: none; max-width: 980px; margin: 56px auto 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.ai-icons li { display: grid; gap: 6px; align-content: start; }
.ai-icons svg { width: 26px; height: 26px; margin-bottom: 6px; color: var(--brick-light); stroke-width: 1.5; }
.ai-icons h4 { font-size: var(--t-h4); color: var(--d-ink); }
.ai-icons p { font-size: var(--t-note); color: var(--d-ink-2); }
.ai-icons a { color: var(--brick-light); }
.ai-sizes { max-width: 980px; margin: 44px auto 0; text-align: center; font-size: var(--t-note); color: var(--d-ink-2); }
.ai-sizes b { color: var(--d-ink); font-weight: 600; }
.ai-sizes span { margin: 0 8px; color: var(--d-muted); }
.ai-details { max-width: 980px; margin-inline: auto; }

/* the app's own Local AI button, so writers know what to look for */
.ai-find { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; color: var(--d-ink-2); font-size: var(--t-note); }
.ai-pill { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px 0 11px; border-radius: 99px; background: linear-gradient(135deg, #c81e35 0%, #e2532f 42%, #f3b63a 100%); color: #fff; font: 600 13px/1 var(--ui); box-shadow: 0 6px 18px rgba(211, 33, 45, .32), inset 0 1px 0 rgba(255, 255, 255, .35); }
.ai-pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; animation: ai-twinkle 4.5s ease-in-out infinite; }
@keyframes ai-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 45% { transform: scale(.86) rotate(-8deg); opacity: .8; } 55% { transform: scale(1.08) rotate(6deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ai-pill svg { animation: none; } }

/* chapter templates: real cards from Book Design in a turning carousel (site.js) */
#features { overflow-x: clip; }
.tpl-carousel { position: relative; margin: 0; height: clamp(300px, 34vw, 420px); perspective: 1400px; }
.tpl-c { --o: 0; --a: 0; position: absolute; left: 50%; top: 50%; width: min(250px, 58%); aspect-ratio: 560 / 653; height: auto; border-radius: 9% / 7.7%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 18px 36px -16px rgba(16, 24, 40, .3); transform: translate(-50%, -50%) translateX(calc(var(--o) * 52%)) scale(calc(1 - var(--a) * .14)) rotateY(calc(var(--o) * -14deg)); z-index: calc(10 - var(--a)); filter: brightness(calc(1 - var(--a) * .035)); transition: transform .8s var(--ease-out), opacity .5s ease, filter .8s ease, box-shadow .8s ease; cursor: pointer; }
.tpl-c.is-front { cursor: default; box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 30px 60px -24px rgba(16, 24, 40, .4); }
.tpl-c.is-hidden { opacity: 0; pointer-events: none; }
.tpl-c:focus-visible { outline: 3px solid rgba(211, 33, 45, .5); outline-offset: 4px; }
.tpl-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10%; text-align: center; background: var(--surface); }
.tpl-more b { font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); color: var(--brick); }
.tpl-more span { font: 600 var(--t-note) var(--ui); color: var(--ink); }
.tpl-more small { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.tpl-carousel:not(.is-on) .tpl-c:not(:first-child) { display: none; }

/* ── Skills ── */
.skills { background: #f3f4f7; }
.skills .section-head { margin-bottom: 64px; }
.skills-catalogue { display: grid; gap: 72px; }
.skills-h { font-size: var(--t-h3s); margin-bottom: 6px; }
.skills-h span { font: 500 var(--t-note) var(--ui); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.skills-note { color: var(--ink-2); font-size: var(--t-note); margin-bottom: 22px; }
/* story frameworks: the beat count leads each card */
.fw-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fw { padding: 22px 24px 24px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); transition: transform .2s var(--ease-out), box-shadow .2s ease; }
.fw:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 18px 36px -18px rgba(16, 24, 40, .25); }
.fw-n { font: 500 var(--t-small)/1 var(--ui); color: var(--muted); }
.fw-n b { font: 400 44px/1 var(--serif); color: var(--brick); letter-spacing: -0.03em; margin-right: 6px; font-variant-numeric: lining-nums; }
.fw h4 { font-size: var(--t-h4); margin-top: 14px; }
.fw-by { margin-top: 4px; font-size: var(--t-small); color: var(--muted); }
.fw-blurb { margin-top: 10px; font-size: var(--t-note); color: var(--ink-2); }
.fw-beats { display: none; }

/* the deck (site.js): frameworks stacked like cards; flick, drag or pick one */
.fw-deck.is-deck { display: grid; grid-template-columns: minmax(0, 580px) 1fr; gap: 72px; align-items: center; }
.is-deck .fw-grid { position: relative; display: block; height: 380px; margin-top: 64px; touch-action: pan-y; }
.is-deck .fw { position: absolute; inset: 0; padding: 34px 36px; transform-origin: 50% 0; z-index: calc(20 - var(--pos, 0)); transform: translateY(calc(var(--pos, 0) * -20px)) scale(calc(1 - var(--pos, 0) * 0.045)) rotate(var(--rot, 0deg)); transition: transform .6s var(--ease-out), opacity .45s ease, box-shadow .3s ease, background .4s ease; user-select: none; }
.is-deck .fw { box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 -1px 4px rgba(16, 24, 40, .05), 0 12px 26px -12px rgba(16, 24, 40, .24); }
.is-deck .fw[data-pos="1"] { background: #fcfcfd; }
.is-deck .fw[data-pos="2"] { background: #f9fafb; }
.is-deck .fw[data-pos="3"] { background: #f6f7f9; }
.is-deck .fw[data-pos="0"] { cursor: grab; box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 40px -16px rgba(16, 24, 40, .28), 0 44px 90px -40px rgba(16, 24, 40, .38); }
.is-deck .fw.is-dragging[data-pos="0"] { box-shadow: 0 4px 8px rgba(16, 24, 40, .08), 0 30px 60px -20px rgba(16, 24, 40, .34), 0 60px 110px -40px rgba(16, 24, 40, .42); }
.is-deck .fw[data-pos="0"]:active { cursor: grabbing; }
.is-deck .fw:not([data-pos="0"]) > * { opacity: 0; }
.is-deck .fw > * { transition: opacity .3s ease .15s; }
.is-deck .fw.is-far { opacity: 0; }
.is-deck .fw.is-dragging { transition: none; }
.is-deck .fw.is-flying { z-index: 30; opacity: 0; transition: transform .45s cubic-bezier(.4, 0, .9, .6), opacity .45s ease; }
.is-deck .fw-n b { font-size: 64px; }
.is-deck .fw h4 { font-size: var(--t-h3); margin-top: 18px; }
.is-deck .fw-blurb { font-size: var(--t-body); margin-top: 14px; }
.is-deck .fw-beats { display: block; margin-top: 22px; font-size: var(--t-small); line-height: 1.7; color: var(--muted); }
.fw-beats i { font-style: normal; color: var(--brick); margin: 0 3px; }
.fw-beats span { white-space: nowrap; }
.fw-deck:not(.is-deck) .fw:hover { transform: translateY(-3px); }
.fw-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fw-index button { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 16px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); font: 500 var(--t-note) var(--ui); text-align: left; cursor: pointer; transition: background .2s ease, color .2s ease; }
.fw-index button:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.fw-index button[aria-current="true"] { background: #fff; color: var(--ink); box-shadow: inset 3px 0 0 var(--brick); }
.fw-index small { font: 500 var(--t-small) var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.fw-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-left: 4px; }
.fw-ctrl button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-soft); transition: transform .15s var(--ease-out), color .2s ease; }
.fw-ctrl button:hover { color: var(--brick); }
.fw-ctrl button:active { transform: scale(.92); }
.fw-ctrl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fw-count { min-width: 56px; text-align: center; font: 600 var(--t-note) var(--ui); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.no-motion .fw, .no-motion .fw > * { transition: none !important; }

/* genres and craft: two ribbons drifting in opposite directions */
.skills-pair { display: grid; gap: 48px; }
.skills-catalogue > *, .skills-pair > * { min-width: 0; }
.marquee { display: flex; gap: 10px; overflow: hidden; padding: 4px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex: none; gap: 10px; animation: drift 70s linear infinite; }
.marquee-right .tags { animation-direction: reverse; animation-duration: 95s; }
.tags li { padding: 10px 18px; border-radius: 999px; background: #fff; font: 500 15px/1.2 var(--ui); color: var(--ink); white-space: nowrap; }
.tags-craft li { background: rgba(18, 24, 38, .055); color: var(--ink-2); }
@keyframes drift { to { transform: translateX(calc(-100% - 10px)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .tags { flex-wrap: wrap; flex: 1; animation: none; }
  .tags[aria-hidden] { display: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skills-foot { margin-top: 56px; font-size: var(--t-small); color: var(--muted); }

/* ── download ── */
.download { background: var(--backdrop), var(--bg); }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 960px; margin: 0 auto; }
.dl-card { background: var(--surface); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 22px; box-shadow: var(--shadow-soft); transition: box-shadow .2s; }
.dl-card.is-yours { box-shadow: 0 0 0 2px var(--brick), var(--shadow-soft); }
.mobile-note { display: flex; gap: 16px; align-items: flex-start; max-width: 960px; margin: 0 auto 20px; padding: 22px; border-radius: 22px; background: var(--brick-soft); }
.mobile-note[hidden] { display: none; }
.mobile-note > svg { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--brick); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-note h3 { font-size: var(--t-h4); margin-bottom: 6px; }
.mobile-note p { color: var(--ink-2); font-size: var(--t-note); margin-bottom: 14px; }
.dl-head { display: flex; gap: 16px; align-items: center; }
.dl-head .os { width: 40px; height: 40px; fill: var(--brick); flex: none; }
.dl-head h3 { font-size: var(--t-h3s); }
.dl-head p { color: var(--ink-2); font-size: var(--t-note); }
.dl-notes { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: var(--t-note); display: grid; gap: 8px; }
.hash { font-size: var(--t-small); color: var(--ink-2); }
.hash summary { cursor: pointer; }
.hash code { display: block; margin-top: 8px; word-break: break-all; font-size: var(--t-small); padding: 10px 12px; }
.dl-foot { text-align: center; margin-top: 36px; color: var(--ink-2); font-size: var(--t-note); }
.dl-foot a, .faq details a, .doc a { color: var(--brick); }

/* ── FAQ ── */
.faq { background: rgba(255, 255, 255, .55); }
.faq details { border-bottom: 1px solid var(--border-strong); padding: 22px 0; }
.faq summary:hover { color: var(--brick); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font: 500 var(--t-h4)/1.3 var(--serif); transition: color .2s ease; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 var(--t-h3s)/1 var(--ui); color: var(--brick); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--ink-2); max-width: 680px; }

/* ── contact ── */
.contact { background: #fff; }
.contact-inner { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.contact-info h2 { font-size: var(--t-h2); }
.contact-lede { margin-top: 14px; font-size: var(--t-lead); color: var(--ink-2); }
.contact-list { margin: 32px 0 0; display: grid; gap: 14px; }
.contact-list div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; }
.contact-list dt { font-size: var(--t-small); color: var(--muted); }
.contact-list dd { margin: 0; font-size: var(--t-body); }
.contact-list a { color: var(--ink); text-decoration-color: rgba(211, 33, 45, .4); text-underline-offset: 3px; }
.contact-list a:hover { color: var(--brick); }
.contact-logo { display: inline-block; text-decoration: none; }
.contact-logo img { display: block; height: 20px; width: auto; transition: opacity .2s ease; }
.contact-logo:hover img { opacity: .75; }
.contact-form { display: grid; gap: 16px; padding: 28px; border-radius: 22px; background: var(--surface); }
.contact-form label { display: grid; gap: 7px; font: 600 var(--t-small)/1.2 var(--ui); color: var(--ink-2); }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--border-strong); font: 400 var(--t-note)/1.5 var(--ui); color: var(--ink); transition: box-shadow .2s ease; }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brick); }
.contact-form .btn { justify-self: start; }
.contact-form .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-status { min-height: 1.4em; font-size: var(--t-note); color: var(--ink-2); }
.contact-status.is-ok { color: var(--teal); }
.contact-status.is-err { color: var(--brick-hover); }

/* ── footer ── */
.footer { background: var(--d-bg); color: var(--d-muted); padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: center; }
.footer-brand .lockup { margin-bottom: 10px; }
.footer-brand img { width: 104px; }
.footer-brand .lockup-sub { color: var(--d-ink-2); }
.footer-brand p { font-size: var(--t-small); }
.footer-by { display: flex; align-items: center; gap: 10px; font-size: var(--t-small); }
.footer-by img { width: 110px; }
.footer-links { display: flex; gap: 22px; font-size: var(--t-small); }
.footer-links a { text-decoration: none; transition: color .2s ease; }
.footer-links a:hover { color: var(--brick-light); }
.footer-small { grid-column: 1 / -1; font-size: var(--t-small); color: #6b717a; padding-top: 8px; text-align: center; }

/* ── legal pages ── */
.doc { padding: 72px 0 112px; background: var(--backdrop), var(--bg); }
.doc .slug { color: var(--brick); }
.doc h1 { font-size: var(--t-h2); margin-bottom: 8px; }
.doc .updated { color: var(--ink-2); margin-bottom: 40px; }
.doc h2 { font-size: var(--t-h3s); margin: 40px 0 12px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--t-note); margin-top: 12px; background: var(--panel); border-radius: 12px; overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 600; background: rgba(255, 255, 255, .7); color: var(--ink); }
.doc .btn { color: #fff; }
.table-scroll { overflow-x: auto; }
.lost { min-height: 60vh; }

/* the app's legal documents, rendered on the website */
.legal h1 { font-size: var(--t-h2); margin-bottom: 8px; }
.legal h1 + p { color: var(--muted); margin-bottom: 32px; }
.legal h3 { font-size: var(--t-h4); margin: 28px 0 10px; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul, .legal ol { margin: 12px 0 0; }
.legal .ai-table { overflow-x: auto; margin-top: 14px; }
.legal code { font-size: .85em; word-break: break-all; }
.legal-loading { color: var(--muted); }
.legal-note { margin: 0 0 40px; padding: 20px 22px; border-radius: 16px; background: rgba(255, 255, 255, .7); }
.legal + .legal-note { margin: 48px 0 0; }
.legal-note h2 { margin: 0 0 8px !important; font-size: var(--t-h4) !important; }
.legal-note p { font-size: var(--t-note); }

/* ── sections that collapse on phones (open on larger screens) ── */
.m-collapse > summary { list-style: none; pointer-events: none; }
.m-collapse > summary::-webkit-details-marker { display: none; }
.m-collapse > summary { display: none; }
.m-collapse > .ticks { margin-top: 24px; }

/* ── entrance motion (added by site.js only when motion is welcome) ── */
.js-reveal .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s var(--ease-out), translate .7s var(--ease-out); transition-delay: var(--d, 0ms); }
.js-reveal .reveal.is-in { opacity: 1; translate: 0 0; }

/* ── responsive ── */
@media (max-width: 960px) {
  .promise-grid { grid-template-columns: 1fr 1fr; }
  .promise-grid > div:nth-child(odd)::before { display: none; }
  .feature { grid-template-columns: 1fr; gap: 36px; margin-bottom: 88px; }
  .ai-icons { grid-template-columns: 1fr 1fr; }
  .feature.flip { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-text { order: 0; }
  .fw-grid { grid-template-columns: 1fr 1fr; }
  .fw-deck.is-deck { grid-template-columns: 1fr; gap: 24px; }
  .is-deck .fw-index { grid-template-columns: 1fr 1fr 1fr; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  :root { --t-body: 16px; --t-lead: 17px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { padding-top: 48px; }
  .hero-cta .btn { width: 100%; }
  .shot-hero { margin-top: 40px; }
  .promise-grid, .dl-grid, .ai-details { grid-template-columns: 1fr; }
  .stack div { grid-template-columns: 1fr; gap: 2px; }
  .section { padding: 64px 0 72px; }
  .section-head { margin-bottom: 48px; }
  .dl-card { padding: 24px; }
  .footer-links { flex-wrap: wrap; }

  /* shorter on phones */
  .feature { gap: 24px; margin-bottom: 64px; }
  .promise-grid { grid-template-columns: 1fr 1fr; gap: 22px 18px; padding: 40px 0; }
  .promise-grid h3 { font-size: var(--t-lead); }
  .promise-grid p { font-size: var(--t-small); }

  .skills-h { display: none; }
  .skills-group > .skills-note { margin-top: 16px; }
  .fw-grid { grid-template-columns: 1fr; gap: 10px; }
  .skills-pair { gap: 0; }
  .fw-n b { font-size: 36px; }
  .is-deck .fw-grid { height: 470px; }
  .is-deck .fw { padding: 26px 24px; }
  .is-deck .fw-n b { font-size: 48px; }
  .is-deck .fw-index { display: none; }
  .fw-ctrl { justify-content: center; margin-top: 8px; }
  .skills-catalogue { gap: 0; }
  .ai-details { gap: 12px; }
  .ai-card > summary { padding: 20px 22px; }
  .ai-card > :not(summary) { margin: 0 22px 22px; }
  .ai-card h3 { font-size: var(--t-h4); }
  .ai-card-hint { font-size: var(--t-small); }

  .aw { padding: 16px; }
  .aw-head small, .aw-model, .aw-btns { display: none; }
  .aw-q { max-width: 100%; font-size: 13.5px; }
  .aw-body { grid-template-columns: 1fr; gap: 18px; padding: 14px; }
  .ai-icons { grid-template-columns: 1fr 1fr; gap: 22px 18px; margin-top: 40px; }
  .ai-sizes { margin-top: 32px; }
  /* tap to open */
  .m-collapse > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 16px; border-radius: 12px; font: 600 var(--t-note) var(--ui); color: var(--brick); background: var(--brick-soft); pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .m-collapse > summary::after { content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
  .m-collapse[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
  .m-collapse > .ticks { margin-top: 16px; }

  /* Extracts: each tab stacks on a phone */
  .xs-overview, .xs-cast { grid-template-columns: 1fr; }
  .xs-props { grid-template-columns: 1fr 1fr; }
  .xs-props .xs-dept:last-child { display: none; }
  .xs-tabs span { display: none; }

  /* the six small features: all showing, one under another */
  .mini-grid { grid-template-columns: 1fr; gap: 10px; }
  .mini { padding: 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .ai-card, .faq summary::after { transition: none; }
}
