/* ───────────────────────────────────────────────────────────────
   WiserGuy · website theme
   Themes: terminal · casino · retro · brutalist · ccu · wiserguy (active)
   ─────────────────────────────────────────────────────────────── */

/* LEMON MILK loads from the same /fonts/ CORS-open route the userscript
   uses — same files, served by main.py's serve_font handler. The website
   is same-origin so it doesn't even need the CORS header, just convenient
   reuse. */
@font-face {
  font-family: "LEMON MILK";
  src: url("/fonts/LEMONMILK-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "LEMON MILK";
  src: url("/fonts/LEMONMILK-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "LEMON MILK";
  src: url("/fonts/LEMONMILK-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html, body, #root { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv01";
}

/* Site-wide background, three stacked layers:
     body          — flat brand background colour
     body::before  — steak / sauce pattern tile, masked into an oval so the
                     corners fade to dark (vignette feel, not wallpaper feel)
                     and drifts slowly so it doesn't look static
     body::after   — soft warm spotlight + dark corner vignette on top, gives
                     depth and anchors the eye to the centre of the screen
   The pattern-loud class (set on <html> while the landing screen is mounted)
   pushes the pattern opacity up so the brand reads strongly there, then
   relaxes everywhere else so dashboard data stays legible. */
:root {
  /* CCU sticker pattern is much louder than the old stake-sauce tile, so
     base opacity is lower and the loud bump is gentler. Theme-level
     overrides can re-tune these without touching the body rules. */
  --bg-pattern-opacity: 0.18;
  --bg-pattern-image: url("ccu-bg.jpg");
  --bg-pattern-mask: radial-gradient(ellipse 110% 85% at 50% 42%, #000 40%, transparent 95%);
  --bg-vignette: radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(255, 255, 255, .35) 100%);
}
.pattern-loud { --bg-pattern-opacity: 0.55; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image: var(--bg-pattern-image);
  background-size: 900px auto;
  background-repeat: repeat;
  opacity: var(--bg-pattern-opacity);
  mask-image: var(--bg-pattern-mask);
  -webkit-mask-image: var(--bg-pattern-mask);
  animation: pattern-drift 240s linear infinite;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-vignette);
}
@keyframes pattern-drift {
  from { background-position: 0 0; }
  to   { background-position: 900px -900px; }
}
#root { position: relative; z-index: 1; }

/* ============================================================
   THEME · TERMINAL · default
   ============================================================ */
:root,
[data-theme="terminal"] {
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-num:     'JetBrains Mono', ui-monospace, monospace;

  --bg:        #07090c;
  --surf:      #0a0e14;
  --surf-2:    #0d1219;
  --surf-3:    #101620;
  --border:    #152030;
  --border-2:  #1d2c41;

  --text:      #d8f0f5;
  --text-2:    #7aaab8;
  --text-3:    #3d6070;

  --accent:    #00e8f0;
  --accent-2:  rgba(0,232,240,.10);
  --accent-3:  rgba(0,232,240,.22);
  --accent-glow: 0 0 18px rgba(0,232,240,.35), 0 0 40px rgba(0,232,240,.10);

  --ok:        #34d399;
  --warn:      #f5c542;
  --err:       #ff5c5c;
  --info:      #7aa6f6;
  --purple:    #a78bfa;

  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 10px;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 12px 30px rgba(0,0,0,.5);

  --topbar-h:  56px;

  --tracking-display: .14em;
  --weight-display:   700;

  --grid-bg: linear-gradient(rgba(0,232,240,.025) 1px, transparent 1px),
             linear-gradient(90deg, rgba(0,232,240,.025) 1px, transparent 1px);
  --grid-size: 28px 28px;
}

/* ============================================================
   THEME · CASINO
   ============================================================ */
[data-theme="casino"] {
  --font-body:    'Sora', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Playfair Display', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-num:     'Cormorant Garamond', 'Playfair Display', serif;

  --bg:        #0a0612;
  --surf:      #140a26;
  --surf-2:    #1a0f30;
  --surf-3:    #20143a;
  --border:    rgba(212,175,55,.18);
  --border-2:  rgba(212,175,55,.32);

  --text:      #f4ecd7;
  --text-2:    #b8a577;
  --text-3:    #6b5d3e;

  --accent:    #d4af37;
  --accent-2:  rgba(212,175,55,.10);
  --accent-3:  rgba(212,175,55,.22);
  --accent-glow: 0 0 24px rgba(212,175,55,.42), 0 0 60px rgba(139,92,246,.18);

  --ok:        #6ee7b7;
  --warn:      #f5c542;
  --err:       #f87171;
  --info:      #c4b5fd;
  --purple:    #8b5cf6;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 2px 6px rgba(0,0,0,.6), 0 24px 60px rgba(139,92,246,.18);

  --topbar-h:  64px;

  --tracking-display: .01em;
  --weight-display:   500;

  --grid-bg:
    radial-gradient(circle at 20% 0%, rgba(139,92,246,.16), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(212,175,55,.10), transparent 55%);
  --grid-size: auto;
}

/* ============================================================
   THEME · RETRO
   ============================================================ */
[data-theme="retro"] {
  --font-body:    'JetBrains Mono', ui-monospace, monospace;
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-num:     'JetBrains Mono', ui-monospace, monospace;

  --bg:        #0a0010;
  --surf:      #0f0018;
  --surf-2:    #130020;
  --surf-3:    #180028;
  --border:    #3d0068;
  --border-2:  #6a00b0;

  --text:      #f0e0ff;
  --text-2:    #b080d0;
  --text-3:    #6040a0;

  --accent:    #ff00ff;
  --accent-2:  rgba(255,0,255,.10);
  --accent-3:  rgba(255,0,255,.28);
  --accent-glow: 0 0 12px rgba(255,0,255,.7), 0 0 32px rgba(255,0,255,.3), 0 0 60px rgba(140,0,255,.2);

  --ok:        #00ff88;
  --warn:      #ffcc00;
  --err:       #ff3333;
  --info:      #00ccff;
  --purple:    #cc44ff;

  --radius-sm: 0px;
  --radius:    0px;
  --radius-lg: 0px;
  --shadow:    4px 4px 0 0 #ff00ff;

  --topbar-h:  56px;

  --tracking-display: .12em;
  --weight-display:   700;

  --grid-bg:
    linear-gradient(rgba(255,0,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,255,.06) 1px, transparent 1px);
  --grid-size: 24px 24px;
}

/* ============================================================
   THEME · BRUTALIST / STAKE SAUCE GRILL
   Charcoal bg · ember orange accent · smoky warmth
   ============================================================ */
[data-theme="brutalist"] {
  --font-body:    'Inter Tight', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Archivo Black', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-num:     'Space Grotesk', sans-serif;

  /* charcoal grill — deep blacks with warm brown undertone */
  --bg:        #0f0c0a;
  --surf:      #181310;
  --surf-2:    #201812;
  --surf-3:    #2a1f16;
  --border:    #3a2a1e;
  --border-2:  #5a3d28;

  /* warm bone/parchment text on charcoal */
  --text:      #f5ede0;
  --text-2:    #b89070;
  --text-3:    #6b4e35;

  /* ember orange — the sauce */
  --accent:    #ff6b1a;
  --accent-2:  rgba(255,107,26,.12);
  --accent-3:  rgba(255,107,26,.28);
  --accent-glow: 5px 5px 0 0 #ff6b1a;

  --ok:        #e8a020;   /* golden sear */
  --warn:      #ff6b1a;   /* same as accent — fire */
  --err:       #e03030;   /* overcooked */
  --info:      #c8845a;
  --purple:    #8b4513;   /* saddle brown */

  --radius-sm: 0;
  --radius:    0;
  --radius-lg: 0;
  --shadow:    4px 4px 0 0 #ff6b1a;

  --topbar-h:  72px;

  --tracking-display: -.02em;
  --weight-display:   800;

  /* subtle grill grate lines */
  --grid-bg: repeating-linear-gradient(0deg, transparent 0 23px, rgba(255,107,26,.04) 23px 24px),
             repeating-linear-gradient(90deg, transparent 0 23px, rgba(255,107,26,.04) 23px 24px);
  --grid-size: auto;
}

/* ============================================================
   THEME · CCU · pastel sticker (active)
   Pink → purple gradient · cream cards · coral accent
   Drives the look of ccu-bg.jpg in body::before.
   ============================================================ */
[data-theme="ccu"] {
  --font-body:    'Inter Tight', system-ui, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-num:     'Space Grotesk', sans-serif;

  /* Soft pink-lavender gradient base — the sticker tile sits over this.
     bg itself is the lighter half so the corners (where the mask fades
     to flat) still feel cohesive with the pattern. */
  --bg:        #f9e6f3;
  --surf:      #ffffff;
  --surf-2:    #fdf3fa;
  --surf-3:    #f4e0ef;
  --border:    #e8c8e0;
  --border-2:  #d49ec6;

  /* Burgundy/eggplant text reads on the pastel base without going stark
     black. Lighter values for muted/disabled text. */
  --text:      #2a1530;
  --text-2:    #7a5773;
  --text-3:    #b89bb1;

  /* Coral-pink accent — pulled from the "CCU CLAIMS 4 U" stickers. */
  --accent:    #ff5fa3;
  --accent-2:  rgba(255,95,163,.12);
  --accent-3:  rgba(255,95,163,.30);
  --accent-glow: 4px 4px 0 0 #ff5fa3;

  --ok:        #5dc097;   /* mint */
  --warn:      #f7b955;   /* sticker yellow */
  --err:       #ff5a5a;   /* coral red */
  --info:      #a78bd9;   /* lavender */
  --purple:    #a78bd9;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 4px 18px rgba(167, 139, 217, .25), 0 2px 6px rgba(255, 95, 163, .15);

  --topbar-h:  72px;

  --tracking-display: -.01em;
  --weight-display:   700;

  /* Faint dot grid in the same lavender so it harmonises with the
     pattern instead of fighting it. */
  --grid-bg:
    radial-gradient(circle at 1px 1px, rgba(167, 139, 217, .12) 1px, transparent 0);
  --grid-size: 28px 28px;

  /* Override the body::before mask + vignette tokens so the pattern is
     readable but text on top stays legible. */
  --bg-pattern-mask: radial-gradient(ellipse 120% 95% at 50% 45%, #000 50%, transparent 100%);
  --bg-vignette:
    /* warm spotlight low-centre */
    radial-gradient(70% 55% at 50% 80%, rgba(255, 95, 163, .08), transparent 75%),
    /* lavender halo behind hero */
    radial-gradient(45% 35% at 50% 18%, rgba(167, 139, 217, .10), transparent 72%),
    /* edge fade to base bg for readability */
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(249, 230, 243, .55) 100%);
}

/* ============================================================
   WISERGUY · ink + grey + white, inverted-block aesthetic
   Same token system the Tampermonkey userscript uses, mapped onto the
   website's existing variable names so the React tree doesn't need to
   change classes. mint (--ok) doubles as a highlight accent so headlines
   pop without going off-brand.
   ============================================================ */
[data-theme="wiserguy"] {
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-display: 'LEMON MILK', 'Arial Narrow', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', ui-monospace, monospace;
  --font-num:     'JetBrains Mono', ui-monospace, monospace;

  --bg:        #0b0b0c;
  --surf:      #0e0e10;
  --surf-2:    #161618;
  --surf-3:    #242427;
  --border:    rgba(255,255,255,.12);
  --border-2:  rgba(255,255,255,.22);

  --text:      #ffffff;
  --text-2:    #bcbcc2;
  --text-3:    #717177;

  /* Buttons / outlined surfaces use white as the inverted accent — same
     "invert the block" treatment the userscript header uses. */
  --accent:    #ffffff;
  --accent-2:  rgba(255,255,255,.08);
  --accent-3:  rgba(255,255,255,.22);
  --accent-glow: 0 1px 3px rgba(0,0,0,.5);

  --ok:        #46c98a;
  --warn:      #e0ad44;
  --err:       #ef6f64;
  --info:      #cdd3da;
  --purple:    #cdd3da;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --shadow:    0 10px 40px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.4);

  --topbar-h:  64px;

  --tracking-display: -0.01em;
  --weight-display:   700;

  /* Kill the pink dot grid the ccu theme used. */
  --grid-bg:   none;
  --grid-size: 0 0;

  /* Plain dark surface — no sticker pattern. The vignette is a single
     soft top-right glow so the hero has dimension without competing
     with the foreground type. */
  --bg-pattern-opacity: 0;
  --bg-pattern-image:   none;
  --bg-pattern-mask:    none;
  --bg-vignette:
    radial-gradient(1200px 600px at 75% -10%, #0e141c 0%, #05070a 60%);
}

/* Within the WiserGuy theme, .h1's <span class="accent"> gets the mint
   green from --ok so headlines have a beat of color without painting
   the whole hero green. */
[data-theme="wiserguy"] .h1 .accent { color: var(--ok); }
[data-theme="wiserguy"] .eyebrow {
  background: var(--surf-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ============================================================
   BACKGROUNDS / TEXTURES
   ============================================================ */
.bg-stage {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: var(--grid-bg);
  background-size: var(--grid-size);
}
[data-theme="terminal"] .bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="retro"] .bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(255, 0, 255, 0.025) 3px,
    rgba(255, 0, 255, 0.025) 4px
  );
}
[data-theme="casino"] .bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="brutalist"] .bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 24px, rgba(255,107,26,.025) 24px 25px),
                    repeating-linear-gradient(90deg, transparent 0 24px, rgba(173, 68, 12, 0.316) 24px 25px);
}

