/* EOTM Labs site v2: design tokens + components.
   Ported from the Perma app (app/src/styles/tokens.css, base.css, components.css) so both share one brand system.
   No build step, no external requests: system font stack only.
   Dark (#131313) is the default; warm-white "day" mode via prefers-color-scheme or [data-theme="light"] on <html>.
   Logos follow the Perma theme: every EOTM seal and mark uses var(--accent-text), the same as the Perma app mark.
   CSP note: the site runs with style-src 'self', so gate.js / feedback.js cannot inject their own <style>.
   Their full styling (themed) lives at the end of this file. */

/* =========================================================== tokens */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 15px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 28px; --fs-2xl: 40px; --fs-3xl: 56px;
  --ls-tight: -0.022em; --ls-snug: -0.011em;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;
  --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --r-xl: 24px; --r-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 120ms; --dur-2: 220ms; --dur-3: 420ms;
  --maxw: 1200px;
  --nav-h: 64px;
  --tap: 44px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #131313; --bg-elev: #1b1b1b; --bg-elev-2: #222222; --bg-elev-3: #2a2a2a;
  --bg-glass: rgba(19, 19, 19, 0.72);
  --hairline: rgba(255, 255, 255, 0.08); --hairline-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f4; --text-2: #a3a3a0; --text-3: #7e7e7a;
  --accent: #e58a5f; --accent-text: #e58a5f; --accent-hover: #ee9a71; --accent-soft: rgba(229, 138, 95, 0.14); --on-accent: #1a0f0a;
  --up: #3fcf8e; --up-soft: rgba(63, 207, 142, 0.13);
  --down: #ff6b6b; --down-soft: rgba(255, 107, 107, 0.13);
  --warn: #f2b84b; --warn-soft: rgba(242, 184, 75, 0.13);
  --info: #7aa7ff; --info-soft: rgba(122, 167, 255, 0.13);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  --skeleton: rgba(255, 255, 255, 0.05); --skeleton-hi: rgba(255, 255, 255, 0.10);
  --card-shadow: none;
  --scrim: rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fdfcfa; --bg-elev: #f8f7f5; --bg-elev-2: #f1efec; --bg-elev-3: #e9e5e0;
    --bg-glass: rgba(253, 252, 250, 0.78);
    --hairline: rgba(40, 30, 20, 0.08); --hairline-strong: rgba(40, 30, 20, 0.14);
    --text: #161412; --text-2: #66615b; --text-3: #78726b;
    --accent: #c8643a; --accent-text: #b65933; --accent-hover: #b6572f; --accent-soft: rgba(200, 100, 58, 0.10); --on-accent: #ffffff;
    --up: #128a55; --up-soft: rgba(18, 138, 85, 0.10);
    --down: #d63c3c; --down-soft: rgba(214, 60, 60, 0.09);
    --warn: #a86b00; --warn-soft: rgba(168, 107, 0, 0.10);
    --info: #2f62d6; --info-soft: rgba(47, 98, 214, 0.09);
    --shadow-1: 0 1px 2px rgba(60, 40, 20, 0.05);
    --shadow-2: 0 10px 30px rgba(60, 40, 20, 0.07), 0 1px 3px rgba(60, 40, 20, 0.05);
    --shadow-3: 0 28px 70px rgba(60, 40, 20, 0.14), 0 2px 8px rgba(60, 40, 20, 0.06);
    --card-shadow: 0 1px 2px rgba(60, 40, 20, 0.04), 0 6px 20px rgba(60, 40, 20, 0.05);
    --skeleton: rgba(40, 30, 20, 0.05); --skeleton-hi: rgba(40, 30, 20, 0.09);
    --scrim: rgba(30, 22, 14, 0.38);
  }
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #fdfcfa; --bg-elev: #f8f7f5; --bg-elev-2: #f1efec; --bg-elev-3: #e9e5e0;
  --bg-glass: rgba(253, 252, 250, 0.78);
  --hairline: rgba(40, 30, 20, 0.08); --hairline-strong: rgba(40, 30, 20, 0.14);
  --text: #161412; --text-2: #66615b; --text-3: #78726b;
  --accent: #c8643a; --accent-text: #b65933; --accent-hover: #b6572f; --accent-soft: rgba(200, 100, 58, 0.10); --on-accent: #ffffff;
  --up: #128a55; --up-soft: rgba(18, 138, 85, 0.10);
  --down: #d63c3c; --down-soft: rgba(214, 60, 60, 0.09);
  --warn: #a86b00; --warn-soft: rgba(168, 107, 0, 0.10);
  --info: #2f62d6; --info-soft: rgba(47, 98, 214, 0.09);
  --shadow-1: 0 1px 2px rgba(60, 40, 20, 0.05);
  --shadow-2: 0 10px 30px rgba(60, 40, 20, 0.07), 0 1px 3px rgba(60, 40, 20, 0.05);
  --shadow-3: 0 28px 70px rgba(60, 40, 20, 0.14), 0 2px 8px rgba(60, 40, 20, 0.06);
  --card-shadow: 0 1px 2px rgba(60, 40, 20, 0.04), 0 6px 20px rgba(60, 40, 20, 0.05);
  --skeleton: rgba(40, 30, 20, 0.05); --skeleton-hi: rgba(40, 30, 20, 0.09);
  --scrim: rgba(30, 22, 14, 0.38);
}
.theme-scope { background: var(--bg); color: var(--text); }
@media (prefers-reduced-motion: reduce) { :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; } }

