:root {
  --bg-deep: #0c0a14;
  --bg-mid: #16122a;
  --accent: #ff6b4a;
  --accent-soft: #ff8f75;
  --accent-glow: rgba(255, 107, 74, 0.45);
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --btn-primary-gradient: linear-gradient(
    135deg,
    #6d28d9 0%,
    #7c3aed 28%,
    #6366f1 55%,
    #2563eb 82%,
    #1d4ed8 100%
  );
  --btn-primary-shadow: 0 12px 40px rgba(91, 33, 182, 0.42), 0 4px 16px rgba(37, 99, 235, 0.22);
  --btn-primary-shadow-hover: 0 18px 52px rgba(124, 58, 237, 0.48), 0 8px 24px rgba(37, 99, 235, 0.28);
  --text: #f4f2ff;
  --text-muted: #b8b3cc;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --radius-lg: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .feature-card,
  .stat-card,
  .btn,
  .btn-primary,
  .btn.primary-btn,
  .btn-cosmic,
  .site-btn-primary {
    transition: none;
    transform: none;
  }

  .btn-primary:hover,
  .btn.primary-btn:hover,
  .btn-cosmic:hover,
  .site-btn-primary:hover {
    transform: none;
  }
  .stat-card:hover,
  .feature-card:hover {
    transform: none;
  }

  .btn-secondary:hover {
    transform: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(139, 92, 246, 0.35), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(34, 211, 238, 0.12), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(255, 107, 74, 0.15), transparent 40%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 55%);
  background-attachment: fixed;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: var(--space-sm);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 10, 20, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.48rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.12;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand-mark {
  font-weight: 800;
  font-size: 1em;
  letter-spacing: 0.06em;
  color: var(--text);
}

.brand-mark span {
  color: var(--accent-soft);
}

.brand-tagline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: none;
  color: rgba(232, 228, 255, 0.68);
  line-height: 1.4;
  max-width: 14rem;
  /* Warm + cosmic glow: violet/indigo core, cyan edge, whisper of ember */
  text-shadow:
    0 0 18px rgba(167, 139, 250, 0.42),
    0 0 32px rgba(99, 102, 241, 0.22),
    0 0 48px rgba(34, 211, 238, 0.1),
    0 0 1px rgba(255, 200, 180, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 400px) {
  .brand {
    font-size: clamp(1.2rem, 4.5vw, 1.35rem);
  }

  .brand-tagline {
    letter-spacing: 0.09em;
    font-size: 0.76em;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.site-nav a[aria-current="page"],
.site-nav a.active {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), var(--violet));
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.1;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #e8e4ff 40%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 38rem;
  margin: 0 auto var(--space-lg);
  font-size: 1.125rem;
  color: var(--text-muted);
}

body.page-home .hero-lead,
body.page-home .section-intro {
  font-family: Georgia, "Times New Roman", serif;
}

body.page-home #about .about-panel p {
  font-family: Georgia, "Times New Roman", serif;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.2s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.22s ease,
    filter 0.2s ease,
    background-position 0.35s ease;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary actions — one system: .btn + .primary-btn (or .btn-primary alias). Same gradient, pill radius, hover glow. */
.btn-primary,
.btn.primary-btn,
.btn-cosmic,
.site-btn-primary {
  border-radius: 999px;
  color: #f7f5ff;
  background: var(--btn-primary-gradient);
  background-size: 140% 140%;
  background-position: 0% 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(15, 10, 40, 0.35),
    var(--btn-primary-shadow),
    0 0 0 1px rgba(167, 139, 250, 0.2);
}

.btn-primary:hover,
.btn.primary-btn:hover,
.btn-cosmic:hover,
.site-btn-primary:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 12px rgba(124, 58, 237, 0.18),
    inset 0 -1px 0 rgba(15, 10, 40, 0.22),
    0 0 32px rgba(167, 139, 250, 0.38),
    var(--btn-primary-shadow-hover),
    0 0 0 1px rgba(129, 140, 248, 0.38);
}

.btn-primary:active,
.btn.primary-btn:active,
.btn-cosmic:active,
.site-btn-primary:active {
  transform: scale(0.98) translateY(0);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 28px rgba(34, 211, 238, 0.14),
    0 0 20px rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
}

.section-intro {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto var(--space-lg);
  color: var(--text-muted);
  font-size: 1.05rem;
}

