/* ==========================================================================
   aimset.app — shared stylesheet: tokens, fonts, base, shared components,
   the root page, the document pages, the 404 page and the invite landing.

   The design language is the app's: the production canvas "Aimset Paper &
   Glass – Production" (docs/design/2026-10-11-aimset-tabs-production/, its
   kit/tokens.py and kit/type.py) and the owner's rulings R16–R51 in
   docs/superpowers/specs/2026-10-11-aimset-tabs-production-design.md:

   - a graphite ground, the orange accent for the one live thing or the one
     action, a separate green for the good direction, red for hits;
   - JetBrains Mono for numbers and headings only, every word a person reads
     or presses in the system face, sentence case, nothing upper-cased by style;
   - capsule buttons, glass groups, the target face as TargetRender draws it.

   The logo is the 2026-09-27 kit (docs/design/2026-09-27-aimset-logo-redesign/
   kit/): drawn from its masters, never retyped. Dark is the only theme.
   ========================================================================== */

/* ── Tokens (kit/tokens.py, dark) ───────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* ground and surfaces: graphite, not navy */
  --bg: #0B0B0C;
  --bg-rgb: 11, 11, 12;
  --surface: #151517;
  --surface-2: #1C1C1F;
  --surface-3: #232326;
  --raised: #0E0E10;
  --hair: rgba(255, 255, 255, .06);
  --hair-2: rgba(255, 255, 255, .10);
  --hair-strong: rgba(255, 255, 255, .18);
  --fill: rgba(255, 255, 255, .06);
  --fill-2: rgba(255, 255, 255, .10);
  --track: rgba(255, 255, 255, .07);

  /* glass: chrome over pictures */
  --glass: rgba(22, 22, 24, .66);
  --glass-strong: rgba(22, 22, 24, .80);
  --glass-border: rgba(255, 255, 255, .14);
  --glass-hi: rgba(255, 255, 255, .08);
  --capsule: rgba(34, 34, 37, .82);

  /* ink ladder */
  --text: #F3F1EC;
  --text-2: #ABA79F;
  --text-3: #8C8881;
  --text-4: #6F6B64;          /* decorative only — never content */
  --text-inverse: #111113;

  /* accent: live, now, you, the one action (owner 2026-10-12) */
  --accent: #FF7438;
  --accent-fill: #F46428;     /* filled controls, under white ink */
  --accent-ink: #FFFFFF;
  --accent-dim: rgba(255, 116, 56, .14);
  --accent-soft: rgba(255, 116, 56, .32);
  --accent-glow: rgba(255, 116, 56, .50);

  /* the good direction — never the accent */
  --good: #5ED5A0;
  --good-dim: rgba(94, 213, 160, .14);

  /* one hue per metric */
  --score: #FF9562;
  --pace: #4FC8E0;
  --spread: #B39EFF;
  --center: #6C9BFF;
  --form: #FF9562;

  /* states */
  --red: #FF4455;
  --red-dim: rgba(255, 68, 85, .14);
  --blue: #5CA8FF;
  --blue-dim: rgba(92, 168, 255, .14);
  --amber: #FFA928;
  --amber-dim: rgba(255, 169, 40, .14);

  /* the paper, as TargetRender draws it (Theme.swift DarkPalette) */
  --paper: #D8D3C4;
  --paper-rgb: 216, 211, 196;
  --paper-ink: #06080C;
  --hit: #FF4455;

  /* the logo's inks on a dark ground (kit guidelines §4) — the hit is the
     accent's orange since 2026-10-17 (owner) */
  --brand-ink: #FFFFFF;
  --brand-hit: #FF7438;

  /* shadows */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, .30);
  --shadow-box: 0 20px 40px rgba(0, 0, 0, .25);
  --shadow-float: 0 18px 40px rgba(0, 0, 0, .50);

  /* type */
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif;
  --display-track: -0.021em;  /* the one display kern, both platforms */

  /* geometry */
  --radius-box: 26px;
  --radius-card: 20px;
  --gutter: clamp(20px, 4.4vw, 48px);
  --max: 1200px;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-land: cubic-bezier(.2, .9, .3, 1.25);
}

/* ── Fonts — JetBrains Mono, self-hosted (SIL OFL 1.1, assets/fonts/OFL.txt) */
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-family: var(--mono); font-weight: 800; letter-spacing: var(--display-track); font-variant-numeric: tabular-nums; }
.num small, .unit { font-size: .5em; font-weight: 500; letter-spacing: 0; color: var(--text-2); }

