/* ============================================================
   PICTORYX — Unified Design System v2
   Modal-inspired · Warm cream + Electric indigo · Light-first
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Surface (warm off-white, intentionally not pure white) */
  --bg:           #FAFAF7;
  --surface:      #FFFFFF;
  --surface-2:    #F5F4EF;
  --surface-3:    #EFEDE5;

  /* Foreground */
  --fg:           #0F0F12;
  --fg-soft:      #2A2A30;
  --fg-muted:     #6B6F76;
  --fg-dim:       #9CA0A7;

  /* Borders */
  --line:         #E8E6DE;
  --line-strong:  #D8D6CC;

  /* Brand — Electric Indigo */
  --accent:       #5B4FE9;
  --accent-hover: #4A3FD9;
  --accent-soft:  #ECEAFD;
  --accent-ink:   #FFFFFF;

  /* Functional */
  --success:      #00A86B;
  --success-soft: #DCFCE7;
  --warning:      #D97706;
  --warning-soft: #FEF3C7;
  --danger:       #DC2626;
  --danger-soft:  #FEE2E2;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Type scale (modular, fluid) */
  --fs-xs:    12px;
  --fs-sm:    14px;
  --fs-base:  16px;
  --fs-md:    18px;
  --fs-lg:    20px;
  --fs-xl:    24px;
  --fs-2xl:   30px;
  --fs-3xl:   38px;
  --fs-4xl:   48px;
  --fs-5xl:   60px;
  --fs-6xl:   76px;

  /* Spacing (8px grid) */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   20px;
  --sp-6:   24px;
  --sp-7:   32px;
  --sp-8:   40px;
  --sp-9:   48px;
  --sp-10:  64px;
  --sp-11:  80px;
  --sp-12:  96px;
  --sp-13:  128px;
  --sp-14:  160px;

  /* Radii */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* Shadows (warm, layered) */
  --sh-xs:  0 1px 2px rgba(15,15,18,0.04);
  --sh-sm:  0 2px 4px rgba(15,15,18,0.04), 0 1px 2px rgba(15,15,18,0.04);
  --sh-md:  0 4px 12px rgba(15,15,18,0.06), 0 2px 4px rgba(15,15,18,0.04);
  --sh-lg:  0 12px 32px rgba(15,15,18,0.08), 0 4px 8px rgba(15,15,18,0.04);
  --sh-xl:  0 24px 64px rgba(15,15,18,0.10), 0 8px 16px rgba(15,15,18,0.04);
  --sh-focus: 0 0 0 4px rgba(91,79,233,0.20);

  /* Motion */
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 120ms;
  --t-mid:  220ms;
  --t-slow: 420ms;

  /* Layout */
  --maxw:     1200px;
  --maxw-narrow: 760px;
  --nav-h:    64px;
}

/* ── DARK THEME (optional toggle) ─────────────────────────── */
[data-theme="dark"] {
  --bg:           #0B0B0F;
  --surface:      #131319;
  --surface-2:    #1A1A22;
  --surface-3:    #22222C;

  --fg:           #F5F5F2;
  --fg-soft:      #D4D4D0;
  --fg-muted:     #9C9CA0;
  --fg-dim:       #6B6B70;

  --line:         #2A2A33;
  --line-strong:  #3A3A45;

  --accent:       #7C71FF;
  --accent-hover: #9189FF;
  --accent-soft:  rgba(124,113,255,0.12);

  --sh-xs:  0 1px 2px rgba(0,0,0,0.4);
  --sh-sm:  0 2px 4px rgba(0,0,0,0.4);
  --sh-md:  0 4px 12px rgba(0,0,0,0.5);
  --sh-lg:  0 12px 32px rgba(0,0,0,0.55);
  --sh-xl:  0 24px 64px rgba(0,0,0,0.6);
  --sh-focus: 0 0 0 4px rgba(124,113,255,0.25);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-size: var(--fs-base);
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  transition: background var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--fg);
}

h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.035em; line-height: 1.02; font-weight: 700; }
h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; line-height: 1.1; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { color: var(--fg-soft); line-height: 1.65; }
.muted { color: var(--fg-muted); }
.dim { color: var(--fg-dim); }