#features {
  padding: var(--space-lg) 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(18, 14, 32, 0.72) 48%,
    rgba(12, 10, 22, 0.85) 100%
  );
  border: 1px solid rgba(167, 139, 250, 0.24);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(124, 58, 237, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 28px rgba(124, 58, 237, 0.1);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.25),
    0 16px 48px rgba(91, 33, 182, 0.28),
    0 0 52px rgba(124, 58, 237, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 36px rgba(99, 102, 241, 0.14);
}

.feature-icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  margin: 0 auto var(--space-sm);
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 18px rgba(124, 58, 237, 0.15),
    0 0 24px rgba(124, 58, 237, 0.25);
}

.feature-card:nth-child(1) .feature-icon {
  background: radial-gradient(circle at 32% 28%, rgba(196, 181, 253, 0.45), rgba(91, 33, 182, 0.4));
  color: #ede9fe;
}

.feature-card:nth-child(2) .feature-icon {
  background: radial-gradient(circle at 32% 28%, rgba(34, 211, 238, 0.28), rgba(79, 70, 229, 0.42));
  color: #cffafe;
}

.feature-card:nth-child(3) .feature-icon {
  background: radial-gradient(circle at 32% 28%, rgba(255, 143, 117, 0.3), rgba(139, 92, 246, 0.38));
  color: #ffe4e6;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  color: var(--text);
  width: 100%;
  text-align: center;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  width: 100%;
  text-align: center;
}

#about {
  padding: var(--space-xl) 0 var(--space-lg);
}

.about-panel {
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: linear-gradient(145deg, var(--surface-strong) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.about-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
}

.about-panel p {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  max-width: 52rem;
}

.about-panel p:last-of-type {
  margin-bottom: 0;
}

.about-home-more {
  margin-top: var(--space-md);
}

.about-home-more a {
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.about-home-more a:hover {
  color: #fff;
  border-bottom-color: rgba(34, 211, 238, 0.6);
}

.page-hero {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.05rem);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #e8e4ff 40%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero p {
  margin: 0 auto;
  max-width: 52rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.generator {
  padding-bottom: 0;
}

.content-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 960px) {
  .content-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.form-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: var(--space-md);
}

.field:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 700;
  color: var(--text);
  font-size: 0.98rem;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-sans);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

select[multiple] {
  min-height: 10rem;
}

input::placeholder,
textarea::placeholder {
  color: rgba(244, 242, 255, 0.6);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  align-items: center;
}

.seed-emma-block {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(167, 139, 250, 0.2);
}

.seed-emma-note {
  margin: 0 0 var(--space-sm);
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.seed-emma-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: rgba(216, 210, 255, 0.95);
}

#seed-emma-btn {
  margin-top: var(--space-xs);
}

/* Seed upload — accentuated cosmic gradient (matches primary CTA, extra aura) */
#seed-emma-btn.seed-emma-btn.btn.primary-btn {
  background: linear-gradient(
    125deg,
    rgba(124, 58, 237, 0.95) 0%,
    rgba(99, 102, 241, 0.92) 38%,
    rgba(34, 211, 238, 0.55) 100%
  );
  background-size: 160% 160%;
  background-position: 12% 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(15, 10, 40, 0.35),
    var(--btn-primary-shadow),
    0 0 28px rgba(124, 58, 237, 0.45),
    0 0 0 1px rgba(167, 139, 250, 0.35);
}

#seed-emma-btn.seed-emma-btn.btn.primary-btn:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 14px rgba(124, 58, 237, 0.22),
    0 0 40px rgba(34, 211, 238, 0.35),
    0 0 36px rgba(167, 139, 250, 0.42),
    0 0 0 1px rgba(129, 140, 248, 0.45);
}

.seed-success-msg {
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
}

.seed-success-msg.seed-success-msg--error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.08);
}

#seed-emma-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.card-preview {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-preview h3 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

#preview-content h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

#preview-content p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

#preview-content strong {
  color: var(--text);
}

.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: flex-start;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

@media (min-width: 720px) {
  .footer-nav {
    justify-content: flex-end;
  }
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--accent-soft);
}

