/* Selica marketing site: styles.
   The app's identity: macOS dark neutrals, the system font, one accent (system
   blue), the node-family palette. Dark only, like the screenshots. Every
   motion is gated on prefers-reduced-motion. */

:root {
  color-scheme: dark;
  /* The neutrals are blue-blacks, not greys: a flat R=G=B grey reads dry beside
     the accent and beside the film's canvas, which is mixed the same way. */
  --page: #0A0C11;
  --page-2: #10131A;
  --surface: #161A22;
  --surface-2: #1E222B;
  --text: #F3F5FA;
  --text-2: #96A0B2;
  --border: rgba(170, 195, 245, .12);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  --glass: rgba(10, 12, 17, .72);
  /* What dims the page behind a modal: the page colour, deeper and less clear. */
  --scrim: rgba(6, 8, 12, .74);
  /* The banded sections are translucent so the page's canvas runs under them. */
  --band: rgba(16, 19, 26, .72);
  --accent: #0A84FF;
  --accent-soft: rgba(10, 132, 255, .18);
  --accent-quiet: #0B6BCB;
  /* The hero's glow: the accent taken most of the way to a slate, so it reads
     as light on the canvas rather than as a blue wash. Still a blue-black. */
  --hero-glow: rgba(72, 112, 168, .2);
  --accent-ink: #FFFFFF;
  --cat-source: #30B0C7; --cat-neural: #0A84FF; --cat-element: #30D158;
  --cat-reduce: #FF9F0A; --cat-resample: #BF5AF2; --cat-loss: #FF375F; --cat-output: #5E5CE6;
  /* The four export formats' own colours, for their marks only (STYLEGUIDE.md,
     Icons). ONNX's dark slate is lightened to stay legible on the surface. */
  --brand-swift: #F05138; --brand-coreml: #40C8E0; --brand-onnx: #7D96C0; --brand-pytorch: #EE4C2C;
  /* Roles for states, named for what they mean; each is one of the family
     colours, so a state never brings a colour the page does not already have. */
  --ok: var(--cat-element); --warn: var(--cat-reduce); --error: var(--cat-loss);
  --ok-soft: rgba(48, 209, 88, .16); --warn-soft: rgba(255, 159, 10, .16);
  --error-soft: rgba(255, 55, 95, .16);
  --focus: 0 0 0 3px rgba(10, 132, 255, .45);
  /* Spacing, one scale. New rules take their margins, paddings and gaps from
     it; STYLEGUIDE.md says which step is for what. */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem;
  --r-control: 8px; --r-card: 14px; --r-node: 10px; --r-pill: 999px;
  --maxw: 1120px;
  /* A text page's reading column: about seventy characters of body type. */
  --measure: 42rem;
  /* The canvas grid's lines, as the film draws them (build.py's --grid-minor and
     --grid-major); the text pages lay the same grid, still. Change them together. */
  --page-grid-minor: rgba(150, 180, 255, .065);
  --page-grid-major: rgba(150, 180, 255, .15);
  /* The sticky header's height; an anchor scrolls to just below it. */
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  /* The page's own canvas layer is absolute inside it, so it is as tall as the
     page and scrolls with it. */
  position: relative;
  margin: 0; font-family: var(--font); color: var(--text); background: var(--page);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0; }
.wrap { width: min(var(--maxw), 100% - 2rem); margin-inline: auto; }
.wrap.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
/* A link's target: lands clear of the sticky header. Put it on an element no
   animation moves (a wrapper round a .reveal), or the scroll aims at where the
   element starts its rise. */
.anchor { scroll-margin-top: calc(var(--header-h) + var(--s-5)); }
/* Read aloud, not shown. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Icons: one family, drawn by hand on a 16-unit grid as strokes, after the
   SF Symbols the application uses (never copied). The stroke is set here so it
   renders 1.5px at either size; a dot is the one fill. Colour comes from
   `color`, set by where the icon stands. STYLEGUIDE.md, Icons. */
.icon { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 20px; height: 20px; stroke-width: 1.2; }
.icon .dot { fill: currentColor; stroke: none; }