/* =========================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
/* smooth anchor jumps; sticky bars never cover a target heading (home adds the sticky filter bar). No overscroll-behavior
   on html/body, so the native iOS rubber-band on the page itself is untouched. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html:has(.bar-f) { scroll-padding-top: calc(var(--nav-h) + var(--bar-f-h) + 16px); }
/* every inner scroller keeps its scroll to itself and gets momentum on old iOS */
.nav-links, .popover, .detail, .tabs, .table-wrap, pre, .chips-scroll, .legal-toc, .u-toc {
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
pre { overflow-x: auto; max-width: 100%; }
.table-wrap, .tabs { overscroll-behavior-y: auto; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; letter-spacing: var(--ls-snug);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-3) var(--ease), color var(--dur-3) var(--ease);
  min-height: 100vh; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
hr { border: 0; border-top: 1px solid var(--hairline); margin: var(--s6) 0; }
code { font-family: var(--font-mono); font-size: max(12px, 0.92em); letter-spacing: 0; }

.display, h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; color: var(--text); text-wrap: balance; }
.display { font-size: clamp(38px, 7.2vw, 72px); line-height: 1.02; letter-spacing: -0.036em; font-weight: 650; }
h1, .h1 { font-size: clamp(30px, 4.4vw, var(--fs-2xl)); line-height: 1.1; letter-spacing: var(--ls-tight); }
h2, .h2 { font-size: clamp(24px, 3vw, var(--fs-xl)); line-height: 1.18; letter-spacing: var(--ls-tight); }
h3, .h3 { font-size: var(--fs-lg); line-height: 1.3; letter-spacing: -0.016em; }
h4, .h4 { font-size: var(--fs-md); line-height: 1.35; }
p { margin: 0; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); line-height: 1.55; max-width: 62ch; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent-text); }
.link { color: var(--accent-text); transition: color var(--dur-1) var(--ease); }
.link:hover { color: color-mix(in srgb, var(--accent-text) 80%, var(--text)); }
/* links inside running text are underlined too, so they never rely on colour alone (WCAG 1.4.1) */
:is(p, li, dd, td, label, small) .link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a, a.u { text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; transition: text-decoration-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.prose a:hover, a.u:hover { text-decoration-color: currentColor; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 calc(var(--s6) + var(--safe-r)) 0 calc(var(--s6) + var(--safe-l)); }
@media (max-width: 640px) { .container { padding: 0 calc(var(--s4) + var(--safe-r)) 0 calc(var(--s4) + var(--safe-l)); } }
main { display: block; padding: 0 0 var(--s20); }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s8); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row-sm { display: flex; align-items: center; gap: var(--s2); }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 641px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 961px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-2, .grid-3, .grid-4 { gap: var(--s5); } }
.section { margin-top: var(--s16); }
@media (max-width: 640px) { .section { margin-top: var(--s12); } }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); margin-bottom: var(--s5); }
.section-head .sub { color: var(--text-3); font-size: var(--fs-sm); }
.hidden { display: none !important; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-weight: 600; }
.skip:focus { top: var(--s3); }
.reveal { animation: rise var(--dur-3) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================== seal (brand mark) */
.seal { display: block; width: 100%; height: 100%; fill: currentColor; }

/* =========================================================== nav */
/* shell.js fills the header after first paint: reserve its height so the page below does not shift (CLS) */
header[data-shell="header"] { min-height: var(--nav-h); }
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { position: relative; height: 100%; display: flex; align-items: center; gap: var(--s5); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: var(--tap); font-family: var(--font-display); font-weight: 650; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; color: var(--text); }
.brand-mark { display: inline-flex; width: 28px; height: 28px; flex: none; color: var(--accent-text); }
.brand .labs { color: var(--text-2); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; white-space: nowrap; transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.nav-link:hover { color: var(--text); background: var(--bg-elev-2); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link.hl { color: var(--accent-text); background: var(--accent-soft); }
.nav-link.hl:hover { color: color-mix(in srgb, var(--accent-text) 80%, var(--text)); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.nav-link .ext { width: 12px; height: 12px; margin-left: 4px; opacity: 0.6; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--s1); flex: none; }
.nav-burger { display: none; }
@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: calc(-1 * var(--s4)); right: calc(-1 * var(--s4));
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: var(--s3) calc(var(--s4) + var(--safe-r)) calc(var(--s5) + var(--safe-b)) calc(var(--s4) + var(--safe-l));
    background: var(--bg); border-bottom: 1px solid var(--hairline); box-shadow: var(--shadow-2);
    max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.open .nav-links { display: flex; animation: pop-in var(--dur-2) var(--ease) both; }
  .nav-links .nav-link { min-height: 48px; padding: 0 12px; font-size: var(--fs-md); }
  .nav-burger { display: inline-flex; }
}
@media (min-width: 641px) and (max-width: 720px) { .nav-links { left: calc(-1 * var(--s6)); right: calc(-1 * var(--s6)); } }
@media (max-width: 360px) { .brand .labs { display: none; } }

/* popover */
.menu { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 60; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-3);
  transform-origin: top right; animation: pop-in var(--dur-2) var(--ease) both;
}
.popover { max-height: calc(100dvh - var(--nav-h) - 16px); overflow-y: auto; }
.popover[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-sm); color: var(--text); text-align: left; transition: background var(--dur-1) var(--ease); }
.menu-item:hover, .menu-item[aria-checked="true"] { background: var(--bg-elev-2); }
.menu-item .sub { color: var(--text-3); font-size: var(--fs-sm); margin-left: auto; }
.menu-label { padding: 10px 12px 6px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.prefs { width: min(300px, calc(100vw - 32px)); padding: var(--s3); }
.prefs .pref-row { padding: var(--s2) var(--s1); }
.prefs .pref-title { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s2); }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-elev-2); border-radius: var(--r-pill); border: 1px solid var(--hairline); }
.seg button { min-height: 38px; padding: 0 14px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 500; font-size: var(--fs-sm); transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"], .seg button.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }
.seg.full { display: flex; } .seg.full button { flex: 1; }

/* =========================================================== buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px;
  border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-base); white-space: nowrap; user-select: none; text-decoration: none;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn-secondary { background: var(--bg-elev-2); color: var(--text); }
.btn-secondary:hover { background: var(--bg-elev-3); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--bg-elev-2); }
.btn-outline { border: 1px solid var(--hairline-strong); color: var(--text); }
.btn-outline:hover { background: var(--bg-elev-2); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); color: var(--text-2); transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--bg-elev-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
/* the burger is phone-only; .icon-btn above would otherwise show it at 721+ px (sideways scroll at 721-800 px, recheck E2 2026-10-15) */
@media (min-width: 721px) { .nav-burger { display: none; } }
@media (pointer: coarse) { .btn-sm { min-height: var(--tap); } }

/* =========================================================== chips, badges, pills */
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: transparent; color: var(--text-2); font-weight: 500; font-size: var(--fs-sm); transition: all var(--dur-2) var(--ease); }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"], .chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (pointer: coarse) { .chip { min-height: var(--tap); padding: 0 16px; } }
.badges { display: flex; gap: var(--s2); flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; background: var(--bg-elev-2); color: var(--text-2); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--up-soft); color: var(--up); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--down-soft); color: var(--down); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.live .dot { box-shadow: 0 0 0 3px var(--up-soft); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; } }