.footer-signature {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-signature strong {
  color: var(--text);
  font-style: normal;
}

/* Age gate overlay */

.age-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: radial-gradient(
      circle at top,
      rgba(139, 92, 246, 0.6),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom,
      rgba(34, 211, 238, 0.4),
      transparent 55%
    ),
    rgba(5, 4, 12, 0.94);
  backdrop-filter: blur(18px);
  touch-action: none;
}

.age-gate-modal {
  max-width: 520px;
  width: 100%;
  max-height: min(92vh, 900px);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: radial-gradient(
      circle at top left,
      rgba(139, 92, 246, 0.22),
      transparent 60%
    ),
    rgba(15, 14, 30, 0.94);
  border: 1px solid rgba(148, 163, 255, 0.45);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
}

.tos-modal {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.age-gate-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}

.age-gate-subtitle {
  margin: 0.75rem 0 var(--space-md);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.age-gate-body {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.age-gate-body-small {
  font-size: 0.9rem;
}

.age-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-md) 0 var(--space-sm);
}

.age-gate-actions .btn {
  flex: 1 1 220px;
}

.age-gate-deny-btn {
  color: #fee2e2;
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 60%, #b91c1c 100%);
  border: 1px solid rgba(248, 113, 113, 0.55);
}

.age-gate-deny-btn:hover {
  filter: brightness(1.07);
}

.age-gate-status {
  min-height: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.age-gate-status[data-type="error"] {
  color: #fecaca;
}

.age-gate-status[data-type="success"] {
  color: #bbf7d0;
}

.age-gate-legal {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.tos-scroll {
  overflow-y: auto;
  max-height: min(52vh, 460px);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 255, 0.28);
  background: rgba(10, 11, 24, 0.75);
}

.tos-section {
  margin-bottom: var(--space-sm);
}

.tos-section:last-child {
  margin-bottom: 0;
}

.tos-section h2 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  color: var(--text);
}

.tos-section p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tos-accept-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 0.9rem;
}

.tos-accept-row input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.tos-actions {
  display: flex;
  justify-content: flex-end;
}

.tos-actions .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.1);
}

.age-gate-fade-out {
  animation: ageGateFadeOut 0.22s ease forwards;
}

.age-gate-blocked .btn {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 560px) {
  .age-gate-modal {
    padding: var(--space-md);
  }

  .age-gate-header h1 {
    font-size: 1.2rem;
    letter-spacing: 0.08em;
  }

  .age-gate-actions {
    flex-direction: column;
  }

  .tos-modal {
    max-width: 100%;
  }

  .tos-scroll {
    max-height: 46vh;
  }

  .tos-actions {
    justify-content: stretch;
  }

  .tos-actions .btn {
    width: 100%;
  }
}

@keyframes ageGateFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