/* Mono / Code */
code, pre, kbd { font-family: var(--font-mono); }
code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  font-size: 0.9em;
  color: var(--accent);
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.wrap-narrow {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.section {
  padding: var(--sp-13) 0;
}
.section-sm { padding: var(--sp-11) 0; }

/* ── NAV ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(250, 250, 247, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease), background var(--t-mid) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
[data-theme="dark"] .nav { background: rgba(11,11,15,0.72); }

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-7);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
}
.nav-brand .brand-mark {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}
.nav-brand .brand-beta {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: var(--sp-1);
}

.nav-links { display: flex; gap: var(--sp-6); align-items: center; flex: 1; }
.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--fg); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:focus-visible { outline: none; box-shadow: var(--sh-focus); }

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(91,79,233,0.30);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--fg);
}

.btn-soft {
  background: var(--surface-2);
  color: var(--fg);
}
.btn-soft:hover { background: var(--surface-3); }

.btn-lg { padding: 14px 24px; font-size: var(--fs-base); border-radius: var(--r-md); }
.btn-sm { padding: 6px 12px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }

/* ── BADGE / PILL ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--fg-muted);
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(0,168,107,0.15);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-12) 0 var(--sp-11);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(91,79,233,0.08) 0%, transparent 60%),
    radial-gradient(40% 30% at 90% 30%, rgba(0,168,107,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 14px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--fg-soft);
  box-shadow: var(--sh-xs);
}
.hero-eyebrow .tag {
  background: var(--fg);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin-top: var(--sp-6);
  max-width: 14ch;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, #8B7FFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  line-height: 1.5;
  margin-top: var(--sp-6);
  max-width: 52ch;
}
.hero-cta {
  margin-top: var(--sp-8);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: var(--sp-6);
  display: flex;
  gap: var(--sp-5);
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.hero-meta .check { color: var(--success); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-10);
  align-items: center;
}
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-xl);
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(91,79,233,0.10), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(0,168,107,0.06), transparent 50%);
  pointer-events: none;
  z-index: 1;
}
.hero-visual model-viewer {
  width: 100%;
  height: 100%;
  background: transparent !important;
  position: relative;
  z-index: 2;
}
.hero-visual .ar-badge {
  position: absolute;
  bottom: var(--sp-4);
  right: var(--sp-4);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(15,15,18,0.85);
  color: #FFF;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.hero-visual .ar-badge:hover { background: var(--accent); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-9); }
  .hero { padding: var(--sp-10) 0 var(--sp-9); }
}

/* ── LOGO STRIP ───────────────────────────────────────────── */
.logo-strip {
  padding: var(--sp-9) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.logo-strip-label {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: var(--sp-6);
}
.logo-marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.logo-marquee-track {
  display: flex;
  gap: var(--sp-10);
  animation: marquee 40s linear infinite;
  flex-shrink: 0;
  padding-right: var(--sp-10);
}
.logo-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-marquee-item i { font-size: 1.2em; opacity: 0.6; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.section-head {
  max-width: 760px;
  margin: 0 auto var(--sp-10);
  text-align: center;
}
.section-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-5);
}
.section-title {
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.section-sub {
  font-size: var(--fs-md);
  color: var(--fg-muted);
  margin-top: var(--sp-4);
  line-height: 1.55;
}

/* ── CARD GRID ────────────────────────────────────────────── */
.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  transition: all var(--t-mid) var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

/* Step / Feature card variant */
.step-card .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--fg);
  color: var(--bg);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--sp-5);
}
.step-card h3, .feature-card h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.02em;
}
.step-card p, .feature-card p {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.6;
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  font-size: 18px;
  margin-bottom: var(--sp-5);
}

/* ── DEMO GRID (3D models) ────────────────────────────────── */
.demo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-mid) var(--ease);
}
.demo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--line-strong);
}
.demo-viewer {
  width: 100%;
  height: 280px;
  background: var(--surface-2);
  position: relative;
}
.demo-viewer model-viewer { width: 100%; height: 100%; background: transparent !important; }
.demo-meta {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.demo-meta .label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--fg);
}
.demo-meta .ar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  transition: all var(--t-fast) var(--ease);
}
.demo-meta .ar-btn:hover { background: var(--accent); color: var(--accent-ink); }