/* =========================================================== cards */
.card { position: relative; background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: var(--s6); box-shadow: var(--card-shadow); }
.card-sm { padding: var(--s4); border-radius: var(--r-lg); }
.card-hover { transition: transform var(--dur-3) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-3) var(--ease); }
.card-hover:hover { transform: translateY(-2px); border-color: var(--hairline-strong); box-shadow: var(--shadow-2); }
.card-title { font-weight: 600; font-size: var(--fs-md); letter-spacing: -0.014em; }
.well { background: var(--bg-elev-2); border-radius: var(--r-md); padding: var(--s4); }
@media (max-width: 640px) { .card { padding: var(--s5); border-radius: var(--r-lg); } }

/* =========================================================== stats, progress, tabs, tables */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--card-shadow); }
.stat { background: var(--bg-elev); padding: var(--s5) var(--s6); display: flex; flex-direction: column; gap: 6px; }
.stat .k { font-size: var(--fs-sm); color: var(--text-2); }
.stat .v { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.026em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.progress { height: 8px; border-radius: var(--r-pill); background: var(--bg-elev-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--dur-3) var(--ease); }
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--hairline); margin-bottom: var(--s5); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.tab { scroll-snap-align: start; }
.tab { position: relative; min-height: var(--tap); padding: 10px 0 12px; color: var(--text-3); font-weight: 500; white-space: nowrap; transition: color var(--dur-2) var(--ease); }
.tab:hover { color: var(--text-2); }
.tab[aria-selected="true"], .tab.on { color: var(--text); }
.tab[aria-selected="true"]::after, .tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--card-shadow); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 500; font-size: var(--fs-sm); color: var(--text-3); padding: 14px var(--s4); border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.table td { padding: 16px var(--s4); border-bottom: 1px solid var(--hairline); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-1) var(--ease); }
.table tbody tr:hover { background: var(--bg-elev-2); }
.table .r { text-align: right; }

/* =========================================================== forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.input, .select, .textarea { width: 100%; min-height: var(--tap); padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--bg-elev-2); color: var(--text); outline: none; font-size: 16px; transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.textarea { min-height: 108px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-text); background: var(--bg-elev); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.hint { font-size: var(--fs-xs); color: var(--text-3); }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: var(--tap); padding: 10px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

/* =========================================================== notices */
.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--hairline); color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.notice b, .notice strong { color: var(--text); }
.notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--text); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.notice a { text-decoration: underline; text-underline-offset: 3px; }

/* modal / sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--scrim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade-in var(--dur-2) var(--ease) both; }
.sheet-backdrop[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* toast */
.toast-host { position: fixed; left: 50%; bottom: calc(var(--s5) + var(--safe-b)); transform: translateX(-50%); z-index: 200; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-3); animation: rise var(--dur-3) var(--ease) both; }

/* =========================================================== home: hero + token */
.hero { position: relative; padding: clamp(48px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(60% 50% at 50% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
/* Home: the hero grows when the cards fill in, so pin the glow in px (a %-based top would move = layout shift) */
.hero-home::before { inset: -360px -10% auto; height: 1000px; }
.hero > .container { position: relative; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.hero .eyebrow .seal-sm { width: 18px; height: 18px; color: var(--accent-text); }
.hero h1 { font-size: clamp(40px, 8vw, 84px); line-height: 1.0; letter-spacing: -0.04em; font-weight: 650; margin: var(--s5) 0 var(--s5); max-width: 14ch; }
.hero h1 i { font-style: normal; color: var(--accent-text); }
.hero .lead { max-width: 60ch; }

.token { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s8); padding: var(--s3) var(--s3) var(--s3) var(--s4); border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--card-shadow); max-width: 760px; }
.tok-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-sm); color: var(--up); white-space: nowrap; }
.tok-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.tok-ca { display: inline-flex; align-items: center; gap: var(--s2); flex-wrap: wrap; min-width: 0; flex: 1 1 320px; }
.tok-ca code { font-size: var(--fs-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg-elev-2); flex: 1 1 auto; min-width: 0; }
/* the address is split into head / middle / tail spans; on phones the middle is visually hidden (still in the DOM,
   so screen readers, text selection and the copy button get the full address) and an ellipsis is drawn between. */