/* Progress bar along the top, from scroll. */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; font-size: .95rem; color: var(--text-2); }
.nav-links > :is(a, span) { white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.nav-toggle { display: none; margin-left: auto; }
/* The menu collapses below 980px, where its seven links and the button stop
   fitting on one line beside the name. */
@media (max-width: 979px) {
  .nav-links { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 1rem; gap: .2rem; background: var(--page-2); border-bottom: 1px solid var(--border); }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links > :is(a, span) { padding: .7rem .5rem; border-radius: 8px; }
  .nav-links a:hover { background: var(--surface-2); }
  .nav-toggle { display: inline-grid; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; transition: transform .15s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px rgba(10,132,255,.32); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(10,132,255,.42); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-lg { padding: .85rem 1.35rem; font-size: 1.05rem; }

/* Focus: one ring, on anything a keyboard can reach. */
:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
/* Not yet an action: the Mac App Store button before the app is on the store (web/build.py, APPSTORE_URL). A span, not a link; the primary's fill, a touch quieter, with no glow, no lift and no pointer. */
.btn-soon, .btn-soon:hover, .btn-soon:active { transform: none; box-shadow: none; cursor: default; }
.btn-primary.btn-soon { background: var(--accent-quiet); }
.btn-danger { background: var(--error-soft); color: var(--error); border-color: var(--error); }

/* Form controls. One height (40px), one radius, one border; states change the
   border and add the ring, never the size. STYLEGUIDE.md shows each. */
.field { display: grid; gap: var(--s-2); }
.field > label, .label { font-size: .85rem; font-weight: 600; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--text-2); }
.field .hint.error { color: var(--error); }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: .5rem .75rem; font: inherit; font-size: .95rem;
  color: var(--text); background: var(--page-2); border: 1px solid var(--border);
  border-radius: var(--r-control); transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-2); opacity: .7; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(170, 195, 245, .26); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--accent); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--error); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .5; cursor: not-allowed; }
.select { appearance: none; -webkit-appearance: none; padding-right: 2rem; background-image:
  linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: inline-flex; align-items: center; gap: var(--s-2); font-size: .95rem; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; flex: none;
  border: 1px solid rgba(170, 195, 245, .3); background: var(--page-2); border-radius: 5px;
  display: inline-grid; place-content: center; transition: background .15s, border-color .15s; }
.check input[type="radio"] { border-radius: 50%; }
.check input::after { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--accent-ink); transform: scale(0); transition: transform .15s var(--ease); }
.check input[type="radio"]::after { border-radius: 50%; width: 8px; height: 8px; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: scale(1); }
.check input:disabled { opacity: .5; }
.switch { display: inline-flex; align-items: center; gap: var(--s-2); font-size: .95rem; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; margin: 0; flex: none; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border); position: relative; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
/* A notice: the same plate in each of the three states. */
.notice { padding: var(--s-3) var(--s-4); border-radius: var(--r-control); border: 1px solid var(--border); background: var(--surface); font-size: .95rem; }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.error { border-color: var(--error); background: var(--error-soft); }

/* Hero: the film is the hero, and it ends on the copy. The background is one
   soft slate-blue glow reaching up behind it; the film's own plate is transparent,
   so the glow mixes into the picture rather than sitting beside it. */
.hero { position: relative; padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(76% 62% at 50% 40%, var(--hero-glow), transparent 72%);
}
.hero-film { position: relative; }
.hero-copy { text-align: center; display: grid; justify-items: center; }
.badge { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; color: var(--text-2); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat-element); box-shadow: 0 0 0 4px rgba(48,209,88,.2); }
.hero h1 { margin-top: 1.2rem; max-width: 16ch; }
.hero h1 .accent { color: var(--accent); }
.lede { margin-top: 1.2rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--text-2); max-width: 44ch; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--text-2); }
/* Scene dots under the film: four, one per scene; the lit one is where the
   film is, and pressing one takes it there. */
