/* ResumeAI — Design System v2 (2026-05-14)
 * Editorial-clean (Enhancv/Teal base) + Apple-polish micro-details.
 * Inter variable font, indigo brand, gradient-as-lighting (not wallpaper). */

/* ── FONTS ──────────────────────────────────────────────────────── */
@font-face {
  font-family: 'InterVar';
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  src: url('https://rsms.me/inter/font-files/InterVariable.woff2?v=4.0') format('woff2');
}

/* ── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg-base: #ffffff;
  --bg-soft: #fafafb;
  --bg-muted: #f4f4f6;
  --bg-tint: #f9fafb;
  --bg-elevated: #ffffff;
  --bg-inverse: #0b1220;

  /* Borders */
  --border-subtle: #f1f5f9;
  --border-default: #e5e7eb;
  --border-strong: #d1d5db;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Brand — indigo */
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;

  /* Accent — pink for gradient harmony */
  --accent-500: #ec4899;

  /* Semantic */
  --success: #10b981;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --info-bg: #dbeafe;
  --info-text: #1e40af;

  /* Hero gradient — used as 'lighting' not wallpaper */
  --hero-glow:
    radial-gradient(75% 60% at 50% 0%, rgba(129, 140, 248, 0.22) 0%, transparent 65%),
    radial-gradient(50% 50% at 85% 15%, rgba(236, 72, 153, 0.16) 0%, transparent 55%),
    radial-gradient(60% 60% at 15% 25%, rgba(59, 130, 246, 0.14) 0%, transparent 60%);

  /* Typography */
  --font-sans: 'InterVar', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* Radius */
  --r-xs: 4px;  --r-sm: 6px;  --r-md: 10px; --r-lg: 14px;
  --r-xl: 20px; --r-2xl: 28px; --r-pill: 999px;

  /* Shadows — multi-layer for depth */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 20px -3px rgba(15,23,42,.09), 0 4px 8px -4px rgba(15,23,42,.05);
  --shadow-xl: 0 22px 44px -10px rgba(15,23,42,.14), 0 8px 16px -8px rgba(15,23,42,.06);
  --shadow-brand: 0 8px 20px -4px rgba(79,70,229,.32);
  --shadow-focus: 0 0 0 4px rgba(99,102,241,.20);

  /* Motion */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 360ms;

  /* Z-index */
  --z-nav: 50;
  --z-modal: 100;
  --z-toast: 200;
}

/* ── RESET + BASE ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.55;
  font-size: 15px;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 700; letter-spacing: -0.028em; line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.022em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0; color: var(--text-secondary); line-height: 1.65; }
a { color: var(--brand-600); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-700); }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand-700);
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.label-mini { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); }
.gradient-text {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--accent-500) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── TOP NAV (sticky, glass) ────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-nav__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.site-nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--text-primary);
  letter-spacing: -0.01em;
}
.site-nav__brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.25);
}
.site-nav__links { display: flex; align-items: center; gap: 2px; }
.site-nav__link {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  padding: 8px 14px; border-radius: var(--r-md);
  transition: background var(--t-fast), color var(--t-fast);
}
.site-nav__link:hover { background: var(--bg-muted); color: var(--text-primary); }
.site-nav__link.is-active { background: var(--brand-50); color: var(--brand-700); }
.site-nav__cta { display: inline-flex; align-items: center; gap: 8px; }
.site-nav__user {
  font-size: 13px; color: var(--text-secondary);
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--bg-muted);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap; line-height: 1.2;
  user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.2); }
.btn-primary:hover { background: var(--brand-700); box-shadow: var(--shadow-brand); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary { background: var(--bg-base); color: var(--text-primary); border-color: var(--border-default); }
.btn-secondary:hover { background: var(--bg-muted); border-color: var(--border-strong); }
.btn-secondary:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-muted); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-danger-ghost { background: transparent; color: var(--danger-text); border-color: #fecaca; }
.btn-danger-ghost:hover { background: var(--danger-bg); }

.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: var(--r-lg); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-block { width: 100%; }

/* ── INPUTS / FORMS ─────────────────────────────────────────────── */
label, .field-label {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  display: block; margin-bottom: 6px; letter-spacing: -0.005em;
}
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=number], textarea, select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px; color: var(--text-primary);
  background: var(--bg-base);
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); font-style: normal; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
textarea { resize: vertical; min-height: 88px; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 38px;
}

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.card-hover:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.card-title {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; letter-spacing: -0.01em;
}
.card-title-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand-50); color: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

