/* ================================================================
   MARENGO.STUDIO — Design System v3
   Dual theme · DM Sans · Premium glassmorphism
   Smooth transitions · Complete light/dark parity
================================================================ */

/* ── Design Tokens ── */
:root {
  --bg-primary: #07090d;
  --bg-secondary: #0b0f16;
  --bg-tertiary: #243447;
  --bg-card: rgba(14, 18, 26, 0.55);

  --text-primary: #eef1f4;
  --text-secondary: #aab6c3;
  --text-muted: #6f7f90;

  --accent-blue: #6f8fb8;
  --accent-cyan: #92a9bf;
  --accent-purple: rgba(0,0,0,0);

  --glow-blue: rgba(111, 143, 184, 0.10);
  --glow-cyan: rgba(146, 169, 191, 0.07);

  --border-subtle: rgba(170, 182, 195, 0.10);
  --border-glow: rgba(111, 143, 184, 0.18);

  --color-success: #10b981;
  --color-danger: #f87171;
  --color-warning: #fbbf24;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --duration-instant: 80ms;
  --duration-fast: 160ms;
  --duration-base: 240ms;
  --duration-slow: 420ms;

  --shadow-soft: 0 12px 40px rgba(0,0,0,0.35);
  --shadow-card: 0 10px 30px rgba(0,0,0,0.25);

  --focus-outline: 2px solid rgba(146,169,191,0.90);
  --focus-offset: 3px;
}

/* ── Light Theme (complete parity) ── */
:root[data-theme="light"] {
  --bg-primary: #f5f6f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255,255,255,0.70);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-blue: #3b6ea5;
  --accent-cyan: #5a8ec0;

  --glow-blue: rgba(111, 143, 184, 0.15);
  --glow-cyan: rgba(146, 169, 191, 0.10);

  --border-subtle: rgba(15, 23, 42, 0.10);
  --border-glow: rgba(111, 143, 184, 0.28);

  --color-success: #059669;
  --color-danger: #dc2626;
  --color-warning: #d97706;

  --shadow-soft: 0 12px 40px rgba(15,23,42,0.08);
  --shadow-card: 0 10px 30px rgba(15,23,42,0.06);

  --focus-outline: 2px solid rgba(59,110,165,0.80);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Smooth theme transition ──
   Applied via .theme-ready class AFTER first paint to avoid FOUC */
.theme-ready,
.theme-ready *,
.theme-ready *::before,
.theme-ready *::after {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.25s ease,
    box-shadow 0.35s ease,
    opacity 0.25s ease !important;
}
/* Exclude elements that need their own transitions */
.theme-ready .loader,
.theme-ready .loader *,
.theme-ready .particle,
.theme-ready .aurora *,
.theme-ready .cursor-glow,
.theme-ready .fc .fc-event,
.theme-ready .btn-shine { transition: unset !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ── Selection ── */
::selection {
  background: rgba(111,143,184,0.25);
  color: var(--text-primary);
}
:root[data-theme="light"] ::selection {
  background: rgba(59,110,165,0.20);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(170,182,195,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(170,182,195,0.40); }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.12); }
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,0.22); }

html { scrollbar-width: thin; scrollbar-color: rgba(170,182,195,0.25) transparent; }
:root[data-theme="light"] { scrollbar-color: rgba(15,23,42,0.12) transparent; }

/* ── Loading Screen ── */
.loader {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease-out-expo), visibility 0.7s;
}
.loader.hidden, .loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-content { display: flex; flex-direction: column; align-items: center; }

.loader-logo {
  width: 160px; display: flex; justify-content: center; align-items: center;
  opacity: 0; animation: loaderFadeIn 0.5s var(--ease-out-expo) forwards;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem; letter-spacing: 0.2em; color: var(--text-secondary);
  line-height: 1; user-select: none;
}
.loader-bar {
  width: 160px; height: 2px;
  background: var(--border-subtle);
  margin-top: 1rem; border-radius: 2px; overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  width: 0;
  animation: loaderProgress 1.4s var(--ease-out-expo) forwards;
}
@keyframes loaderFadeIn { to { opacity: 1; } }
@keyframes loaderProgress { to { width: 100%; } }

/* ── Noise Overlay ── */
.noise {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none; opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}
:root[data-theme="light"] .noise { opacity: 0.012; }

/* ── Aurora Background ── */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg-primary); }

