/* Link Meteor site. Night ink, cool paper and fireball lime; Atkinson Hyperlegible throughout. */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fonts/atkinson-hyperlegible-next-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("../fonts/atkinson-hyperlegible-mono.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --night: oklch(0.2 0.035 266);
  --night-2: oklch(0.245 0.04 266);
  --night-3: oklch(0.29 0.04 266);
  --night-line: oklch(0.36 0.035 266);
  --night-ink: oklch(0.96 0.008 265);
  --night-muted: oklch(0.78 0.02 265);

  --paper: oklch(0.985 0.004 265);
  --paper-2: oklch(0.962 0.007 265);
  --card: oklch(1 0 0);
  --ink: oklch(0.23 0.03 265);
  --ink-2: oklch(0.36 0.03 265);
  --muted: oklch(0.48 0.024 265);
  --line: oklch(0.9 0.01 265);
  --line-strong: oklch(0.82 0.014 265);

  --lime: oklch(0.9 0.2 124);
  --lime-hover: oklch(0.93 0.19 124);
  --lime-deep: oklch(0.5 0.14 138);
  --lime-wash: oklch(0.955 0.06 122);
  --lime-mark: oklch(0.9 0.2 124 / 0.55);
  --lime-edge: oklch(0.62 0.16 130);
  --logo-head: #c3f344;
  --warn: oklch(0.52 0.11 62);
  --danger: oklch(0.54 0.19 27);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px oklch(0.2 0.03 265 / 0.06), 0 18px 40px -16px oklch(0.2 0.03 265 / 0.28);
  --shadow-night: 0 24px 60px -20px oklch(0.05 0.02 265 / 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.45rem, 1.2rem + 0.9vw, 1.8rem);
  --step-3: clamp(1.9rem, 1.35rem + 2vw, 3rem);
  --step-4: clamp(2.5rem, 1.5rem + 4vw, 5.1rem);
  --z-header: 10;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(0.155 0.016 265);
    --paper-2: oklch(0.19 0.02 265);
    --card: oklch(0.215 0.022 265);
    --ink: oklch(0.955 0.007 265);
    --ink-2: oklch(0.86 0.012 265);
    --muted: oklch(0.74 0.02 265);
    --line: oklch(0.31 0.022 265);
    --line-strong: oklch(0.42 0.025 265);
    --lime-deep: oklch(0.88 0.18 124);
    --lime-wash: oklch(0.27 0.05 128);
    --lime-mark: oklch(0.9 0.2 124 / 0.32);
    --warn: oklch(0.84 0.12 80);
    --danger: oklch(0.78 0.12 25);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 18px 40px -16px oklch(0 0 0 / 0.7);
  }
}