/* ── CHIPS / TAGS ───────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; line-height: 1.4;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--bg-muted); color: var(--text-secondary);
}
.chip-success { background: var(--success-bg); color: var(--success-text); }
.chip-warning { background: var(--warning-bg); color: var(--warning-text); }
.chip-danger { background: var(--danger-bg); color: var(--danger-text); }
.chip-brand { background: var(--brand-50); color: var(--brand-700); }
.chip-info { background: var(--info-bg); color: var(--info-text); }

/* ── LAYOUT HELPERS ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.container-tight { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-6 > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── HERO (marketing landing) ───────────────────────────────────── */
.hero {
  position: relative;
  padding: 96px 24px 80px;
  text-align: center;
  background: var(--bg-base);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--hero-glow);
  pointer-events: none;
}
.hero__inner { max-width: 880px; margin: 0 auto; }
.hero__title { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 24px 0 20px; }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary); max-width: 640px; margin: 0 auto 36px; line-height: 1.55; }
.hero__ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero__proof { margin-top: 56px; display: flex; gap: 56px; flex-wrap: wrap; justify-content: center; }
.hero__proof-item { text-align: center; }
.hero__proof-num { font-size: 28px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.hero__proof-lbl { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }

/* ── DROPZONE / UPLOAD ──────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-base);
  background: var(--bg-soft);
}
.dropzone:hover { border-color: var(--brand-500); background: var(--brand-50); }
.dropzone.is-active { border-color: var(--brand-600); background: var(--brand-50); transform: scale(1.005); }
.dropzone.has-file { border-color: var(--success); background: var(--success-bg); border-style: solid; }
.dropzone__icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--brand-600); }
.dropzone__text { font-size: 14px; color: var(--text-secondary); }
.dropzone__text strong { color: var(--brand-700); font-weight: 600; }
input[type=file] { display: none; }

/* ── MESSAGES / ALERTS ──────────────────────────────────────────── */
.msg { font-size: 13px; padding: 10px 14px; border-radius: var(--r-md); line-height: 1.5; }
.msg-ok { background: var(--success-bg); color: var(--success-text); }
.msg-err { background: var(--danger-bg); color: var(--danger-text); }
.msg-info { background: var(--info-bg); color: var(--info-text); }
.msg-warn { background: var(--warning-bg); color: var(--warning-text); }

/* ── SPINNER ────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: ds-spin 0.7s linear infinite;
  vertical-align: middle;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ── FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-default);
  padding: 40px 24px;
  text-align: center; font-size: 13px; color: var(--text-tertiary);
  background: var(--bg-soft);
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--text-primary); }

/* ── TOAST (bottom-right pill) ──────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-inverse); color: white;
  padding: 12px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── UTIL ───────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── REDUCED MOTION ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero::before { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — 3-tier breakpoint system (session 20).
     • sm: 0–640px   (phones)
     • md: 641–1024px (tablets, foldables, small laptops)
     • lg: 1025px+   (desktops, monitors)
   These are the ONLY thresholds used across the app. Resist adding
   new ones — pick the closest tier instead.
   Fluid typography + spacing via clamp() handles the in-between
   widths so layouts smooth-scale instead of jumping at thresholds.
   ═══════════════════════════════════════════════════════════════════ */

/* ── TABLET (≤ 1024px) — softer transitions before the mobile cliff */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .site-nav__inner { padding: 12px 20px; }
  .site-nav__link { padding: 7px 12px; font-size: 13.5px; }
}

