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

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

/* ══════════════════════════════════════════════════════════════════════════
   THEME SYSTEM
   data-theme = accent color (matrix, purple, amber, cyan, rose, slate)
   data-mode  = light | dark (independent of accent)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Matrix Phosphor (default dark) ── */
:root, [data-theme="matrix"] {
  --bg:           #060a06;
  --bg-subtle:    #0e1810;
  --nav-bg:       rgba(6,10,6,0.92);
  --surface:      #111e14;
  --surface-hover:#182818;
  --border:       #1a3020;
  --border-hover: #2a5038;
  --text:         #e8f0e8;
  --text-muted:   #c8d8cc;
  --text-dim:     #6e9a7c;
  --accent:       #10b981;
  --accent-light: #34d399;
  --accent-glow:  rgba(16,185,129,0.18);
  --accent-border:#1a4030;
  --accent-shadow:rgba(16,185,129,0.15);
  --accent-hover: #059669;
  --accent-underline: rgba(52,211,153,0.40);
  --shadow:       0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(16,185,129,0.20);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(16,185,129,0.25);
  --dot-color:    rgba(16,185,129,0.06);
  --code-bg:      #0a140c;
  --cyan:         #06b6d4;
  --emerald:      #10b981;
  --amber:        #f59e0b;
  --radius:       12px;
  --radius-sm:    8px;
}

/* ── Original Purple ── */
[data-theme="purple"] {
  --bg:           #06060e;
  --bg-subtle:    #10101e;
  --nav-bg:       rgba(6,6,14,0.92);
  --surface:      #161228;
  --surface-hover:#1e1838;
  --border:       #2a2248;
  --border-hover: #3e3068;
  --text:         #f1f5f9;
  --text-muted:   #cbd5e1;
  --text-dim:     #7a8a9e;
  --accent:       #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow:  rgba(124,58,237,0.18);
  --accent-border:#2e2050;
  --accent-shadow:rgba(124,58,237,0.15);
  --accent-hover: #6d28d9;
  --accent-underline: rgba(167,139,250,0.40);
  --shadow:       0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(124,58,237,0.20);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(124,58,237,0.25);
  --dot-color:    rgba(124,58,237,0.05);
  --code-bg:      #0c0a1a;
}

/* ── Amber Terminal ── */
[data-theme="amber"] {
  --bg:           #0a0804;
  --bg-subtle:    #181410;
  --nav-bg:       rgba(10,8,4,0.92);
  --surface:      #1e1a10;
  --surface-hover:#282014;
  --border:       #302818;
  --border-hover: #504020;
  --text:         #f0e8d8;
  --text-muted:   #d4caba;
  --text-dim:     #8a7a58;
  --accent:       #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow:  rgba(245,158,11,0.18);
  --accent-border:#3a3018;
  --accent-shadow:rgba(245,158,11,0.15);
  --accent-hover: #d97706;
  --accent-underline: rgba(251,191,36,0.40);
  --shadow:       0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(245,158,11,0.20);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(245,158,11,0.25);
  --dot-color:    rgba(245,158,11,0.05);
  --code-bg:      #12100a;
}

/* ── Cyan Frost ── */
[data-theme="cyan"] {
  --bg:           #04090c;
  --bg-subtle:    #0c161c;
  --nav-bg:       rgba(4,9,12,0.92);
  --surface:      #0e1c24;
  --surface-hover:#142830;
  --border:       #183040;
  --border-hover: #285060;
  --text:         #e0f0f4;
  --text-muted:   #c0d8e0;
  --text-dim:     #6a9aa8;
  --accent:       #06b6d4;
  --accent-light: #22d3ee;
  --accent-glow:  rgba(6,182,212,0.18);
  --accent-border:#183848;
  --accent-shadow:rgba(6,182,212,0.15);
  --accent-hover: #0891b2;
  --accent-underline: rgba(34,211,238,0.40);
  --shadow:       0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(6,182,212,0.20);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(6,182,212,0.25);
  --dot-color:    rgba(6,182,212,0.05);
  --code-bg:      #080e14;
}

/* ── Rose Quartz ── */
[data-theme="rose"] {
  --bg:           #0a0608;
  --bg-subtle:    #181014;
  --nav-bg:       rgba(10,6,8,0.92);
  --surface:      #201018;
  --surface-hover:#2c1820;
  --border:       #381828;
  --border-hover: #582840;
  --text:         #f0e8ec;
  --text-muted:   #d8c4cc;
  --text-dim:     #a07888;
  --accent:       #f43f5e;
  --accent-light: #fb7185;
  --accent-glow:  rgba(244,63,94,0.18);
  --accent-border:#381828;
  --accent-shadow:rgba(244,63,94,0.15);
  --accent-hover: #e11d48;
  --accent-underline: rgba(251,113,133,0.40);
  --shadow:       0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(244,63,94,0.20);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(244,63,94,0.25);
  --dot-color:    rgba(244,63,94,0.05);
  --code-bg:      #140a0e;
}