@media (max-width: 599px) {
  .tok-ca code { flex: 0 1 auto; }
  .tok-ca .ca-m { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .tok-ca .ca-h::after { content: "\2026"; content: "\2026" / ""; color: var(--text-3); }
}
.tok-acts { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tok-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); color: var(--text-2); background: transparent; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.tok-btn[hidden] { display: none; }
.tok-btn:hover { background: var(--bg-elev-2); color: var(--text); border-color: var(--text-3); }
.tok-btn:active { transform: scale(0.96); }
.tok-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tok-btn img { width: 22px; height: 22px; border-radius: 6px; }
.tok-fomo { background: #060510; border-color: #060510; }
.tok-fomo:hover { background: #060510; border-color: var(--text-3); }
.tok-msg { font-size: var(--fs-xs); font-weight: 600; color: var(--up); min-width: 1ch; }
.tok-chain { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
/* live $EOTM card (home hero); numbers filled by assets/home.js from /api/eotm-token.php */
.ltok { margin-top: var(--s8); max-width: 760px; display: grid; gap: var(--s5); }
.ltok-top { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.pair-av { position: relative; display: inline-block; width: 72px; height: 44px; flex: none; }
.pair-av .av { position: absolute; top: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--bg-elev); }
.pair-av .av-tok { left: 0; z-index: 1; background: var(--bg-elev-2); color: var(--accent-text); }
.pair-av .av-tok svg { width: 24px; height: 24px; fill: currentColor; }
.pair-av .av-eth { left: 34px; width: 38px; height: 38px; top: 3px; background: var(--bg-elev-3); color: var(--text); }
.pair-av .av-eth svg { width: 18px; height: 18px; fill: currentColor; }
.ltok-id { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ltok-id h2 { font-size: var(--fs-lg); line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
.ltok-id .sym { color: var(--text-3); font-weight: 500; font-size: var(--fs-base); margin-left: 4px; }
.ltok-sub { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltok-badge { flex: none; }
.ltok-badge.off { background: var(--bg-elev-2); color: var(--text-3); }
.ltok-badge.off .dot { background: var(--text-3); box-shadow: none; animation: none; }
.ltok-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px var(--s3); min-height: calc(var(--fs-xl) * 1.25); }
#lt-price { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
#lt-price sub { font-size: 0.55em; vertical-align: -0.1em; letter-spacing: 0; }
.ltok-chg { font-size: var(--fs-base); font-weight: 600; }
.ltok-chg.up { color: var(--up); } .ltok-chg.down { color: var(--down); }
.ltok-range { margin-left: auto; white-space: nowrap; font-size: var(--fs-sm); color: var(--text-3); } /* pinned right: price/change filling in does not move it */
.ltok-chart { height: 120px; margin: 0 calc(-1 * var(--s2)); }
.ltok-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ltok-chart .line { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ltok-chart .area { fill: var(--accent-soft); stroke: none; }
.ltok-chart .end { fill: var(--accent-text); }
.ltok-chart.empty { display: grid; place-items: center; border-radius: var(--r-lg); background: var(--bg-elev-2); color: var(--text-3); font-size: var(--fs-sm); }
.ltok-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: 0; }
.ltok-meta div { display: grid; gap: 2px; min-width: 0; }
.ltok-meta dt { font-size: var(--fs-xs); color: var(--text-3); }
.ltok-meta dd { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltok-prog { display: grid; gap: var(--s2); }
.ltok-prog-h { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); color: var(--text-2); }
.ltok-prog .bar { height: 8px; border-radius: var(--r-pill); background: var(--bg-elev-3); overflow: hidden; }
.ltok-prog .bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width var(--dur-3) var(--ease); }
.ltok-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.ltok-acts .tok-ca { flex: 1 1 300px; }
.ltok-trade { flex: none; }
.ltok-foot { margin: 0; font-size: var(--fs-xs); color: var(--text-3); }
@media (max-width: 640px) {
  .ltok { gap: var(--s4); }
  .ltok-chart { height: 96px; }
  .ltok-meta dd { font-size: var(--fs-base); }
  .ltok-trade { width: 100%; justify-content: center; }
  .ltok-acts .tok-ca { flex-basis: 100%; }
}
.tok-risk { margin-top: var(--s3); font-size: var(--fs-sm); color: var(--text-3); max-width: 760px; }

/* section heading used across the site (v1 "batch-head") */
.batch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); margin-bottom: var(--s5); }
.batch-head h2 { font-size: clamp(24px, 3vw, 32px); }
.batch-head span { color: var(--text-3); font-size: var(--fs-sm); }

/* mission / vision cards */
.mv-card { display: flex; flex-direction: column; gap: var(--s3); }
.mv-k { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.mv-card p { color: var(--text-2); font-size: var(--fs-base); line-height: 1.6; }
.mv-card p b { color: var(--text); font-weight: 600; }
.mv-more { margin-top: var(--s4); }
.mv-more a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--accent-text); font-weight: 600; }
.mv-more a:hover { color: color-mix(in srgb, var(--accent-text) 80%, var(--text)); }

/* support banner */
.fbanner { margin-top: var(--s12); }
.fbanner .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); padding: var(--s5) var(--s6); border-radius: var(--r-xl); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.fb-t { color: var(--text); font-size: var(--fs-md); line-height: 1.45; max-width: 64ch; }
.fb-t span { color: var(--text-2); }
@media (max-width: 640px) { .fbanner .inner { padding: var(--s5); } .fb-a { width: 100%; } }

/* status strip */
.status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s12); padding: var(--s4) var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--card-shadow); }
.flaps { display: flex; gap: 3px; }
.flap { display: grid; place-items: center; width: 24px; height: 32px; border-radius: 6px; background: var(--bg-elev-3); font: 600 16px/1 var(--font-mono); color: var(--text); box-shadow: inset 0 -1px 0 var(--hairline-strong); }
.flap.gap { width: 6px; background: none; box-shadow: none; }
.status p { color: var(--text-2); font-size: var(--fs-base); flex: 1 1 280px; }