/* ── MOBILE (≤ 640px) — the small-phone cliff */
@media (max-width: 640px) {
  .site-nav__inner { padding: 10px 14px; gap: 10px; }
  /* Hide the inline horizontal links — replaced by the drawer (see below). */
  .site-nav__links { display: none; }
  .site-nav__user { display: none; }
  .site-nav__brand { font-size: 14px; flex: 1; }
  .site-nav__brand-mark { width: 28px; height: 28px; font-size: 12px; }
  .site-nav__cta { gap: 4px; }
  /* Theme toggle shrinks slightly on tiny viewports */
  .theme-toggle { width: 34px; height: 34px; }
  /* Sign-in button compact form on mobile */
  .site-nav__cta .btn-sm { padding: 6px 10px; font-size: 12.5px; }
  /* Avatar dropdown shrinks for thumb-friendly tap */
  .nav-avatar { width: 30px; height: 30px; font-size: 12px; }
  .nav-menu { right: -4px; min-width: 220px; }
  .container, .container-narrow, .container-tight { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section-tight { padding: 28px 0; }
  .hero { padding: 48px 16px 40px; }
  /* Proof bar: 2x2 grid on phones (4 items in flex would overflow) */
  .hero__proof {
    gap: 20px 16px;
    margin-top: 28px;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
  }
  .hero__proof-item { text-align: center; }
  .hero__proof-num { font-size: 22px !important; }
  .hero__proof-lbl { font-size: 12px !important; }
  /* CTA buttons stack vertically — full width, never clip */
  .hero__ctas {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .hero__ctas .btn { flex: none; width: 100%; min-width: 0; }
  .card { padding: 16px; border-radius: var(--r-md); }
  /* Tighter button padding so they don't dominate small viewports */
  .btn-lg { padding: 12px 18px; font-size: 14.5px; }
  .btn { padding: 9px 14px; font-size: 13.5px; }
  /* Inputs gain touch-friendly height + 16px font kills iOS auto-zoom */
  input[type=text], input[type=email], input[type=password], input[type=tel],
  input[type=url], input[type=number], textarea, select {
    font-size: 16px;
    padding: 12px 14px;
  }
}

/* ── HAMBURGER BUTTON ─────────────────────────────────────────────── */
/* Injected at runtime by /auth-client.js's setupMobileNav(). Hidden
   above 640 — the inline nav links cover navigation at desktop sizes. */
.nav-hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  cursor: pointer;
  padding: 0;
  gap: 4px;
  flex-direction: column;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.nav-hamburger:hover { background: var(--bg-muted); border-color: var(--border-strong); }
.nav-hamburger:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.nav-hamburger__bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast);
}
.nav-hamburger.is-active .nav-hamburger__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger.is-active .nav-hamburger__bar:nth-child(2) { opacity: 0; }
.nav-hamburger.is-active .nav-hamburger__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
@media (max-width: 640px) {
  .nav-hamburger { display: inline-flex; }
}

/* ── NAV DRAWER ────────────────────────────────────────────────────── */
.nav-drawer {
  position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 90;
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
  display: flex; align-items: flex-start; justify-content: stretch;
}
.nav-drawer[hidden] { display: none; }
.nav-drawer.is-open { opacity: 1; }
.nav-drawer__panel {
  width: 100%;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  padding: 16px 18px 22px;
  transform: translateY(-12px);
  transition: transform 220ms var(--ease-out);
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
}
.nav-drawer.is-open .nav-drawer__panel { transform: translateY(0); }
.nav-drawer__head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-tertiary);
  padding: 4px 4px 12px; border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}