/* ============================================================
   LANDING — single-page layout
   ============================================================ */
.landing-hero {
  padding: 72px 0 36px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.landing-hero .h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.02; }
.landing-hero .lead { margin: 14px auto 0; font-size: 16px; color: var(--text-2); max-width: 36ch; }

.landing-steps {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 0 44px;
  position: relative;
  z-index: 1;
}
.landing-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: color-mix(in srgb, var(--surf) 82%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.landing-step-num {
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #0a0608;
  font-size: 12px; font-weight: 800;
  font-family: var(--font-num);
}
.landing-step svg { color: var(--accent); }

.landing-pricing { padding: 0 0 80px; position: relative; z-index: 1; }
.tier-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 18px;
  background: color-mix(in srgb, var(--surf) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  position: relative;
}
.tier-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-3);
  background: color-mix(in srgb, var(--surf) 95%, transparent);
}
.tier-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-2), 0 12px 40px rgba(255, 107, 26, .12);
}
.tier-card .ribbon {
  position: absolute; top: -10px; right: 14px;
  background: var(--accent); color: #0a0608;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 3px;
  text-transform: uppercase;
}

/* ============================================================
   AUTH — signup / signin card layout
   ============================================================ */
.auth-card {
  max-width: 420px;
  padding: 60px 24px;
  margin: 0 auto;
}
.auth-switch {
  background: none; border: 0; padding: 8px 0;
  color: var(--text-2); font-size: 13px;
  cursor: pointer; text-align: center; width: 100%;
}
.auth-switch:hover { color: var(--accent); }
.auth-switch.inline { display: inline; width: auto; padding: 0; }
.tg-code {
  text-align: center;
  font-size: 44px; font-weight: 700; letter-spacing: 10px;
  font-family: var(--font-mono);
  color: var(--accent);
  padding: 12px 0;
}
.err-text { color: var(--err); font-size: 13px; margin: 0; }