body.age-gate-active {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Cookie consent banner + modal (MADDY — The Elysium Project) */

.cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  padding: var(--space-sm) var(--space-md);
  padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
  background: linear-gradient(
      180deg,
      rgba(12, 10, 20, 0) 0%,
      rgba(12, 10, 20, 0.92) 28%
    ),
    radial-gradient(
      ellipse 90% 120% at 50% 100%,
      rgba(139, 92, 246, 0.35),
      transparent 55%
    ),
    rgba(8, 7, 18, 0.97);
  border-top: 1px solid rgba(148, 163, 255, 0.35);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cookie-consent-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.cookie-consent-text {
  margin: 0;
  flex: 1 1 280px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: flex-end;
}

.cookie-consent-actions .btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

.cookie-consent-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(5, 4, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-consent-modal {
  max-width: 520px;
  width: 100%;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: radial-gradient(
      circle at top,
      rgba(139, 92, 246, 0.2),
      transparent 55%
    ),
    rgba(15, 14, 30, 0.96);
  border: 1px solid rgba(148, 163, 255, 0.4);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.cookie-modal-title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cookie-modal-intro {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-toggle-list {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
}

.cookie-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.cookie-toggle-row:last-child {
  border-bottom: none;
}

.cookie-toggle-row--locked {
  opacity: 0.95;
}

.cookie-toggle-label {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.cookie-toggle-desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cookie-toggle-input {
  margin-top: 0.35rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.cookie-toggle-locked {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  white-space: nowrap;
  margin-top: 0.25rem;
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: flex-end;
}

body.cookie-consent-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.footer-nav a.cookie-settings-link {
  cursor: pointer;
}

@media (max-width: 640px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    justify-content: stretch;
  }

  .cookie-consent-actions .btn-sm {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* —— Site navigation (responsive) —— */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0.55rem 0.7rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent-soft), var(--violet));
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav--collapsible {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
    padding-top: var(--space-xs);
  }

  .site-nav--collapsible.is-open {
    display: flex;
  }

  .site-nav--collapsible a {
    text-align: center;
  }
}

@media (min-width: 961px) {
  .site-nav--collapsible {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
  }

  .nav-toggle {
    display: none !important;
  }
}

/* —— Mystical hover / glow —— */

.form-card:hover,
.card-preview:hover {
  box-shadow:
    0 20px 56px rgba(139, 92, 246, 0.12),
    var(--shadow);
}

/* —— Emma 4.0 status dashboard —— */

.status-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-radius: var(--radius-lg);
  background: linear-gradient(
      145deg,
      var(--surface-strong) 0%,
      rgba(139, 92, 246, 0.1) 55%,
      rgba(34, 211, 238, 0.04) 100%
    );
  border: 1px solid rgba(148, 163, 255, 0.22);
  box-shadow:
    var(--shadow),
    0 0 72px rgba(139, 92, 246, 0.1);
}

.status-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  text-align: center;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #e8e4ff 45%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status-lead {
  text-align: center;
  margin: 0 0 var(--space-lg);
  color: var(--text-muted);
  font-size: 0.98rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
}

@media (min-width: 560px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(139, 92, 246, 0.06) 100%
  );
  border: 1px solid rgba(148, 163, 255, 0.18);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow:
    0 18px 52px rgba(139, 92, 246, 0.2),
    0 0 28px rgba(34, 211, 238, 0.08),
    var(--shadow);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--text);
  letter-spacing: -0.02em;
}

.memory-list {
  max-height: 420px;
  overflow-y: auto;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    180deg,
    rgba(10, 11, 24, 0.88) 0%,
    rgba(22, 18, 42, 0.75) 100%
  );
  border: 1px solid rgba(148, 163, 255, 0.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.25);
}

.memory-item {
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.memory-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.memory-item strong {
  color: var(--text);
  font-weight: 600;
}

.memory-item-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-actions {
  text-align: center;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.status-last-updated {
  margin: 0;
  padding: 0 var(--space-xs) var(--space-sm);
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.status-last-updated::before {
  content: "";
  display: block;
  width: 5rem;
  height: 1px;
  margin: 0 auto var(--space-sm);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 92, 246, 0.5),
    rgba(34, 211, 238, 0.35),
    transparent
  );
}

.status-empty,
.status-error {
  margin: 0;
  padding: var(--space-md);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.status-error {
  color: #fecaca;
}

.footer-project {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-weight: 600;
  color: var(--accent-soft);
  font-size: 0.95rem;
}

/* —— Emma's Mind (graph viewer) —— immersive layout */
.page-graph {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-graph .site-header,
.page-graph .site-footer {
  flex-shrink: 0;
}

.page-graph #main.graph-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: var(--space-sm) clamp(0.75rem, 3vw, 2rem) var(--space-md);
}

.page-graph .graph-top {
  flex: 0 0 auto;
}

.page-graph .graph-hero.page-hero {
  margin-bottom: var(--space-sm);
  text-align: center;
}

.page-graph .graph-hero.page-hero h1 {
  margin-bottom: 0.35rem;
}

.graph-lead {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.02rem);
  line-height: 1.6;
}

.graph-inline-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  padding: 0.12em 0.45em;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: rgba(216, 210, 255, 0.95);
}

.graph-panel {
  margin-bottom: var(--space-xs);
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-xs);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.graph-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.graph-legend-item--muted::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #5b21b8;
  border: 1px solid #7c3aed;
  margin-right: 0.35rem;
}

.graph-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.graph-dot--julian {
  background: #fbbf24;
  border-color: #d97706;
}

.graph-dot--emma {
  background: #f472b6;
  border-color: #be185d;
}

.graph-dot--maddy {
  background: #a78bfa;
  border-color: #5b21b6;
}

.graph-dot--elysium {
  background: #22d3ee;
  border-color: #0e7490;
}