.hero-dots { display: flex; justify-content: center; gap: var(--s-3); margin-top: var(--s-5); }
.hero-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1px solid rgba(170, 195, 245, .35);
  background: transparent; cursor: pointer; position: relative; transition: background .25s, border-color .25s, transform .25s var(--ease); }
.hero-dot::before { content: ""; position: absolute; inset: -9px; }  /* a target a thumb can hit */
.hero-dot:hover { border-color: var(--text-2); transform: scale(1.15); }
.hero-dot[aria-current="true"] { background: var(--accent); border-color: var(--accent); }


/* Sections */
.feature-section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.feature-section.alt { background: var(--band); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p, .split-copy p { margin-top: 1rem; font-size: 1.1rem; color: var(--text-2); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split.reverse .split-copy { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse .split-copy { order: 0; } }
.quiet { font-style: italic; }
.ticks { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.6rem; color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ticks li.no { color: var(--text-2); }
.ticks li.no::before { background: transparent; box-shadow: inset 0 0 0 2px var(--border); }
.ticks small { color: var(--text-2); }

/* Stat card (observation) */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 1.2rem; display: grid; gap: 1rem; }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-2); }
.stat-row strong, .stat-grid strong { font-family: var(--mono); color: var(--text); font-size: 1.6rem; font-weight: 600; }
.sparkline svg { width: 100%; height: 60px; }
.spark { stroke-dasharray: 260; stroke-dashoffset: 260; }
.in .spark { animation: draw-spark 1.6s var(--ease) .3s forwards; }
@keyframes draw-spark { to { stroke-dashoffset: 0; } }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.stat-grid > div { display: grid; gap: .1rem; background: var(--surface-2); padding: .7rem .8rem; border-radius: 10px; }
.stat-grid span { font-size: .78rem; color: var(--text-2); }
.stat-grid strong { font-size: 1.1rem; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 42px; }
.bars i { flex: 1; background: var(--accent); opacity: .85; border-radius: 3px 3px 0 0; height: 0; transition: height .9s var(--ease); }
.in .bars i { height: var(--h); }
.in .bars i:nth-child(2) { transition-delay: .05s } .in .bars i:nth-child(3) { transition-delay: .1s } .in .bars i:nth-child(4) { transition-delay: .15s }
.in .bars i:nth-child(5) { transition-delay: .2s } .in .bars i:nth-child(6) { transition-delay: .25s } .in .bars i:nth-child(7) { transition-delay: .3s } .in .bars i:nth-child(8) { transition-delay: .35s }

/* Templates */
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
/* The family's colour, mixed well down into the surface: a label, not a signal. */
.tpl { display: grid; gap: .2rem; padding: 1rem 1rem 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid color-mix(in srgb, var(--tpl) 42%, var(--surface)); border-radius: 12px; transition: transform .25s var(--ease), box-shadow .25s; }
.tpl:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tpl b { display: flex; align-items: center; gap: var(--s-2); font-weight: 650; }
/* The icon a little stronger than the edge, still taken well down into the quiet text colour. */
.tpl .icon { color: color-mix(in srgb, var(--tpl) 55%, var(--text-2)); }
.tpl span { font-size: .88rem; color: var(--text-2); }
.cap { margin-top: 1.4rem; font-size: .95rem; color: var(--text-2); max-width: 70ch; }
/* Under the two plans, the note about where to get it belongs to both. */
.cap.centred { margin-inline: auto; text-align: center; }

/* Live card: two scenes that take turns, both drawn by main.ts on a canvas.
   The camera scene lights a grid of five-pixel cells from a hundred handwritten
   digits; the microphone scene adds four harmonics of a voice into one wave and
   shows them all. What the picture is about is white (the digit, the wave),
   what is worked out around it is blue (the convolution's halo, the
   harmonics), and both chips are the accent. The card's `data-scene` says
   which is up. */
.live-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.live-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font-size: .85rem; color: var(--text-2); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--cat-loss); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.live-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background:
  radial-gradient(120% 95% at 50% 0%, rgba(10,132,255,.10), transparent 72%), var(--surface-2); }