/* ── PRICING ──────────────────────────────────────────────── */
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--t-mid) var(--ease);
}
.price-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-md); }
.price-card.popular {
  border: 2px solid var(--fg);
  background: var(--surface);
  box-shadow: var(--sh-lg);
}
.price-card.popular .price-cta { background: var(--accent); color: var(--accent-ink); }
.price-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.price-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.price-amount {
  font-size: var(--fs-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: var(--sp-3);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-amount .period { font-size: var(--fs-base); font-weight: 500; color: var(--fg-muted); }
.price-desc {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.price-features {
  list-style: none;
  margin-top: var(--sp-6);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.price-features li {
  font-size: var(--fs-sm);
  color: var(--fg-soft);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}
.price-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}
.price-features li.off { color: var(--fg-dim); }
.price-features li.off::before { content: '—'; color: var(--fg-dim); }
.price-cta {
  margin-top: var(--sp-6);
  width: 100%;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--line);
  transition: all var(--t-fast) var(--ease);
}
.price-cta:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%;
  padding: var(--sp-6) 0;
  text-align: left;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  letter-spacing: -0.01em;
}
.faq-q::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--fg-muted);
  transition: transform var(--t-mid) var(--ease);
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow) var(--ease), padding var(--t-mid) var(--ease);
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: var(--sp-6);
}

/* ── CTA BANNER ───────────────────────────────────────────── */
.cta-banner {
  background: var(--fg);
  color: var(--bg);
  padding: var(--sp-11) var(--sp-9);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 60% at 50% 100%, rgba(91,79,233,0.45) 0%, transparent 70%),
    radial-gradient(40% 50% at 10% 0%, rgba(0,168,107,0.20) 0%, transparent 60%);
  pointer-events: none;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 {
  color: var(--bg);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}
.cta-banner p {
  color: rgba(255,255,255,0.72);
  margin-top: var(--sp-4);
  font-size: var(--fs-md);
}
.cta-banner .btn {
  margin-top: var(--sp-7);
  background: var(--bg);
  color: var(--fg);
  border-color: transparent;
}
.cta-banner .btn:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: var(--sp-11) 0 var(--sp-7);
  background: var(--bg);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  padding-bottom: var(--sp-9);
}
.footer-brand p {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  max-width: 32ch;
}
.footer-socials {
  margin-top: var(--sp-5);
  display: flex;
  gap: var(--sp-3);
}
.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  color: var(--fg-muted);
  transition: all var(--t-fast) var(--ease);
}
.footer-socials a:hover { color: var(--fg); border-color: var(--fg); }
.footer-col h5 {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--sp-5);
}
.footer-col a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--fg-soft);
  margin-bottom: var(--sp-3);
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--fg); }
.footer-col a .soon {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 6px;
}
.footer-bottom {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--fg-muted);
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-7); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── FORMS (Auth pages) ───────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-9) var(--sp-6);
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-9);
  box-shadow: var(--sh-md);
}
.auth-head { text-align: center; margin-bottom: var(--sp-7); }
.auth-head h1 {
  font-size: var(--fs-2xl);
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-2);
}
.auth-head p { font-size: var(--fs-sm); color: var(--fg-muted); }

.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.field label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--fg-soft);
  letter-spacing: 0.01em;
}
.field input, .field textarea, .field select {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--fg);
  transition: all var(--t-fast) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--sh-focus);
  background: var(--surface);
}
.field .error { color: var(--danger); font-size: var(--fs-xs); }

.auth-sep {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
  font-size: var(--fs-xs);
  color: var(--fg-muted);
}
.auth-sep::before, .auth-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.auth-foot {
  margin-top: var(--sp-6);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.auth-foot a { color: var(--accent); font-weight: 600; }

/* ── UTILITIES ────────────────────────────────────────────── */
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.hidden { display: none !important; }

/* Theme toggle button */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg-muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--fg); border-color: var(--line); }

/* ── REVEAL ANIMATION ─────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═════════════════════════════════════════════════════════════
   APP / DASHBOARD COMPONENTS
   ═════════════════════════════════════════════════════════════ */

/* ── App shell ────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
}
.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: var(--sp-7) var(--sp-4);
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.app-main {
  flex: 1;
  padding: var(--sp-8) var(--sp-9);
  min-width: 0;
  max-width: 1100px;
}

.sb-nav { list-style: none; padding: 0; margin: 0; }
.sb-nav li { margin-bottom: 2px; }
.sb-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--fg-soft);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}
.sb-nav a:hover { background: var(--surface-2); color: var(--fg); }
.sb-nav a.active {
  background: var(--fg);
  color: var(--bg);
}
.sb-nav a i { font-size: 16px; width: 18px; text-align: center; }

.sb-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding: var(--sp-5) var(--sp-3) var(--sp-2);
}

.credit-pill {
  margin: var(--sp-5) 0 0;
  padding: var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.credit-pill .label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--sp-2);
}
.credit-pill .credit-count {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.credit-bar { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.credit-bar-fill { height: 100%; background: var(--accent); transition: width var(--t-mid) var(--ease); }
.credit-sub { font-size: var(--fs-xs); color: var(--fg-muted); }

/* Page headers inside app */
.app-page-title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.app-page-sub { font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--sp-7); }

