/* ── Gnosis Memory — Shared Stylesheet ── */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-gutter: stable; }


/* ══════════════════════════════════════════════════════════════════════════
   THEME SYSTEM — OKLCH + mode/lum
   data-theme = accent color (matrix, purple, amber, cyan, rose, slate, navy)
   data-mode  = light | dark via --mode (0=dark, 1=light)
   --lum-bg / --lum-tx = luminosity slider offsets (set by JS)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Matrix Phosphor (default dark) ── */
:root, [data-theme="matrix"] {
  color-scheme: dark;
  --mode: 0;
  --lum-bg: 0;
  --lum-tx: 0;
  --bg:            oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.012 145);
  --bg-subtle:     oklch(calc(0.20 + var(--mode) * 0.76 + var(--lum-bg)) 0.022 150);
  --surface:       oklch(calc(0.22 + var(--mode) * 0.73 + var(--lum-bg)) 0.027 150);
  --surface-hover: oklch(calc(0.26 + var(--mode) * 0.66 + var(--lum-bg)) 0.037 145);
  --border:        oklch(calc(0.29 + var(--mode) * 0.58 + var(--lum-bg)) 0.041 152);
  --border-hover:  oklch(calc(0.40 + var(--mode) * 0.37 + var(--lum-bg)) 0.060 155);
  --text:          oklch(calc(0.95 - var(--mode) * 0.77 + var(--lum-tx)) 0.014 146);
  --text-muted:    oklch(calc(0.87 - var(--mode) * 0.55 + var(--lum-tx)) 0.024 154);
  --text-dim:      oklch(calc(0.65 - var(--mode) * 0.10 + var(--lum-tx)) 0.066 154);
  --accent:        oklch(calc(0.70 - var(--mode) * 0.10) 0.149 162);
  --accent-light:  oklch(calc(0.77 - var(--mode) * 0.08) 0.154 163);
  --accent-hover:  oklch(calc(0.60 - var(--mode) * 0.09) 0.127 163);
  --code-bg:       oklch(calc(0.18 + var(--mode) * 0.77 + var(--lum-bg)) 0.022 150);
  --nav-bg:        oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.012 145 / 0.92);
  --accent-glow:   oklch(0.70 0.149 162 / calc(0.18 - var(--mode) * 0.08));
  --accent-border: oklch(calc(0.34 + var(--mode) * 0.26) calc(0.052 + var(--mode) * 0.075) 162 / calc(1 - var(--mode) * 0.80));
  --accent-shadow: oklch(0.70 0.149 162 / calc(0.15 - var(--mode) * 0.07));
  --accent-underline: oklch(0.77 0.154 163 / calc(0.40 - var(--mode) * 0.10));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42)),
                   0 0 1px oklch(0.70 0.149 162 / calc(0.20 * (1 - var(--mode))));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50)),
                   0 0 1px oklch(0.70 0.149 162 / calc(0.25 * (1 - var(--mode))));
  --dot-color:     oklch(calc(0.70 * (1 - var(--mode))) calc(0.149 * (1 - var(--mode))) 162 / calc(0.06 - var(--mode) * 0.03));
  --cyan:          #06b6d4;
  --emerald:       #10b981;
  --amber:         #f59e0b;
  --radius:        12px;
  --radius-sm:     8px;
}

/* ── Original Purple ── */
[data-theme="purple"] {
  --bg:            oklch(calc(0.13 + var(--mode) * 0.85 + var(--lum-bg)) 0.019 283);
  --bg-subtle:     oklch(calc(0.18 + var(--mode) * 0.78 + var(--lum-bg)) 0.029 283);
  --surface:       oklch(calc(0.20 + var(--mode) * 0.75 + var(--lum-bg)) 0.043 290);
  --surface-hover: oklch(calc(0.24 + var(--mode) * 0.68 + var(--lum-bg)) 0.060 290);
  --border:        oklch(calc(0.28 + var(--mode) * 0.59 + var(--lum-bg)) 0.068 291);
  --border-hover:  oklch(calc(0.35 + var(--mode) * 0.42 + var(--lum-bg)) 0.094 292);
  --text:          oklch(calc(0.97 - var(--mode) * 0.79 + var(--lum-tx)) 0.007 248);
  --text-muted:    oklch(calc(0.87 - var(--mode) * 0.55 + var(--lum-tx)) 0.020 253);
  --text-dim:      oklch(calc(0.63 - var(--mode) * 0.08 + var(--lum-tx)) 0.036 254);
  --accent:        oklch(calc(0.54 - var(--mode) * 0.05) 0.247 293);
  --accent-light:  oklch(calc(0.71 - var(--mode) * 0.17) 0.159 294);
  --accent-hover:  oklch(calc(0.49 - var(--mode) * 0.06) 0.241 293);
  --code-bg:       oklch(calc(0.16 + var(--mode) * 0.79 + var(--lum-bg)) 0.033 288);
  --nav-bg:        oklch(calc(0.13 + var(--mode) * 0.85 + var(--lum-bg)) 0.019 283 / 0.92);
  --accent-glow:   oklch(0.54 0.247 293 / calc(0.18 - var(--mode) * 0.08));
  --accent-border: oklch(calc(0.29 + var(--mode) * 0.20) calc(0.085 + var(--mode) * 0.156) 293 / calc(1 - var(--mode) * 0.80));
  --accent-shadow: oklch(0.54 0.247 293 / calc(0.15 - var(--mode) * 0.07));
  --accent-underline: oklch(0.71 0.159 294 / calc(0.40 - var(--mode) * 0.15));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42)),
                   0 0 1px oklch(0.54 0.247 293 / calc(0.20 * (1 - var(--mode))));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50)),
                   0 0 1px oklch(0.54 0.247 293 / calc(0.25 * (1 - var(--mode))));
  --dot-color:     oklch(calc(0.54 * (1 - var(--mode))) calc(0.247 * (1 - var(--mode))) 293 / calc(0.05 - var(--mode) * 0.02));
}