/* ============================================================
   LANDING — overlays on top of the body pattern
   The body::before tile + body::after vignette carry the look. This layer
   adds two cinematic touches that only apply on the landing route:
     .glow    — a brighter bottom warmth and an accent-tinted halo behind
                the hero, screen-blended so the pattern shows through
     .ember   — drifting particles for life
   ============================================================ */
.landing-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.landing-bg .glow {
  position: absolute; inset: 0;
  background:
    /* warmer, deeper bottom glow than the global one */
    radial-gradient(70% 55% at 50% 100%, rgba(255, 90, 25, .22), transparent 72%),
    /* hero halo — sits behind the H1 */
    radial-gradient(45% 32% at 50% 22%, rgba(255, 175, 90, .10), transparent 75%),
    /* subtle accent dot top-right */
    radial-gradient(28% 25% at 88% 10%, rgba(0, 232, 240, .06), transparent 70%);
  mix-blend-mode: screen;
}
.landing-bg .ember {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 999px;
  background: #ffd09c;
  box-shadow: 0 0 10px 2px rgba(255, 140, 40, .9),
              0 0 22px 4px rgba(255, 90, 20, .35);
  animation: ember-rise linear infinite;
  will-change: transform, opacity;
}
@keyframes ember-rise {
  0%   { transform: translateY(0) scale(.5);  opacity: 0; }
  15%  { opacity: 1; }
  80%  { opacity: .7; }
  100% { transform: translateY(-340px) scale(.3); opacity: 0; }
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  overflow: hidden;
}
/* When the topbar is hidden (landing / signup), collapse to a single
   full-height row so the main content fills the viewport. */
.app.no-topbar {
  grid-template-rows: 1fr;
}

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surf);
  z-index: 10;
}
[data-theme="brutalist"] .topbar { border-bottom-width: 3px; border-bottom-color: var(--accent); }
[data-theme="casino"]    .topbar { background: linear-gradient(180deg, var(--surf), color-mix(in oklab, var(--surf) 95%, var(--purple) 5%)); }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 14px;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  color: var(--text);
}
[data-theme="casino"] .brand {
  font-size: 20px;
  text-transform: none;
  font-weight: 600;
  font-style: italic;
}
[data-theme="brutalist"] .brand {
  font-size: 18px;
  text-transform: uppercase;
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  background: var(--accent-2);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
}
[data-theme="brutalist"] .brand-mark {
  background: var(--accent);
  color: #0f0c0a;
  border-width: 2px;
  border-color: var(--accent);
}
[data-theme="casino"] .brand-mark {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, white 40%));
  color: #1a0e2a;
  font-weight: 800;
  border: 0;
}

.topbar nav { display: flex; gap: 4px; margin-left: 22px; }
.topbar nav button {
  background: none; border: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: .02em;
}
.topbar nav button:hover { color: var(--text); background: var(--surf-2); }
.topbar nav button.active { color: var(--text); background: var(--surf-3); }
[data-theme="brutalist"] .topbar nav button.active {
  background: var(--accent); color: #0f0c0a;
}
[data-theme="brutalist"] .topbar nav button {
  font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-2);
}
[data-theme="brutalist"] .topbar nav button:hover { color: var(--accent); background: var(--surf-2); }

.top-spacer { flex: 1; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   STAGE / SCROLLING AREA
   ============================================================ */
.stage {
  overflow: auto;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.stage::-webkit-scrollbar { width: 10px; height: 10px; }
.stage::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--weight-display); margin: 0; letter-spacing: var(--tracking-display); }
[data-theme="casino"] h1, [data-theme="casino"] h2, [data-theme="casino"] h3 { letter-spacing: .005em; font-weight: 500; }
[data-theme="brutalist"] h1, [data-theme="brutalist"] h2 { text-transform: uppercase; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
[data-theme="casino"] .eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  letter-spacing: .08em;
  text-transform: none;
  color: var(--accent);
}
[data-theme="brutalist"] .eyebrow {
  background: var(--accent); color: #0f0c0a;
  padding: 4px 10px;
  display: inline-block;
  font-weight: 700;
  font-size: 11px;
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }

/* ============================================================
   CARDS / SURFACES
   ============================================================ */
.card {
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}
[data-theme="brutalist"] .card {
  border-width: 2px;
  border-color: var(--border-2);
  background: var(--surf);
  box-shadow: var(--shadow);
}
[data-theme="casino"] .card {
  background: linear-gradient(180deg, color-mix(in oklab, var(--surf-2) 90%, var(--purple) 10%), var(--surf-2));
  border-color: var(--border);
}
.card.lift { box-shadow: var(--shadow); }
.card.glow { box-shadow: var(--accent-glow); }
.card.accent { border-color: var(--accent-3); }
.card.flat { background: transparent; }