.aurora-gradient {
  position: absolute; width: 150%; height: 150%; top: -25%; left: -25%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(111,143,184,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(146,169,191,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(111,143,184,0.07) 0%, transparent 55%);
  animation: auroraMove 25s ease-in-out infinite;
  will-change: transform;
}
:root[data-theme="light"] .aurora-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59,110,165,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(90,142,192,0.05) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(59,110,165,0.04) 0%, transparent 55%);
}

@keyframes auroraMove {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(5%, -5%) rotate(2deg) scale(1.02); }
  50% { transform: translate(-3%, 3%) rotate(-1deg) scale(0.98); }
  75% { transform: translate(-5%, -3%) rotate(1deg) scale(1.01); }
}

/* ── Orbs ── */
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(110px); opacity: 0.32;
  will-change: transform; animation: orbFloat 20s ease-in-out infinite;
}
:root[data-theme="light"] .orb { opacity: 0.18; filter: blur(120px); }

.orb-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle at 30% 30%, var(--accent-blue) 0%, transparent 60%);
  top: -300px; right: -200px;
}
.orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle at 70% 70%, var(--accent-cyan) 0%, transparent 60%);
  bottom: -200px; left: -150px; animation-delay: -7s;
}
.orb-3 { display: none; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -40px) scale(1.05); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* ── Grid Pattern ── */
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(170,182,195,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170,182,195,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
}
:root[data-theme="light"] .grid {
  background-image:
    linear-gradient(rgba(15,23,42,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.03) 1px, transparent 1px);
}

/* ── Particles ── */
.particles { position: absolute; inset: 0; overflow: hidden; }
.particle {
  position: absolute; background: var(--text-secondary);
  border-radius: 50%; opacity: 0;
  animation: particleRise 20s linear infinite;
  will-change: transform, opacity;
}
.particle::after {
  content: ''; position: absolute; inset: -2px;
  background: inherit; border-radius: inherit;
  filter: blur(4px); opacity: 0.5;
}
@keyframes particleRise {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  5% { opacity: 0.7; transform: translateY(90vh) scale(1); }
  95% { opacity: 0.7; transform: translateY(10vh) scale(1); }
  100% { opacity: 0; transform: translateY(0) scale(0); }
}

/* ── Cursor Glow ── */
.cursor-glow {
  position: fixed; width: 480px; height: 480px;
  background: radial-gradient(circle, var(--glow-blue) 0%, transparent 60%);
  border-radius: 50%; pointer-events: none; z-index: 1; opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s var(--ease-out-quart);
  will-change: transform, left, top;
}
@media (hover: hover) { body:hover .cursor-glow { opacity: 0.8; } }
@media (hover: none) {
  .cursor-glow {
    opacity: 0.4; width: 350px; height: 350px;
    animation: mobileGlow 15s ease-in-out infinite;
  }
  @keyframes mobileGlow {
    0%, 100% { left: 25%; top: 35%; }
    25% { left: 75%; top: 25%; }
    50% { left: 65%; top: 75%; }
    75% { left: 20%; top: 65%; }
  }
}

/* ── Main Container ── */
.main {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem; gap: 0.25rem;
}

/* ── Logo ── */
.logo-section {
  text-align: center; opacity: 0; transform: translateY(40px);
  animation: revealUp 1s var(--ease-out-expo) 1.8s forwards;
}
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

.logo { position: relative; display: inline-block; text-decoration: none; color: inherit; }
.logo-text {
  font-size: clamp(3.5rem, 14vw, 8rem); font-weight: 700;
  letter-spacing: -0.04em; line-height: 0.9;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; position: relative;
}
.logo-text::after {
  content: 'Marengo'; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: blur(30px); opacity: 0.5; z-index: -1;
}

.logo-line {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), transparent);
  transform: scaleX(0); transform-origin: left;
  animation: lineReveal 1.2s var(--ease-out-expo) 2.4s forwards;
}
@keyframes lineReveal { to { transform: scaleX(1); } }

.logo-sub {
  font-size: clamp(1.8rem, 6vw, 4rem); font-weight: 400;
  letter-spacing: 0.08em; color: var(--text-secondary);
  margin-top: 0.1em; opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s var(--ease-out-expo) 2.6s forwards;
}