/* ── Amber Terminal ── */
[data-theme="amber"] {
  --bg:            oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.012 89);
  --bg-subtle:     oklch(calc(0.20 + var(--mode) * 0.76 + var(--lum-bg)) 0.010 67);
  --surface:       oklch(calc(0.22 + var(--mode) * 0.73 + var(--lum-bg)) 0.019 89);
  --surface-hover: oklch(calc(0.25 + var(--mode) * 0.67 + var(--lum-bg)) 0.024 77);
  --border:        oklch(calc(0.28 + var(--mode) * 0.59 + var(--lum-bg)) 0.029 84);
  --border-hover:  oklch(calc(0.38 + var(--mode) * 0.39 + var(--lum-bg)) 0.052 83);
  --text:          oklch(calc(0.93 - var(--mode) * 0.75 + var(--lum-tx)) 0.023 85);
  --text-muted:    oklch(calc(0.84 - var(--mode) * 0.52 + var(--lum-tx)) 0.024 80);
  --text-dim:      oklch(calc(0.59 - var(--mode) * 0.04 + var(--lum-tx)) 0.052 86);
  --accent:        oklch(calc(0.77 - var(--mode) * 0.10) 0.165 70);
  --accent-light:  oklch(calc(0.84 - var(--mode) * 0.07) 0.164 84);
  --accent-hover:  oklch(calc(0.67 - var(--mode) * 0.12) 0.157 58);
  --code-bg:       oklch(calc(0.17 + var(--mode) * 0.78 + var(--lum-bg)) 0.012 92);
  --nav-bg:        oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.012 89 / 0.92);
  --accent-glow:   oklch(0.77 0.165 70 / calc(0.18 - var(--mode) * 0.08));
  --accent-border: oklch(calc(0.31 + var(--mode) * 0.36) calc(0.041 + var(--mode) * 0.116) 70 / calc(1 - var(--mode) * 0.80));
  --accent-shadow: oklch(0.77 0.165 70 / calc(0.15 - var(--mode) * 0.07));
  --accent-underline: oklch(0.84 0.164 84 / calc(0.40 - var(--mode) * 0.15));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42)),
                   0 0 1px oklch(0.77 0.165 70 / calc(0.20 * (1 - var(--mode))));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50)),
                   0 0 1px oklch(0.77 0.165 70 / calc(0.25 * (1 - var(--mode))));
  --dot-color:     oklch(calc(0.77 * (1 - var(--mode))) calc(0.165 * (1 - var(--mode))) 70 / calc(0.05 - var(--mode) * 0.02));
}

/* ── Cyan Frost ── */
[data-theme="cyan"] {
  --bg:            oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.013 228);
  --bg-subtle:     oklch(calc(0.19 + var(--mode) * 0.77 + var(--lum-bg)) 0.019 236);
  --surface:       oklch(calc(0.22 + var(--mode) * 0.73 + var(--lum-bg)) 0.025 235);
  --surface-hover: oklch(calc(0.26 + var(--mode) * 0.66 + var(--lum-bg)) 0.030 226);
  --border:        oklch(calc(0.30 + var(--mode) * 0.57 + var(--lum-bg)) 0.042 240);
  --border-hover:  oklch(calc(0.41 + var(--mode) * 0.36 + var(--lum-bg)) 0.052 226);
  --text:          oklch(calc(0.94 - var(--mode) * 0.76 + var(--lum-tx)) 0.018 215);
  --text-muted:    oklch(calc(0.87 - var(--mode) * 0.55 + var(--lum-tx)) 0.028 220);
  --text-dim:      oklch(calc(0.66 - var(--mode) * 0.11 + var(--lum-tx)) 0.056 218);
  --accent:        oklch(calc(0.72 - var(--mode) * 0.11) 0.126 215);
  --accent-light:  oklch(calc(0.80 - var(--mode) * 0.08) 0.134 212);
  --accent-hover:  oklch(calc(0.61 - var(--mode) * 0.09) 0.111 222);
  --code-bg:       oklch(calc(0.16 + var(--mode) * 0.79 + var(--lum-bg)) 0.016 248);
  --nav-bg:        oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.013 228 / 0.92);
  --accent-glow:   oklch(0.72 0.126 215 / calc(0.18 - var(--mode) * 0.08));
  --accent-border: oklch(calc(0.32 + var(--mode) * 0.29) calc(0.047 + var(--mode) * 0.064) 222 / calc(1 - var(--mode) * 0.80));
  --accent-shadow: oklch(0.72 0.126 215 / calc(0.15 - var(--mode) * 0.07));
  --accent-underline: oklch(0.80 0.134 212 / calc(0.40 - var(--mode) * 0.15));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42)),
                   0 0 1px oklch(0.72 0.126 215 / calc(0.20 * (1 - var(--mode))));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50)),
                   0 0 1px oklch(0.72 0.126 215 / calc(0.25 * (1 - var(--mode))));
  --dot-color:     oklch(calc(0.72 * (1 - var(--mode))) calc(0.126 * (1 - var(--mode))) 215 / calc(0.05 - var(--mode) * 0.02));
}