.divider {
  height: 1px; background: var(--border); margin: 12px 0;
}
[data-theme="brutalist"] .divider { background: var(--accent); height: 2px; opacity: .4; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--surf-3);
  color: var(--text);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--surf-3); border-color: var(--accent-3); color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--accent);
  color: #0a0e14;
  border-color: var(--accent);
}
.btn.primary:hover {
  background: color-mix(in oklab, var(--accent) 85%, white 15%);
  border-color: var(--accent);
  color: #0a0e14;
  box-shadow: var(--accent-glow);
}
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surf-2); border-color: var(--border); }
.btn.lg { font-size: 14px; padding: 12px 22px; }
.btn.sm { font-size: 12px; padding: 6px 10px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

[data-theme="casino"] .btn {
  font-family: var(--font-body);
  letter-spacing: .03em;
  border-radius: var(--radius);
}
[data-theme="casino"] .btn.primary {
  background: linear-gradient(135deg, var(--accent), #b48a1f);
  color: #1a0e2a;
  font-weight: 700;
  border: 0;
}
[data-theme="casino"] .btn.primary:hover {
  background: linear-gradient(135deg, #e9c455, var(--accent));
  box-shadow: 0 0 20px rgba(212,175,55,.5);
}

[data-theme="brutalist"] .btn {
  border-width: 2px;
  border-color: var(--border-2);
  background: var(--surf-2);
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
  border-radius: 0;
  box-shadow: 3px 3px 0 0 var(--accent);
}
[data-theme="brutalist"] .btn:hover {
  transform: translate(-1px,-1px);
  box-shadow: 4px 4px 0 0 var(--accent);
  background: var(--surf-3);
  color: var(--accent);
  border-color: var(--accent);
}
[data-theme="brutalist"] .btn:active {
  transform: translate(2px,2px);
  box-shadow: 1px 1px 0 0 var(--accent);
}
[data-theme="brutalist"] .btn.primary {
  background: var(--accent); color: #0f0c0a; border-color: var(--accent);
  box-shadow: 4px 4px 0 0 rgba(139,50,0,.6);
}
[data-theme="brutalist"] .btn.primary:hover {
  box-shadow: 5px 5px 0 0 rgba(139,50,0,.8);
  background: color-mix(in oklab, var(--accent) 85%, white 15%);
  color: #0f0c0a;
}
[data-theme="brutalist"] .btn.ghost {
  box-shadow: none; background: transparent; border-color: transparent;
}
[data-theme="brutalist"] .btn.ghost:hover {
  background: var(--surf-2); color: var(--accent); box-shadow: none; border-color: var(--accent);
}

/* ============================================================
   PILLS / BADGES / CHIPS
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--surf-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  white-space: nowrap;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.pill.live { color: var(--accent); border-color: var(--accent-3); background: var(--accent-2); }
.pill.ok   { color: var(--ok);     border-color: color-mix(in oklab, var(--ok) 50%, transparent); background: color-mix(in oklab, var(--ok) 10%, transparent); }
.pill.warn { color: var(--warn);   border-color: color-mix(in oklab, var(--warn) 50%, transparent); background: color-mix(in oklab, var(--warn) 10%, transparent); }
.pill.err  { color: var(--err);    border-color: color-mix(in oklab, var(--err) 50%, transparent); background: color-mix(in oklab, var(--err) 10%, transparent); }

[data-theme="casino"] .pill { border-radius: 4px; font-family: var(--font-body); font-style: italic; text-transform: none; letter-spacing: .04em; font-size: 11px; }
[data-theme="brutalist"] .pill {
  border-radius: 0;
  background: var(--surf-2);
  color: var(--text-2);
  border: 2px solid var(--border-2);
  font-weight: 700;
}
[data-theme="brutalist"] .pill.ok   { background: color-mix(in oklab, var(--ok) 12%, transparent); color: var(--ok); border-color: var(--ok); }
[data-theme="brutalist"] .pill.warn { background: color-mix(in oklab, var(--warn) 12%, transparent); color: var(--warn); border-color: var(--warn); }
[data-theme="brutalist"] .pill.err  { background: color-mix(in oklab, var(--err) 12%, transparent); color: var(--err); border-color: var(--err); }
[data-theme="brutalist"] .pill.live { background: var(--accent-2); color: var(--accent); border-color: var(--accent); }

/* ============================================================
   FIELDS / INPUTS
   ============================================================ */
.field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
[data-theme="casino"] .field-label {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: .02em;
  font-size: 12px;
  color: var(--text-2);
}
[data-theme="brutalist"] .field-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--accent);
  text-transform: uppercase;
}

.input, .select, .textarea {
  width: 100%;
  background: var(--surf);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-2);
}
[data-theme="brutalist"] .input,
[data-theme="brutalist"] .select {
  border-width: 2px; border-color: var(--border-2);
  background: var(--surf-2);
  font-family: var(--font-mono);
  color: var(--text);
}
[data-theme="brutalist"] .input:focus {
  box-shadow: 3px 3px 0 0 var(--accent);
  border-color: var(--accent);
  outline: 0;
}

.input.error {
  border-color: var(--err);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--err) 18%, transparent);
}

.help { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.help.err { color: var(--err); }

/* ============================================================
   STATS / NUMBERS
   ============================================================ */
.stat {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surf-2);
}
[data-theme="brutalist"] .stat { border-width: 2px; border-color: var(--border-2); box-shadow: var(--shadow); background: var(--surf); }
.stat .k {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
[data-theme="brutalist"] .stat .k { font-family: var(--font-body); font-weight: 700; }
[data-theme="casino"]    .stat .k { font-family: var(--font-body); font-style: italic; text-transform: none; letter-spacing: .04em; color: var(--text-2); }
.stat .n {
  font-family: var(--font-num);
  font-size: 32px;
  font-weight: var(--weight-display);
  letter-spacing: -.02em;
  color: var(--text);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
[data-theme="casino"] .stat .n { font-weight: 500; letter-spacing: 0; }
[data-theme="brutalist"] .stat .n { font-weight: 800; }
.stat .d { font-size: 11px; color: var(--ok); font-family: var(--font-mono); margin-top: 2px; }
.stat .d.down { color: var(--err); }

/* ============================================================
   TABLES / LOGS
   ============================================================ */
.log {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surf);
}
[data-theme="brutalist"] .log { border-width: 2px; border-color: var(--border-2); }
.log-row {
  display: grid;
  grid-template-columns: 80px 80px 1fr 80px 60px;
  padding: 8px 14px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.log-row:last-child { border-bottom: 0; }
.log-row.head {
  background: var(--surf-3);
  color: var(--text-3);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.log-row.appear { animation: rowIn .35s ease both; background: var(--accent-2); }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.log-row .ok { color: var(--ok); }
.log-row .err { color: var(--err); }
.log-row .pending { color: var(--warn); }

/* ============================================================
   STEPS
   ============================================================ */
.steps { display: flex; align-items: center; gap: 0; }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.step .n {
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
}
.step.done { color: var(--text); }
.step.done .n { background: var(--accent); color: #07090c; border-color: var(--accent); }
.step.active { color: var(--text); }
.step.active .n { background: var(--accent-2); color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.step-bar { width: 32px; height: 1px; background: var(--border); margin: 0 8px; }
.step.done + .step-bar { background: var(--accent); }
[data-theme="brutalist"] .step .n { border-width: 2px; border-color: var(--border-2); border-radius: 0; }
[data-theme="brutalist"] .step.done .n { background: var(--accent); color: #0f0c0a; border-color: var(--accent); }
[data-theme="brutalist"] .step.active .n { background: var(--accent-2); color: var(--accent); border-color: var(--accent); }

/* ============================================================
   ANIMATIONS / TRANSITIONS
   ============================================================ */
.fade-in { animation: fadeIn .35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.scale-in { animation: scaleIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.93); }
}
.spin { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* glow ring for "live" things */
.glow-ring {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

/* ============================================================
   LANDING / HERO
   ============================================================ */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 72px 20px 40px;
  max-width: 820px;
  margin: 0 auto;
}
.hero .lead { margin-left: auto; margin-right: auto; }
@media (max-width: 980px) { .hero { padding: 40px 16px 24px; } }

.h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.02em;
  font-weight: var(--weight-display);
  color: var(--text);
}
[data-theme="terminal"] .h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
[data-theme="casino"]   .h1 { font-style: italic; font-weight: 500; letter-spacing: -.005em; }
[data-theme="brutalist"] .h1 { text-transform: uppercase; line-height: .92; font-weight: 800; }

.h1 .accent { color: var(--accent); }
[data-theme="brutalist"] .h1 .accent {
  background: var(--accent); color: white;
  padding: 2px 10px;
  display: inline-block;
}
[data-theme="casino"] .h1 .accent {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 50%, white 50%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 18px;
  color: var(--text-2);
  margin-top: 18px;
  max-width: 52ch;
  line-height: 1.5;
}
[data-theme="brutalist"] .lead { color: var(--text); font-weight: 500; }

/* path cards */
.path-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 32px;
}
.path-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surf-2);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
}
.path-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--accent-glow); }
.path-card.selected { border-color: var(--accent); box-shadow: var(--accent-glow); background: color-mix(in oklab, var(--surf-2) 70%, var(--accent-2)); }
.path-card.featured { background: linear-gradient(180deg, var(--accent-2), var(--surf-2)); }
[data-theme="brutalist"] .path-card { border-width: 2px; border-color: var(--border-2); box-shadow: var(--shadow); }
[data-theme="brutalist"] .path-card.selected { background: var(--surf-2); border-color: var(--accent); box-shadow: 6px 6px 0 0 var(--accent); }
[data-theme="brutalist"] .path-card:hover { transform: translate(-2px,-2px); border-color: var(--accent); box-shadow: 7px 7px 0 0 var(--accent); }