.live-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.m-cam, .m-mic { opacity: 0; transition: opacity .45s var(--ease); }
.live-card[data-scene="cam"] .m-cam, .live-card[data-scene="mic"] .m-mic { opacity: 1; }

/* The words under and over the picture change with the scene. */
.swap { position: relative; display: inline-block; min-height: 1.25em; }
.swap > * { position: absolute; left: 0; top: 0; white-space: nowrap; }
.head-mode { flex: 1; }
.head-mode b { font-weight: 500; }
.live-tags { position: absolute; left: 1rem; bottom: 1rem; }
.live-tags span { position: absolute; left: 0; bottom: 0; font: 600 .8rem var(--mono); color: #fff; background: var(--c); padding: .25rem .5rem; border-radius: 6px; white-space: nowrap; }

/* Exports */
.exports { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.exp { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; display: grid; gap: .3rem; }
.exp b { display: flex; align-items: center; gap: var(--s-2); font-size: 1.15rem; letter-spacing: -.01em; }
.exp .icon { color: var(--brand); }
.exp span { font-size: .88rem; color: var(--text-2); }

/* Cards */
.grid { display: grid; gap: 1rem; }
/* Rows of three on a wide page, two on a middling one, one on a phone. A last
   row that is short is shared out evenly: two cards take half each, one card
   the whole row, so no row ends in a hole. */
.cards { grid-template-columns: 1fr; }
@media (min-width: 620px) and (max-width: 959px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards .card:nth-child(odd):last-child { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(6, 1fr); }
  .cards .card { grid-column: span 2; }
  .cards .card:nth-child(3n+1):nth-last-child(2),
  .cards .card:nth-child(3n+1):nth-last-child(2) + .card { grid-column: span 3; }
  .cards .card:nth-child(3n+1):last-child { grid-column: 1 / -1; }
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 1.3rem; display: grid; align-content: start; gap: .6rem; transition: transform .25s var(--ease), box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card p { color: var(--text-2); font-size: .97rem; }

/* Plans */
.plans { grid-template-columns: repeat(2, 1fr); align-items: start; max-width: 860px; margin-inline: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 1.5rem; display: grid; gap: .8rem; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.plan-tag { position: absolute; top: -12px; left: 1.5rem; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.price { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; }
.price small { font-size: .9rem; color: var(--text-2); font-weight: 500; }
.plan > p { color: var(--text-2); }
.plan .btn { justify-self: start; margin-top: .4rem; }
/* A line under a plan's button saying how that plan is got. */
.plan-note { margin-top: -.4rem; font-size: .85rem; color: var(--text-2); }

/* The full feature list, under the plans: each group a panel with a title, a
   line, and its list. Two columns, split by the generator where the halves are
   closest in height, both starting at the same line. */
.features-head { text-align: center; margin: var(--s-8) auto var(--s-6); max-width: 620px; }
.features-head h3 { font-size: 1.5rem; font-weight: 700; }
.features-head p { margin-top: var(--s-2); color: var(--text-2); }
.feature-groups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
@media (max-width: 900px) { .feature-groups { grid-template-columns: 1fr; } }
.feature-column { display: grid; gap: var(--s-4); }
.feature-group { padding: var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.feature-group h4 { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
.feature-group h4 .icon { color: var(--text-2); }
.feature-group > p { margin-top: var(--s-1); font-size: .9rem; color: var(--text-2); }
.feature-group ul { list-style: none; margin: var(--s-4) 0 0; padding: var(--s-4) 0 0; display: grid; gap: var(--s-3); border-top: 1px solid var(--border); }
.feature-group li { font-size: .92rem; line-height: 1.5; }
.feature-group li b { font-weight: 600; }
.feature-group li span { color: var(--text-2); }
/* The small print: what the page does not promise. */
.disclaimer { margin: var(--s-5) auto 0; max-width: 70ch; text-align: center; font-size: .85rem; color: var(--text-2); }

/* Screenshots, under the feature list: an index, not panels. Numbered titles
   that link to the picture, each with its line under it, in two columns read
   down (1–5, then 6–10), one on a phone. Written by docs/release/screenshots.py. */
.shot-list { list-style: none; margin: 0 auto; padding: 0; max-width: 960px; display: grid; column-gap: var(--s-7); }
@media (min-width: 901px) { .shot-list { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rows), auto); grid-auto-flow: column; } }
.shot { position: relative; padding: var(--s-4) 0 var(--s-5) 2.5rem; border-top: 1px solid var(--border); }
.shot-num { position: absolute; left: 0; top: calc(var(--s-4) + .2em); font: 500 .8rem var(--mono); color: var(--text-2); }
.shot-link { font-size: 1.05rem; font-weight: 600; color: var(--text); border-radius: 4px;
  text-decoration: underline 1px var(--border); text-underline-offset: .3em; transition: color .2s, text-decoration-color .2s; }
.shot-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.shot p { margin-top: var(--s-1); font-size: .95rem; color: var(--text-2); max-width: 60ch; }

/* Modal: a native <dialog> opened with showModal(), so focus stays inside,
   Escape closes it and the page behind is inert. A floating panel on a scrim
   that dims and slightly blurs the page; the picture is as large as the
   viewport allows at 16:10, never past its natural size (1440 x 900 CSS
   pixels for a 2x screenshot). STYLEGUIDE.md, Modal. */
:root:has(.modal[open]) { overflow: hidden; }
.modal {
  --pad: var(--s-4);
  /* The picture's width: its natural width, the viewport's less the margins, or
     what the viewport's height leaves once the head and the caption are in. */
  --pic: min(1440px, 100vw - 2rem - 2 * var(--pad), (100dvh - 2rem - 11rem) * 1.6);
  width: calc(var(--pic) + 2 * var(--pad)); max-width: none; max-height: calc(100dvh - 2rem);
  margin: auto; padding: 0; overflow: auto; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow);
}
@media (min-width: 621px) { .modal { --pad: var(--s-5); } }
.modal::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .22s var(--ease); }
.modal[open]::backdrop { animation: scrim-in .22s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes scrim-in { from { opacity: 0; } }
.modal-body { display: grid; gap: var(--s-4); padding: var(--pad); }
.modal-head, .modal-foot { display: flex; align-items: center; gap: var(--s-3); }
.modal-foot { align-items: flex-start; }
.modal-title { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 600; }
.modal-count { margin-right: var(--s-2); font: 500 .8rem var(--mono); color: var(--text-2); }
.modal-desc { flex: 1; font-size: .95rem; color: var(--text-2); }
.modal-nav { display: flex; gap: var(--s-2); }
.modal .icon-btn { width: 40px; height: 40px; transition: background .2s, border-color .2s; }
.modal .icon-btn:hover { background: var(--surface-2); border-color: rgba(170, 195, 245, .26); }
/* On a phone the caption takes the width; previous and next go under it, one
   at each side, at a thumb's size. */
@media (max-width: 620px) {
  .modal .icon-btn { width: 44px; height: 44px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-nav { justify-content: space-between; }
}
.modal-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--page-2); border-radius: var(--r-control); }
.modal-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 1; transition: opacity .2s var(--ease); }
.modal-frame[data-loading="true"] .modal-img, .modal-frame[data-loading="error"] .modal-img { opacity: 0; }
/* The loading state: one quiet word, shown only if the picture is slow. */
.modal-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; color: var(--text-2); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.modal-frame[data-loading="true"] .modal-loading { opacity: 1; transition-delay: .2s; }
.modal-frame[data-loading="true"] .modal-loading > span { animation: loading-breathe 1.6s ease-in-out infinite; }
.modal-frame[data-loading="error"] .modal-loading { opacity: 1; transition: none; }
@keyframes loading-breathe { 50% { opacity: .45; } }

/* FAQ */
.faq { display: grid; gap: .6rem; }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 1.1rem; }
.qa summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--text-2); font-size: 1.3rem; transition: transform .25s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 0 1rem; color: var(--text-2); }