/* ── Rose Quartz ── */
[data-theme="rose"] {
  --bg:            oklch(calc(0.13 + var(--mode) * 0.85 + var(--lum-bg)) 0.010 345);
  --bg-subtle:     oklch(calc(0.19 + var(--mode) * 0.77 + var(--lum-bg)) 0.015 347);
  --surface:       oklch(calc(0.20 + var(--mode) * 0.75 + var(--lum-bg)) 0.030 349);
  --surface-hover: oklch(calc(0.24 + var(--mode) * 0.68 + var(--lum-bg)) 0.035 354);
  --border:        oklch(calc(0.26 + var(--mode) * 0.61 + var(--lum-bg)) 0.056 350);
  --border-hover:  oklch(calc(0.35 + var(--mode) * 0.42 + var(--lum-bg)) 0.077 350);
  --text:          oklch(calc(0.94 - var(--mode) * 0.76 + var(--lum-tx)) 0.010 345);
  --text-muted:    oklch(calc(0.84 - var(--mode) * 0.52 + var(--lum-tx)) 0.025 351);
  --text-dim:      oklch(calc(0.62 - var(--mode) * 0.07 + var(--lum-tx)) 0.054 353);
  --accent:        oklch(calc(0.65 - var(--mode) * 0.06) 0.215 16);
  --accent-light:  oklch(calc(0.72 - var(--mode) * 0.07) 0.169 13);
  --accent-hover:  oklch(calc(0.59 - var(--mode) * 0.08) 0.222 18);
  --code-bg:       oklch(calc(0.16 + var(--mode) * 0.79 + var(--lum-bg)) 0.019 354);
  --nav-bg:        oklch(calc(0.13 + var(--mode) * 0.85 + var(--lum-bg)) 0.010 345 / 0.92);
  --accent-glow:   oklch(0.65 0.215 16 / calc(0.18 - var(--mode) * 0.08));
  --accent-border: oklch(calc(0.26 + var(--mode) * 0.33) calc(0.056 + var(--mode) * 0.166) 16 / calc(1 - var(--mode) * 0.80));
  --accent-shadow: oklch(0.65 0.215 16 / calc(0.15 - var(--mode) * 0.07));
  --accent-underline: oklch(0.72 0.169 13 / calc(0.40 - var(--mode) * 0.15));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42)),
                   0 0 1px oklch(0.65 0.215 16 / calc(0.20 * (1 - var(--mode))));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50)),
                   0 0 1px oklch(0.65 0.215 16 / calc(0.25 * (1 - var(--mode))));
  --dot-color:     oklch(calc(0.65 * (1 - var(--mode))) calc(0.215 * (1 - var(--mode))) 16 / calc(0.05 - var(--mode) * 0.02));
}

/* ── Slate Minimal ── */
[data-theme="slate"] {
  --bg:            oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.005 286);
  --bg-subtle:     oklch(calc(0.19 + var(--mode) * 0.77 + var(--lum-bg)) 0.006 286);
  --surface:       oklch(calc(0.21 + var(--mode) * 0.74 + var(--lum-bg)) 0.008 286);
  --surface-hover: oklch(calc(0.25 + var(--mode) * 0.67 + var(--lum-bg)) 0.011 286);
  --border:        oklch(calc(0.29 + var(--mode) * 0.58 + var(--lum-bg)) 0.011 286);
  --border-hover:  oklch(calc(0.35 + var(--mode) * 0.42 + var(--lum-bg)) 0.017 285);
  --text:          oklch(calc(0.93 - var(--mode) * 0.75 + var(--lum-tx)) 0.013 256);
  --text-muted:    oklch(calc(0.78 - var(--mode) * 0.46 + var(--lum-tx)) 0.025 264);
  --text-dim:      oklch(calc(0.55 + var(--lum-tx)) 0.041 257);
  --accent:        oklch(calc(0.93 - var(--mode) * 0.56) calc(0.013 + var(--mode) * 0.026) 257);
  --accent-light:  oklch(calc(0.97 - var(--mode) * 0.52) calc(0.007 + var(--mode) * 0.031) 253);
  --accent-hover:  oklch(calc(0.87 - var(--mode) * 0.59) calc(0.020 + var(--mode) * 0.017) 257);
  --code-bg:       oklch(calc(0.17 + var(--mode) * 0.78 + var(--lum-bg)) 0.008 285);
  --nav-bg:        oklch(calc(0.14 + var(--mode) * 0.84 + var(--lum-bg)) 0.005 286 / 0.92);
  --accent-glow:   oklch(calc(1 - var(--mode) * 0.63) calc(var(--mode) * 0.039) 257 / 0.08);
  --accent-border: oklch(calc(0.29 + var(--mode) * 0.54) calc(0.018 - var(--mode) * 0.008) 285);
  --accent-shadow: oklch(calc(1 - var(--mode) * 0.63) calc(var(--mode) * 0.039) 257 / 0.06);
  --accent-underline: oklch(calc(0.97 - var(--mode) * 0.52) calc(0.007 + var(--mode) * 0.031) 253 / calc(0.30 - var(--mode) * 0.05));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50));
  --dot-color:     oklch(calc(1 - var(--mode)) 0 0 / calc(0.04 - var(--mode) * 0.01));
}