/* Stat strip */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
}
.stat-card .sc-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.stat-card .sc-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1;
}

/* Guest banner */
.guest-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--accent-soft);
  border: 1px solid rgba(91,79,233,0.20);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.guest-banner-icon { font-size: 22px; flex-shrink: 0; }
.guest-banner-text { flex: 1; min-width: 200px; }
.guest-banner-text strong { display: block; font-size: var(--fs-sm); font-weight: 700; margin-bottom: 2px; color: var(--fg); }
.guest-banner-text span { font-size: var(--fs-xs); color: var(--fg-soft); }
.guest-banner-actions { display: flex; gap: var(--sp-2); flex-shrink: 0; flex-wrap: wrap; }
.guest-countdown {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-9) var(--sp-7);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
  position: relative;
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-icon {
  width: 56px; height: 56px;
  background: var(--accent-soft);
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.upload-zone h3 { font-size: var(--fs-md); font-weight: 600; margin-bottom: 6px; }
.upload-zone p { font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--sp-5); }

/* Quality mode selector */
.quality-mode-group { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.quality-mode-option {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  display: flex; flex-direction: column; gap: 2px;
}
.quality-mode-option:hover { border-color: var(--line-strong); }
.quality-mode-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.quality-mode-option .qm-title { font-size: var(--fs-sm); font-weight: 600; color: var(--fg); }
.quality-mode-option .qm-sub { font-size: var(--fs-xs); color: var(--fg-muted); }

/* Params panel */
.params-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
  margin-top: var(--sp-3);
}
.param-group label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: flex; justify-content: space-between;
}
.param-group label span { color: var(--fg); font-weight: 700; }
.param-slider {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  outline: none;
  cursor: pointer;
}
.param-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(91,79,233,0.4);
}
.param-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: var(--fs-sm);
  color: var(--fg);
  outline: none;
  font-family: inherit;
  transition: border-color var(--t-fast) var(--ease);
}
.param-input:focus { border-color: var(--accent); box-shadow: var(--sh-focus); }

/* Job card */
.job-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all var(--t-mid) var(--ease);
}
.job-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.job-preview {
  min-height: 220px;
  background: var(--surface-2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}
.job-preview model-viewer { width: 100%; height: 220px; background: transparent !important; flex-shrink: 0; }
.job-preview-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; width: 100%; height: 100%; min-height: 220px;
}
.job-preview-placeholder i { font-size: 32px; color: var(--fg-dim); }
.job-preview-placeholder span { font-size: var(--fs-xs); color: var(--fg-muted); }

.job-processing-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; width: 100%; min-height: 220px; padding: var(--sp-6) 0;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 70%);
}
.job-ring-wrap { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.job-ring-wrap svg { overflow: visible; }
.job-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.job-ring-pct {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.job-hg-icon { font-size: 13px; color: var(--accent); animation: hg-flip 2s ease-in-out infinite; }
@keyframes hg-flip {
  0%,35%  { transform: rotate(0deg); opacity: 1; }
  45%,55% { transform: rotate(90deg); opacity: 0.4; }
  65%,100%{ transform: rotate(180deg); opacity: 1; }
}
.job-processing-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg-muted);
}

.job-queued-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; width: 100%; min-height: 220px;
}
.job-queue-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px dashed rgba(217,119,6,0.25);
  border-top-color: var(--warning);
  animation: ring-spin 1.2s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.job-queued-icon { font-size: 18px; color: var(--warning); }
.job-queued-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--warning);
}

.job-body { padding: var(--sp-4) var(--sp-5); }
.job-id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-dim);
  margin-bottom: 6px;
}
.job-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--r-pill);
}
.job-status.queued { background: var(--warning-soft); color: var(--warning); }
.job-status.processing { background: var(--accent-soft); color: var(--accent); }
.job-status.complete { background: var(--success-soft); color: var(--success); }
.job-status.failed { background: var(--danger-soft); color: var(--danger); }
.job-progress-bar { height: 3px; background: var(--surface-3); border-radius: 2px; margin: 10px 0; overflow: hidden; }
.job-progress-fill { height: 100%; background: var(--accent); transition: width 0.5s ease; }