/* Themes (0.4.0): generated from src/core/themes.js, and checked by tests/themes.test.mjs. Meteor is :root above. */
:root[data-theme="comet"] { --night: oklch(0.2 0.035 235); --night-2: oklch(0.245 0.04 235); --night-3: oklch(0.29 0.04 235); --night-line: oklch(0.36 0.035 235); --night-ink: oklch(0.96 0.008 235); --night-muted: oklch(0.78 0.02 235); --paper: oklch(0.985 0.004 235); --paper-2: oklch(0.962 0.007 235); --ink: oklch(0.23 0.03 235); --ink-2: oklch(0.36 0.03 235); --muted: oklch(0.48 0.024 235); --line: oklch(0.9 0.01 235); --line-strong: oklch(0.82 0.014 235); --card: oklch(1 0 0); --lime: oklch(0.86 0.12 205); --lime-hover: oklch(0.89 0.114 205); --lime-deep: oklch(0.5 0.1 215); --lime-mark: oklch(0.86 0.12 205 / 0.55); --lime-edge: oklch(0.6 0.11 212); --logo-head: oklch(0.86 0.12 205); --warn: oklch(0.52 0.11 62); --danger: oklch(0.54 0.19 27); --lime-wash: oklch(0.955 0.036 203); }
:root[data-theme="aurora"] { --night: oklch(0.2 0.0315 195); --night-2: oklch(0.245 0.036 195); --night-3: oklch(0.29 0.036 195); --night-line: oklch(0.36 0.0315 195); --night-ink: oklch(0.96 0.0072 195); --night-muted: oklch(0.78 0.018 195); --paper: oklch(0.985 0.0036 195); --paper-2: oklch(0.962 0.0063 195); --ink: oklch(0.23 0.027 195); --ink-2: oklch(0.36 0.027 195); --muted: oklch(0.48 0.0216 195); --line: oklch(0.9 0.009 195); --line-strong: oklch(0.82 0.0126 195); --card: oklch(1 0 0); --lime: oklch(0.85 0.14 168); --lime-hover: oklch(0.88 0.133 168); --lime-deep: oklch(0.5 0.1 172); --lime-mark: oklch(0.85 0.14 168 / 0.55); --lime-edge: oklch(0.6 0.12 172); --logo-head: oklch(0.85 0.14 168); --warn: oklch(0.52 0.11 62); --danger: oklch(0.54 0.19 27); --lime-wash: oklch(0.955 0.042 166); }
:root[data-theme="ember"] { --night: oklch(0.2 0.028 45); --night-2: oklch(0.245 0.032 45); --night-3: oklch(0.29 0.032 45); --night-line: oklch(0.36 0.028 45); --night-ink: oklch(0.96 0.0064 45); --night-muted: oklch(0.78 0.016 45); --paper: oklch(0.985 0.0032 45); --paper-2: oklch(0.962 0.0056 45); --ink: oklch(0.23 0.024 45); --ink-2: oklch(0.36 0.024 45); --muted: oklch(0.48 0.0192 45); --line: oklch(0.9 0.008 45); --line-strong: oklch(0.82 0.0112 45); --card: oklch(1 0 0); --lime: oklch(0.78 0.15 42); --lime-hover: oklch(0.81 0.142 42); --lime-deep: oklch(0.52 0.15 38); --lime-mark: oklch(0.78 0.15 42 / 0.55); --lime-edge: oklch(0.56 0.15 38); --logo-head: oklch(0.78 0.15 42); --warn: oklch(0.52 0.11 62); --danger: oklch(0.42 0.17 355); --lime-wash: oklch(0.955 0.045 40); }
:root[data-theme="nebula"] { --night: oklch(0.2 0.035 300); --night-2: oklch(0.245 0.04 300); --night-3: oklch(0.29 0.04 300); --night-line: oklch(0.36 0.035 300); --night-ink: oklch(0.96 0.008 300); --night-muted: oklch(0.78 0.02 300); --paper: oklch(0.985 0.004 300); --paper-2: oklch(0.962 0.007 300); --ink: oklch(0.23 0.03 300); --ink-2: oklch(0.36 0.03 300); --muted: oklch(0.48 0.024 300); --line: oklch(0.9 0.01 300); --line-strong: oklch(0.82 0.014 300); --card: oklch(1 0 0); --lime: oklch(0.8 0.14 315); --lime-hover: oklch(0.83 0.133 315); --lime-deep: oklch(0.52 0.18 310); --lime-mark: oklch(0.8 0.14 315 / 0.55); --lime-edge: oklch(0.58 0.16 310); --logo-head: oklch(0.8 0.14 315); --warn: oklch(0.52 0.11 62); --danger: oklch(0.54 0.19 27); --lime-wash: oklch(0.955 0.042 313); }
:root[data-theme="graphite"] { --night: oklch(0.2 0 0); --night-2: oklch(0.245 0 0); --night-3: oklch(0.29 0 0); --night-line: oklch(0.36 0 0); --night-ink: oklch(0.96 0 0); --night-muted: oklch(0.78 0 0); --paper: oklch(0.985 0 0); --paper-2: oklch(0.962 0 0); --ink: oklch(0.23 0 0); --ink-2: oklch(0.36 0 0); --muted: oklch(0.48 0 0); --line: oklch(0.9 0 0); --line-strong: oklch(0.82 0 0); --card: oklch(1 0 0); --lime: oklch(0.9 0 0); --lime-hover: oklch(0.95 0 0); --lime-deep: oklch(0.3 0 0); --lime-mark: oklch(0.9 0 0 / 0.55); --lime-edge: oklch(0.36 0 0); --logo-head: oklch(0.74 0 0); --warn: oklch(0.52 0.11 62); --danger: oklch(0.54 0.19 27); --lime-wash: oklch(0.955 0 0); }
:root[data-theme="contrast"] { --night: oklch(0 0 0); --night-2: oklch(0.13 0 0); --night-3: oklch(0.22 0 0); --night-line: oklch(0.62 0 0); --night-ink: oklch(1 0 0); --night-muted: oklch(0.86 0 0); --paper: oklch(1 0 0); --paper-2: oklch(0.96 0 0); --card: oklch(1 0 0); --ink: oklch(0 0 0); --ink-2: oklch(0.15 0 0); --muted: oklch(0.3 0 0); --line: oklch(0.45 0 0); --line-strong: oklch(0.15 0 0); --lime: oklch(0.92 0.19 105); --lime-hover: oklch(0.95 0.17 105); --lime-deep: oklch(0.42 0.26 264); --lime-mark: oklch(0.92 0.19 105 / 0.55); --lime-edge: oklch(0 0 0); --logo-head: oklch(0.92 0.19 105); --warn: oklch(0.42 0.12 60); --danger: oklch(0.45 0.2 27); --lime-wash: oklch(0.94 0.03 264); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="comet"] { --night: oklch(0.2 0.035 235); --night-2: oklch(0.245 0.04 235); --night-3: oklch(0.29 0.04 235); --night-line: oklch(0.36 0.035 235); --night-ink: oklch(0.96 0.008 235); --night-muted: oklch(0.78 0.02 235); --paper: oklch(0.155 0.016 235); --paper-2: oklch(0.19 0.02 235); --card: oklch(0.215 0.022 235); --ink: oklch(0.955 0.007 235); --ink-2: oklch(0.86 0.012 235); --muted: oklch(0.74 0.02 235); --line: oklch(0.31 0.022 235); --line-strong: oklch(0.42 0.025 235); --lime: oklch(0.86 0.12 205); --lime-hover: oklch(0.89 0.114 205); --lime-deep: oklch(0.86 0.11 205); --lime-mark: oklch(0.86 0.12 205 / 0.32); --lime-edge: oklch(0.6 0.11 212); --logo-head: oklch(0.86 0.12 205); --warn: oklch(0.84 0.12 80); --danger: oklch(0.78 0.12 25); --lime-wash: oklch(0.27 0.03 209); }
  :root[data-theme="aurora"] { --night: oklch(0.2 0.0315 195); --night-2: oklch(0.245 0.036 195); --night-3: oklch(0.29 0.036 195); --night-line: oklch(0.36 0.0315 195); --night-ink: oklch(0.96 0.0072 195); --night-muted: oklch(0.78 0.018 195); --paper: oklch(0.155 0.0144 195); --paper-2: oklch(0.19 0.018 195); --card: oklch(0.215 0.0198 195); --ink: oklch(0.955 0.0063 195); --ink-2: oklch(0.86 0.0108 195); --muted: oklch(0.74 0.018 195); --line: oklch(0.31 0.0198 195); --line-strong: oklch(0.42 0.0225 195); --lime: oklch(0.85 0.14 168); --lime-hover: oklch(0.88 0.133 168); --lime-deep: oklch(0.86 0.12 168); --lime-mark: oklch(0.85 0.14 168 / 0.32); --lime-edge: oklch(0.6 0.12 172); --logo-head: oklch(0.85 0.14 168); --warn: oklch(0.84 0.12 80); --danger: oklch(0.74 0.12 25); --lime-wash: oklch(0.27 0.035 172); }
  :root[data-theme="ember"] { --night: oklch(0.2 0.028 45); --night-2: oklch(0.245 0.032 45); --night-3: oklch(0.29 0.032 45); --night-line: oklch(0.36 0.028 45); --night-ink: oklch(0.96 0.0064 45); --night-muted: oklch(0.78 0.016 45); --paper: oklch(0.155 0.0128 45); --paper-2: oklch(0.19 0.016 45); --card: oklch(0.215 0.0176 45); --ink: oklch(0.955 0.0056 45); --ink-2: oklch(0.86 0.0096 45); --muted: oklch(0.74 0.016 45); --line: oklch(0.31 0.0176 45); --line-strong: oklch(0.42 0.02 45); --lime: oklch(0.78 0.15 42); --lime-hover: oklch(0.81 0.142 42); --lime-deep: oklch(0.83 0.12 42); --lime-mark: oklch(0.78 0.15 42 / 0.32); --lime-edge: oklch(0.56 0.15 38); --logo-head: oklch(0.78 0.15 42); --warn: oklch(0.84 0.12 80); --danger: oklch(0.7 0.19 12); --lime-wash: oklch(0.27 0.0375 46); }
  :root[data-theme="nebula"] { --night: oklch(0.2 0.035 300); --night-2: oklch(0.245 0.04 300); --night-3: oklch(0.29 0.04 300); --night-line: oklch(0.36 0.035 300); --night-ink: oklch(0.96 0.008 300); --night-muted: oklch(0.78 0.02 300); --paper: oklch(0.155 0.016 300); --paper-2: oklch(0.19 0.02 300); --card: oklch(0.215 0.022 300); --ink: oklch(0.955 0.007 300); --ink-2: oklch(0.86 0.012 300); --muted: oklch(0.74 0.02 300); --line: oklch(0.31 0.022 300); --line-strong: oklch(0.42 0.025 300); --lime: oklch(0.8 0.14 315); --lime-hover: oklch(0.83 0.133 315); --lime-deep: oklch(0.84 0.12 315); --lime-mark: oklch(0.8 0.14 315 / 0.32); --lime-edge: oklch(0.58 0.16 310); --logo-head: oklch(0.8 0.14 315); --warn: oklch(0.84 0.12 80); --danger: oklch(0.78 0.12 25); --lime-wash: oklch(0.27 0.035 319); }
  :root[data-theme="graphite"] { --night: oklch(0.2 0 0); --night-2: oklch(0.245 0 0); --night-3: oklch(0.29 0 0); --night-line: oklch(0.36 0 0); --night-ink: oklch(0.96 0 0); --night-muted: oklch(0.78 0 0); --paper: oklch(0.155 0 0); --paper-2: oklch(0.19 0 0); --card: oklch(0.215 0 0); --ink: oklch(0.955 0 0); --ink-2: oklch(0.86 0 0); --muted: oklch(0.74 0 0); --line: oklch(0.31 0 0); --line-strong: oklch(0.42 0 0); --lime: oklch(0.9 0 0); --lime-hover: oklch(0.95 0 0); --lime-deep: oklch(0.92 0 0); --lime-mark: oklch(0.9 0 0 / 0.32); --lime-edge: oklch(0.36 0 0); --logo-head: oklch(0.74 0 0); --warn: oklch(0.84 0.12 80); --danger: oklch(0.78 0.12 25); --lime-wash: oklch(0.27 0 0); }
  :root[data-theme="contrast"] { --night: oklch(0 0 0); --night-2: oklch(0.13 0 0); --night-3: oklch(0.22 0 0); --night-line: oklch(0.62 0 0); --night-ink: oklch(1 0 0); --night-muted: oklch(0.86 0 0); --paper: oklch(0 0 0); --paper-2: oklch(0.07 0 0); --card: oklch(0.13 0 0); --ink: oklch(1 0 0); --ink-2: oklch(0.94 0 0); --muted: oklch(0.86 0 0); --line: oklch(0.62 0 0); --line-strong: oklch(0.88 0 0); --lime: oklch(0.92 0.19 105); --lime-hover: oklch(0.95 0.17 105); --lime-deep: oklch(0.92 0.19 105); --lime-mark: oklch(0.92 0.19 105 / 0.32); --lime-edge: oklch(0 0 0); --logo-head: oklch(0.92 0.19 105); --warn: oklch(0.9 0.15 90); --danger: oklch(0.78 0.14 25); --lime-wash: oklch(0.25 0.05 105); }
}
/* End of themes */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre, blockquote { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, samp, pre { font-family: var(--mono); font-size: 0.92em; }
kbd { display: inline-grid; place-items: center; min-width: 1.6em; padding: 0.05em 0.4em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--card); color: var(--ink); font: 600 0.82em/1.45 var(--font); vertical-align: 0.08em; }
:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 3px; border-radius: 4px; }
.night :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--lime); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--lime); color: var(--night); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: 68ch; }