/* ── Navy Depth ── */
[data-theme="navy"] {
  --bg:            oklch(calc(0.16 + var(--mode) * 0.82 + var(--lum-bg)) 0.023 260);
  --bg-subtle:     oklch(calc(0.20 + var(--mode) * 0.76 + var(--lum-bg)) 0.038 265);
  --surface:       oklch(calc(0.24 + var(--mode) * 0.71 + var(--lum-bg)) 0.046 262);
  --surface-hover: oklch(calc(0.27 + var(--mode) * 0.65 + var(--lum-bg)) 0.047 257);
  --border:        oklch(calc(0.31 + var(--mode) * 0.56 + var(--lum-bg)) 0.063 261);
  --border-hover:  oklch(calc(0.40 + var(--mode) * 0.37 + var(--lum-bg)) 0.075 259);
  --text:          oklch(calc(0.95 - var(--mode) * 0.77 + var(--lum-tx)) 0.011 248);
  --text-muted:    oklch(calc(0.85 - var(--mode) * 0.53 + var(--lum-tx)) 0.021 248);
  --text-dim:      oklch(calc(0.62 - var(--mode) * 0.07 + var(--lum-tx)) 0.061 249);
  --accent:        oklch(calc(0.62 - var(--mode) * 0.08) 0.188 260);
  --accent-light:  oklch(calc(0.71 - var(--mode) * 0.09) 0.144 255);
  --accent-hover:  oklch(calc(0.55 - var(--mode) * 0.06) 0.215 263);
  --code-bg:       oklch(calc(0.18 + var(--mode) * 0.77 + var(--lum-bg)) 0.032 261);
  --nav-bg:        oklch(calc(0.16 + var(--mode) * 0.82 + var(--lum-bg)) 0.023 260 / 0.92);
  --accent-glow:   oklch(0.62 0.188 260 / calc(0.18 - var(--mode) * 0.08));
  --accent-border: oklch(calc(0.32 + var(--mode) * 0.55) calc(0.075 - var(--mode) * 0.040) 260);
  --accent-shadow: oklch(0.62 0.188 260 / calc(0.15 - var(--mode) * 0.07));
  --accent-underline: oklch(0.71 0.144 255 / calc(0.40 - var(--mode) * 0.10));
  --shadow:        0 2px 8px oklch(0 0 0 / calc(0.50 - var(--mode) * 0.42)),
                   0 0 1px oklch(0.62 0.188 260 / calc(0.20 * (1 - var(--mode))));
  --shadow-lg:     0 8px 32px oklch(0 0 0 / calc(0.60 - var(--mode) * 0.50)),
                   0 0 1px oklch(0.62 0.188 260 / calc(0.25 * (1 - var(--mode))));
  --dot-color:     oklch(calc(0.62 * (1 - var(--mode))) calc(0.188 * (1 - var(--mode))) 260 / calc(0.05 - var(--mode) * 0.02));
}

/* ── Classic (light-native, standalone — no dark variant) ── */
[data-theme="classic"] {
  --bg:           #ffffff;
  --bg-subtle:    #f5f5f5;
  --nav-bg:       rgba(255,255,255,0.95);
  --surface:      #f0f0f0;
  --surface-hover:#e8e8e8;
  --border:       #d8d8d8;
  --border-hover: #b0b0b0;
  --text:         #111111;
  --text-muted:   #2a2a2a;
  --text-dim:     #6b7280;
  --accent:       #059669;
  --accent-light: #10b981;
  --accent-glow:  rgba(5,150,105,0.08);
  --accent-border:#c8e8d8;
  --accent-shadow:rgba(5,150,105,0.06);
  --accent-hover: #047857;
  --accent-underline: rgba(16,185,129,0.35);
  --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg:    0 4px 16px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
  --dot-color:    rgba(0,0,0,0.02);
  --code-bg:      #f0f0f0;
}

/* ── Light mode toggle ── */
[data-mode="light"] { --mode: 1; color-scheme: light; }

/* Amber accent needs dark text on its bright button */
[data-mode="light"][data-theme="amber"] .auth-btn { color: #111; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

main, nav, header, footer { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }

/* ── Nav ── */
nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
}
nav .container { display: flex; align-items: center; }
nav strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
nav strong a { color: inherit; text-decoration: none; }
nav strong span { color: var(--accent-light); }
nav .nav-links { display: flex; align-items: center; gap: 8px; order: 2; margin: 0 auto; }
nav .nav-links a, nav .nav-cta, nav .nav-signin {
  color: var(--text-muted); text-decoration: none; font-size: 14px;
  padding: 6px 14px; border-radius: 6px; transition: all 0.15s;
}
nav .nav-links a:hover, nav .nav-cta:hover, nav .nav-signin:hover { color: var(--text); background: var(--surface-hover); }
nav .nav-cta {
  color: var(--accent-light);
  border: 1px solid var(--accent-underline);
  order: 1; margin-left: 8px;
}
nav .nav-cta:hover { background: var(--accent-glow); color: var(--text); }
nav .nav-links a.active { color: var(--text); background: var(--surface); }
nav .nav-signout {
  color: var(--text-dim); text-decoration: none; font-size: 12px;
  padding: 4px 8px; border-radius: 6px; transition: all 0.15s; order: 4;
}
nav .nav-signout:hover { color: var(--text); background: var(--surface-hover); }

/* ── Hero ── */
header.hero { padding: 56px 0 36px; text-align: center; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-light); background: var(--accent-glow);
  border: 1px solid var(--accent-glow);
  padding: 4px 14px; border-radius: 20px; margin-bottom: 20px;
}
header.hero h1 {
  font-size: clamp(36px, 5vw, 52px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
header.hero p { color: var(--text-muted); font-size: clamp(17px, 2.5vw, 20px); max-width: 560px; margin: 0 auto; }

/* ── Platform grid (visual quick-pick) ── */
#platforms > h2 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); text-align: center;
  margin-bottom: 20px;
}
.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 480px) { .platform-grid { grid-template-columns: repeat(3, 1fr); } }

.platform-grid button {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 8px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  color: var(--text); font-family: inherit; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.platform-grid button:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.platform-grid button[aria-expanded="true"] {
  border-color: var(--accent); background: var(--accent-glow);
  box-shadow: 0 0 20px var(--accent-shadow);
}
.platform-grid button svg { width: 32px; height: 32px; }
.platform-grid .btn-label { font-size: 14px; font-weight: 600; }
.platform-grid button.coming-soon { opacity: 0.5; border-style: dashed; }
.platform-grid button.coming-soon:hover { opacity: 0.7; }
.coming-soon-tag {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-dim);
}