/* ── Tagline ── */
.tagline {
  margin-top: 2.6rem; opacity: 0; transform: translateY(30px);
  animation: revealUp 0.8s var(--ease-out-expo) 2.8s forwards;
  text-align: center; max-width: 56ch;
}
.tagline-text {
  font-size: clamp(0.85rem, 2.1vw, 1.05rem); font-weight: 500;
  color: var(--text-muted); letter-spacing: 0.12em;
  text-transform: uppercase; line-height: 1.6;
}
.tagline-text + .tagline-text { margin-top: 0.65rem; }

/* ── Hero ── */
.hero {
  margin-top: 1.35rem; max-width: 62ch; text-align: center;
  opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s var(--ease-out-expo) 2.95s forwards;
}
.hero-points { list-style: none; display: grid; gap: 0.55rem; padding: 0; }
.hero-points li {
  display: inline-flex; align-items: baseline; justify-content: center;
  gap: 0.55rem; color: var(--text-secondary); line-height: 1.55; font-size: 0.95rem;
}
.hp-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(146,169,191,0.95), rgba(111,143,184,0.55));
  box-shadow: 0 0 0 4px rgba(111,143,184,0.12);
  flex-shrink: 0; transform: translateY(-1px);
}

/* ── Section Head ── */
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; margin-bottom: 1rem; }
.section-title { font-size: 1.05rem; font-weight: 650; letter-spacing: 0.01em; color: var(--text-primary); }
.section-sub { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.55; max-width: 64ch; }

/* ── Cards ── */
.preview, .roadmap {
  width: min(760px, 100%); margin-top: 1.55rem;
  opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s var(--ease-out-expo) 3.05s forwards;
}
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.card { padding: 0.95rem; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.55rem; }
.card-head { display: flex; flex-direction: column; gap: 4px; }
.card-title { font-size: 0.98rem; font-weight: 650; color: var(--text-primary); }
.card-subtitle { margin: 0; font-size: 0.9rem; line-height: 1.2; opacity: 0.75; }
.card-text { color: var(--text-secondary); line-height: 1.6; font-size: 0.92rem; white-space: normal; }

.badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: var(--text-secondary); padding: 0.28rem 0.55rem;
  border-radius: 999px; border: 1px solid rgba(170,182,195,0.16);
  background: rgba(7,9,13,0.22); white-space: nowrap;
}
:root[data-theme="light"] .badge { background: rgba(241,245,249,0.6); border-color: rgba(15,23,42,0.10); }

/* ── Status Badge ── */
.status {
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-top: 1.8rem; padding: 0.625rem 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 100px; backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s var(--ease-out-expo) 3s forwards;
}
.status-dot { position: relative; width: 8px; height: 8px; }
.status-dot::before, .status-dot::after {
  content: ''; position: absolute; inset: 0;
  background: var(--color-success); border-radius: 50%;
}
.status-dot::after { animation: statusPulse 2s ease-out infinite; }
@keyframes statusPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } }

.status-label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  font-weight: 500; color: var(--text-secondary); letter-spacing: 0.02em;
}

/* ── Links ── */
.links {
  margin-top: 1.1rem; display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center;
  opacity: 0; transform: translateY(18px);
  animation: revealUp 0.8s var(--ease-out-expo) 3.05s forwards;
}
.link-pill {
  text-decoration: none; color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  padding: 0.55rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(170,182,195,0.14);
  background: rgba(7,9,13,0.25); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: inline-flex; align-items: center; gap: .4rem;
  transition: transform 0.2s var(--ease-out-quart), border-color 0.25s;
}
:root[data-theme="light"] .link-pill {
  background: rgba(255,255,255,0.5); border-color: rgba(15,23,42,0.10);
}
.link-pill:hover { transform: translateY(-1px); border-color: rgba(146,169,191,0.35); }
.link-pill:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }

/* ── Theme Toggle (shared component) ── */
.theme-toggle {
  position: fixed; top: 1.25rem; right: 1.25rem; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border-subtle); border-radius: 50%;
  background: var(--bg-card); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary); cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.2s;
}
.theme-toggle:hover {
  background: var(--glow-blue); border-color: var(--border-glow);
  color: var(--text-primary); transform: scale(1.05);
}
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }

/* Icon show/hide by theme */
:root[data-theme="light"] .theme-icon--dark,
:root:not([data-theme="light"]) .theme-icon--light { display: none; }
:root[data-theme="light"] .theme-icon--light,
:root:not([data-theme="light"]) .theme-icon--dark { display: block; }