/* Night surfaces ------------------------------------------------------------- */
.night { background: var(--night); color: var(--night-ink); }
.night a { color: var(--night-ink); }
.night .muted, .night small { color: var(--night-muted); }
.muted { color: var(--muted); }

/* Header -------------------------------------------------------------------- */
.site-header { position: relative; z-index: var(--z-header); background: var(--night); color: var(--night-ink); border-bottom: 1px solid oklch(1 0 0 / 0.07); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.12rem; letter-spacing: -0.01em; text-decoration: none; color: var(--night-ink); }
.logo svg { width: 32px; height: 32px; }
.logo svg circle { fill: var(--logo-head); }
.logo svg stop { stop-color: var(--logo-head); }
.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--night-muted); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: color 0.15s var(--ease), background-color 0.15s var(--ease); }
.nav a:hover { color: var(--night-ink); background: oklch(1 0 0 / 0.07); }
.nav a[aria-current="page"] { color: var(--night-ink); background: oklch(1 0 0 / 0.1); }
.nav .gh { display: inline-flex; align-items: center; gap: 6px; }
.nav .gh svg { width: 14px; height: 14px; }
.menu-toggle { display: none; margin-left: auto; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--night-line); border-radius: 10px; background: transparent; color: var(--night-ink); font: 600 0.95rem var(--font); cursor: pointer; }
.menu-toggle svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; display: none; padding: 8px var(--gutter) 18px; background: var(--night); border-bottom: 1px solid var(--night-line); box-shadow: var(--shadow-night); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: 12px; font-size: 1.02rem; }
}