/* ── Platform panel (shown below grid) ── */
.platform-panel {
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: none; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.platform-panel.active { display: block; }
.panel-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.panel-header svg { width: 28px; height: 28px; flex-shrink: 0; }
.panel-header h3 { font-size: 22px; font-weight: 700; margin: 0; line-height: 1; }
.panel-header small { font-size: 14px; color: var(--text-muted); display: block; margin-top: 2px; }

/* ── Surface tabs (Desktop / Web / CLI etc.) ── */
.surface-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px;
}
.surface-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; padding: 10px 16px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-muted); transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.surface-tab:hover { color: var(--text); background: var(--surface); }
.surface-tab.active {
  color: var(--accent-light); border-bottom-color: var(--accent);
}
.surface-tab .tab-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 8px;
}
.tab-badge.verified {
  color: var(--emerald); background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
}
.tab-badge.unavailable {
  color: var(--text-dim); background: rgba(100,116,139,0.1);
  border: 1px solid rgba(100,116,139,0.2);
}
.surface-tab.dimmed { opacity: 0.45; }
.surface-tab.dimmed:hover { opacity: 0.7; }

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Status badges (inline) */
.meta-tag {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 10px; border-radius: 10px; display: inline-block;
}
.meta-tag.verified {
  color: var(--emerald); background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
}
.meta-tag.likely-badge {
  color: var(--amber); background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
}

/* ── Setup steps (semantic <ol>) ── */
ol.setup-steps {
  counter-reset: step;
  list-style: none; padding: 0; margin: 0;
}
ol.setup-steps > li {
  counter-increment: step;
  position: relative; padding-left: 40px; margin-bottom: 18px;
  font-size: 16px; line-height: 1.6;
}
ol.setup-steps > li:last-child { margin-bottom: 0; }
ol.setup-steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-glow); border: 1px solid var(--accent-underline);
  color: var(--accent-light); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
ol.setup-steps strong { font-weight: 600; }

/* ── Config blocks (<pre><code> with copy button) ── */
.config-block {
  position: relative; margin: 8px 0 12px;
}
.config-block pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; padding-right: 70px;
  font-family: 'Cascadia Code', 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px; color: var(--accent);
  overflow-x: auto; white-space: pre; line-height: 1.5;
  margin: 0;
}
.config-block code { font-family: inherit; color: inherit; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-muted); font-size: 11px; padding: 4px 10px;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.copy-btn:hover { background: var(--surface-hover); color: var(--text); }
.copy-btn.copied { color: var(--emerald); border-color: rgba(16,185,129,0.3); }

/* Inline code */
code.inline {
  background: var(--code-bg); padding: 2px 7px; border-radius: 4px;
  font-size: 14px; font-family: 'Cascadia Code', 'JetBrains Mono', monospace;
}

/* ── Auth button ── */
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white; border: none; border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background 0.15s; text-decoration: none; margin: 8px 0;
}
.auth-btn:hover { background: var(--accent-hover); }

/* ── Post-setup section ── */
.post-setup { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.post-setup h5 {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 8px;
}
.post-setup > p { font-size: 14px; line-height: 1.6; }

/* ── Aside notes (warnings, info, etc.) ── */
aside.note-warning {
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px;
}
aside.note-warning > strong {
  display: block; font-size: 12px; font-weight: 600; color: var(--amber); margin-bottom: 4px;
}
aside.note-warning > p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }

aside.note-info {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px;
}
aside.note-info > strong {
  display: block; font-size: 12px; font-weight: 600; color: var(--emerald); margin-bottom: 4px;
}
aside.note-info > p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ── Unavailable section ── */
.unavailable-content { text-align: center; padding: 24px 16px; }
.unavailable-content p { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 500px; margin: 0 auto 12px; }
.unavailable-content p.detail { font-size: 13px; color: var(--text-dim); }

/* ── Coming soon content (inside panels) ── */
.coming-soon-content { text-align: center; padding: 32px 16px; }
.coming-soon-content p { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.coming-soon-content p.detail { font-size: 13px; color: var(--text-dim); }

/* ── Features section ── */
#features { padding: 48px 0; border-top: 1px solid var(--border); }
#features > h2 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); text-align: center;
  margin-bottom: 20px;
}
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }
.features-grid a.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}
.features-grid a.feature-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow-lg);
}
.features-grid .feature-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.features-grid .feature-header h3 { font-size: 17px; font-weight: 600; margin: 0; }
.features-grid .feature-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.features-grid .feature-body { font-size: 15px; color: var(--text-muted); line-height: 1.5; margin: 0; }
.features-grid .feature-arrow { font-size: 13px; color: var(--accent); margin-top: 8px; display: block; }

/* ── Footer ── */
footer { padding: 24px 0; border-top: 1px solid var(--border); text-align: center; }
footer p { font-size: 13px; color: var(--text-dim); }
footer a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--accent-light); }

/* ══════════════════════════════════════════════════════════════════════════
   CONTENT PAGES — Legal, About, Pricing, Security, FAQ
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page header (used instead of hero on content pages) ── */
.page-header { padding: 48px 0 32px; border-bottom: 1px solid var(--border); }
.page-header h1 {
  font-size: clamp(32px, 5vw, 44px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px;
}
.page-header .subtitle {
  color: var(--text-muted); font-size: 18px; max-width: 640px; text-wrap: balance;
}
.page-header .effective-date {
  display: inline-block; font-size: 13px; color: var(--text-dim);
  margin-top: 12px;
}

/* ── Legal / Article content ── */
article.legal-content { padding: 40px 0 60px; text-wrap: pretty; }
article.legal-content h2 {
  font-size: 30px; font-weight: 700; margin-top: 48px; margin-bottom: 18px;
  padding-top: 28px; border-top: 1px solid var(--border);
  letter-spacing: -0.02em;
}
article.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
article.legal-content h3 {
  font-size: 23px; font-weight: 600; margin-top: 32px; margin-bottom: 14px;
  color: var(--accent);
}
article.legal-content h4 {
  font-size: 18px; font-weight: 600; margin-top: 24px; margin-bottom: 10px;
}
article.legal-content p {
  font-size: 17px; line-height: 1.7; color: var(--text-muted); margin-bottom: 16px;
}
article.legal-content ul, article.legal-content ol {
  margin: 14px 0 18px 24px; color: var(--text-muted);
}
article.legal-content li {
  font-size: 17px; line-height: 1.7; margin-bottom: 8px;
}
article.legal-content a {
  color: var(--accent-light); text-decoration: none;
  border-bottom: 1px solid var(--accent-underline);
  transition: border-color 0.15s;
}
article.legal-content a:hover { border-color: var(--accent-light); }
article.legal-content strong { color: var(--text); font-weight: 600; }
article.legal-content em { font-style: italic; color: var(--text); }

/* ── Tables (sub-processors, etc.) ── */
article.legal-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  font-size: 14px;
}
article.legal-content thead th {
  text-align: left; padding: 10px 14px; font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim);
  border-bottom: 2px solid var(--border);
}
article.legal-content tbody td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
article.legal-content tbody tr:hover { background: var(--surface); }