/* ── Keyframes ──────────────────────────────────────────────────────────── */
@keyframes a-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes a-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes a-fade-out { to { opacity: 0; } }
@keyframes a-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes a-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@keyframes a-beacon { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes a-land { 0% { transform: scale(2.2); opacity: 0; } 55% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes a-ripple { from { transform: scale(.4); opacity: .85; } to { transform: scale(3.2); opacity: 0; } }
@keyframes a-outline { 0% { opacity: 0; transform: scale(1.8); } 25% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes a-marquee { to { transform: translateX(calc(-50% - 20px)); } }
@keyframes a-chev { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }

/* ── The logo — the horizontal lockup, drawn from the kit's masters ─────────
   Symbol canvas 1.36 H, the gap 0.4 H, the wordmark at cap height H (kit
   README, "Construction"). Two SVGs share one 136-unit-tall frame: the symbol
   (256 square, inked by mark.css) and the wordmark (x 176 → 643.76). Its
   height sets everything; never under 96 px wide (guidelines §3). */
.lockup {
  --h: 30px;
  display: inline-flex; align-items: center; gap: calc(var(--h) * 40 / 136);
  color: var(--brand-ink); line-height: 0; flex: none;
}
.lockup:hover { color: var(--brand-ink); }
.lockup__mark { width: var(--h); height: var(--h); flex: none; overflow: visible; }
.lockup__word { height: var(--h); width: calc(var(--h) * 467.76 / 136); flex: none; fill: currentColor; }
.lockup--sm { --h: 24px; }
.lockup--lg { --h: 44px; }
/* The symbol's inks and motion are mark.css (the animated mark,
   docs/design/2026-10-17-aimset-animated-mark/); with no stylesheet it is the master. */

/* ── Labels and pills ───────────────────────────────────────────────────── */
/* A label is read, not scanned: the system face, sentence case (R17, R18). */
.label { font-family: var(--sans); font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--text-3); letter-spacing: 0; }
.label--dim { color: var(--text-4); }
.label a { color: var(--text-2); }
.label a:hover { color: var(--text); }

.pill {
  display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px 0 12px; border-radius: 17px;
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap;
}
/* The live dot: the accent, breathing — the HUD's Active indicator. */
.pill__dot, .live-dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  animation: a-breathe 2.4s ease-in-out infinite;
}

/* ── Buttons — capsules (R23) ───────────────────────────────────────────── */
.btn {
  --bh: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--bh); padding: 0 calc(var(--bh) * .5); border-radius: calc(var(--bh) / 2);
  font-family: var(--sans); font-size: 16.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--text); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .2s, border-color .2s, box-shadow .25s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn:active { transform: scale(.97); transition-duration: .08s; }