.nav-drawer__link {
  display: block;
  padding: 14px 12px;
  font-size: 15px; font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background var(--t-fast);
}
.nav-drawer__link:hover, .nav-drawer__link:focus-visible {
  background: var(--bg-muted);
  outline: none;
}
.nav-drawer__link.is-active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}
[data-theme="dark"] .nav-drawer { background: rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .nav-drawer__panel { background: var(--bg-elevated); }

/* ── FLUID TYPOGRAPHY + SPACING — smooth between breakpoints ────── */
/* These override the static font-sizes from base typography. Result:
   instead of font sizes jumping at each breakpoint, they scale
   linearly with viewport width, clamped at min/max. */
body { font-size: clamp(14px, 0.5vw + 13px, 15.5px); }
.container { padding: 0 clamp(16px, 3vw, 28px); }
.container-narrow { padding: 0 clamp(16px, 3vw, 28px); }
.section { padding: clamp(48px, 6vw, 80px) 0; }
.section-tight { padding: clamp(28px, 4vw, 48px) 0; }

/* ── GLOBAL UTILITIES — phone polish (session 20.2) ─────────────── */
@media (max-width: 640px) {
  /* Toast stack: bottom-center on phones so it doesn't hug the corner */
  #toast-stack { bottom: 16px; right: 12px; left: 12px; }
  .toast-msg { min-width: 0; max-width: 100%; }
  /* Keyboard shortcuts overlay — full-width card with sensible margins */
  .kbd-overlay { padding: 16px; }
  .kbd-overlay__card { padding: 22px 20px; max-width: 100%; }
  .kbd-overlay__title { font-size: 16px; }
  /* Keyboard hint corner pill — pull away from the home indicator */
  .kbd-hint { bottom: 12px; left: 12px; right: 12px; justify-content: center; }
  /* Tooltip popups: wider on phones since 240px max can overflow */
  .tip::before { max-width: min(260px, calc(100vw - 32px)); }
  /* Cards globally: tighter padding so content breathes */
  .card { padding: 16px; }
  /* Forms: row gaps tighten */
  .stack-6 > * + * { margin-top: 18px; }
  .stack-4 > * + * { margin-top: 12px; }
  /* Hero badge eyebrow shrinks slightly */
  .eyebrow { padding: 4px 10px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════════
   DARK THEME — Linear/Cursor-inspired neutral palette with vibrant
   aurora-style hero gradients. Activated by setting data-theme="dark"
   on the root <html> element (handled by the inline theme-init script
   in each template's <head>, which runs BEFORE this stylesheet loads
   so the tokens are applied pre-paint — no flash-of-light flicker).
   ═══════════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  /* Surfaces — near-black with subtle warm undertone */
  --bg-base: #0a0a0b;
  --bg-soft: #0f0f10;
  --bg-muted: #18181b;
  --bg-tint: #141417;
  --bg-elevated: #111114;
  --bg-inverse: #fafafa;

  /* Borders — hairline neutrals */
  --border-subtle: #1a1a1f;
  --border-default: #27272a;
  --border-strong: #3f3f46;

  /* Text — high-contrast neutrals */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #52525b;
  --text-inverse: #0a0a0b;

  /* Brand — lifted for contrast on dark */
  --brand-50:  #1e1b4b;
  --brand-100: #312e81;
  --brand-200: #4338ca;
  --brand-400: #818cf8;
  --brand-500: #818cf8;
  --brand-600: #818cf8;
  --brand-700: #a5b4fc;
  --brand-800: #c7d2fe;

  /* Accent */
  --accent-500: #f472b6;

  /* Semantic — tinted backgrounds (low-alpha brand) */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-text: #6ee7b7;
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-text: #fcd34d;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-text: #fca5a5;
  --info-bg: rgba(99, 102, 241, 0.15);
  --info-text: #c7d2fe;

  /* Hero glow — turned up; dark canvas absorbs ~half the punch */
  --hero-glow:
    radial-gradient(75% 60% at 50% 0%, rgba(129, 140, 248, 0.30) 0%, transparent 65%),
    radial-gradient(50% 50% at 85% 15%, rgba(236, 72, 153, 0.22) 0%, transparent 55%),
    radial-gradient(60% 60% at 15% 25%, rgba(59, 130, 246, 0.20) 0%, transparent 60%);

  /* Shadows — black-based, deeper */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .5), 0 2px 4px -2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, .5), 0 4px 8px -4px rgba(0, 0, 0, .4);
  --shadow-xl: 0 22px 44px -10px rgba(0, 0, 0, .6), 0 8px 16px -8px rgba(0, 0, 0, .4);
  --shadow-brand: 0 8px 24px -4px rgba(99, 102, 241, .45);
  --shadow-focus: 0 0 0 4px rgba(129, 140, 248, .30);
}