/* CTA + footer */
.cta-section { padding: 0 0 clamp(3rem, 7vw, 6rem); }
.cta-band { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; border-radius: 24px; background:
  radial-gradient(70% 90% at 50% 0%, var(--accent-soft), transparent 70%), var(--surface); border: 1px solid var(--border); display: grid; justify-items: center; gap: 1rem; }
.cta-icon { filter: drop-shadow(0 12px 24px rgba(10,132,255,.35)); }
.cta-band p { color: var(--text-2); max-width: 46ch; }
.cta-band .hero-ctas { justify-content: center; margin-top: .4rem; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; color: var(--text-2); font-size: .9rem; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: var(--s-2) 1.2rem; }
.footer-grid nav a:hover, .footer-grid nav a[aria-current="page"] { color: var(--text); }
/* The line under the name and the links, on its own row: beside seven links it
   no longer fits, and a right-hand line that wraps under them looks dropped. */
.footer-line { flex-basis: 100%; }
/* The owner's reminder in the footer; build.py keeps it only in a draft build. */
.placeholder-note { margin-top: 1.2rem; font-size: .8rem; opacity: .8; }
/* Whose marks the page names, and why: small print, the last line. */
.trademarks { margin-top: var(--s-3); font-size: .8rem; color: var(--text-2); }
code { font-family: var(--mono); font-size: .9em; }