.graph-dot--memory {
  background: linear-gradient(135deg, #5865a8, #8b7fd8);
  border-color: rgba(167, 139, 250, 0.5);
}

.graph-hint {
  margin: 0 0 var(--space-sm);
  font-size: clamp(0.75rem, 2vw, 0.8rem);
  color: rgba(184, 179, 204, 0.75);
  letter-spacing: 0.02em;
}

.graph-status {
  font-size: 0.88rem;
  color: var(--cyan);
  margin-bottom: var(--space-sm);
}

.graph-error {
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(127, 29, 29, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  text-align: center;
}

.graph-error p {
  margin: 0 0 var(--space-sm);
}

.graph-layout {
  flex: 1 1 auto;
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: min(68vh, calc(100vh - 14.5rem));
}

@media (min-width: 960px) {
  .graph-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, min(32vw, 340px));
    grid-template-rows: minmax(0, 1fr);
    min-height: min(82vh, calc(100vh - 10.5rem));
  }
}

.graph-canvas-shell {
  position: relative;
  width: 100%;
  min-height: clamp(300px, 56vh, 920px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  align-self: stretch;
}

@media (min-width: 960px) {
  .graph-canvas-shell {
    min-height: min(78vh, calc(100vh - 11rem));
    height: 100%;
  }
}

.graph-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 100% 80% at 50% 15%, rgba(91, 33, 182, 0.28), transparent 58%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(34, 211, 238, 0.08), transparent 50%),
    linear-gradient(168deg, rgba(8, 6, 18, 0.97), rgba(18, 12, 32, 0.99));
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    inset 0 0 72px rgba(124, 58, 237, 0.12),
    inset 0 0 120px rgba(34, 211, 238, 0.04),
    0 16px 56px rgba(0, 0, 0, 0.45);
  animation: graph-canvas-ambient 14s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .graph-canvas {
    animation: none;
  }
}

@keyframes graph-canvas-ambient {
  0%,
  100% {
    box-shadow:
      inset 0 0 72px rgba(124, 58, 237, 0.12),
      inset 0 0 120px rgba(34, 211, 238, 0.04),
      0 16px 56px rgba(0, 0, 0, 0.45);
  }
  50% {
    box-shadow:
      inset 0 0 88px rgba(124, 58, 237, 0.16),
      inset 0 0 100px rgba(255, 107, 74, 0.03),
      0 20px 64px rgba(91, 33, 182, 0.25);
  }
}

.graph-detail {
  max-height: min(40vh, 360px);
  overflow-y: auto;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: rgba(10, 8, 20, 0.82);
  border: 1px solid rgba(167, 139, 250, 0.22);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 960px) {
  .graph-detail {
    max-height: none;
    align-self: stretch;
    min-height: 0;
  }
}

.graph-detail-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  color: var(--text);
  line-height: 1.35;
}

.graph-detail-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.graph-detail-body p {
  margin: 0 0 var(--space-sm);
}

.graph-detail-content {
  color: var(--text);
  font-size: 0.92rem;
}

.graph-detail-dl {
  margin: 0 0 var(--space-sm);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.86rem;
}

.graph-detail-dl dt {
  margin: 0;
  color: rgba(184, 179, 204, 0.85);
  font-weight: 600;
}

.graph-detail-dl dd {
  margin: 0;
}

.graph-detail-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}

.graph-detail-muted {
  color: rgba(184, 179, 204, 0.65);
  font-size: 0.86rem;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 var(--space-xs);
}

.graph-toolbar .btn {
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
}

.graph-detail-backdrop {
  display: none;
}

@media (max-width: 959px) {
  .graph-detail-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(4, 2, 12, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 85;
  }
}

.graph-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.graph-detail-header .graph-detail-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.08rem;
}

.graph-detail-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.25rem -0.25rem 0 0;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.graph-detail-close:hover {
  background: rgba(167, 139, 250, 0.25);
  border-color: rgba(196, 181, 253, 0.5);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.graph-detail-section {
  margin-bottom: var(--space-md);
}

.graph-detail-section:last-child {
  margin-bottom: 0;
}

.graph-detail-section h3 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.75);
  margin: 0 0 0.45rem;
}

.graph-detail-prose {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  white-space: pre-wrap;
  word-break: break-word;
}

.graph-importance-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.graph-importance-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  min-width: 2rem;
}

.graph-importance-track {
  flex: 1;
  min-width: 120px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.2);
  overflow: hidden;
}

.graph-importance-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
  transition: width 0.35s ease;
}