/* ── Slate Minimal ── */
[data-theme="slate"] {
  --bg:           #08080a;
  --bg-subtle:    #131316;
  --nav-bg:       rgba(8,8,10,0.92);
  --surface:      #18181c;
  --surface-hover:#202026;
  --border:       #2a2a30;
  --border-hover: #3a3a44;
  --text:         #e2e8f0;
  --text-muted:   #b0b8c8;
  --text-dim:     #64748b;
  --accent:       #e2e8f0;
  --accent-light: #f1f5f9;
  --accent-glow:  rgba(255,255,255,0.08);
  --accent-border:#2a2a34;
  --accent-shadow:rgba(255,255,255,0.06);
  --accent-hover: #cbd5e1;
  --accent-underline: rgba(241,245,249,0.30);
  --shadow:       0 2px 8px rgba(0,0,0,0.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6);
  --dot-color:    rgba(255,255,255,0.04);
  --code-bg:      #0e0e12;
}

/* ── Navy Depth ── */
[data-theme="navy"] {
  --bg:           #080e18;
  --bg-subtle:    #0e1628;
  --nav-bg:       rgba(8,14,24,0.92);
  --surface:      #121e34;
  --surface-hover:#18283e;
  --border:       #1e3050;
  --border-hover: #2e4870;
  --text:         #e8eef4;
  --text-muted:   #c4d0dc;
  --text-dim:     #6888a8;
  --accent:       #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow:  rgba(59,130,246,0.18);
  --accent-border:#1e3058;
  --accent-shadow:rgba(59,130,246,0.15);
  --accent-hover: #2563eb;
  --accent-underline: rgba(96,165,250,0.40);
  --shadow:       0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(59,130,246,0.20);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6), 0 0 1px rgba(59,130,246,0.25);
  --dot-color:    rgba(59,130,246,0.05);
  --code-bg:      #0a1220;
}

/* ── Classic (light-native, newspaper readability) ── */
[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 — overrides neutrals, keeps accent from data-theme
   ══════════════════════════════════════════════════════════════════════════ */
[data-mode="light"] {
  --bg:           #ffffff;
  --bg-subtle:    #f5f6f8;
  --nav-bg:       rgba(255,255,255,0.92);
  --surface:      #f0f1f3;
  --surface-hover:#e4e6ea;
  --border:       #d4d6dc;
  --border-hover: #b0b4bc;
  --text:         #111111;
  --text-muted:   #333333;
  --text-dim:     #6b7280;
  --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg:    0 8px 24px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
  --dot-color:    rgba(0,0,0,0.03);
  --code-bg:      #eef0f2;
}
/* Light mode accent adjustments — darker accents for white bg readability */
[data-mode="light"][data-theme="matrix"], [data-mode="light"]:not([data-theme]) {
  --accent:       #059669;
  --accent-light: #10b981;
  --accent-glow:  rgba(5,150,105,0.10);
  --accent-border:rgba(5,150,105,0.20);
  --accent-shadow:rgba(5,150,105,0.08);
  --accent-hover: #047857;
  --accent-underline: rgba(16,185,129,0.30);
}
[data-mode="light"][data-theme="purple"] {
  --accent:       #6d28d9;
  --accent-light: #7c3aed;
  --accent-glow:  rgba(109,40,217,0.10);
  --accent-border:rgba(109,40,217,0.20);
  --accent-shadow:rgba(109,40,217,0.08);
  --accent-hover: #5b21b6;
  --accent-underline: rgba(124,58,237,0.25);
}
[data-mode="light"][data-theme="amber"] {
  --accent:       #d97706;
  --accent-light: #f59e0b;
  --accent-glow:  rgba(217,119,6,0.10);
  --accent-border:rgba(217,119,6,0.20);
  --accent-shadow:rgba(217,119,6,0.08);
  --accent-hover: #b45309;
  --accent-underline: rgba(245,158,11,0.25);
}
[data-mode="light"][data-theme="cyan"] {
  --accent:       #0891b2;
  --accent-light: #06b6d4;
  --accent-glow:  rgba(8,145,178,0.10);
  --accent-border:rgba(8,145,178,0.20);
  --accent-shadow:rgba(8,145,178,0.08);
  --accent-hover: #0e7490;
  --accent-underline: rgba(6,182,212,0.25);
}
[data-mode="light"][data-theme="rose"] {
  --accent:       #e11d48;
  --accent-light: #f43f5e;
  --accent-glow:  rgba(225,29,72,0.10);
  --accent-border:rgba(225,29,72,0.20);
  --accent-shadow:rgba(225,29,72,0.08);
  --accent-hover: #be123c;
  --accent-underline: rgba(244,63,94,0.25);
}
[data-mode="light"][data-theme="slate"] {
  --accent:       #334155;
  --accent-light: #475569;
  --accent-glow:  rgba(51,65,85,0.08);
  --accent-border:#c8ccd4;
  --accent-shadow:rgba(51,65,85,0.06);
  --accent-hover: #1e293b;
  --accent-underline: rgba(71,85,105,0.25);
}
[data-mode="light"][data-theme="navy"] {
  --accent:       #2563eb;
  --accent-light: #3b82f6;
  --accent-glow:  rgba(37,99,235,0.10);
  --accent-border:#c8d8f0;
  --accent-shadow:rgba(37,99,235,0.08);
  --accent-hover: #1d4ed8;
  --accent-underline: rgba(59,130,246,0.30);
}
/* Light mode auth button text */
[data-mode="light"] .auth-btn { color: #fff; }
[data-mode="light"][data-theme="amber"] .auth-btn { color: #111; }
[data-mode="light"][data-theme="slate"] .auth-btn { color: #fff; }

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; justify-content: space-between; }
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; }
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);
  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;
}
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;
}
.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; }
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;
  margin-left: 4px; padding: 6px 14px;
  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; }

/* ── 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); }

/* ── 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; }
}