/* Body in dark — subtle dot grid for premium "fabric" texture (~5% alpha).
   Stays performant: pure CSS, no image asset. */
[data-theme="dark"] body {
  background-color: var(--bg-base);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
}

/* Glass nav on dark */
[data-theme="dark"] .site-nav {
  background: rgba(10, 10, 11, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .site-nav__link:hover { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .site-nav__link.is-active { background: rgba(129, 140, 248, 0.12); color: var(--brand-700); }
[data-theme="dark"] .site-nav__user { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,.04); }

/* Cards pop just enough on dark */
[data-theme="dark"] .card {
  background: var(--bg-elevated);
  border-color: var(--border-default);
}
[data-theme="dark"] .card-hover:hover,
[data-theme="dark"] .card-lift:hover {
  border-color: var(--brand-400);
  box-shadow: 0 12px 32px -8px rgba(99, 102, 241, .25), var(--shadow-lg);
}

/* Inputs — IMPORTANT: use background-color (NOT the `background` shorthand)
   because <select> elements depend on background-image + background-repeat
   inherited from the base rule. The shorthand resets those to initial,
   which means the chevron SVG tiles across the entire select. */
[data-theme="dark"] input[type=text],
[data-theme="dark"] input[type=email],
[data-theme="dark"] input[type=password],
[data-theme="dark"] input[type=tel],
[data-theme="dark"] input[type=url],
[data-theme="dark"] input[type=number],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: var(--bg-soft);
  border-color: var(--border-default);
  color: var(--text-primary);
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--brand-500);
  background-color: var(--bg-elevated);
}
/* Dark-mode chevron: lighter stroke so it's visible on the dark input.
   Re-declare no-repeat / position here as belt-and-braces in case any
   page-specific style block uses the `background` shorthand on select. */
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Buttons — primary becomes a vibrant gradient on dark */
[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, var(--brand-500) 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.12);
}
[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-500) 100%);
  box-shadow: var(--shadow-brand);
}
[data-theme="dark"] .btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}
[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-muted);
  border-color: var(--brand-500);
  color: var(--brand-700);
}
[data-theme="dark"] .btn-ghost { color: var(--text-primary); }
[data-theme="dark"] .btn-ghost:hover { background: var(--bg-muted); }

/* Eyebrow / gradient-text — re-tuned for dark */
[data-theme="dark"] .eyebrow {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-700);
}
[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, var(--brand-400) 0%, var(--accent-500) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Dropzone */
[data-theme="dark"] .dropzone {
  background: var(--bg-soft);
  border-color: var(--border-strong);
}
[data-theme="dark"] .dropzone:hover {
  background: rgba(129, 140, 248, 0.08);
  border-color: var(--brand-500);
}
[data-theme="dark"] .dropzone.has-file {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--success);
}

/* Footer */
[data-theme="dark"] .site-footer {
  background: var(--bg-soft);
  border-top-color: var(--border-subtle);
}

/* ── THEME TOGGLE BUTTON (sun/moon swap) ─────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.theme-toggle:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle svg { width: 16px; height: 16px; }
/* Default (light): show moon (action: switch to dark) */
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
/* In dark mode: show sun (action: switch to light) */
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle { color: var(--text-secondary); border-color: var(--border-default); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.05); color: var(--brand-700); border-color: var(--brand-500); }

/* Prevent transition flicker when the theme attribute flips */
.theme-transitioning, .theme-transitioning * {
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease !important;
}