.graph-detail-timestamp {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(216, 210, 255, 0.88);
  font-variant-numeric: tabular-nums;
}

.graph-entity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.graph-entity-pill {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: rgba(232, 228, 255, 0.95);
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.15);
}

.graph-detail-list--connections {
  list-style: none;
  padding: 0;
  margin: 0;
}

.graph-detail-list--connections li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
}

.graph-detail-list--connections li:last-child {
  border-bottom: none;
}

.graph-detail-list--connections code {
  font-size: 0.82rem;
  color: rgba(196, 181, 253, 0.95);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
}

@media (max-width: 959px) {
  .graph-detail:not([hidden]) {
    position: fixed;
    left: clamp(0.5rem, 3vw, 1rem);
    right: clamp(0.5rem, 3vw, 1rem);
    bottom: clamp(0.5rem, 3vw, 1rem);
    max-height: min(52vh, 420px);
    z-index: 90;
    margin: 0;
    box-shadow:
      0 -8px 48px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(167, 139, 250, 0.25),
      0 0 40px rgba(124, 58, 237, 0.2);
  }
}

/* —— FAQ page —— */
.page-faq .faq-main {
  max-width: var(--max);
}

.faq-page-hero {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.faq-kicker {
  display: inline-block;
  margin: 0 0 var(--space-sm);
  padding: 0.3rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.9);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 999px;
}

.faq-page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #e8e4ff 45%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.faq-deck {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-toc {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(12, 10, 22, 0.85));
  border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.06);
}

.faq-toc-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.85);
  margin: 0 0 var(--space-sm);
}

.faq-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.faq-toc-list a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s, text-shadow 0.2s;
}

.faq-toc-list a:hover {
  color: #fff;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.faq-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}

.faq-topic {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(18, 14, 32, 0.75) 100%);
  border: 1px solid rgba(167, 139, 250, 0.18);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.faq-topic h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.faq-intro p {
  margin: 0 0 var(--space-sm);
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.faq-intro p:last-child {
  margin-bottom: 0;
}

.faq-steps {
  margin: 0 0 var(--space-sm);
  padding-left: 1.35rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-steps li {
  margin-bottom: 0.45rem;
}

.faq-steps li::marker {
  color: rgba(167, 139, 250, 0.85);
  font-weight: 700;
}

.faq-intro a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.35);
}

.faq-intro a:hover {
  color: #fff;
  border-bottom-color: rgba(34, 211, 238, 0.65);
}

.faq-accordion {
  margin-top: var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(8, 6, 18, 0.55);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-accordion[open] {
  border-color: rgba(167, 139, 250, 0.38);
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.12);
}

.faq-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: rgba(232, 228, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::before {
  content: "✦";
  font-size: 0.65rem;
  opacity: 0.75;
  color: var(--cyan);
  transition: transform 0.25s ease;
}

.faq-accordion[open] summary::before {
  transform: rotate(90deg);
}

.faq-accordion summary:hover {
  background: rgba(124, 58, 237, 0.12);
}

.faq-accordion summary:focus {
  outline: none;
}

.faq-accordion summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.faq-accordion-body {
  padding: 0 var(--space-md) var(--space-md);
  border-top: 1px solid rgba(167, 139, 250, 0.12);
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(216, 210, 255, 0.88);
}

.faq-accordion-body p {
  margin: 0 0 var(--space-sm);
}

.faq-accordion-body p:last-child {
  margin-bottom: 0;
}

.faq-accordion--compact {
  margin-top: var(--space-xs);
}

.faq-accordion--compact summary {
  font-size: 0.88rem;
  font-weight: 600;
}

.faq-list {
  margin: 0;
  padding-left: 1.15rem;
  color: rgba(216, 210, 255, 0.88);
}

.faq-list li {
  margin-bottom: 0.4rem;
}

.faq-inline-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.86em;
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: rgba(230, 224, 255, 0.95);
}

.faq-code {
  display: block;
  margin: var(--space-sm) 0;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: rgba(4, 2, 12, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: rgba(216, 210, 255, 0.92);
  box-shadow: inset 0 0 24px rgba(124, 58, 237, 0.08);
}

.faq-code code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  white-space: pre;
}

.faq-note {
  margin: var(--space-sm) 0 0;
  font-size: 0.84rem;
  color: rgba(184, 179, 204, 0.75);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .faq-accordion summary::before {
    transition: none;
  }
}

/* —— Developer Guide —— */
.page-dev-guide .dev-guide-main {
  max-width: var(--max);
}

.page-dev-guide .dev-guide-section h3.dev-guide-h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.88);
  margin: var(--space-md) 0 var(--space-sm);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.page-dev-guide .dev-guide-section h3.dev-guide-h3:first-of-type {
  margin-top: 0;
}