.ribbon {
  position: absolute; top: -10px; left: 16px;
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px;
  background: var(--accent); color: #07090c;
  border-radius: 999px;
}
[data-theme="casino"] .ribbon { font-family: var(--font-body); font-style: italic; letter-spacing: 0; text-transform: none; font-size: 11px; border-radius: 4px; }
[data-theme="brutalist"] .ribbon { background: var(--accent); color: #0f0c0a; border-radius: 0; padding: 4px 10px; }

/* ============================================================
   LAYOUTS
   ============================================================ */
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.stack > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 780px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   DASHBOARD STRUCTURE
   ============================================================ */
.dash {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 22px 0;
}
@media (max-width: 980px) { .dash { grid-template-columns: 1fr; } }
.sidebar {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  height: fit-content;
  position: sticky;
  top: 12px;
}
[data-theme="brutalist"] .sidebar { border-width: 2px; border-color: var(--border-2); box-shadow: var(--shadow); }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.sidebar .nav-item:hover { background: var(--surf-2); color: var(--text); }
.sidebar .nav-item.active { background: var(--accent-2); color: var(--accent); }
[data-theme="brutalist"] .sidebar .nav-item.active { background: var(--accent-2); color: var(--accent); border-left: 3px solid var(--accent); }
.sidebar .group-label {
  font-family: var(--font-display);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-3);
  padding: 12px 10px 4px;
}

/* code feed item */
.feed-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.feed-row:last-child { border-bottom: 0; }
.feed-row .code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.feed-row .plat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  background: var(--surf-3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
[data-theme="brutalist"] .feed-row .plat { border: 1px solid var(--border-2); }

/* extension popup card */
.ext-popup {
  width: 360px;
  background: var(--surf);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 6px 14px rgba(0,0,0,.4);
}
[data-theme="brutalist"] .ext-popup { border-width: 2px; border-color: var(--border-2); box-shadow: var(--shadow); }
.ext-popup .ext-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surf);
}
.ext-popup .ext-body { padding: 14px; }

/* link row */
.link-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surf-2);
  border: 1px solid var(--border);
}
[data-theme="brutalist"] .link-row { border-width: 2px; border-color: var(--border-2); }
.link-row + .link-row { margin-top: 8px; }

/* ============================================================
   PAGE TRANSITION HELPERS
   ============================================================ */
.screen-in  { animation: screenIn .4s cubic-bezier(.2,.8,.2,1) both; }
.screen-out { animation: screenOut .25s cubic-bezier(.2,.8,.2,1) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes screenOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* toast */
.toast-wrap {
  position: fixed; right: 22px; bottom: 22px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px;
  border: 1px solid var(--accent-3);
  background: var(--surf);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  max-width: 380px;
  animation: scaleIn .25s ease both;
}
[data-theme="brutalist"] .toast { border-width: 2px; border-color: var(--accent); }
.toast.ok { border-color: color-mix(in oklab, var(--ok) 60%, transparent); }

/* terminal screen scanlines */
[data-theme="terminal"] .scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,232,240,.04) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

/* casino shimmer */
[data-theme="casino"] .shimmer {
  background: linear-gradient(110deg, transparent 30%, rgba(212,175,55,.15) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* big call-out */
.callout {
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surf);
  font-size: 13px;
  color: var(--text-2);
}
[data-theme="brutalist"] .callout { border: 2px solid var(--border-2); background: var(--surf-2); color: var(--text-2); }
[data-theme="casino"]    .callout { border: 1px solid var(--border-2); background: linear-gradient(180deg, var(--surf-2), color-mix(in oklab, var(--surf-2) 90%, var(--accent) 10%)); font-style: italic; color: var(--text-2); }
[data-theme="retro"]     .callout { border: 2px solid var(--border-2); background: var(--surf-2); color: var(--text-2); }

/* sparkline */
.spark { width: 100%; height: 40px; }

/* skeleton */
.skel {
  background: linear-gradient(90deg, var(--surf-2) 0%, var(--surf-3) 50%, var(--surf-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease infinite;
  border-radius: var(--radius-sm);
  height: 10px;
}

/* ============================================================
   THEME · RETRO — component overrides
   ============================================================ */

/* topbar */
[data-theme="retro"] .topbar {
  background: var(--surf);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 2px 0 0 var(--accent), 0 4px 0 0 rgba(255,0,255,.2);
}
[data-theme="retro"] .brand {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 13px;
  text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}
[data-theme="retro"] .brand-mark {
  background: var(--accent);
  color: #0a0010;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent), inset 0 0 6px rgba(255,255,255,.2);
  font-weight: 800;
}
[data-theme="retro"] .topbar nav button {
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-3);
  border-radius: 0;
}
[data-theme="retro"] .topbar nav button:hover { color: var(--accent); background: var(--accent-2); }
[data-theme="retro"] .topbar nav button.active {
  color: var(--accent);
  background: var(--accent-2);
  box-shadow: inset 0 -2px 0 0 var(--accent);
}

/* cards */
[data-theme="retro"] .card {
  border: 2px solid var(--border-2);
  background: var(--surf-2);
  box-shadow: 4px 4px 0 0 var(--border-2);
}
[data-theme="retro"] .card.lift { box-shadow: 4px 4px 0 0 var(--accent); border-color: var(--accent-3); }
[data-theme="retro"] .card.glow { box-shadow: var(--accent-glow), 4px 4px 0 0 var(--accent); }
[data-theme="retro"] .divider { background: var(--border-2); height: 2px; }

/* buttons */
[data-theme="retro"] .btn {
  border: 2px solid var(--border-2);
  background: var(--surf-3);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  box-shadow: 3px 3px 0 0 var(--border-2);
  transition: transform .06s, box-shadow .06s;
}
[data-theme="retro"] .btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 3px 3px 0 0 var(--accent);
  background: var(--surf-3);
}
[data-theme="retro"] .btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 var(--accent);
}
[data-theme="retro"] .btn.primary {
  background: var(--accent);
  color: #0a0010;
  border-color: var(--accent);
  box-shadow: 3px 3px 0 0 #880088, 0 0 18px rgba(255,0,255,.4);
}
[data-theme="retro"] .btn.primary:hover {
  background: color-mix(in oklab, var(--accent) 80%, white 20%);
  box-shadow: 4px 4px 0 0 #880088, 0 0 28px rgba(255,0,255,.6);
  color: #0a0010;
}
[data-theme="retro"] .btn.primary:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 #880088;
}
[data-theme="retro"] .btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
[data-theme="retro"] .btn.ghost:hover { background: var(--accent-2); border-color: var(--border-2); box-shadow: none; color: var(--accent); }