/* Theme menu (0.4.0): the site's look, kept in this browser. */
.theme-menu { position: relative; flex: none; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--night-line); border-radius: 10px; background: transparent; color: var(--night-ink); font: 600 0.95rem var(--font); cursor: pointer; }
.theme-toggle:hover, .theme-toggle[aria-expanded="true"] { background: oklch(1 0 0 / 0.07); }
.theme-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--lime)); box-shadow: 0 0 0 1px oklch(1 0 0 / 0.3); }
.theme-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: calc(var(--z-header) + 1); display: grid; gap: 2px; min-width: 210px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--night-line); border-radius: 12px; background: var(--night-2); box-shadow: var(--shadow-night); }
.theme-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--night-ink); font: 600 0.95rem var(--font); text-align: left; cursor: pointer; }
.theme-list button:hover { background: oklch(1 0 0 / 0.08); }
.theme-list button svg { width: 16px; height: 16px; margin-left: auto; color: var(--lime); visibility: hidden; }
.theme-list button[aria-checked="true"] svg { visibility: visible; }
/* Below 1024 px the toggle shows only its dot; between 861 and 1023 px the nav tightens to make room for it. */
@media (max-width: 1023px) {
  .theme-toggle { padding: 0 11px; }
  .theme-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 861px) and (max-width: 1023px) { .site-header .wrap { gap: 14px; } .nav a { padding-inline: 8px; } }
@media (max-width: 360px) { .site-header .wrap { gap: 8px; } .theme-toggle { padding: 0 9px; } }
@media (forced-colors: active) { .theme-dot { forced-color-adjust: none; } }