.page-dev-guide .dev-guide-section .faq-intro {
  margin-bottom: var(--space-sm);
}

.page-dev-guide .dev-ascii {
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

@media (min-width: 640px) {
  .page-dev-guide .dev-ascii {
    font-size: 0.78rem;
  }
}

/* —— Contact —— */
.page-contact .contact-main {
  max-width: var(--max);
  padding-bottom: var(--space-xl);
}

.contact-hero .contact-intro {
  font-size: 1.12rem;
  color: rgba(232, 228, 255, 0.92);
}

.contact-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: stretch;
}

@media (min-width: 900px) {
  .contact-body {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-xl);
  }

  .contact-body .contact-form {
    flex: 1.15;
    min-width: 0;
  }

  .contact-body .contact-aside {
    flex: 0.85;
    position: sticky;
    top: calc(var(--space-md) + 4rem);
  }
}

.page-contact .contact-form {
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(18, 14, 32, 0.82) 100%);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(124, 58, 237, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.page-contact .contact-form input[type="text"],
.page-contact .contact-form input[type="email"],
.page-contact .contact-form textarea {
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(8, 6, 20, 0.72);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.page-contact .contact-form input[type="text"]:hover,
.page-contact .contact-form input[type="email"]:hover,
.page-contact .contact-form textarea:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(12, 10, 28, 0.85);
}

.page-contact .contact-form input[type="text"]:focus,
.page-contact .contact-form input[type="email"]:focus,
.page-contact .contact-form textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.35),
    0 0 24px rgba(34, 211, 238, 0.22),
    0 0 48px rgba(124, 58, 237, 0.12);
  background: rgba(10, 8, 24, 0.92);
}

.page-contact .contact-form input:focus-visible,
.page-contact .contact-form textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.contact-form-actions {
  margin-top: var(--space-md);
}

.contact-form-hint {
  margin: var(--space-md) 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(184, 179, 204, 0.82);
}

.contact-aside {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  text-align: center;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.12), rgba(12, 10, 22, 0.88));
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.1);
}

.contact-fallback-label {
  margin: 0 0 var(--space-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(216, 210, 255, 0.9);
}

.contact-email-cta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(34, 211, 238, 0.18));
  border: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-email-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(34, 211, 238, 0.35);
  border-color: rgba(34, 211, 238, 0.5);
}

.contact-email-cta:focus {
  outline: none;
}

.contact-email-cta:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.contact-sla {
  margin: var(--space-md) 0 0;
  font-size: 0.92rem;
  color: rgba(184, 179, 204, 0.88);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .contact-email-cta {
    transition: none;
  }

  .contact-email-cta:hover {
    transform: none;
  }
}

/* —— About —— */
.page-about .about-main {
  max-width: var(--max);
  padding-bottom: var(--space-xl);
}

.about-hero .about-hero-deck {
  max-width: 42rem;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.page-about .about-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-prose p {
  margin: 0 0 var(--space-sm);
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.about-prose p:last-child {
  margin-bottom: 0;
}

.about-feature-list {
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}

.about-feature-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.about-feature-item strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.about-feature-item strong a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(34, 211, 238, 0.35);
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

.about-feature-item strong a:hover {
  color: #fff;
  border-bottom-color: rgba(34, 211, 238, 0.65);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
}

.about-feature-item span {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  padding-left: 0.15rem;
}

.about-note {
  margin: var(--space-sm) 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(184, 179, 204, 0.88);
}

.about-note a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.3);
}

.about-note a:hover {
  color: #fff;
  border-bottom-color: rgba(34, 211, 238, 0.55);
}

.about-section--closing {
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.1) 0%, rgba(18, 14, 32, 0.65) 100%);
  border-color: rgba(167, 139, 250, 0.28);
}

.about-closing-line {
  font-size: 1.05rem !important;
  color: rgba(232, 228, 255, 0.92) !important;
}