/* catalogue filter bar */
.bar-f { position: sticky; top: var(--nav-h); z-index: 20; margin-top: var(--s12); padding: var(--s3) 0; background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.bar-f .container { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.bar-f .count { margin-left: auto; color: var(--text-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
/* one fixed-height row at every width (its height feeds scroll-padding-top above): on phones the chips scroll sideways
   with snap; the right-edge fade is the affordance, so the scrollbar can hide */
:root { --bar-f-h: 61px; }
@media (pointer: coarse) { :root { --bar-f-h: 69px; } }
.bar-f .container { flex-wrap: nowrap; }
.bar-f .chips { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; }
.bar-f .chips::-webkit-scrollbar { display: none; }
.bar-f .chip { flex: none; scroll-snap-align: start; white-space: nowrap; }
.bar-f .count { flex: none; white-space: nowrap; }
@media (max-width: 480px) { .bar-f .chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: var(--s6); } }

/* catalogue cards (Uniswap-launches-like) */
.cat-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* desktop: two broad cards per row, art on the left; a card alone in its row spans the full width */
@media (min-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
  .cat-grid > .pcard { display: grid; grid-template-columns: minmax(160px, 38%) minmax(0, 1fr); column-gap: var(--s6); row-gap: var(--s2); align-content: start; padding: var(--s6); }
  .cat-grid > .pcard > * { grid-column: 2; }
  .cat-grid > .pcard > .art { grid-column: 1; grid-row: 1 / span 7; align-self: start; padding: 16%; }
  .cat-grid > .pcard > .no { margin-bottom: var(--s1); }
  .cat-grid > .pcard .nm { font-size: var(--fs-xl); }
  .cat-grid > .pcard:last-child:nth-child(odd) { grid-column: 1 / -1; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); }
  .cat-grid > .pcard:last-child:nth-child(odd) .concept, .cat-grid > .pcard:last-child:nth-child(odd) ul.facts { max-width: 62ch; }
}
.pcard { position: relative; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--hairline); box-shadow: var(--card-shadow); color: var(--text); text-align: left; transition: transform var(--dur-3) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-3) var(--ease); }
a.pcard:hover, button.pcard:hover, a.pcard:focus-visible { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: var(--shadow-2); }
.pcard .no { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pcard .art { aspect-ratio: 1; display: grid; place-items: center; padding: 18%; border-radius: var(--r-lg); background: var(--bg-elev-2); color: var(--accent-text); transition: background var(--dur-3) var(--ease); }
.pcard .art svg { width: 100%; height: 100%; fill: currentColor; transition: transform var(--dur-3) var(--ease); }
a.pcard:hover .art svg, button.pcard:hover .art svg { transform: scale(1.05); }
.stroke-mark { fill: none; stroke: currentColor; stroke-width: 2; }
.pcard .art svg .stroke-mark, .d-art svg .stroke-mark { fill: none; }
.pcard .nm { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.02em; }
.pcard .fam { font-size: var(--fs-sm); color: var(--text-2); }
.pcard .concept { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.pcard ul.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--hairline); padding-top: var(--s3); }
.pcard ul.facts li { position: relative; padding-left: 16px; font-size: var(--fs-sm); color: var(--text-2); }
.pcard ul.facts li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pcard .go { margin-top: auto; padding-top: var(--s2); font-size: var(--fs-sm); font-weight: 600; color: var(--accent-text); }
.pcard.reserved { background: transparent; border-style: dashed; border-color: var(--hairline-strong); box-shadow: none; }
.pcard.reserved .art { background: transparent; color: var(--text-3); opacity: 0.55; }
.pcard.reserved .nm { color: var(--text-2); font-style: italic; }

/* principles */
.pr-card { display: flex; flex-direction: column; gap: var(--s2); }
.pr-card .label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.pr-card h3 { font-size: var(--fs-lg); }
.pr-card p { color: var(--text-2); line-height: 1.6; }