/* ── Highlight boxes (used in legal for key disclosures) ── */
.disclosure-box {
  background: var(--accent-glow); border: 1px solid var(--accent-border);
  border-radius: var(--radius); padding: 20px 24px; margin: 20px 0;
  box-shadow: var(--shadow);
}
.disclosure-box h4 {
  font-size: 14px; font-weight: 600; color: var(--accent);
  margin-top: 0; margin-bottom: 8px;
}
.disclosure-box p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin-bottom: 8px; }
.disclosure-box p:last-child { margin-bottom: 0; }

/* ── Expanding detail panes (Technology deep-dives) ── */
details.tech-detail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin: 16px 0;
  box-shadow: var(--shadow); overflow: hidden;
}
details.tech-detail summary {
  padding: 16px 24px; cursor: pointer; font-size: 15px; font-weight: 600;
  color: var(--accent); list-style: none; display: flex; align-items: center;
  gap: 8px; transition: background 0.15s;
}
details.tech-detail summary:hover { background: var(--surface-hover); }
details.tech-detail summary::before {
  content: '\25B8'; font-size: 12px; transition: transform 0.2s;
  display: inline-block; flex-shrink: 0;
}
details.tech-detail[open] summary::before { transform: rotate(90deg); }
details.tech-detail summary::-webkit-details-marker { display: none; }
details.tech-detail .detail-body {
  padding: 0 24px 20px; border-top: 1px solid var(--border);
}
details.tech-detail .detail-body p {
  font-size: 14px; line-height: 1.7; color: var(--text-muted); margin: 12px 0 0;
}
details.tech-detail .detail-body ul {
  font-size: 14px; line-height: 1.7; color: var(--text-muted);
  margin: 8px 0 0; padding-left: 20px;
}
details.tech-detail .detail-body li { margin: 4px 0; }
details.tech-detail .detail-body code {
  font-size: 13px; background: var(--code-bg); padding: 2px 6px;
  border-radius: 4px; color: var(--accent);
}
details.tech-detail .detail-body strong { color: var(--text); }

/* ── Tech scrollspy nav ── */
.tech-nav {
  position: sticky;
  top: var(--nav-height, 53px);
  z-index: 90;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}
.tech-nav .surface-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 0;
  flex-wrap: nowrap;
}
.tech-nav .surface-tabs::-webkit-scrollbar { display: none; }
.tech-nav .surface-tab {
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  font-size: 14px;
}

/* ── Pricing cards ── */
.pricing-hero { text-align: center; padding: 48px 0 32px; }
.pricing-hero h1 {
  font-size: clamp(28px, 5vw, 40px); font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.pricing-hero p { color: var(--text-muted); font-size: 19px; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  max-width: 1080px; margin: 0 auto; align-items: start;
}
.pricing-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.pricing-card.featured { border-color: var(--accent); box-shadow: var(--shadow-lg), 0 0 40px var(--accent-shadow); }
.pricing-card .tier-label {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 4px;
}
.pricing-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.pricing-card .price { font-size: 48px; font-weight: 700; margin: 16px 0 4px; }
.pricing-card .price-note { font-size: 14px; color: var(--text-dim); margin-bottom: 24px; }
.pricing-card .price-annual { font-size: 13px; color: var(--text-dim); margin: -2px 0 20px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0; }
.pricing-card li {
  font-size: 15px; color: var(--text-muted); padding: 9px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 10px;
}
.pricing-card li:last-child { border-bottom: none; }
.pricing-card .check { color: var(--emerald); font-weight: 700; flex-shrink: 0; }
.pricing-card .dash { color: var(--text-dim); font-weight: 400; flex-shrink: 0; }
.pricing-card .section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-dim);
  padding: 14px 0 4px; border-bottom: none;
}