.btn .arrow { display: inline-block; transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn svg { flex: none; }
/* ↗ — the button leaves the site */
.ext { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.btn:hover .ext { transform: translate(2px, -2px); }

/* The one primary action: the accent capsule with white ink and its glow. */
.btn--accent {
  background: var(--accent-fill); color: var(--accent-ink);
  box-shadow: 0 12px 30px rgba(244, 100, 40, .26), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--accent:hover { color: var(--accent-ink); background: #FF6E30; box-shadow: 0 16px 38px rgba(244, 100, 40, .36), inset 0 1px 0 rgba(255, 255, 255, .26); }
/* The secondary verb: glass on the ground. */
.btn--glass {
  background: var(--glass); border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.btn--glass:hover { border-color: var(--hair-strong); background: var(--glass-strong); }
/* A neutral capsule on the raised surface (NeutralCapsuleButton). */
.btn--neutral { background: var(--surface-2); border-color: var(--hair-strong); }
.btn--neutral:hover { background: var(--surface-3); }
.btn--sm { --bh: 40px; font-size: 15px; padding: 0 18px; }
.btn--lg { --bh: 58px; font-size: 17px; padding: 0 34px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* The record capsule's chevron run (kit slide_cta) — the hero action's tail. */
.chevs { display: inline-flex; margin-right: -4px; }
.chevs svg { width: 9px; height: 14px; animation: a-chev 1.6s ease-in-out infinite; }
.chevs svg:nth-child(2) { animation-delay: .18s; }
.chevs svg:nth-child(3) { animation-delay: .36s; }

/* ── Glass group — THE content box (GlassGroup): surface gradient, one
   highlight stroke, radius 26. Never one inside another. */
.glass {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hair); border-radius: var(--radius-box);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-card);
}

/* ── Segmented capsule (SegmentedCapsule): a recessed track, a raised neutral
   thumb — never the accent. */
.seg {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: 40px; padding: 2px; margin: 0; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--hair-strong); border-radius: 20px;
}
.seg__thumb {
  position: absolute; top: 2px; bottom: 2px; left: 2px; border-radius: 18px;
  background: var(--surface-3); box-shadow: inset 0 1px 0 var(--glass-hi), 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .4s var(--ease-out), width .4s var(--ease-out); pointer-events: none;
}
.seg__opt {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; border-radius: 18px; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: color .25s;
}
.seg__opt input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none; }
.seg__opt.is-on { color: var(--text); }
.seg__opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A small status pill in the good green (`Save 44%`, `1 month free`). */
.tag {
  display: inline-block; height: 26px; line-height: 24px; padding: 0 10px; border-radius: 13px;
  background: var(--good-dim); border: 1px solid rgba(94, 213, 160, .30);
  font-size: 13px; font-weight: 600; color: var(--good); white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ── Layout frame ───────────────────────────────────────────────────────── */
.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Display type ───────────────────────────────────────────────────────── */
.display {
  margin: 0; font-family: var(--mono); font-weight: 800; letter-spacing: var(--display-track);
  line-height: 1.02; color: var(--text); text-wrap: balance;
}
.rise { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 .04em .16em 0; margin-bottom: -.16em; }
.rise > span { display: inline-block; animation: a-rise .9s var(--ease-out) both; }
.rise[data-delay="1"] > span { animation-delay: .1s; }
.rise[data-delay="2"] > span { animation-delay: .2s; }
.fade-in { animation: a-fade-up .8s var(--ease-out) both; }
.fade-in[data-delay="1"] { animation-delay: .25s; }
.fade-in[data-delay="2"] { animation-delay: .4s; }
.fade-in[data-delay="3"] { animation-delay: .55s; }
.fade-in[data-delay="4"] { animation-delay: .7s; }

/* ── The paper face (TargetRender): the inline SVG faces share these inks ── */
.face__paper { fill: rgba(var(--paper-rgb), .92); stroke: rgba(var(--paper-rgb), .95); stroke-width: 1; }
.face__ring { fill: none; stroke: rgba(6, 8, 12, .35); stroke-width: .8; }
.face__black { fill: var(--paper-ink); stroke: rgba(var(--paper-rgb), .6); stroke-width: 1.2; }
.face__ring-in { fill: none; stroke: rgba(var(--paper-rgb), .32); stroke-width: .8; }
.face__center { fill: rgba(var(--paper-rgb), .6); }
.face__num { font-family: var(--mono); font-weight: 400; fill: rgba(6, 8, 12, .5); text-anchor: middle; dominant-baseline: central; }
.face__num--in { fill: rgba(var(--paper-rgb), .4); }
/* Hits are coloured markers: holeRed .85 with a white .55 rim (R20). */
.hit { fill: var(--hit); fill-opacity: .85; stroke: #FFFFFF; stroke-opacity: .55; stroke-width: .8; }
.hit--new { transform-box: fill-box; transform-origin: center; animation: a-land .42s var(--ease-land) both; }
.hit-outline { fill: none; stroke: #FFFFFF; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: a-outline 1.6s var(--ease-out) both; }
.hit-ripple { fill: none; stroke: var(--hit); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: a-ripple 1.1s var(--ease-out) both; }

/* ── Root page ──────────────────────────────────────────────────────────── */
.home {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  overflow: hidden; isolation: isolate;
}
.home::before {
  /* the warm stage the face sits on: a soft accent bloom, low and right */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 640px at 82% 92%, rgba(255, 116, 56, .10), transparent 62%),
    radial-gradient(1200px 800px at 70% 0%, #151517 0%, transparent 60%);
}
.home__bar { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 2; }
.home__links { display: flex; align-items: center; gap: 6px; }
.home__link { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 20px; font-size: 15px; font-weight: 500; color: var(--text-2); transition: color .2s, background-color .2s; }
.home__link:hover { color: var(--text); background: var(--fill); }
.home__face {
  position: absolute; z-index: 0; width: min(980px, 128vw); height: auto;
  right: -16%; bottom: -40%; pointer-events: none;
  animation: a-face-in 1.6s var(--ease-out) .15s both;
  transition: transform .9s var(--ease-out);
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 62%, rgba(0, 0, 0, .35) 100%);
  mask-image: radial-gradient(closest-side at 50% 50%, #000 62%, rgba(0, 0, 0, .35) 100%);
}
@keyframes a-face-in { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
/* The newest hit wears the accent with its beacon kept at rest (R20). */
.hit.is-latest { fill: var(--accent); fill-opacity: 1; stroke: none; }
.hit.is-fading, .hit-beacon.is-fading { animation: a-fade-out .6s var(--ease-out) forwards; }
.hit-beacon { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-opacity: .7; transform-box: fill-box; transform-origin: center; animation: a-fade .4s var(--ease-out) both; }
.hit-pulse { fill: none; stroke: var(--accent); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: a-beacon 1.8s var(--ease-out) both; }
.home__body {
  position: relative; z-index: 1; width: 100%; max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(40px, 10vh, 128px) var(--gutter) clamp(48px, 10vh, 112px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
}
.home__h1 { font-size: clamp(46px, 7.4vw, 92px); line-height: .98; }
/* Norwegian runs longer; keep the headline inside a 375 px phone. */
html[lang="nb"] .home__h1 { font-size: clamp(38px, 7vw, 88px); }
.home__lede { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 40ch; text-wrap: pretty; }
.home__note { margin: 0; }
.home__foot {
  position: relative; z-index: 1; padding-top: 22px; padding-bottom: 28px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.home__foot::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--hair-2); }

/* The launch-notification form: one glass capsule, the field and its button. */
.waitlist { display: flex; flex-direction: column; gap: 12px; width: min(100%, 520px); margin-top: 8px; }
.waitlist__field {
  position: relative; display: flex; align-items: center; gap: 8px; height: 62px; padding: 0 6px 0 22px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 31px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-card);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: border-color .25s, box-shadow .25s;
}
.waitlist__field:focus-within { border-color: rgba(255, 116, 56, .55); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 4px var(--accent-dim), var(--shadow-card); }
.waitlist.is-error .waitlist__field { border-color: rgba(255, 68, 85, .6); }
.waitlist__label { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; }
.waitlist__input {
  flex: 1 1 auto; min-width: 0; height: 100%; font-family: var(--sans); font-size: 17px; color: var(--text);
  background: transparent; border: 0; padding: 0; outline: none; -webkit-appearance: none; appearance: none;
}
.waitlist__input::placeholder { color: var(--text-3); }
.waitlist__input:focus-visible { outline: none; }
.waitlist__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.waitlist__submit { --bh: 50px; flex: none; }
.waitlist__status { margin: 0 0 0 22px; min-height: 1.35em; display: flex; align-items: center; gap: 9px; }
.waitlist__status.is-error { color: var(--red); }
.waitlist__status.is-ok { color: var(--text); font-size: 16px; font-weight: 600; margin-left: 0; animation: a-fade-up .5s var(--ease-out) both; }
.waitlist__status.is-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.waitlist.is-done .waitlist__field { display: none; }

/* ── Document pages (privacy, terms, guidelines) ────────────────────────── */
.doc-bar {
  position: sticky; top: 0; z-index: 10; height: 68px;
  background: rgba(var(--bg-rgb), .72); border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
}
.doc-bar__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.doc-bar__back { --bh: 38px; font-size: 14.5px; }
.doc { max-width: 720px; margin: 0 auto; padding: 64px var(--gutter) 104px; }
.doc h1 { margin: 0 0 10px; font-family: var(--mono); font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: var(--display-track); line-height: 1.08; text-wrap: balance; }
.doc .meta { margin: 0 0 44px; font-size: 14.5px; color: var(--text-3); }
.doc h2 { margin: 52px 0 14px; font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: var(--display-track); line-height: 1.18; color: var(--text); }
.doc h3 { margin: 32px 0 10px; font-family: var(--mono); font-size: 18px; font-weight: 800; letter-spacing: var(--display-track); color: var(--text); }
.doc p, .doc li { margin: 12px 0; font-size: 16.5px; line-height: 1.68; color: var(--text-2); text-wrap: pretty; }
.doc strong { color: var(--text); font-weight: 600; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li::marker { color: var(--text-4); }
.doc a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-soft); text-underline-offset: 3px; }
.doc a:hover { color: var(--text); text-decoration-color: var(--text-3); }
.doc code { font-family: var(--mono); font-size: .88em; color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hair-2); color: var(--text-2); vertical-align: top; }
.doc th { color: var(--text); font-weight: 600; }
.doc-foot { border-top: 1px solid var(--hair-2); padding: 26px var(--gutter) 40px; }
.doc-foot__in { max-width: 720px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Contact (/contact/, /no/kontakt/) ──────────────────────────────────── */
.contact {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px);
  align-items: start; padding-top: clamp(56px, 9vh, 104px); padding-bottom: clamp(64px, 10vh, 120px);
}
.contact__intro { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 108px; }
.contact__h { font-size: clamp(40px, 5.4vw, 68px); }
.contact__lede { margin: 0; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.55; color: var(--text-2); max-width: 26em; }
.contact__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact__addr { font-family: var(--mono); font-size: clamp(19px, 1.8vw, 23px); font-weight: 800; letter-spacing: var(--display-track); color: var(--text); border-bottom: 1.5px solid var(--accent-soft); padding-bottom: 2px; }
.contact__addr:hover { color: var(--text); border-color: var(--accent); }
.contact__note { margin: 6px 0 0; max-width: 30em; font-size: 15px; line-height: 1.55; }
.contact-form { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.field__opt { font-size: 13px; font-weight: 500; color: var(--text-3); }
.field__input {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px;
  font-family: var(--sans); font-size: 16.5px; line-height: 1.4; color: var(--text);
  background: rgba(0, 0, 0, .25); border: 1px solid var(--hair-2); outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field__input::placeholder { color: var(--text-4); }
.field__input:hover { border-color: var(--hair-strong); }
.field__input:focus { border-color: rgba(255, 116, 56, .6); box-shadow: 0 0 0 4px var(--accent-dim); background: rgba(0, 0, 0, .35); }
.field.is-error .field__input { border-color: rgba(255, 68, 85, .7); }
.field__area { min-height: 156px; resize: vertical; }
.field__select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ABA79F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 16px;
}
.field__select option { background: var(--surface-2); color: var(--text); }
.contact-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 4px; }
.contact-form__send { min-width: 140px; }
.contact-form__status { margin: 0; flex: 1 1 200px; }
.contact-form__status.is-error { color: var(--red); }
.contact-form__status.is-ok { color: var(--text); font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; animation: a-fade-up .5s var(--ease-out) both; }
.contact-form__status.is-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.contact-form.is-done .field, .contact-form.is-done .contact-form__send { opacity: .45; pointer-events: none; }
.contact-form__fine { margin: 0; font-size: 13.5px; }
@media (max-width: 860px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact__intro { position: static; }
}

/* ── 404 and the invite landing ─────────────────────────────────────────── */
.notfound {
  position: relative; min-height: 100vh; min-height: 100svh; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 22px; padding: 48px var(--gutter);
}
.notfound::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 520px at 50% 30%, #18181A 0%, transparent 70%);
}
.notfound__face { width: 168px; height: 168px; margin-bottom: 10px; overflow: visible; animation: a-fade-up .9s var(--ease-out) both; }
.notfound__h { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.06; animation: a-fade-up .9s var(--ease-out) .1s both; }
.notfound__p { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.6; animation: a-fade-up .9s var(--ease-out) .2s both; }
.notfound .btn { animation: a-fade-up .9s var(--ease-out) .3s both; }
.notfound .lockup { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); }
.notfound__miss { transform-box: fill-box; transform-origin: center; animation: a-land .5s var(--ease-land) .9s both; }
.notfound__pulse { animation: a-beacon 2.2s var(--ease-out) 1.3s infinite both; }

/* The invite and share landing (/u/<username>, /c/<slug>). `display` on the
   buttons would beat the [hidden] attribute, so it is restated here. */
.invite { justify-content: flex-start; padding-top: clamp(112px, 18vh, 168px); }
.invite [hidden] { display: none; }
.invite__kind { animation: a-fade-up .9s var(--ease-out) both; }
.invite__name { overflow-wrap: anywhere; }
.invite__line { max-width: 34ch; }
.invite__get {
  display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin-top: 22px; padding: 26px;
  width: min(100%, 480px); text-align: left; animation: a-fade-up .9s var(--ease-out) .35s both;
}
.invite__get-h { margin: 0; font-family: var(--mono); font-size: 20px; font-weight: 800; letter-spacing: var(--display-track); color: var(--text); }
.invite__note { margin: -6px 0 4px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.invite__rows { display: flex; flex-direction: column; gap: 0; }
.invite__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--hair-2); }
.invite__row > .label { flex: 1 0 100%; color: var(--text); font-weight: 600; font-size: 15px; }

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (max-width: 700px) {
  /* on a phone the footer sits over the paper: a full-width fade under its words */
  .home__foot::after {
    content: ""; position: absolute; z-index: -1; left: 50%; width: 100vw; margin-left: -50vw; top: -48px; bottom: 0;
    background: linear-gradient(rgba(var(--bg-rgb), 0), rgba(var(--bg-rgb), .88) 55%); pointer-events: none;
  }
}
@media (max-width: 560px) {
  .waitlist__field { height: 58px; padding-left: 18px; }
  .waitlist__submit { --bh: 46px; padding: 0 18px; }
}