/* detail view (full-screen sheet) */
.detail { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow: auto; overscroll-behavior: contain; animation: rise var(--dur-3) var(--ease) both; }
.detail { scroll-padding-top: calc(var(--nav-h) + 16px); }
.detail[hidden] { display: none; }
.d-top { position: sticky; top: 0; z-index: 2; height: var(--nav-h); background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.d-top .container { height: 100%; display: flex; align-items: center; gap: var(--s4); }
.d-top .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s8); padding-top: var(--s8); padding-bottom: calc(var(--s16) + var(--safe-b)); }
@media (min-width: 900px) { .d-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s12); padding-top: var(--s12); } }
.d-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 18%; border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--hairline); color: var(--accent-text); max-width: 520px; width: 100%; }
@media (min-width: 900px) { .d-art { position: sticky; top: calc(var(--nav-h) + var(--s8)); } }
.d-art svg { width: 100%; height: 100%; fill: currentColor; }
.d-art .plate { position: absolute; left: var(--s5); bottom: var(--s4); font-size: var(--fs-xs); color: var(--text-3); }
.d-text .no { font-size: var(--fs-sm); color: var(--text-3); }
.d-text h2 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1.02; margin: var(--s3) 0; }
.d-text .concept { font-size: var(--fs-md); color: var(--text-2); line-height: 1.55; margin-bottom: var(--s6); }
.sec { border-top: 1px solid var(--hairline); padding: var(--s5) 0; }
.sec .label { display: block; margin-bottom: var(--s2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.sec p { color: var(--text-2); line-height: 1.65; }
.sec ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.sec li { margin: 4px 0; }

/* =========================================================== footer */
.footer { margin-top: var(--s16); border-top: 1px solid var(--hairline); padding: var(--s12) 0 calc(var(--s12) + var(--safe-b)); color: var(--text-2); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s8); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s12); } }
.footer .brand { margin-bottom: var(--s4); }
.footer .line { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.024em; line-height: 1.2; color: var(--text); margin-bottom: var(--s4); max-width: 22ch; }
.footer .links { display: flex; flex-wrap: wrap; gap: 0 var(--s2); align-items: center; }
.footer .links a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text-2); }
.footer .links a:hover { color: var(--text); }
.footer .social { display: flex; gap: var(--s2); margin: var(--s3) 0; }
.footer .social a { width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hairline-strong); color: var(--text-2); transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.footer .social a:hover { background: var(--bg-elev-2); color: var(--text); }
.footer .social svg { width: 18px; height: 18px; fill: currentColor; }
.risk { display: flex; flex-direction: column; gap: var(--s3); }
.risk p { line-height: 1.65; }
.risk .note { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--bg-elev); border: 1px solid var(--hairline); font-size: var(--fs-sm); }
.risk .note a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
.footer-bottom { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); justify-content: space-between; color: var(--text-3); font-size: var(--fs-xs); }

/* =========================================================== style guide */
.sg-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 1000px) { .sg-pair { grid-template-columns: 1fr 1fr; } }
.sg-panel { border-radius: var(--r-xl); border: 1px solid var(--hairline-strong); padding: var(--s6); display: flex; flex-direction: column; gap: var(--s6); min-width: 0; }
@media (max-width: 640px) { .sg-panel { padding: var(--s4); } }
.sg-label { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s3); }
.swatch { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.swatch i { display: block; height: 44px; border-radius: 12px; border: 1px solid var(--hairline); }
.sw-bg { background: var(--bg); } .sw-elev { background: var(--bg-elev); } .sw-elev2 { background: var(--bg-elev-2); } .sw-elev3 { background: var(--bg-elev-3); }
.sw-text { background: var(--text); } .sw-text2 { background: var(--text-2); } .sw-text3 { background: var(--text-3); }
.sw-accent { background: var(--accent); } .sw-up { background: var(--up); } .sw-down { background: var(--down); } .sw-warn { background: var(--warn); } .sw-info { background: var(--info); }
.sg-seals { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; color: var(--accent-text); }
.sg-seals .s64 { width: 64px; height: 64px; } .sg-seals .s40 { width: 40px; height: 40px; } .sg-seals .s24 { width: 24px; height: 24px; }
.sg-type > * + * { margin-top: var(--s2); }
.w-60 { width: 60%; } .w-35 { width: 35%; }
.mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-6 { margin-top: var(--s6); } .mt-8 { margin-top: var(--s8); } .mt-12 { margin-top: var(--s12); }
.pt-12 { padding-top: var(--s12); }

/* =========================================================== gate.js (entry notice), themed
   gate.js injects an inline <style>; under the strict CSP that is blocked, so these rules are the only styling.
   Elements: .eg-back (backdrop) > .eg (dialog): .k, h2, p, label > input[checkbox] + span (links inside), .row > button.no + button.go,
   p.left[hidden] > button.lk.back + button.lk.again. States: checkbox checked/disabled, .go disabled, .left shown, buttons [hidden].
   Scroll lock: gate.js sets html{overflow:hidden} through CSSOM (allowed by the CSP); :has() below is a belt-and-braces copy. */
.eg-back { position: fixed; inset: 0; z-index: 2147483000; background: var(--scrim); -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px); display: grid; place-items: center; padding: max(var(--s4), env(safe-area-inset-top, 0px)) calc(var(--s4) + var(--safe-r)) calc(var(--s4) + var(--safe-b)) calc(var(--s4) + var(--safe-l)); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: fade-in var(--dur-2) var(--ease) both; }
html .eg { color-scheme: inherit; background: var(--bg-elev); color: var(--text); max-width: 540px; width: 100%; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-3); padding: var(--s6); font: var(--fs-base)/1.55 var(--font); letter-spacing: var(--ls-snug); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - var(--safe-b)); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: eg-in var(--dur-3) var(--ease) both; }
@keyframes eg-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
html:has(> body > .eg-back) { overflow: hidden; }
html .eg [hidden] { display: none !important; }
html .eg h2 { font: 600 24px/1.2 var(--font-display); letter-spacing: var(--ls-tight); margin: 0 0 var(--s2); color: var(--text); }
html .eg .k { font: 600 var(--fs-xs)/1.3 var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 var(--s2); }
html .eg p { margin: 0 0 var(--s3); color: var(--text-2); }
html .eg label { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; min-height: var(--tap); padding: var(--s3) 0; border-top: 1px solid var(--hairline); cursor: pointer; color: var(--text); transition: opacity var(--dur-2) var(--ease); }
html .eg ul.eg-list { margin: 0 0 var(--s4); padding: 0 0 0 var(--s5); display: grid; gap: var(--s2); color: var(--text); }
html .eg ul.eg-list li { padding-left: 2px; line-height: 1.5; }
html .eg ul.eg-list li::marker { color: var(--accent-text); }
html .eg label.eg-all { padding: var(--s3) var(--s4); border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-elev-2); align-items: center; font-weight: 600; }
html .eg label.eg-all:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }
html .eg p.eg-note { margin: var(--s3) 0 0; font-size: var(--fs-sm); color: var(--text-3); }
html .eg label:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
html .eg label span { color: var(--text); }
html .eg input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--accent); cursor: inherit; }
html .eg a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
html .eg .row { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; margin-top: var(--s4); }
html .eg button { font: 600 var(--fs-base)/1 var(--font); letter-spacing: normal; text-transform: none; min-height: var(--tap); padding: 0 20px; border: 0; border-radius: var(--r-pill); background: var(--bg-elev-2); color: var(--text); cursor: pointer; transition: background var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease); }
html .eg button:hover { background: var(--bg-elev-3); }
html .eg button:active:not([disabled]) { transform: scale(0.98); }
html .eg button.go { background: var(--accent); color: var(--on-accent); }
html .eg button.go:hover { background: var(--accent-hover); }
html .eg button[disabled] { opacity: 0.4; cursor: not-allowed; }
html .eg button:focus-visible, html .eg input:focus-visible, html .eg a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
html .eg .left { font-size: var(--fs-sm); color: var(--text-2); margin-top: var(--s3); }
html .eg .left[hidden] { display: none; }
html .eg button.lk { background: none; min-height: var(--tap); padding: 0 var(--s2); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; color: var(--text); }
html .eg button.lk:hover { background: var(--bg-elev-2); }
@media (max-width: 479px) { html .eg { padding: var(--s5); border-radius: var(--r-lg); } html .eg h2 { font-size: 22px; } html .eg .row button { flex: 1; } }