.early-access-banner {
  text-align: center; padding: 32px; margin: 0 auto 40px; max-width: 960px;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.early-access-banner h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.early-access-banner p { font-size: 15px; color: var(--text-muted); margin: 0; }
.early-access-banner .highlight { color: var(--accent); font-weight: 600; }

.pricing-faq { max-width: 640px; margin: 48px auto 0; }
.pricing-faq h2 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 20px;
  text-align: center;
}
.pricing-faq dt {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-top: 20px; margin-bottom: 6px;
}
.pricing-faq dd {
  font-size: 15px; color: var(--text-muted); margin: 0 0 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.future-plans p { font-size: 14px; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ── Security architecture ── */
.arch-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin: 24px 0;
}
.arch-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.arch-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.arch-card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.arch-card .icon { font-size: 24px; margin-bottom: 12px; display: block; }

/* ── FAQ ── */
.faq-list { margin: 32px 0; }
section > .container > h2 {
  font-size: 22px; font-weight: 700; color: var(--accent);
  margin-top: 48px; margin-bottom: 8px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
section > .container > h2:first-child { margin-top: 24px; border-top: none; padding-top: 0; }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 20px 0;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item dt {
  font-size: 20px; font-weight: 600; color: var(--text); cursor: default;
  margin-bottom: 10px;
}
.faq-item dd {
  font-size: 17px; color: var(--text-muted); line-height: 1.7; margin: 0;
}
.faq-item dd p { margin-bottom: 10px; }
.faq-item dd p:last-child { margin-bottom: 0; }

/* ── Account page ── */
.account-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.account-identity { display: flex; align-items: center; gap: 16px; }
.account-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--border);
}
.account-email { font-size: 17px; font-weight: 600; color: var(--text); }
.account-name { font-size: 15px; color: var(--text-muted); }
.account-meta { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.account-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.account-section h2 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.account-section p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.account-section p a { color: var(--accent-light); }
.account-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.account-hint { margin-top: 8px; font-size: 13px; color: var(--text-dim); }

.account-danger { border-color: rgba(239,68,68,0.2); }
.account-danger h2 { color: #ef4444; }

.btn-muted {
  background: var(--surface); color: var(--text-muted); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 6px; font-size: 14px; cursor: pointer;
  transition: all 0.15s;
}
.btn-muted:hover { background: var(--surface-hover); color: var(--text); }

.btn-danger {
  background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.3);
  padding: 10px 18px; border-radius: 6px; font-size: 14px; cursor: pointer;
  font-weight: 600; transition: all 0.15s;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

.delete-preview {
  background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-sm); padding: 16px; margin: 16px 0;
  font-size: 13px; color: var(--text-muted);
}
.delete-preview ul { margin: 8px 0 0 20px; }
.delete-preview li { margin-bottom: 4px; }
.delete-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.delete-input {
  background: var(--bg); color: var(--text); border: 1px solid rgba(239,68,68,0.3);
  padding: 8px 12px; border-radius: 6px; font-size: 14px; font-family: monospace;
  width: 200px;
}
.delete-input:focus { outline: none; border-color: #ef4444; }

/* ── Account stats ── */
.account-stats { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── Nav sign-in ── */
nav .nav-signin {
  color: var(--text-muted); font-size: 14px;
  padding: 6px 14px; order: 3;
  display: inline-flex; align-items: center; justify-content: flex-start;
  width: 72px; height: 32px; box-sizing: border-box;
}
nav .nav-signin img { width: 28px; height: 28px; border-radius: 50%; display: block; }
nav .nav-signin:hover { color: var(--text); background: var(--surface-hover); }

/* ── Token display ── */
.auth-btn.disabled {
  opacity: 0.4; pointer-events: none; cursor: default;
}
.token-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim); margin-top: 6px; cursor: pointer;
  user-select: none;
}
.token-toggle input { margin: 0; cursor: pointer; }

/* ── Visual Assets ── */

/* Comparison panels (before/after, side-by-side) */
.vis-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin: 24px 0;
}
.vis-compare .vis-panel { background: var(--bg); padding: 20px; }
.vis-compare .vis-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 12px; display: block;
}
.vis-compare .vis-before .vis-label { color: var(--text-dim); }
.vis-compare .vis-after .vis-label { color: var(--accent); }
@media (max-width: 640px) { .vis-compare { grid-template-columns: 1fr; } }

/* Chat mockup */
.vis-chat { display: flex; flex-direction: column; gap: 10px; }
.vis-msg {
  max-width: 88%; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.5;
}
.vis-msg.user {
  align-self: flex-end; background: var(--accent);
  color: oklch(0.98 0 0); border-bottom-right-radius: 4px;
}
.vis-msg.assistant {
  align-self: flex-start; background: var(--surface);
  color: var(--text); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.vis-msg .tool-call {
  font-size: 11px; font-family: monospace; color: var(--accent);
  background: var(--bg); border-radius: 4px; padding: 4px 8px;
  margin: 6px 0 4px; display: inline-block;
}
.vis-msg em { color: var(--text-dim); font-style: italic; }
.vis-msg strong { color: var(--accent-light); font-weight: 600; }

/* Code comparison panels (topic landscape vs random) */
.vis-code {
  font-family: monospace; font-size: 12px; line-height: 1.6;
  color: var(--text-muted); white-space: pre-wrap; word-break: break-word;
}
.vis-code .dim { color: var(--text-dim); }
.vis-code .hi { color: var(--accent); }
.vis-code .hi2 { color: var(--accent-light); }
.vis-code .num { color: var(--amber); }

/* Architecture diagram (encryption boundary, pipeline) */
.vis-arch {
  display: flex; flex-direction: column; gap: 0;
  margin: 24px 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.vis-zone {
  padding: 20px; display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: center;
}
.vis-zone-encrypted { background: var(--surface); }
.vis-zone-plain { background: var(--bg); }
.vis-zone-label {
  width: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 4px;
}
.vis-zone-encrypted .vis-zone-label { color: var(--accent); }
.vis-zone-plain .vis-zone-label { color: var(--text-dim); }
.vis-boundary {
  background: var(--border); padding: 6px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-dim); text-align: center;
  border-top: 2px dashed var(--accent); border-bottom: 2px dashed var(--accent);
}
.vis-node {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px;
  font-size: 12px; text-align: center; min-width: 100px;
}
.vis-node-label { font-weight: 600; color: var(--text); display: block; }
.vis-node-sub { font-size: 11px; color: var(--text-dim); display: block; margin-top: 2px; }
.vis-node.locked { border-color: var(--accent); }
.vis-node.locked .vis-node-label::before { content: "\1F512 "; }

/* Pipeline flow */
.vis-pipeline {
  display: flex; align-items: center; gap: 0;
  margin: 24px 0; overflow-x: auto; padding: 12px 0;
}
.vis-stage {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; text-align: center;
}
.vis-stage-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap;
}
.vis-stage-time {
  font-size: 11px; color: var(--accent); font-weight: 600;
  margin-top: 4px; font-family: monospace;
}
.vis-arrow {
  width: 32px; height: 2px; background: var(--accent);
  flex-shrink: 0; position: relative;
}
.vis-arrow::after {
  content: ""; position: absolute; right: -1px; top: -4px;
  border: 5px solid transparent; border-left: 6px solid var(--accent);
}
@media (max-width: 640px) {
  .vis-pipeline { flex-direction: column; align-items: stretch; }
  .vis-arrow {
    width: 2px; height: 24px; align-self: center;
    background: var(--accent);
  }
  .vis-arrow::after {
    right: auto; top: auto; bottom: -1px; left: -4px;
    border: 5px solid transparent; border-top: 6px solid var(--accent);
    border-left-color: transparent;
  }
}