/* pills */
[data-theme="retro"] .pill {
  border-radius: 0;
  border: 2px solid var(--border-2);
  background: var(--surf-3);
  color: var(--text-2);
  font-size: 9px;
  letter-spacing: .14em;
}
[data-theme="retro"] .pill.live { color: var(--accent); border-color: var(--accent-3); background: var(--accent-2); text-shadow: 0 0 8px var(--accent); }
[data-theme="retro"] .pill.ok   { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 50%, transparent); background: color-mix(in oklab, var(--ok) 8%, transparent); }
[data-theme="retro"] .pill.warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 50%, transparent); background: color-mix(in oklab, var(--warn) 8%, transparent); }
[data-theme="retro"] .pill.err  { color: var(--err); border-color: color-mix(in oklab, var(--err) 50%, transparent); background: color-mix(in oklab, var(--err) 8%, transparent); }

/* inputs */
[data-theme="retro"] .input,
[data-theme="retro"] .select {
  border: 2px solid var(--border-2);
  background: var(--surf);
  color: var(--text);
}
[data-theme="retro"] .input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-2), 0 0 12px rgba(255,0,255,.3);
}

/* field label */
[data-theme="retro"] .field-label {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}

/* stats */
[data-theme="retro"] .stat {
  border: 2px solid var(--border-2);
  background: var(--surf-2);
  box-shadow: 4px 4px 0 0 var(--border-2);
}
[data-theme="retro"] .stat .k {
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--text-3);
}
[data-theme="retro"] .stat .n {
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent);
}

/* eyebrow */
[data-theme="retro"] .eyebrow {
  color: var(--ok);
  text-shadow: 0 0 10px var(--ok);
  font-size: 10px;
  letter-spacing: .22em;
}

/* headings */
[data-theme="retro"] h1,
[data-theme="retro"] h2,
[data-theme="retro"] h3 {
  text-transform: uppercase;
  letter-spacing: .1em;
}
[data-theme="retro"] .h1 { letter-spacing: .06em; }
[data-theme="retro"] .h1 .accent {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent);
}

/* path cards */
[data-theme="retro"] .path-card {
  border: 2px solid var(--border-2);
  background: var(--surf-2);
  box-shadow: 4px 4px 0 0 var(--border-2);
  transition: transform .08s, box-shadow .08s, border-color .08s;
}
[data-theme="retro"] .path-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--accent);
  box-shadow: 6px 6px 0 0 var(--accent);
}
[data-theme="retro"] .path-card.selected {
  border-color: var(--accent);
  box-shadow: 6px 6px 0 0 var(--accent), 0 0 20px rgba(255,0,255,.3);
  background: color-mix(in oklab, var(--surf-2) 75%, var(--accent-2));
}
[data-theme="retro"] .path-card.featured {
  background: linear-gradient(180deg, var(--accent-2), var(--surf-2));
}
[data-theme="retro"] .ribbon {
  background: var(--accent);
  color: #0a0010;
  border-radius: 0;
  font-size: 9px;
  letter-spacing: .14em;
  text-shadow: none;
  box-shadow: 2px 2px 0 0 #880088;
}

/* steps */
[data-theme="retro"] .step .n {
  border: 2px solid var(--border-2);
  border-radius: 0;
}
[data-theme="retro"] .step.done .n { background: var(--ok); color: #0a0010; border-color: var(--ok); box-shadow: 0 0 8px var(--ok); }
[data-theme="retro"] .step.active .n { background: var(--accent-2); color: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* sidebar */
[data-theme="retro"] .sidebar {
  border: 2px solid var(--border-2);
  box-shadow: 4px 4px 0 0 var(--border-2);
}
[data-theme="retro"] .sidebar .nav-item.active {
  background: var(--accent-2);
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}
[data-theme="retro"] .sidebar .group-label {
  color: var(--text-3);
  font-size: 8px;
  letter-spacing: .22em;
}

/* logs */
[data-theme="retro"] .log {
  border: 2px solid var(--border-2);
}
[data-theme="retro"] .log-row.head {
  background: var(--surf-3);
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
}

/* link row */
[data-theme="retro"] .link-row {
  border: 2px solid var(--border-2);
}

/* toast */
[data-theme="retro"] .toast {
  border: 2px solid var(--accent-3);
  box-shadow: 4px 4px 0 0 var(--accent), var(--accent-glow);
}

/* scanlines over everything */
[data-theme="retro"] .scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.15) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  z-index: 2;
}

/* ============================================================
   PRICING-LED HERO (Direction B) — split hero with buy module
   ============================================================ */
.hero-split {
  display: flex;
  gap: 32px;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 0 auto;
  max-width: 1040px;
  padding: 60px 20px 36px;
  position: relative;
  z-index: 1;
}
.hero-split .hero-left { flex: 1 1 380px; min-width: 0; }
.hero-split .hero-buy  { flex: 0 1 400px; min-width: 0; }
.hero-split .hero-left .h1 {
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.05;
  margin: 12px 0 16px;
}
.hero-split .hero-left .lead {
  font-size: 15.5px; line-height: 1.6; color: var(--text-2);
  max-width: 46ch;
}
.hero-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.hero-note {
  font-size: 13.5px; line-height: 1.5;
  padding-left: 14px; position: relative;
  color: var(--text-2);
}
.hero-note::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 720px) {
  .hero-split { gap: 24px; padding: 36px 16px 24px; }
  .hero-split .hero-buy { flex: 1 1 100%; }
}