/* ═══════════════════════════════════════════════════════════════════
   UX PRIMITIVES — toast, skeleton, tooltip, celebration, kbd hint.
   Foundational, reusable across all pages. Each component is opt-in
   via class name; no global side effects. Research-grounded:
     • Skeleton screens: -40% perceived load time vs spinner
     • Toasts: actionable, contextual feedback > alert()
     • Micro-interactions: 95+ celebration = product feels alive
   ═══════════════════════════════════════════════════════════════════ */

/* ── TOAST STACK ──────────────────────────────────────────────────── */
#toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast-msg {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 420px;
  padding: 12px 16px 12px 14px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--text-tertiary);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px; line-height: 1.45;
  opacity: 0; transform: translateY(16px) scale(0.98);
  animation: toastIn 280ms var(--ease-out) forwards;
}
.toast-msg.is-leaving {
  animation: toastOut 220ms var(--ease-std) forwards;
}
.toast-msg.ok    { border-left-color: var(--success); }
.toast-msg.info  { border-left-color: var(--brand-500); }
.toast-msg.warn  { border-left-color: var(--warning); }
.toast-msg.err   { border-left-color: var(--danger); }
.toast-msg__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  font-size: 12px; font-weight: 700; color: white;
}
.toast-msg.ok   .toast-msg__icon { background: var(--success); }
.toast-msg.info .toast-msg__icon { background: var(--brand-500); }
.toast-msg.warn .toast-msg__icon { background: var(--warning); }
.toast-msg.err  .toast-msg__icon { background: var(--danger); }
.toast-msg__body { flex: 1; min-width: 0; }
.toast-msg__title { font-weight: 600; color: var(--text-primary); }
.toast-msg__sub { font-size: 12.5px; color: var(--text-tertiary); margin-top: 1px; }
.toast-msg__close {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted); padding: 4px; line-height: 1;
  border-radius: var(--r-sm); font-size: 14px;
}
.toast-msg__close:hover { color: var(--text-primary); background: var(--bg-muted); }
@keyframes toastIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* ── SKELETON LOADER ──────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-muted) 0%,
    var(--bg-soft) 50%,
    var(--bg-muted) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  color: transparent; /* hide any placeholder text inside */
  user-select: none;
}
.skeleton-line { height: 10px; margin-bottom: 8px; }
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-circle { border-radius: 50%; }
.skeleton-block { display: block; }
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── TOOLTIP (CSS-only, ?-icon trigger) ───────────────────────────── */
.has-tip {
  display: inline-flex; align-items: center; gap: 4px;
}
.tip {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-tertiary);
  font-size: 10px; font-weight: 700;
  cursor: help;
  transition: background var(--t-fast), color var(--t-fast);
}
.tip:hover, .tip:focus-visible {
  background: var(--brand-500);
  color: white;
  outline: none;
}
.tip::before {
  /* The actual tooltip — content from data-tip attribute */
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 240px;
  padding: 8px 12px;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  font-size: 12px; font-weight: 500; line-height: 1.45;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
  white-space: normal;
  z-index: 100;
}
.tip::after {
  /* Tooltip arrow */
  content: '';
  position: absolute; bottom: calc(100% + 2px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 4px solid transparent;
  border-top-color: var(--bg-inverse);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.tip:hover::before, .tip:focus-visible::before,
.tip:hover::after, .tip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── SCORE CELEBRATION (95+ moment) ───────────────────────────────── */
.celebrating .score-ring__bar {
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, .6));
  animation: ringPulse 1.4s ease-out;
}
.celebrating .score-ring__num {
  animation: numPop 600ms var(--ease-out);
}
@keyframes ringPulse {
  0%   { filter: drop-shadow(0 0 0 rgba(99, 102, 241, .8)); }
  35%  { filter: drop-shadow(0 0 16px rgba(99, 102, 241, .8)); }
  100% { filter: drop-shadow(0 0 8px rgba(99, 102, 241, .4)); }
}
@keyframes numPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.confetti-piece {
  position: absolute;
  font-size: 22px;
  pointer-events: none;
  user-select: none;
  animation: confettiDrift 1.6s ease-out forwards;
  opacity: 0;
}
@keyframes confettiDrift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(0.6); opacity: 0; }
  15%  { opacity: 1; transform: translate(0, -8px) rotate(20deg) scale(1); }
  100% { transform: translate(var(--cx, 0), -120px) rotate(var(--cr, 90deg)) scale(0.8); opacity: 0; }
}