/* Buttons ------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border: 1.5px solid transparent; border-radius: 12px; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.16s var(--ease), color 0.16s var(--ease); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn.btn-lime { background: var(--lime); color: var(--night); }
.btn.btn-lime:hover { background: var(--lime-hover); }
.btn.btn-lime:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { border-color: var(--night-line); color: var(--night-ink); background: oklch(1 0 0 / 0.02); }
.btn-ghost:hover { border-color: var(--night-muted); background: oklch(1 0 0 / 0.07); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); }
.btn-line { border-color: var(--line-strong); color: var(--ink); background: var(--card); }
.btn-line:hover { border-color: var(--muted); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.92rem; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero ---------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; background: radial-gradient(closest-side, color-mix(in oklch, var(--lime) 12%, transparent), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "title title" "copy demo"; column-gap: clamp(32px, 5vw, 72px); row-gap: clamp(28px, 4vw, 48px); align-items: start; }
.hero-title { grid-area: title; }
.hero-copy { grid-area: copy; padding-top: 8px; }
.hero .demo { grid-area: demo; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 6px 12px 6px 10px; border: 1px solid var(--night-line); border-radius: 999px; color: var(--night-muted); font-size: 0.88rem; font-weight: 600; }
.status-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px color-mix(in oklch, var(--lime) 18%, transparent); }
.hero h1 { max-width: 14ch; font-size: clamp(2.6rem, 1.4rem + 5.2vw, 6rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.035em; }
@media (min-width: 1100px) { .hero h1 { max-width: none; } }
.hero h1 .lime { display: block; color: var(--lime); }
.lede { margin-top: 0; max-width: 34em; color: var(--night-muted); font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); line-height: 1.55; }
.hero .btn-row { margin-top: 32px; }
.promise { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--night-muted); font-size: 0.95rem; }
.promise li { display: inline-flex; align-items: center; gap: 8px; }
.promise svg { width: 16px; height: 16px; color: var(--lime); }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "copy" "demo"; } }

/* Interactive capture demo -------------------------------------------------- */
.demo { position: relative; }
.demo-stage { position: relative; }
.demo-page { position: relative; padding: 22px 24px 44px; border-radius: 16px; background: oklch(0.985 0.004 265); color: oklch(0.23 0.03 265); box-shadow: var(--shadow-night); user-select: none; -webkit-user-select: none; cursor: crosshair; }
.demo-site { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: oklch(0.48 0.024 265); font: 500 0.8rem/1.3 var(--mono); }
.demo-site span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: oklch(0.82 0.014 265); }
.demo-page h2 { font-size: 1.16rem; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 10px; }
.demo-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.demo-list li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid oklch(0.92 0.008 265); font-size: 0.95rem; line-height: 1.4; }
.demo-list li:last-child { border-bottom: 0; }
.demo-list .n { flex: none; width: 1.4em; color: oklch(0.55 0.02 265); font: 500 0.78rem var(--mono); }
.demo-list a { color: oklch(0.36 0.1 250); text-decoration-color: oklch(0.36 0.1 250 / 0.4); }
.demo-list .meta { color: oklch(0.5 0.024 265); font-size: 0.82rem; }
.demo-list .thumb { display: inline-block; vertical-align: middle; width: 54px; height: 30px; border-radius: 5px; background: linear-gradient(135deg, oklch(0.75 0.12 150), oklch(0.62 0.12 200)); }
.demo-layer { position: absolute; inset: 0; pointer-events: none; }
.demo-rect { position: absolute; border: 1.5px solid var(--lime); background: color-mix(in oklch, var(--lime) 10%, transparent); box-shadow: 0 0 0 1px oklch(0.2 0.035 266 / 0.55); border-radius: 3px; }
.demo-hit { position: absolute; background: color-mix(in oklch, var(--lime) 42%, transparent); outline: 1px solid var(--lime-edge); border-radius: 3px; }
.demo-badge { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--night); color: #fff; font: 700 0.78rem/1.2 var(--font); white-space: nowrap; box-shadow: 0 6px 16px oklch(0 0 0 / 0.3); }
.demo-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.demo-result { position: relative; margin: -28px 0 0 auto; width: min(92%, 440px); padding: 16px; border-radius: 14px; background: var(--night-2); border: 1px solid oklch(1 0 0 / 0.1); box-shadow: var(--shadow-night); color: var(--night-ink); }
.demo-result-head { display: flex; align-items: center; gap: 10px; }
.demo-result-head svg { width: 24px; height: 24px; flex: none; }
.demo-count { font-weight: 750; font-size: 1.02rem; }
.demo-dest { color: var(--night-muted); font-size: 0.84rem; }
.demo-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 0.82rem; table-layout: fixed; }
.demo-table th { padding: 6px 8px; border-bottom: 1px solid var(--night-line); color: var(--night-muted); font-weight: 650; text-align: left; font-size: 0.74rem; }
.demo-table th:first-child { width: 44%; }
.demo-table td { padding: 6px 8px; border-bottom: 1px solid oklch(1 0 0 / 0.06); vertical-align: top; overflow-wrap: anywhere; line-height: 1.35; }
.demo-table td:last-child { font-family: var(--mono); font-size: 0.74rem; color: var(--night-muted); }
.demo-table .empty { color: var(--night-muted); font-style: italic; }
.demo-table tr.more td { color: var(--night-muted); border-bottom: 0; }
.demo-empty { margin-top: 10px; color: var(--night-muted); font-size: 0.9rem; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.demo-actions .btn { min-height: 36px; padding: 0 12px; font-size: 0.86rem; border-radius: 9px; }
.demo-actions .btn-ghost { border-width: 1px; }
.demo-caption { margin-top: 16px; color: var(--night-muted); font-size: 0.9rem; }
.demo-caption strong { color: var(--night-ink); }
.demo-status { min-height: 1.4em; margin-top: 8px; color: var(--lime); font-size: 0.86rem; font-weight: 600; }
@media (max-width: 560px) {
  .demo-page { padding: 18px 16px 14px; }
  .demo-result { margin-top: 12px; width: 100%; }
  .demo-list .meta { display: none; }
}

/* Sections ------------------------------------------------------------------ */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--paper-2); }
.section.night + .section, .section + .section.night { border-top: 0; }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: var(--step-3); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; }
.section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }
.night .section-head p { color: var(--night-muted); }
mark, .mark { background: linear-gradient(transparent 58%, var(--lime-mark) 58%, var(--lime-mark) 92%, transparent 92%); color: inherit; padding: 0 0.08em; }