/* ── Notify Card ── */
.notify {
  width: min(520px, 100%); margin-top: 2.35rem;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 18px; padding: 1.1rem;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
  opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s var(--ease-out-expo) 3.1s forwards;
}
.notify-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; }
.notify-sub { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 0.9rem; }

.notify-form { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: stretch; }
.notify-form .chip-block { grid-column: 1 / -1; display: grid; gap: 0.55rem; margin-bottom: 0.15rem; }

.chip-title { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }
.chip-group { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  appearance: none; border: 1px solid rgba(170,182,195,0.16);
  background: rgba(7,9,13,0.22); color: var(--text-secondary);
  border-radius: 999px; padding: 0.45rem 0.7rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  cursor: pointer; transition: transform var(--duration-fast), border-color var(--duration-base);
}
:root[data-theme="light"] .chip { background: rgba(241,245,249,0.6); border-color: rgba(15,23,42,0.10); }
.chip:hover { transform: translateY(-1px); border-color: rgba(146,169,191,0.34); }
.chip[aria-pressed="true"] {
  border-color: rgba(146,169,191,0.45);
  background: linear-gradient(135deg, rgba(111,143,184,0.18), rgba(146,169,191,0.10));
  color: var(--text-primary);
}

.notify-input {
  flex: 1; border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(7,9,13,0.35); color: var(--text-primary);
  padding: 0.9rem 0.95rem; font-family: inherit; font-size: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
}
:root[data-theme="light"] .notify-input { background: rgba(241,245,249,0.8); }
.notify-input::placeholder { color: rgba(170,182,195,0.55); }
:root[data-theme="light"] .notify-input::placeholder { color: rgba(148,163,184,0.70); }
.notify-input:focus { border-color: var(--border-glow); box-shadow: 0 0 0 4px rgba(111,143,184,0.10); outline: none; }
.notify-input:focus-visible, .notify-btn:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.notify-input.is-invalid { border-color: rgba(248,113,113,0.45); box-shadow: 0 0 0 4px rgba(248,113,113,0.08); }
.notify-input.is-valid { border-color: rgba(16,185,129,0.40); box-shadow: 0 0 0 4px rgba(16,185,129,0.06); }

.notify-btn {
  position: relative; border: 1px solid rgba(146,169,191,0.25);
  background: linear-gradient(135deg, rgba(111,143,184,0.18), rgba(146,169,191,0.10));
  color: var(--text-primary); border-radius: 14px; padding: 0 1rem;
  font-weight: 600; cursor: pointer; min-width: 160px;
  transition: transform 0.2s, border-color 0.25s;
  overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.notify-btn:hover { transform: translateY(-1px); border-color: rgba(146,169,191,0.40); }
.notify-btn:active { transform: translateY(0); }
.notify-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-label { position: relative; z-index: 1; }
.btn-shine {
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s var(--ease-out-expo); pointer-events: none;
}
.notify-btn:hover .btn-shine { left: 100%; }

.notify-meta { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; }

.notify-privacy {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.5;
}

/* ── Consent Checkbox ── */
.consent {
  display: flex; align-items: flex-start; gap: 0.6rem;
  cursor: pointer; font-size: 0.84rem; color: var(--text-secondary);
  line-height: 1.45; padding: 0.35rem 0;
  transition: color 0.2s;
}
.consent:hover { color: var(--text-primary); }

.consent input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; min-width: 18px; margin-top: 1px;
  border: 1.5px solid rgba(170,182,195,0.25);
  border-radius: 5px; cursor: pointer;
  background: rgba(7,9,13,0.30);
  transition: all 0.2s var(--ease-out-quart);
  position: relative;
}
:root[data-theme="light"] .consent input[type="checkbox"] {
  background: rgba(241,245,249,0.8); border-color: rgba(15,23,42,0.15);
}
.consent input[type="checkbox"]:hover {
  border-color: var(--accent-blue);
}
.consent input[type="checkbox"]:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
.consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; top: 2px; left: 5px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent input[type="checkbox"]:focus-visible {
  outline: var(--focus-outline); outline-offset: var(--focus-offset);
}