/* ── KEYBOARD HINT (corner pill on first visit) ──────────────────── */
.kbd-hint {
  position: fixed; bottom: 16px; left: 16px;
  z-index: 80;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  animation: kbdHintIn 400ms var(--ease-out) 1.2s forwards;
}
.kbd-hint.is-leaving { animation: kbdHintOut 280ms var(--ease-std) forwards; }
.kbd-hint kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}
@keyframes kbdHintIn { to { opacity: 1; } }
@keyframes kbdHintOut { to { opacity: 0; transform: translateY(6px); } }

/* ── KEYBOARD SHORTCUTS OVERLAY (? to open) ─────────────────────── */
.kbd-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
  animation: fadeIn 200ms var(--ease-out);
}
.kbd-overlay.is-hidden { display: none; }
.kbd-overlay__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: cardIn 280ms var(--ease-out);
}
.kbd-overlay__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.015em; }
.kbd-overlay__sub { font-size: 13px; color: var(--text-tertiary); margin-bottom: 22px; }
.kbd-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.kbd-row:last-child { border-bottom: none; }
.kbd-row__desc { font-size: 14px; color: var(--text-primary); }
.kbd-row__keys { display: inline-flex; gap: 4px; }
.kbd-row__keys kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--text-primary);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── EMPTY STATES (small + medium variants) ──────────────────────── */
.empty-state {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-tertiary);
}
.empty-state__icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-600);
}
.empty-state__title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.empty-state__body { font-size: 13px; line-height: 1.55; max-width: 320px; margin: 0 auto; }

/* ── NAV AVATAR DROPDOWN (session 18) ─────────────────────────────
   Replaces the old "Sign in" button when the user is authenticated.
   Wired up by the shared navHydrate() helper in /auth-client.js. */
.nav-account { position: relative; display: inline-flex; }
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  padding: 0;
  box-shadow: var(--shadow-xs);
}
.nav-avatar:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.nav-avatar:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.nav-account.is-open .nav-avatar { box-shadow: var(--shadow-focus); }
.nav-avatar__initial {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 rgba(0,0,0,.12);
}

.nav-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  padding: 6px;
  z-index: var(--z-modal);
  animation: navMenuIn 160ms var(--ease-out);
}
.nav-menu[hidden] { display: none; }
@keyframes navMenuIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-menu__head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}
.nav-menu__head-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 3px;
}
.nav-menu__head-email {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 220px;
}

.nav-menu__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: transparent; border: 0;
  color: var(--text-primary);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  text-align: left; text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-menu__item svg { color: var(--text-tertiary); flex-shrink: 0; }
.nav-menu__item:hover,
.nav-menu__item:focus-visible {
  background: var(--bg-muted);
  color: var(--text-primary);
  outline: none;
}
.nav-menu__item:focus-visible { box-shadow: 0 0 0 2px var(--brand-200) inset; }
.nav-menu__item:hover svg { color: var(--brand-600); }
.nav-menu__item--danger { color: var(--danger-text); }
.nav-menu__item--danger svg { color: var(--danger); }
.nav-menu__item--danger:hover,
.nav-menu__item--danger:focus-visible {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.nav-menu__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 4px;
}

[data-theme="dark"] .nav-menu {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  box-shadow: 0 22px 60px -12px rgba(0,0,0,.8), 0 4px 8px -4px rgba(0,0,0,.5);
}
[data-theme="dark"] .nav-avatar {
  border-color: var(--border-default);
}