/* =========================================================== feedback.js (efb-*), themed (same CSP reason)
   Elements: .efb-btn (floating, svg + .efb-bl label) | .efb-card.efb-panel (non-modal dialog) and .efb-card.efb-sv (survey):
   .efb-top > h2.efb-h + .efb-x | fieldset.efb-fs > legend.efb-lg + .efb-pills/.efb-rate > label.efb-pill > input[radio] + span | .efb-ends
   | .efb-lab, textarea, input[type=email], .efb-meta, .efb-err[hidden], .efb-sec (Choose files) + input[type=file][hidden]
   | ul.efb-files > li > .efb-fn + .efb-fz + button.efb-rm | .efb-hint | label.efb-upd > input[checkbox] | .efb-hp (honeypot)
   | .efb-page, .efb-note, a | .efb-row > .efb-lk, .efb-grow, .efb-go (Send/Next; [disabled] while sending) | .efb-prog
   | p.efb-st(.efb-bad|.efb-good). Open = [hidden] removed (enter animation); close = [hidden] set (instant, JS has no exit state).
   Phones (<640px) the panel is a bottom sheet. Reduced motion: --dur-* go to 0 and the global rule stops the animation. */
.efb-btn, .efb-card, .efb-card *, .efb-card *::before, .efb-card *::after { box-sizing: border-box; }
.efb-btn[hidden], .efb-card[hidden], .efb-card [hidden] { display: none !important; }
.efb-btn { position: fixed; z-index: 2147482000; right: calc(16px + var(--safe-r)); bottom: calc(16px + var(--safe-b)); display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); min-width: var(--tap); margin: 0; padding: 0 16px 0 14px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill); background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: var(--text); font: 500 14px/1 var(--font); letter-spacing: normal; text-transform: none; cursor: pointer; box-shadow: var(--shadow-2); transition: transform var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.efb-btn:hover { transform: translateY(-1px); background: var(--bg-elev); }
.efb-btn:active { transform: scale(0.97); }
.efb-btn svg { width: 18px; height: 18px; flex: none; }
.efb-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.efb-card { position: fixed; z-index: 2147482001; right: calc(16px + var(--safe-r)); bottom: calc(16px + var(--safe-b)); width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; margin: 0; background: var(--bg-elev); color: var(--text); border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-3); padding: var(--s4) var(--s5) var(--s5); font: 15px/1.5 var(--font); text-align: left; letter-spacing: var(--ls-snug); text-transform: none; -webkit-overflow-scrolling: touch; transform-origin: bottom right; animation: efb-in var(--dur-3) var(--ease) both; }
@keyframes efb-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes efb-sheet-in { from { opacity: 0.6; transform: translateY(100%); } to { opacity: 1; transform: none; } }
.efb-sv { width: min(340px, calc(100vw - 32px)); }
.efb-card p, .efb-card ul, .efb-card fieldset, .efb-card legend, .efb-card h2 { margin: 0; padding: 0; }
.efb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -8px 4px 0; }
.efb-card h2.efb-h { font: 600 17px/1.3 var(--font-display); letter-spacing: -0.014em; color: var(--text); }
.efb-card button { font: inherit; letter-spacing: normal; text-transform: none; margin: 0; color: var(--text); cursor: pointer; }
.efb-x { flex: none; width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-pill); background: none; font-size: 20px !important; line-height: 1; color: var(--text-2) !important; }
.efb-x:hover { background: var(--bg-elev-2); color: var(--text) !important; }
.efb-x { display: inline-flex; align-items: center; justify-content: center; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.efb-fs { border: 0; min-width: 0; margin: 12px 0 0 !important; }
.efb-card legend.efb-lg { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.efb-card .efb-lab { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.efb-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.efb-pill { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.efb-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.efb-pill span { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); padding: 8px 14px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: 14px; line-height: 1.2; transition: all var(--dur-2) var(--ease); }
.efb-pill:hover span { color: var(--text); border-color: var(--text-3); }
.efb-pill input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.efb-pill input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.efb-rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.efb-rate .efb-pill span { width: 100%; padding: 8px 0; }
.efb-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.efb-card textarea, .efb-card input[type=email] { display: block; width: 100%; max-width: 100%; margin: 0; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-elev-2); color: var(--text); font: inherit; font-size: 16px; line-height: 1.4; box-shadow: none; outline: none; transition: border-color var(--dur-2) var(--ease); }
.efb-card textarea:focus, .efb-card input[type=email]:focus { border-color: var(--accent-text); background: var(--bg-elev); }
.efb-card textarea::placeholder, .efb-card input[type=email]::placeholder { color: var(--text-3); }
.efb-card textarea { overscroll-behavior: contain; }
.efb-card textarea { min-height: 108px; resize: vertical; }
.efb-card input[type=email] { min-height: var(--tap); }
.efb-card textarea[aria-invalid=true], .efb-card input[aria-invalid=true] { border-color: var(--down); box-shadow: 0 0 0 1px var(--down); }
.efb-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.efb-small { font-size: 13px; color: var(--text-2); }
.efb-card .efb-err { font-size: 13px; color: var(--down); margin-top: 5px; }
.efb-sec { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 var(--s4); border: 1px solid var(--hairline-strong); border-radius: var(--r-pill); background: transparent; font-weight: 600; font-size: var(--fs-sm) !important; transition: background var(--dur-2) var(--ease); }
.efb-sec:hover { background: var(--bg-elev-2); }
.efb-sec:active, .efb-go:active:not([disabled]) { transform: scale(0.98); }
.efb-files { list-style: none; margin: 8px 0 0 !important; }
.efb-files li { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--bg-elev-2); padding: 0 0 0 var(--s3); margin-top: var(--s1); }
.efb-files .efb-fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efb-files .efb-fz { color: var(--text-3); flex: none; }
.efb-rm { flex: none; min-width: var(--tap); min-height: var(--tap); padding: 0 var(--s3); border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2) !important; text-decoration: underline; text-underline-offset: 3px; font-size: var(--fs-sm) !important; }
.efb-rm:hover { color: var(--down) !important; }
.efb-hint { font-size: 12px; color: var(--text-3); margin-top: 6px !important; }
.efb-upd { display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); padding: var(--s3) 0 0; margin-top: 10px !important; font-size: 14px; line-height: 1.4; color: var(--text); cursor: pointer; }
.efb-upd input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--accent); }
.efb-page { font-size: 13px; color: var(--text-2); margin-top: 12px !important; overflow-wrap: anywhere; }
.efb-note { font-size: 12px; color: var(--text-2); margin-top: 10px !important; }
.efb-card a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.efb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.efb-go { min-height: var(--tap); padding: 0 20px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent) !important; font-weight: 600; transition: background var(--dur-2) var(--ease); }
.efb-go:hover { background: var(--accent-hover); }
.efb-go[disabled] { opacity: 0.45; cursor: progress; }
.efb-lk { min-height: var(--tap); padding: 0 var(--s2); border: 0; border-radius: var(--r-pill); background: none; color: var(--text-2) !important; text-decoration: underline; text-underline-offset: 3px; font-size: 14px !important; }
.efb-lk:hover { color: var(--text) !important; background: var(--bg-elev-2); }
.efb-grow { flex: 1; }
.efb-st { font-size: 14px; margin-top: 10px !important; min-height: 1px; }
.efb-st.efb-bad { color: var(--down); }
.efb-st.efb-good { color: var(--up); font-weight: 600; }
.efb-prog { font-size: 12px; color: var(--text-3); }
.efb-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.efb-btn:focus-visible, .efb-card button:focus-visible, .efb-card a:focus-visible, .efb-card textarea:focus-visible, .efb-card input[type=email]:focus-visible, .efb-upd input:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* phones: the floating Feedback button sits over the page, so the footer gets extra bottom room
   (button height + its offset) and the last lines of every page can always be scrolled clear of it. */