/* the buy module card */
.hero-buy {
  border: 1px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 20px;
  background: color-mix(in srgb, var(--surf) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 50px rgba(0,0,0,.35), var(--accent-glow);
  display: flex; flex-direction: column;
}
.hero-buy .buy-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.hero-buy .buy-title { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.hero-buy .buy-step  { font-size: 11px; color: var(--text-2); letter-spacing: .06em; text-transform: uppercase; }

/* 3-way segmented toggle */
.buy-seg {
  display: flex;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surf-2);
}
.buy-seg button {
  flex: 1; padding: 9px 6px;
  background: transparent; color: var(--text-2);
  border: none; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; letter-spacing: .02em;
  transition: background .12s ease, color .12s ease;
}
.buy-seg button + button { border-left: 1px solid var(--border-2); }
.buy-seg button:hover { color: var(--text); }
.buy-seg button.on {
  background: var(--accent); color: #0a0608;
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}

/* tier options inside buy module */
.buy-set { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.buy-opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surf-2);
  cursor: pointer;
  text-align: left;
  transition: border-color .12s ease, background .12s ease;
}
.buy-opt:hover { border-color: var(--accent-3); }
.buy-opt.sel  { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-2); }
.buy-opt .lbl { display: flex; flex-direction: column; gap: 2px; }
.buy-opt .name { font-size: 13.5px; font-weight: 600; }
.buy-opt .blurb { font-size: 11.5px; color: var(--text-2); line-height: 1.35; }
.buy-opt .price {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: var(--tracking-display);
  white-space: nowrap; margin-left: 12px;
}
.buy-opt .price.free { color: var(--ok); }

.buy-foot { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.buy-trust { font-size: 11.5px; text-align: center; color: var(--text-2); }

/* HOW IT WORKS — inverted dark block */
.how-block {
  background: #07060a;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 36px 28px;
  margin: 64px auto 0;
  max-width: 1000px;
}
.how-block .how-head { text-align: center; margin-bottom: 24px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.how-card {
  background: color-mix(in srgb, var(--surf) 70%, #000);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  position: relative;
}
.how-card .num {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  color: var(--accent); line-height: 1;
  letter-spacing: var(--tracking-display);
}
.how-card strong { display: block; font-size: 15px; margin: 10px 0 6px; }
.how-card p { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0; }

/* ============================================================
   PRICING SECTION — three-card layout (Userscript / API.us / API.com)
   ============================================================ */
.pricing-section {
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 20px;
}
.pricing-header { text-align: center; margin-bottom: 28px; }
.pricing-header h2 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  color: var(--text);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-2);
  border-top: 3px solid var(--plan-accent, var(--accent));
  border-radius: var(--radius);
  padding: 22px 20px;
  background: color-mix(in srgb, var(--surf) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 50px rgba(0,0,0,.35);
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease;
}
.pricing-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-3);
}
.pricing-card-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px;
}
.pricing-card-head > div { min-width: 0; }
.pricing-card-head strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  color: var(--text);
}
.pricing-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--plan-accent, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--plan-accent, var(--accent)) 35%, transparent);
  flex-shrink: 0;
}

.pricing-covers {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--plan-accent, var(--accent)) 35%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--plan-accent, var(--accent)) 6%, transparent);
}
.covers-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.covers-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.covers-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600;
  color: var(--text);
  padding: 3px 8px;
  border: 1px solid var(--border-2);
  border-radius: 3px;
  background: var(--surf-2);
}
.covers-chip.bonus {
  border-style: dashed;
  color: var(--text-2);
}
.covers-chip-tag {
  font-family: var(--font-body);
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--warn, var(--accent));
}
.covers-note {
  font-size: 11.5px; line-height: 1.5;
  color: var(--text-2);
  margin: 4px 0 0;
}
.covers-note strong { color: var(--text); }

.pricing-tiers {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
  flex: 1;
}
.pricing-tier {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surf-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.pricing-tier:hover {
  border-color: var(--plan-accent, var(--accent-3));
  transform: translateY(-1px);
}
.pricing-tier.featured {
  border-color: var(--plan-accent, var(--accent));
  background: color-mix(in srgb, var(--plan-accent, var(--accent)) 8%, var(--surf-2));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--plan-accent, var(--accent)) 25%, transparent);
}
.tier-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tier-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.tier-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--plan-accent, var(--accent));
  color: #0a0608;
  padding: 2px 6px; border-radius: 3px;
}
.tier-blurb {
  font-size: 11.5px; line-height: 1.4;
  color: var(--text-2);
  margin: 0;
}
.tier-price {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: var(--tracking-display);
  color: var(--text);
  white-space: nowrap;
}
.tier-price.free { color: var(--ok); }

.pricing-cta { margin-top: auto; }

@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   WHAT YOU GET — feature grid
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.feature-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 22px 22px;
  background: color-mix(in srgb, var(--surf) 88%, transparent);
  color: var(--text);
  text-align: left;
  transition: transform .15s ease, border-color .15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-3);
}
.feature-card h3 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  color: var(--text);
}

/* ============================================================
   MANIFESTO — soft callout card (CCU only)
   ============================================================ */
.manifesto-card {
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  background: color-mix(in srgb, var(--surf) 90%, transparent);
  color: var(--text);
}

/* ============================================================
   FAQ — collapsible cards
   ============================================================ */
.faq-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  background: color-mix(in srgb, var(--surf) 88%, transparent);
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s ease;
}
.faq-card:hover { border-color: var(--accent-3); }
.faq-card[open] { border-color: var(--accent-3); }
.faq-card summary { color: var(--text); }
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::after {
  content: "+";
  float: right;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-2);
  transition: transform .15s ease;
}
.faq-card[open] summary::after { content: "−"; }

/* ============================================================
   MANIFEST · single-document landing layout
   Pricing-forward "system console" treatment. No card chrome,
   no rounded containers — type, rules, and density carry the
   identity. Lives in its own namespace so it doesn't collide
   with the dashboard panels.
   ============================================================ */

.page-manifest body { background: var(--bg); }

.manifest {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* HEADER — subhead + status pip on one line. Tightened after the
   wordmark was removed — vertical-align center now fits the
   single-line content cleanly. */
.manifest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-2);
}
.manifest-mark { display: flex; flex-direction: column; gap: 4px; }
.manifest-wm {
  font-family: "LEMON MILK", sans-serif;
  font-size: 28px;
  letter-spacing: 0.16em;
  color: var(--text);
  line-height: 1;
}
.manifest-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
}
.manifest-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-2);
}
.manifest-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: manifestPulse 2.4s ease-in-out infinite;
}
@keyframes manifestPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* SECTIONS — every section opens with a rule label that runs to
   the right edge. This is the structural device the whole page hangs
   on; no other dividers, no card outlines. */
.manifest-section { padding-top: 28px; }
.manifest-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.manifest-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* LAST 24 H — three big monospace stats in a row. Numbers do the
   work; labels are quiet. The accent color shows up here once. */