.consent a {
  color: var(--accent-blue); text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.consent a:hover { color: var(--accent-cyan); }

/* ── Status messages ── */
.notify-msg { min-height: 1.2rem; font-size: 0.88rem; color: var(--text-secondary); display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 10px; }
.notify-msg:empty { display: none; }
.notify-msg .msg-icon { width: 18px; height: 18px; margin-top: 2px; opacity: 0.95; }
.notify-msg[data-state="success"] { color: var(--color-success); }
.notify-msg[data-state="error"]   { color: var(--color-danger); }
.notify-msg[data-state="info"]    { color: var(--accent-blue); }

.btn-spinner {
  width: 16px; height: 16px; display: none;
  border-radius: 999px; border: 2px solid rgba(146,169,191,0.28);
  border-top-color: rgba(146,169,191,0.85);
  animation: spin 0.9s linear infinite;
}
.notify-btn[data-state="loading"] .btn-spinner { display: inline-block; }
.notify-btn[data-state="loading"] .btn-label { opacity: 0.5; }
.notify-btn[data-state="loading"] .btn-shine { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Component primitives ── */
.c-card {
  background: rgba(10,12,18,0.45); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
}
:root[data-theme="light"] .c-card { background: rgba(255,255,255,0.75); }

.c-input { border-radius: var(--radius-md); transition: border-color var(--duration-base), box-shadow var(--duration-base); }
.c-btn { border-radius: var(--radius-md); transition: transform var(--duration-fast), border-color var(--duration-base); }

/* ── Shake animation (error feedback) ── */
@keyframes msShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(1px); }
}
.ms-shake {
  animation: msShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ── Toast notification ── */
.ms-toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.25rem; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 500;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.30);
  z-index: 10000; pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}
.ms-toast.is-visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.ms-toast--success {
  background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.30);
  color: var(--color-success);
}
.ms-toast--error {
  background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.30);
  color: var(--color-danger);
}
.ms-toast--info {
  background: rgba(111,143,184,0.15); border: 1px solid rgba(111,143,184,0.30);
  color: var(--accent-blue);
}
:root[data-theme="light"] .ms-toast--success { background: rgba(5,150,105,0.10); }
:root[data-theme="light"] .ms-toast--error { background: rgba(220,38,38,0.10); }
:root[data-theme="light"] .ms-toast--info { background: rgba(59,110,165,0.10); }

/* ── About ── */
.about { width: min(760px, 100%); margin-top: 1.35rem; padding: 1.1rem; }
.about-body { text-align: left; }
.about-p { color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; margin-top: 0.65rem; }
.about-p strong { color: var(--text-primary); }
.about-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.05rem; }

/* ── Standard pages ── */
.std-page { width: min(760px, 100%); margin-top: 1.35rem; padding: 1.1rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.page-meta { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--border-subtle); }
.page-kv { display: flex; gap: 0.6rem; align-items: center; }
.page-k { color: var(--text-secondary); font-size: 0.85rem; min-width: 72px; }
.page-v {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  color: var(--text-primary); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle); border-radius: 10px; padding: 0.25rem 0.5rem;
}
:root[data-theme="light"] .page-v { background: rgba(241,245,249,0.6); }
.inline-link { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.inline-link:hover { text-decoration-color: rgba(111,143,184,0.95); }

/* ── Honeypot ── */
.hp-field {
  position: absolute !important; left: -10000px !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
  opacity: 0 !important; pointer-events: none !important;
}

/* ── Focus ── */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: var(--focus-outline); outline-offset: var(--focus-offset);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .main { padding: 1.5rem; }
  .orb { opacity: 0.24; filter: blur(82px); }
  .orb-1 { width: 520px; height: 520px; top: -150px; right: -150px; }
  .orb-2 { width: 420px; height: 420px; bottom: -110px; left: -110px; }
  .cards-grid { grid-template-columns: 1fr; }
  .notify-form { grid-template-columns: 1fr; }
  .notify-btn { min-height: 48px; min-width: 100%; }
}
@media (max-width: 480px) {
  .main { padding: 1rem; }
  .logo-text { font-size: 3rem; }
  .logo-sub { font-size: 1.5rem; }
  .status { padding: 0.5rem 1rem; }
  .status-label { font-size: 0.75rem; }
  .theme-toggle { top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor-glow, .noise, .particle { display: none !important; }
  .theme-ready, .theme-ready *, .theme-ready *::before, .theme-ready *::after {
    transition: none !important;
  }
}