@media (max-width: 640px) {
  .footer { padding-bottom: calc(var(--s12) + var(--tap) + var(--s5) + var(--safe-b)); }
  .efb-btn { right: calc(12px + var(--safe-r)); bottom: calc(12px + var(--safe-b)); }
}
@media (max-width: 639px) {
  /* feedback panel = bottom sheet with a grab-handle look; survey = full-width card above the home indicator */
  .efb-panel { left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; max-height: 88dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0; padding: var(--s3) calc(var(--s4) + var(--safe-r)) calc(var(--s4) + var(--safe-b)) calc(var(--s4) + var(--safe-l)); animation-name: efb-sheet-in; }
  .efb-panel::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto var(--s2); border-radius: var(--r-pill); background: var(--hairline-strong); }
  .efb-sv { right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); width: calc(100vw - 16px - var(--safe-l) - var(--safe-r)); max-height: 70vh; max-height: 70dvh; }
  .efb-panel .efb-row .efb-go { flex: 1; }
}
@media (max-width: 479px) {
  .efb-btn { padding: 0; width: var(--tap); justify-content: center; }
  .efb-btn .efb-bl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@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; }
}
.d-art .stage { width: 100%; height: 100%; }

/* Phones: 44px tap targets for the footer legal links; no text under 12px (DEVICE-QA 2026-10-08 F7/F8) */
@media (max-width: 767px) {
  .risk .note a { min-height: 44px; }
  code { font-size: max(12px, 1em); }
}