/* Pipeline animation */
.vis-pipeline.animated .vis-stage,
.vis-pipeline.animated .vis-arrow {
  opacity: 0; animation: vis-fadein 0.4s ease forwards;
}
.vis-pipeline.animated .vis-stage:nth-child(1) { animation-delay: 0s; }
.vis-pipeline.animated .vis-arrow:nth-child(2) { animation-delay: 0.15s; }
.vis-pipeline.animated .vis-stage:nth-child(3) { animation-delay: 0.3s; }
.vis-pipeline.animated .vis-arrow:nth-child(4) { animation-delay: 0.45s; }
.vis-pipeline.animated .vis-stage:nth-child(5) { animation-delay: 0.6s; }
.vis-pipeline.animated .vis-arrow:nth-child(6) { animation-delay: 0.75s; }
.vis-pipeline.animated .vis-stage:nth-child(7) { animation-delay: 0.9s; }
.vis-pipeline.animated .vis-arrow:nth-child(8) { animation-delay: 1.05s; }
.vis-pipeline.animated .vis-stage:nth-child(9) { animation-delay: 1.2s; }
.vis-pipeline.animated .vis-arrow:nth-child(10) { animation-delay: 1.35s; }
.vis-pipeline.animated .vis-stage:nth-child(11) { animation-delay: 1.5s; }
@keyframes vis-fadein { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .vis-pipeline.animated .vis-stage,
  .vis-pipeline.animated .vis-arrow { animation: none; opacity: 1; }
}

/* Pipeline total time callout */
.vis-pipeline-total {
  text-align: center; margin-top: 4px;
  font-size: 13px; color: var(--text-muted);
}
.vis-pipeline-total strong { color: var(--accent); }

/* Theme Switcher (dev-only) */
.theme-switcher {
  position: fixed; bottom: 16px; right: 16px; z-index: 9999;
  background: rgba(0,0,0,0.85); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 8px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: #94a3b8; font-family: inherit;
  backdrop-filter: blur(8px);
}
[data-mode="light"] .theme-switcher {
  background: rgba(255,255,255,0.90); border-color: rgba(0,0,0,0.15);
  color: #4a5568;
}
.theme-switcher label { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.theme-switcher select, .theme-switcher .mode-toggle {
  background: rgba(255,255,255,0.08); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px; padding: 4px 8px; font-size: 11px; font-family: inherit;
  cursor: pointer;
}
[data-mode="light"] .theme-switcher select,
[data-mode="light"] .theme-switcher .mode-toggle {
  background: rgba(0,0,0,0.05); color: #1a1a2e; border-color: rgba(0,0,0,0.15);
}
.theme-switcher select:focus, .theme-switcher .mode-toggle:focus { outline: 1px solid rgba(255,255,255,0.3); }
.theme-switcher .divider { width: 1px; height: 16px; background: rgba(255,255,255,0.15); }
[data-mode="light"] .theme-switcher .divider { background: rgba(0,0,0,0.15); }
.theme-switcher .lum-control {
  display: flex; align-items: center; gap: 4px; font-size: 11px; white-space: nowrap; cursor: default;
}
.theme-switcher .lum-control input[type="range"] {
  width: 80px; height: 4px; cursor: pointer; accent-color: var(--accent, #10b981);
}
.theme-switcher .lum-value { min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .page-header { padding: 32px 0 24px; }
  article.legal-content { padding: 24px 0 40px; }
  article.legal-content h2 { font-size: 24px; }
  article.legal-content h3 { font-size: 20px; }
  article.legal-content p, article.legal-content li { font-size: 16px; }
  .faq-item dt { font-size: 18px; }
  .faq-item dd { font-size: 16px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .pricing-card { padding: 24px; }
  .pricing-card h2 { font-size: 20px; }
  .arch-grid { grid-template-columns: 1fr; }
  .account-identity { flex-direction: column; text-align: center; }
  .theme-switcher { bottom: 8px; right: 8px; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .delete-input { width: 100%; max-width: 100%; }
}

@media (max-width: 480px) {
  nav { padding: 10px 0 0; }
  nav .container { flex-wrap: wrap; gap: 0; }
  nav .nav-links {
    order: 10; width: 100%; gap: 0; margin-top: 8px; padding: 6px 0;
    border-top: 1px solid var(--border);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; flex-wrap: nowrap;
  }
  nav .nav-links::-webkit-scrollbar { display: none; }
  nav .nav-links a {
    font-size: 13px; padding: 6px 10px; white-space: nowrap; flex-shrink: 0;
  }
  nav .nav-cta { font-size: 13px; padding: 6px 10px; }
  nav .nav-signin { width: auto; padding: 6px 8px; }
  header.hero { padding: 36px 0 24px; }
  header.hero h1 { font-size: 28px; }
  header.hero p { font-size: 16px; }
  .platform-panel { padding: 16px; }
  .panel-header h3 { font-size: 18px; }
  .surface-tabs { flex-wrap: wrap; }
  .surface-tab { font-size: 12px; padding: 8px 10px; min-height: 44px; }
  .tech-nav .surface-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tech-nav .surface-tab { font-size: 13px; padding: 8px 12px; min-height: 44px; }
  .container { padding: 0 16px; }
  .features-grid a.feature-card { padding: 14px 16px; }
  .features-grid .feature-header h3 { font-size: 15px; }
  .features-grid .feature-body { font-size: 14px; }
  .account-section { padding: 16px; }
  .account-card { padding: 16px; }
  .account-actions { flex-direction: column; }
  .account-actions button, .account-actions a { width: 100%; text-align: center; min-height: 44px; }
}