.job-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.job-actions a, .job-actions button {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.job-btn-dl {
  background: var(--fg);
  color: var(--bg);
}
.job-btn-dl:hover { background: var(--accent); }
.job-btn-del {
  background: var(--surface-2);
  color: var(--danger);
  border-color: var(--line);
  flex: 0 0 auto !important;
}
.job-btn-del:hover { background: var(--danger-soft); border-color: rgba(220,38,38,0.30); }

.job-preview .ar-btn {
  position: absolute;
  bottom: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(15,15,18,0.85);
  color: #FFF;
  border: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 5;
}
.job-preview .ar-btn:hover { background: var(--accent); }
@media (max-width: 767px) { .job-preview .ar-btn { display: none; } }

/* Auth gate modal (in dashboard) */
.gate-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,15,18,0.55);
  backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  z-index: 9100;
  padding: var(--sp-5);
}
.gate-backdrop.open { display: flex; }
.gate-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--sh-xl);
}
.gate-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  color: var(--fg-muted);
  display: grid; place-items: center;
  cursor: pointer;
}
.gate-close:hover { background: var(--surface-2); color: var(--fg); }
.gate-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(91,79,233,0.20);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: var(--fs-sm);
  color: var(--fg);
  margin-bottom: var(--sp-5);
}
.gate-banner i { color: var(--accent); font-size: 16px; flex-shrink: 0; }
.gate-banner strong { color: var(--accent); }

.gate-tabs {
  display: flex; gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: var(--sp-5);
}
.gate-tab {
  flex: 1; padding: 8px;
  border: none; border-radius: calc(var(--r-md) - 2px);
  font-size: var(--fs-xs); font-weight: 600;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.gate-tab.active {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--sh-xs);
}

/* Toast */
.px-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--fg);
  box-shadow: var(--sh-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: transform var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
  z-index: 9999;
  max-width: 360px;
}
.px-toast.show { transform: translateY(0); opacity: 1; }

/* Bootstrap-compatible row/col fallback (used by dashboard.js) */
.row { display: flex; flex-wrap: wrap; margin: 0 calc(var(--sp-3) * -0.5); }
.row > [class*="col-"] { padding: 0 calc(var(--sp-3) * 0.5); margin-bottom: var(--sp-3); }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6  { flex: 0 0 50%; max-width: 50%; }
.col-md-4, .col-md-6 { flex: 0 0 100%; max-width: 100%; }
.col-lg-3, .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
.col-sm-6 { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
}
.g-3 > [class*="col-"] { padding: 0 6px; margin-bottom: 12px; }
.g-3 { margin: 0 -6px; }
.g-4 > [class*="col-"] { padding: 0 10px; margin-bottom: 20px; }
.g-4 { margin: 0 -10px; }
.mb-3 { margin-bottom: var(--sp-3) !important; }
.mb-4 { margin-bottom: var(--sp-5) !important; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-5 { margin-top: var(--sp-7) !important; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.text-center { text-align: center; }
.py-5 { padding-top: var(--sp-7); padding-bottom: var(--sp-7); }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ms-auto { margin-left: auto; }

/* Account page */
.account-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  margin-bottom: var(--sp-5);
}
.account-section h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.account-section .section-desc {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  margin-bottom: var(--sp-5);
}
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--fg-muted); }
.kv .v { color: var(--fg); font-weight: 500; }

/* Responsive sidebar */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .app-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: var(--sp-4);
  }
  .app-main { padding: var(--sp-6) var(--sp-5); max-width: 100%; }
}

/* ── MOBILE NAV ───────────────────────────────────────────── */
@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-4);
    gap: var(--sp-3);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--t-mid) var(--ease);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: var(--sp-3); border-radius: var(--r-sm); }
  .nav-links a:hover { background: var(--surface-2); }
  .nav-mobile-cta {
    display: flex !important;
    flex-direction: column;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--line);
  }
  .nav-actions .desktop-only { display: none; }
}
.nav-mobile-cta { display: none; }

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

/* ── SKIP LINK ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: var(--sp-3);
}