/* Specimen ------------------------------------------------------------------ */
.specimen { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr); gap: clamp(16px, 3vw, 36px); align-items: center; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.specimen-source { display: grid; gap: 14px; }
.specimen-label { color: var(--muted); font-size: 0.85rem; font-weight: 650; }
.specimen pre { padding: 16px 18px; border-radius: 12px; background: var(--night); color: var(--night-ink); font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.specimen pre .t { color: oklch(0.8 0.1 250); }
.specimen pre .a { color: oklch(0.85 0.1 80); }
.specimen pre .v { color: var(--lime); }
.specimen-rendered { padding: 14px 18px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.specimen-rendered a { color: oklch(0.45 0.13 250); font-weight: 600; }
@media (prefers-color-scheme: dark) { .specimen-rendered a { color: oklch(0.8 0.1 250); } }
.specimen-arrow { width: 44px; height: 44px; color: var(--lime-deep); }
.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fields dt, .fields dd { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.fields dt { color: var(--muted); font-size: 0.86rem; font-weight: 650; background: var(--paper-2); }
.fields dd { font-size: 0.96rem; overflow-wrap: anywhere; }
.fields dd.exact { font: 500 0.84rem/1.55 var(--mono); color: var(--ink-2); }
.fields .key dt { color: var(--ink); background: var(--lime-wash); }
.fields .key dd { font-weight: 700; }
.fields > div { display: contents; }
.fields > div:last-child > * { border-bottom: 0; }
@media (max-width: 860px) {
  .specimen { grid-template-columns: minmax(0, 1fr); }
  .specimen-arrow { transform: rotate(90deg); justify-self: center; }
}
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-top: clamp(40px, 6vw, 72px); padding: 0; list-style: none; }
.rules li { display: grid; gap: 10px; align-content: start; }
.rules h3 { font-size: var(--step-1); font-weight: 750; letter-spacing: -0.01em; }
.rules p { color: var(--ink-2); }
.rule-figure { height: 92px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); font-size: 0.86rem; overflow: hidden; }
.rule-figure .pill { display: inline-flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.rule-figure .pill small { color: var(--muted); font-size: 0.7rem; font-weight: 650; }
.rule-figure .pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rule-figure .pill .nil { color: var(--muted); font-style: italic; }
.rule-figure .x { color: var(--muted); font: 600 0.8rem var(--mono); }
@media (max-width: 860px) { .rules { grid-template-columns: minmax(0, 1fr); } }

/* Scope ladder -------------------------------------------------------------- */
.scopes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.scope-diagram { position: sticky; top: 32px; aspect-ratio: 5 / 4; }
.scope-diagram svg { width: 100%; height: 100%; }
.scope-diagram rect { fill: none; stroke: var(--line-strong); stroke-width: 1.5; transition: stroke 0.2s var(--ease), fill 0.2s var(--ease), stroke-width 0.2s var(--ease); }
.scope-diagram text { fill: var(--muted); font: 650 13px var(--font); transition: fill 0.2s var(--ease); }
.scope-diagram [data-scope].is-active rect { stroke: var(--lime-deep); stroke-width: 2.5; fill: var(--lime-wash); }
.scope-diagram [data-scope].is-active text { fill: var(--ink); }
.scope-diagram [data-scope="region"] rect { stroke-dasharray: 6 5; }
.scope-diagram .glyph { fill: var(--line-strong); stroke: none; transition: fill 0.2s var(--ease); }
.scope-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.scope-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 18px; border: 1px solid transparent; border-radius: 16px; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); cursor: default; }
.scope-item.is-active { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
.scope-item .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); }
.scope-item.is-active .ico { background: var(--lime); border-color: var(--lime); color: var(--night); }
.scope-item .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scope-item h3 { font-size: var(--step-1); font-weight: 750; letter-spacing: -0.01em; }
.scope-item p { margin-top: 4px; color: var(--ink-2); }
.scope-item .perm { display: inline-flex; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 0.88rem; }
.scope-item .perm svg { width: 15px; height: 15px; margin-top: 3px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .scopes { grid-template-columns: minmax(0, 1fr); } .scope-diagram { position: relative; top: 0; max-width: 460px; } }

/* Screens ------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: minmax(0, 1fr); } .split.flip > :first-child { order: 0; } }
.shot { margin: 0; }
.shot img { width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.shot figcaption { margin-top: 12px; color: var(--muted); font-size: 0.88rem; }
.wide-shot { margin-top: clamp(40px, 6vw, 72px); }
.doc-body .shot { margin: 22px 0; }
.statuses { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.statuses li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.statuses svg { width: 22px; height: 22px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.statuses .ok svg { color: var(--lime-deep); }
.statuses .none svg { color: var(--muted); }
.statuses .warn svg { color: var(--warn); }
.statuses .bad svg { color: var(--danger); }
.statuses strong { display: block; }
.statuses span { color: var(--ink-2); }
.checks { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.checks svg { width: 20px; height: 20px; margin-top: 3px; color: var(--lime-deep); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.night .checks svg { color: var(--lime); }

/* Export viewer ------------------------------------------------------------- */
.exporter { border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.exporter-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--paper-2); overflow-x: auto; scrollbar-width: thin; }
.exporter-tabs button { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 650 0.94rem var(--font); cursor: pointer; }
.exporter-tabs button:hover { background: var(--card); color: var(--ink); }
.exporter-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / 0.08), 0 0 0 1px var(--line); }
.exporter-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); }
.exporter-output { min-width: 0; padding: 20px; }
.exporter-output pre { max-height: 360px; overflow: auto; padding: 16px 18px; border-radius: 12px; background: var(--night); color: var(--night-ink); font-size: 0.84rem; line-height: 1.6; white-space: pre; tab-size: 18; }
.sheet { width: 100%; border-collapse: collapse; font-size: 0.9rem; table-layout: fixed; }
.sheet th, .sheet td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.sheet th { background: var(--paper-2); font-weight: 700; font-size: 0.82rem; }
.sheet .colhead th { padding: 4px 10px; color: var(--muted); font: 500 0.76rem var(--mono); text-align: center; }
.sheet .header td { font-weight: 700; background: var(--card); }
.sheet .rownum { width: 36px; background: var(--paper-2); color: var(--muted); font: 500 0.78rem var(--mono); text-align: center; }
.sheet td.url { font: 500 0.8rem/1.5 var(--mono); color: var(--ink-2); }
.sheet td.nil { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--paper-2) 6px 7px); }
.exporter-notes { display: grid; align-content: start; gap: 14px; padding: 20px; border-left: 1px solid var(--line); background: var(--paper); font-size: 0.95rem; }
.exporter-notes h3 { font-size: 1.05rem; font-weight: 750; }
.exporter-notes p { color: var(--ink-2); }
.exporter-notes .btn { justify-self: start; }
@media (max-width: 820px) { .exporter-body { grid-template-columns: minmax(0, 1fr); } .exporter-notes { border-left: 0; border-top: 1px solid var(--line); } }
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.formats li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 0.9rem; font-weight: 600; }