.manifest-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.manifest-stat { display: flex; flex-direction: column; gap: 6px; }
.manifest-stat-num {
  font-size: 36px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
  font-feature-settings: "tnum";
}
.manifest-stat-unit {
  font-size: 16px;
  color: var(--text-3);
  margin-left: 2px;
  letter-spacing: 0;
  font-weight: 500;
}
.manifest-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
}

/* ACCESS — line items, not cards. Two passes per row in a small
   monospace button. Hover invert is the only state cue. */
.manifest-access {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.manifest-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.manifest-row-head { display: flex; flex-direction: column; gap: 4px; }
.manifest-row-label {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.manifest-row-blurb {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.manifest-row-passes { display: flex; gap: 8px; }
.manifest-pass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 2px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.manifest-pass:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-2);
}
.manifest-pass-dur {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.manifest-pass:hover .manifest-pass-dur { color: var(--text-2); }
.manifest-pass-price {
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}
.manifest-pass.is-featured {
  border-color: var(--accent);
  color: var(--text);
}
.manifest-pass.is-featured .manifest-pass-price { color: var(--accent); }

.manifest-note {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}
.manifest-note strong { color: var(--text-2); font-weight: 500; }

/* MANIFESTO (CCU only) — quiet, set in body face. */
.manifest-manifesto {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  max-width: 60ch;
}

/* PIPELINE — replaces the "How it works 1/2/3". Stages on the
   left, notes on the right, arrows as the only ornament. */
.manifest-pipeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manifest-pipe-row {
  display: grid;
  grid-template-columns: 20px 110px 1fr;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
}
.manifest-pipe-arrow {
  color: var(--accent);
  font-weight: 700;
}
.manifest-pipe-stage {
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.manifest-pipe-note { color: var(--text-2); }
.manifest-pipe-foot {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-body);
}
.manifest-pipe-foot strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-feature-settings: "tnum";
}

/* FAQ — Q/A definition list. No accordion, all visible.
   Marker letters stay aligned in a left gutter so the column
   reads like a printed Q&A. */
.manifest-faq {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.manifest-faq-q,
.manifest-faq-a {
  margin: 0;
  position: relative;
  padding-left: 38px;
  font-size: 13px;
  line-height: 1.65;
}
.manifest-faq-q { color: var(--text); font-weight: 500; }
.manifest-faq-a { color: var(--text-2); margin-bottom: 2px; }
/* Marker (Q. / A.) sits in the left gutter via the inline span. Pulling
   it out with absolute positioning would mean assuming a fixed line
   height; keeping it inline + negative margin keeps the marker visually
   in the gutter while letting the body flow as normal inline text
   (so <strong>, links, etc. don't break to new lines). */
.manifest-faq-marker {
  position: absolute;
  left: 0;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.manifest-faq-a strong { color: var(--text); font-weight: 500; }

/* FOOTER — single tight line. */
.manifest-foot {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
}
.manifest-foot a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border-2);
  transition: all 0.14s ease;
}
.manifest-foot a:hover { color: var(--accent); border-color: var(--accent); }
.manifest-foot strong { color: var(--ok); font-weight: 500; }
.manifest-foot-sep { color: var(--border-2); }

/* RESPONSIVE — at narrow widths, the access rows stack and the
   pipeline collapses. Stats keep their grid but shrink. */
@media (max-width: 640px) {
  .manifest { padding: 32px 18px 56px; font-size: 13px; }
  .manifest-head { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 20px; }
  .manifest-wm { font-size: 22px; }
  .manifest-stats { grid-template-columns: 1fr; gap: 22px; }
  .manifest-stat-num { font-size: 30px; }
  .manifest-row { grid-template-columns: 1fr; gap: 10px; }
  .manifest-row-passes { flex-wrap: wrap; }
  .manifest-pipe-row { grid-template-columns: 16px 1fr; }
  .manifest-pipe-stage { display: block; grid-column: 2; }
  .manifest-pipe-note { grid-column: 2; }
  .manifest-foot { flex-wrap: wrap; }
}

/* GET STARTED — two paths (userscript / api), each numbered. The numbers
   are real here (do step 1, then 2, then 3), so the numbered marker is
   honest information, not decoration. */
.manifest-tut {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.manifest-tut-path { display: flex; flex-direction: column; gap: 14px; }
.manifest-tut-head {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}
.manifest-tut-marker { color: var(--accent); font-weight: 700; }
.manifest-tut-steps {
  list-style: none;
  counter-reset: tut;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.manifest-tut-steps li {
  counter-increment: tut;
  position: relative;
  padding-left: 36px;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.manifest-tut-steps li::before {
  content: counter(tut, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.manifest-tut-steps li a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-3);
  transition: border-color 0.14s ease;
}
.manifest-tut-steps li a:hover { border-color: var(--accent); }
.manifest-tut-steps li strong { color: var(--text); font-weight: 500; }
.manifest-tut-foot {
  margin: 4px 0 0 36px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-3);
  font-style: italic;
}
@media (max-width: 640px) {
  .manifest-tut-foot { margin-left: 0; }
}

/* TUTORIAL PAGE — extended walkthrough. Reuses .manifest-tut-* base
   from the landing's get-started block, adds longer-form treatments
   for the full /tutorial page. */
.manifest-back {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 2px;
  transition: all 0.14s ease;
}
.manifest-back:hover { color: var(--accent); border-color: var(--accent); }

.manifest-tut-intro {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 60ch;
}

/* Longer step variant — step body can wrap into multiple lines and
   include sub-lists or callouts. Inherits absolute-positioned counter
   from the base .manifest-tut-steps li. */
.manifest-tut-long li {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  padding-bottom: 14px;
}
.manifest-tut-long li:not(:last-child) {
  border-bottom: 1px dashed var(--border-2);
  margin-bottom: 14px;
}
.manifest-tut-long li strong { color: var(--text); font-weight: 600; }
.manifest-tut-long li em { color: var(--text); font-style: normal; background: var(--accent-2); padding: 0 4px; border-radius: 2px; font-family: var(--font-mono); font-size: 12.5px; }
.manifest-tut-long li code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surf-2);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--text);
}

.manifest-tut-sub {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-2);
}
.manifest-tut-sub li {
  display: list-item;
  padding-left: 14px;
  position: relative;
  border: none;
  margin: 0;
  padding-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
}
.manifest-tut-sub li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-3);
  font-weight: 700;
}
.manifest-tut-sub li a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-3); }
.manifest-tut-sub li a:hover { border-color: var(--accent); }

.manifest-tut-callout {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--surf-2);
  border-left: 2px solid var(--warn);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.manifest-tut-callout em { background: transparent; padding: 0; color: var(--text); font-style: italic; font-family: var(--font-body); font-size: inherit; }

.manifest-tut-note {
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px dashed var(--border-2);
  background: color-mix(in srgb, var(--surf) 60%, transparent);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.manifest-tut-note strong { color: var(--text); font-weight: 600; }
.manifest-tut-note em { font-style: italic; color: var(--text); }