/* A link in running copy: the accent, with a quiet underline that turns solid
   on hover. The text pages' links are the same (.prose a). */
.text-link, .prose a { color: var(--accent); text-decoration: underline 1px var(--accent-soft); text-underline-offset: .22em;
  border-radius: 2px; transition: text-decoration-color .2s; }
.text-link:hover, .prose a:hover { text-decoration-color: currentColor; }

/* Text pages: privacy, terms, support and the 404, written by
   docs/release/pages.py. Calm: no film, no wiring, nothing that moves; the
   canvas grid lies still under the head and fades out before the text runs
   long. One reading column, body type at a long-form line height. */
.doc-grid { position: absolute; inset: 0 0 auto; height: 760px; z-index: -1; pointer-events: none; opacity: .34;
  background:
    repeating-linear-gradient(to right, var(--page-grid-major) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(to bottom, var(--page-grid-major) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(to right, var(--page-grid-minor) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(to bottom, var(--page-grid-minor) 0 1px, transparent 1px 10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, transparent 100%); }
.doc { padding: var(--s-8) 0; }
.prose { max-width: var(--measure); line-height: 1.7; overflow-wrap: break-word; }
.doc-head { margin-bottom: var(--s-7); padding-bottom: var(--s-6); border-bottom: 1px solid var(--border); }
.doc-head h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 650; }
.doc-meta { margin-top: var(--s-3); font-size: .9rem; color: var(--text-2); }
.doc-notice { margin-bottom: var(--s-6); }
.prose h2 { margin: var(--s-7) 0 var(--s-3); font-size: 1.3rem; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
.prose h3 { margin: var(--s-6) 0 var(--s-2); font-size: 1.05rem; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
.doc-head + h2, .doc-notice + h2 { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s-4); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.prose li + li { margin-top: var(--s-2); }
.prose li::marker { color: var(--text-2); }
.prose strong { font-weight: 600; }
/* The 404: one short message, centred, with the way back. */
.doc-missing { text-align: center; padding: clamp(5rem, 16vh, 10rem) 0; }
.doc-missing .lede { margin-inline: auto; }

/* Reveal on scroll: everything marked .reveal rises in when it enters the
   viewport, staggered by --i. Nothing moves for people who asked it not to. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .spark { stroke-dashoffset: 0; animation: none; }
  .rec { animation: none; }
  .m-cam, .m-mic { transition: none; }
  .hero-dots { display: none; }
  .bars i { height: var(--h); transition: none; }
  .modal[open], .modal[open]::backdrop { animation: none; }
  .modal-img, .shot-link { transition: none; }
  .modal-loading { transition: none; }
  .modal-frame[data-loading="true"] .modal-loading > span { animation: none; }
}