/* Privacy (night) ----------------------------------------------------------- */
.never { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; border-radius: 18px; overflow: hidden; background: var(--night-line); border: 1px solid var(--night-line); }
.never li { display: grid; gap: 6px; padding: 24px; background: var(--night-2); }
.never strong { font-size: 1.2rem; font-weight: 750; letter-spacing: -0.01em; }
.never span { color: var(--night-muted); font-size: 0.96rem; }
@media (max-width: 900px) { .never { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .never { grid-template-columns: minmax(0, 1fr); } }
.perm-table { width: 100%; margin-top: 40px; border-collapse: collapse; font-size: 0.96rem; }
.perm-table caption { margin-bottom: 14px; text-align: left; font-size: var(--step-1); font-weight: 750; }
.perm-table th, .perm-table td { padding: 12px 14px; border-bottom: 1px solid var(--night-line); text-align: left; vertical-align: top; }
.perm-table th { color: var(--night-muted); font-size: 0.84rem; font-weight: 650; }
.perm-table td:first-child { font: 600 0.88rem/1.5 var(--mono); color: var(--lime); white-space: nowrap; }
.perm-table td:nth-child(2) { color: var(--night-ink); }
.perm-table td:nth-child(3) { color: var(--night-muted); }
.table-scroll { overflow-x: auto; }
.paper .perm-table th, .paper .perm-table td { border-color: var(--line); }
.paper .perm-table th { color: var(--muted); }
.paper .perm-table td:first-child { color: var(--lime-deep); }
.paper .perm-table td:nth-child(2) { color: var(--ink); }
.paper .perm-table td:nth-child(3) { color: var(--ink-2); }

/* Limits and install ---------------------------------------------------------- */
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; margin: 0; padding: 0; list-style: none; }
.limits li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.limits svg { width: 20px; height: 20px; margin-top: 3px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.limits strong { display: block; }
.limits span { color: var(--ink-2); }
@media (max-width: 760px) { .limits { grid-template-columns: minmax(0, 1fr); } }
.install-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: clamp(28px, 4vw, 48px); border-radius: 24px; background: var(--night); color: var(--night-ink); box-shadow: var(--shadow); }
.install-band h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
.install-band p { margin-top: 12px; color: var(--night-muted); max-width: 52ch; }
@media (max-width: 760px) { .install-band { grid-template-columns: minmax(0, 1fr); } }

/* Inner pages ----------------------------------------------------------------- */
.page-hero { padding: clamp(44px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2.3rem, 1.6rem + 3vw, 4rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.page-hero p { margin-top: 16px; max-width: 40em; color: var(--night-muted); font-size: var(--step-1); }
.page-hero p.status-chip { margin-top: 0; font-size: 0.88rem; }
.page-hero p a { color: var(--night-ink); }
.page-hero .status-chip { margin-bottom: 18px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 110px); }
.toc { position: sticky; top: 24px; align-self: start; font-size: 0.94rem; }
.toc h2 { margin-bottom: 10px; color: var(--muted); font-size: 0.86rem; font-weight: 650; }
.toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.toc a:hover { background: var(--paper-2); color: var(--ink); }
@media (max-width: 900px) { .doc { grid-template-columns: minmax(0, 1fr); } .toc { position: static; padding: 16px; border: 1px solid var(--line); border-radius: 14px; } }
.doc-body { min-width: 0; max-width: 74ch; }
.doc-body > section { padding-bottom: 48px; }
.doc-body > section + section { padding-top: 48px; border-top: 1px solid var(--line); }
.doc-body h2 { margin-bottom: 16px; font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; scroll-margin-top: 24px; }
.doc-body h3 { margin: 28px 0 8px; font-size: var(--step-1); font-weight: 750; letter-spacing: -0.01em; scroll-margin-top: 24px; }
.doc-body p + p, .doc-body p + ul, .doc-body ul + p, .doc-body p + ol, .doc-body ol + p, .doc-body .note + p, .doc-body p + .note, .doc-body p + .table-scroll, .doc-body .table-scroll + p { margin-top: 14px; }
.doc-body ul, .doc-body ol { display: grid; gap: 8px; padding-left: 1.3em; }
.doc-body li::marker { color: var(--muted); }
.doc-body code { padding: 0.1em 0.35em; border-radius: 5px; background: var(--paper-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; gap: 18px !important; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--night); font-weight: 800; }
.steps > li > div { padding-top: 4px; }
.steps strong { display: block; margin-bottom: 2px; }
.note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.note svg { width: 20px; height: 20px; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note.warn { background: color-mix(in srgb, var(--warn) 9%, var(--paper)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.note.warn svg { color: var(--warn); }
.download-card { display: grid; gap: 12px; margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.download-card .btn { justify-self: start; }
.hash { font: 500 0.78rem/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.defs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; }
.defs dt { font-weight: 700; }
.defs dd { color: var(--ink-2); }
@media (max-width: 560px) { .defs { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .defs dd { margin-bottom: 10px; } }

/* Videos: silent, click to play, with a caption track and a transcript */
.video { display: grid; gap: 14px; margin: 0; }
.doc-body .video { margin-top: 20px; }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); background: oklch(0.18 0.03 265); box-shadow: var(--shadow); }
.video figcaption { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.video figcaption strong { color: var(--ink); }
.transcript-box { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.transcript-box summary { padding: 12px 16px; font-weight: 700; cursor: pointer; }
.transcript-box[open] summary { border-bottom: 1px solid var(--line); }
.doc-body .transcript, .transcript { display: grid; gap: 10px; margin: 0; padding: 16px; list-style: none; }
.transcript li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 12px; }
.transcript li.scene:not(:first-child) { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.transcript .t { color: var(--muted); font: 600 0.84rem/1.6 var(--mono); font-variant-numeric: tabular-nums; }
.transcript p { max-width: 70ch; color: var(--ink); font-weight: 600; line-height: 1.5; }
.transcript .scene p { color: var(--ink-2); font-weight: 400; }
.transcript .tag { display: inline-block; margin-right: 4px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); font-size: 0.74rem; font-weight: 700; line-height: 1.5; vertical-align: 0.1em; }

/* About page ------------------------------------------------------------------ */
.contact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 18px 0 14px; padding: 0 !important; list-style: none; }
.contact-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; }
.contact-list a:hover { border-color: var(--line-strong); }
.contact-list svg { width: 22px; height: 22px; flex: none; color: var(--ink); }
.contact-list span { display: grid; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.contact-list strong { color: var(--ink); font-size: 1rem; }
.btn svg.heart { color: oklch(0.6 0.19 5); }

/* Footer -------------------------------------------------------------------- */
.site-footer { padding: 56px 0 40px; background: var(--night); color: var(--night-muted); font-size: 0.94rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.site-footer .logo { margin-bottom: 12px; }
.site-footer h2 { margin-bottom: 10px; color: var(--night-ink); font-size: 0.95rem; font-weight: 700; }
.site-footer ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--night-muted); text-decoration: none; }
.site-footer a:hover { color: var(--night-ink); text-decoration: underline; }
.site-footer .credit { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 24px; border-top: 1px solid var(--night-line); }
.site-footer .made { color: var(--night-ink); font-weight: 600; }
.site-footer .made a { color: var(--night-ink); text-decoration: underline; text-decoration-color: color-mix(in oklch, var(--lime) 60%, transparent); text-underline-offset: 0.2em; }
.site-footer .social { display: flex; flex-wrap: wrap; gap: 4px; }
.site-footer .social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--night-muted); transition: color 0.15s var(--ease), background-color 0.15s var(--ease); }
.site-footer .social a:hover { color: var(--night-ink); background: oklch(1 0 0 / 0.08); text-decoration: none; }
.site-footer .social svg { width: 19px; height: 19px; }
.site-footer .sponsor { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--night-line); border-radius: 999px; color: var(--night-ink); font-weight: 600; font-size: 0.9rem; }
.site-footer .sponsor svg { width: 17px; height: 17px; color: oklch(0.78 0.13 5); }
.site-footer .sponsor:hover { border-color: var(--night-muted); text-decoration: none; background: oklch(1 0 0 / 0.05); }
.site-footer .fine { grid-column: 1 / -1; font-size: 0.85rem; }
.site-footer .fine a { text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); } .site-footer .sponsor { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .demo-hit, .demo-rect { outline: 2px solid Highlight; }
  .btn, .exporter-tabs button[aria-selected="true"] { border: 1px solid CanvasText; }
}
@media print {
  .site-header, .site-footer, .demo-actions, .menu-toggle { display: none; }
  .night { background: none; color: #000; }
}

/* Practice page -------------------------------------------------------------- */
.practice { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding: clamp(32px, 5vw, 64px) 0 clamp(64px, 8vw, 110px); align-items: start; }
.practice-howto { position: sticky; top: 24px; display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 0.96rem; }
.practice-howto h2 { font-size: var(--step-1); font-weight: 800; }
.practice-howto .steps { display: grid; gap: 14px; margin: 0; }
.practice-howto .steps > li { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.practice-howto .steps > li::before { width: 28px; height: 28px; font-size: 0.86rem; }
.practice-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.practice-sections > *, .practice > * { min-width: 0; }
@media (max-width: 960px) { .practice { grid-template-columns: minmax(0, 1fr); } .practice-howto { position: static; } }
.pract { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 18px; background: var(--card); scroll-margin-top: 24px; }
.pract-head { display: grid; gap: 6px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pract-site { color: var(--muted); font: 500 0.8rem/1.3 var(--mono); }
.pract h2 { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; }
.expect { color: var(--ink-2); font-size: 0.95rem; }
.expect strong { padding: 0 0.3em; border-radius: 4px; background: var(--lime-wash); color: var(--ink); }
.pract a { color: oklch(0.45 0.13 250); }
@media (prefers-color-scheme: dark) { .pract a { color: oklch(0.8 0.1 250); } }
.biblio { display: grid; gap: 12px; margin: 0; padding-left: 1.4em; }
.biblio li::marker { color: var(--muted); }
.biblio > li > a { font-weight: 650; }
.biblio span { display: block; color: var(--ink-2); font-size: 0.94rem; }
.biblio .biblio-note { display: inline; }
.biblio .figure-link { display: flex; align-items: center; gap: 14px; list-style-position: outside; }
.biblio .figure-link img { border-radius: 6px; border: 1px solid var(--line); }
.biblio .narrow { max-width: 17em; }
.result { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.result:last-child { border-bottom: 0; }
.result h3 { font-size: 1.08rem; font-weight: 700; }
.result p { color: var(--muted); font-size: 0.92rem; }
.result .result-links { margin-top: 2px; }
.tickets { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tickets th, .tickets td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tickets th { color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.tickets td:first-child a { font: 600 0.9rem var(--mono); }
.tag-open, .tag-wait, .tag-done { padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.tag-open { background: var(--lime-wash); }
.tag-wait { background: color-mix(in srgb, var(--warn) 18%, var(--card)); }
.tag-done { background: var(--paper-2); color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.products li { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.products img { width: 100%; height: auto; border-radius: 8px; }
.products .name { font-weight: 700; }
.products span { color: var(--muted); font-size: 0.88rem; }
.products .sold-out img { filter: grayscale(0.7); opacity: 0.75; }
.tricky { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tricky li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tricky span { color: var(--muted); font-size: 0.9rem; }
.icon-link { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 10px; }
.icon-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.archive { height: 220px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); overscroll-behavior: contain; }
.archive a { display: block; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.frame { width: 100%; height: 150px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); }
.shadow-host { color: var(--ink-2); }
.late { display: grid; gap: 10px; margin-top: 16px; justify-items: start; }
.late-list { display: grid; gap: 6px; margin: 0; padding-left: 1.2em; }
