/* ================================================================
   CloudFlare Assistant — Official Site
   Style: Clean Light · Linear/Stripe-inspired
   Brand: Cloudflare Orange (#F48120)
   ================================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Background layers */
  --bg: #ffffff;
  --bg-tinted: #f7f8fa;
  --bg-card: #ffffff;
  --bg-hover: #f3f4f6;
  --bg-subtle: #fafbfc;

  /* Brand colors */
  --brand: #f48120;
  --brand-dark: #d96e0f;
  --brand-light: #ffa55c;
  --brand-soft: #fff4eb;
  --brand-glow: rgba(244, 129, 32, 0.18);
  --brand-gradient: linear-gradient(135deg, #f48120 0%, #fa9e3b 100%);

  /* Text */
  --text: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --text-4: #9ca3af;

  /* Accent palette */
  --c-orange: #f97316;
  --c-orange-bg: #fff7ed;
  --c-blue: #3b82f6;
  --c-blue-bg: #eff6ff;
  --c-amber: #d97706;
  --c-amber-bg: #fffbeb;
  --c-green: #16a34a;
  --c-green-bg: #f0fdf4;
  --c-purple: #8b5cf6;
  --c-purple-bg: #f5f3ff;
  --c-red: #ef4444;
  --c-red-bg: #fef2f2;
  --c-cyan: #06b6d4;
  --c-cyan-bg: #ecfeff;
  --c-indigo: #6366f1;
  --c-indigo-bg: #eef2ff;
  --c-pink: #ec4899;
  --c-pink-bg: #fdf2f8;

  /* Borders */
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --border-strong: #d1d5db;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.04);
  --shadow-brand: 0 8px 24px rgba(244,129,32,0.25);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 999px;

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

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.15s;
  --dur: 0.25s;
  --dur-slow: 0.4s;

  /* Layout */
  --container: 1120px;
  --nav-h: 64px;

  color-scheme: light;
}

/* ---------- Dark Theme Overrides ---------- */
[data-theme="dark"] {
  --bg: #0d1117;
  --bg-tinted: #161b22;
  --bg-card: #161b22;
  --bg-hover: #21262d;
  --bg-subtle: #1c2128;

  --brand: #f48120;
  --brand-dark: #ffa55c;
  --brand-light: #ffb874;
  --brand-soft: rgba(244, 129, 32, 0.12);
  --brand-glow: rgba(244, 129, 32, 0.20);
  --brand-gradient: linear-gradient(135deg, #f48120 0%, #fa9e3b 100%);

  --text: #e6edf3;
  --text-2: #c9d1d9;
  --text-3: #8b949e;
  --text-4: #6e7681;

  --c-orange: #fb923c;
  --c-orange-bg: rgba(251, 146, 60, 0.10);
  --c-blue: #60a5fa;
  --c-blue-bg: rgba(96, 165, 250, 0.10);
  --c-amber: #fbbf24;
  --c-amber-bg: rgba(251, 191, 36, 0.10);
  --c-green: #4ade80;
  --c-green-bg: rgba(74, 222, 128, 0.10);
  --c-purple: #c084fc;
  --c-purple-bg: rgba(192, 132, 252, 0.10);
  --c-red: #f87171;
  --c-red-bg: rgba(248, 113, 113, 0.10);
  --c-cyan: #22d3ee;
  --c-cyan-bg: rgba(34, 211, 238, 0.10);
  --c-indigo: #818cf8;
  --c-indigo-bg: rgba(129, 140, 248, 0.10);
  --c-pink: #f472b6;
  --c-pink-bg: rgba(244, 114, 182, 0.10);

  --border: #30363d;
  --border-light: #21262d;
  --border-strong: #484f58;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.6), 0 8px 16px rgba(0,0,0,0.3);
  --shadow-brand: 0 8px 24px rgba(244,129,32,0.30);

  color-scheme: dark;
}

/* Dark mode: specific component overrides */
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .nav {
  background: rgba(13, 17, 23, 0.85);
}
[data-theme="dark"] .nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-theme="dark"] .btn-ghost {
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="dark"] .btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
[data-theme="dark"] .phone-frame {
  border-color: #30363d;
  background: #30363d;
}
[data-theme="dark"] .phone-screen { background: #0f1117; }
[data-theme="dark"] .shot-img { background: #0f1117; }
[data-theme="dark"] .cta-banner {
  background: linear-gradient(135deg, #0d1117 0%, #1a1a2e 100%);
}
[data-theme="dark"] .footer { background: var(--bg-subtle); }
[data-theme="dark"] .notice {
  background: rgba(217,119,6,0.08);
  border-color: rgba(217,119,6,0.2);
}
[data-theme="dark"] .faq summary:hover { background: var(--bg-hover); }
[data-theme="dark"] .check-item:hover {
  border-color: var(--c-green);
  background: var(--c-green-bg);
}
[data-theme="dark"] ::selection {
  background: rgba(244,129,32,0.25);
  color: var(--brand-light);
}

/* ---------- Theme Toggle Button ---------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  flex-shrink: 0;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
  margin-left: 4px;
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
svg { flex-shrink: 0; }

::selection { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* ================================================================
   Navigation
   ================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: var(--text);
}
.logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-brand);
  flex-shrink: 0;
}
.logo-text { letter-spacing: -0.01em; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links > a {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.nav-links > a:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.nav-cta {
  background: var(--brand);
  color: #fff !important;
  border-radius: var(--r-full);
  padding: 8px 18px !important;
  transition: background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.nav-cta:hover {
  background: var(--brand-dark);
  background: none;
  background-color: var(--brand-dark);
  box-shadow: var(--shadow-brand);
}
.nav-toggle {
  display: none;
  padding: 8px;
  color: var(--text);
  border-radius: var(--r-sm);
  transition: background var(--dur-fast) ease;
}
.nav-toggle:hover { background: var(--bg-hover); }

/* ================================================================
   Buttons
   ================================================================ */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-full);
  padding: 13px 26px;
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) ease,
              background var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}
.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(244,129,32,0.35);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--text-3);
  background: var(--bg-hover);
  transform: translateY(-2px);
}
.btn-ghost:active { transform: translateY(0) scale(0.98); }

/* ================================================================
   Hero
   ================================================================ */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}
.hero-glow-1 {
  width: 500px; height: 500px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(244,129,32,0.30), transparent 70%);
  animation: float-a 20s ease-in-out infinite;
}
.hero-glow-2 {
  width: 420px; height: 420px;
  top: 10%; right: -100px;
  background: radial-gradient(circle, rgba(99,102,241,0.18), transparent 70%);
  animation: float-b 24s ease-in-out infinite;
}
.hero-glow-3 {
  width: 380px; height: 380px;
  bottom: -100px; left: 40%;
  background: radial-gradient(circle, rgba(236,72,153,0.12), transparent 70%);
  animation: float-c 28s ease-in-out infinite;
}
@keyframes float-a { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,20px); } }
@keyframes float-b { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-20px,40px); } }
@keyframes float-c { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px,-20px); } }

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-text { max-width: 580px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  border: 1px solid rgba(244,129,32,0.2);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 24px;
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(244,129,32,0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(244,129,32,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(244,129,32,0.08); }
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text);
}
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.lead {
  font-size: 17px;
  color: var(--text-3);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.runtime-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse-status 2s ease-in-out infinite;
}
@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Hero Visual / Phone ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
.phone-frame {
  position: relative;
  max-width: 300px;
  width: 100%;
  border: 6px solid #1a1a2e;
  border-radius: 44px;
  padding: 0;
  background: #1a1a2e;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.12),
    0 20px 40px rgba(0,0,0,0.08),
    0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
}
.phone-screen {
  position: relative;
  border-radius: 36px;
  background: #0f1117;
  overflow: hidden;
  aspect-ratio: 9 / 19;
}
.phone-glow {
  position: absolute;
  inset: -20px;
  border-radius: 52px;
  background: radial-gradient(ellipse at center, rgba(244,129,32,0.15), transparent 70%);
  z-index: -1;
  filter: blur(20px);
  pointer-events: none;
}

/* ---------- Carousel ---------- */
.hero-carousel { position: relative; height: 100%; }
.hero-slide {
  display: none;
  height: 100%;
}
.hero-slide.is-active {
  display: block;
  animation: fade-in var(--dur-slow) var(--ease-out);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes fade-in {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 3;
  transition: background var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.carousel-btn:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}
.carousel-btn:active { transform: translateY(-50%) scale(0.95); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all var(--dur) var(--ease-out);
}
.carousel-dot.is-active {
  width: 22px;
  border-radius: 4px;
  background: #fff;
}

/* ---------- Hero Stats ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
  position: relative;
  z-index: 1;
}
.stat {
  padding: 20px 18px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease;
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}
.stat span {
  color: var(--text-3);
  font-size: 13px;
}

/* ================================================================
   Sections
   ================================================================ */
.section {
  padding: 72px 0;
  position: relative;
}
.section-tinted {
  background: var(--bg-tinted);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}
.section-head p {
  color: var(--text-3);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- Badges ---------- */
.release-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.badge-primary {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: rgba(244,129,32,0.2);
}

/* ================================================================
   Feature Cards
   ================================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 28px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, border-color var(--dur) ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.65;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.bg-orange { background: var(--c-orange-bg); color: var(--c-orange); }
.bg-blue { background: var(--c-blue-bg); color: var(--c-blue); }
.bg-amber { background: var(--c-amber-bg); color: var(--c-amber); }
.bg-green { background: var(--c-green-bg); color: var(--c-green); }
.bg-purple { background: var(--c-purple-bg); color: var(--c-purple); }
.bg-red { background: var(--c-red-bg); color: var(--c-red); }
.bg-cyan { background: var(--c-cyan-bg); color: var(--c-cyan); }
.bg-indigo { background: var(--c-indigo-bg); color: var(--c-indigo); }
.bg-pink { background: var(--c-pink-bg); color: var(--c-pink); }

/* ================================================================
   Update Cards
   ================================================================ */
.update-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.update-card {
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease;
}
.update-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.update-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.update-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.update-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.update-card li {
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}
.update-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

/* ================================================================
   Quality Checks
   ================================================================ */
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-2);
  font-weight: 500;
  transition: border-color var(--dur) ease, background var(--dur) ease;
}
.check-item:hover {
  border-color: var(--c-green);
  background: var(--c-green-bg);
}
.check-icon {
  color: var(--c-green);
  flex-shrink: 0;
}

/* ================================================================
   Screenshots
   ================================================================ */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
}
.shot-card {
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease;
}
.shot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.shot-img {
  background: #0f1117;
  aspect-ratio: 9 / 18;
  overflow: hidden;
}
.shot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot-caption {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shot-caption strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.shot-caption span {
  font-size: 13px;
  color: var(--text-3);
}

/* ================================================================
   Tech Stack
   ================================================================ */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stack-item {
  padding: 22px 18px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease;
}
.stack-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stack-item b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.stack-item span {
  font-size: 13px;
  color: var(--text-3);
}

/* ================================================================
   Install
   ================================================================ */
.install-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 32px;
}
.install-card {
  padding: 30px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.install-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.step {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.step strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.step p {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}

.auth-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-list li {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
}
.auth-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg);
}
.auth-list strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Permission Card ---------- */
.perm-card {
  padding: 30px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.perm-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.perm-card .muted {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 24px;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.perm-group h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-soft);
}
.perm-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.perm-group li {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.perm-group li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

/* ---------- Quick Links ---------- */
.quick-links {
  text-align: center;
}
.quick-links h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

/* ================================================================
   Use Cases
   ================================================================ */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.usecase-card {
  padding: 32px 26px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease;
}
.usecase-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.usecase-card .icon-box {
  width: 56px;
  height: 56px;
  margin-inline: auto;
  margin-bottom: 20px;
}
.usecase-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.usecase-card p {
  font-size: 14.5px;
  color: var(--text-3);
  line-height: 1.65;
}

/* ================================================================
   FAQ
   ================================================================ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}
.faq details {
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur) ease;
}
.faq details[open] {
  box-shadow: var(--shadow-md);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--dur-fast) ease;
}
.faq summary:hover { background: var(--bg-hover); }
.faq summary::-webkit-details-marker { display: none; }
.faq-chevron {
  color: var(--text-4);
  transition: transform var(--dur) var(--ease-out);
  flex-shrink: 0;
}
.faq details[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq details p {
  padding: 0 22px 20px;
  font-size: 14.5px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ================================================================
   Notice
   ================================================================ */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: var(--c-amber-bg);
  border: 1px solid rgba(217,119,6,0.15);
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
}
.notice-icon {
  color: var(--c-amber);
  flex-shrink: 0;
  margin-top: 1px;
}
.notice strong {
  color: var(--c-amber);
  font-weight: 700;
}

/* ================================================================
   CTA Banner
   ================================================================ */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 40px;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,129,32,0.25), transparent 70%);
  pointer-events: none;
}
.cta-banner h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.cta-banner p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}
.cta-banner .hero-actions {
  margin-bottom: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ================================================================
   Footer
   ================================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-subtle);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-3);
}
.footer-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: none;
}
.footer-meta {
  font-size: 13px;
  color: var(--text-4);
}

/* ================================================================
   Back to Top
   ================================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand);
  z-index: 50;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out), background var(--dur-fast) ease;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}
.back-to-top:active {
  transform: translateY(0) scale(0.92);
}

/* ================================================================
   Pages Deploy Guide
   ================================================================ */
#pages-deploy { scroll-margin-top: calc(var(--nav-h) + 12px); }

.subsection-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 20px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  line-height: 1.3;
}

/* ---- Mode cards ---- */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.mode-card {
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}
.mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.mode-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.mode-trigger {
  font-size: 11.5px;
  color: var(--text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--bg-hover);
  padding: 3px 8px;
  border-radius: 6px;
}
.mode-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

/* ---- Priority line ---- */
.mode-priority {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--text-2);
}
.mode-priority strong { color: var(--text); }
.mode-priority svg { color: var(--text-4); }
.mode-priority-note { color: var(--text-4); margin-left: 4px; }
.badge-soft {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ---- Code blocks ---- */
.code-block {
  margin: 0;
  padding: 16px 18px;
  background: #0d1117;
  color: #c9d1d9;
  border-radius: var(--r-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.06);
}
.code-block code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.code-block-sm {
  padding: 12px 14px;
  font-size: 12px;
  margin-top: 12px;
}
[data-theme="light"] .code-block { background: #1f2937; color: #e5e7eb; }

/* Inline code */
#pages-deploy p code,
#pages-deploy li code,
#pages-deploy td code {
  background: var(--bg-hover);
  color: var(--brand-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ---- Structure cards ---- */
.structure-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.structure-card {
  padding: 0;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.structure-card-wide { grid-column: span 2; }
.structure-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}
.structure-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 700;
}
.structure-title {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}
.structure-card .code-block {
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ---- Feature table ---- */
.feature-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.feature-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 13.5px;
  min-width: 540px;
}
.feature-table thead th {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  font-size: 13px;
}
.feature-table thead th:nth-child(2) { text-align: center; width: 70px; }
.feature-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  line-height: 1.5;
  vertical-align: middle;
}
.feature-table tbody tr:last-child td { border-bottom: none; }
.feature-table tbody tr:hover { background: var(--bg-hover); }
.feature-table .yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-green-bg);
  color: var(--c-green);
  font-weight: 700;
  font-size: 13px;
}

/* ---- Two-column lists ---- */
.pages-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: start;
}
.pages-col .subsection-title { margin-top: 0; }

/* ---- Pitfall list ---- */
.pitfall-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pitfall-list li {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  transition: border-color var(--dur) var(--ease);
}
.pitfall-list li:hover { border-left-color: var(--brand-dark); }
.pitfall-list strong {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}
.pitfall-reason {
  display: inline-block;
  font-size: 11.5px;
  color: var(--c-red);
  background: var(--c-red-bg);
  padding: 2px 8px;
  border-radius: var(--r-full);
  align-self: flex-start;
  font-weight: 600;
}
.pitfall-fix {
  color: var(--text-3);
  font-size: 13px;
}

/* ---- Asset cards ---- */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.asset-card {
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.asset-card-wide { grid-column: span 2; }
.asset-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.asset-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
}
.asset-sub {
  font-size: 12px;
  color: var(--text-4);
}
.asset-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 4px;
}

/* ---- Config grid ---- */
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.config-card {
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.config-card-wide { grid-column: span 2; }
.config-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.config-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}
.binding-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.binding-chip {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12.5px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: var(--r-full);
  font-weight: 600;
}

/* ---- API Flow ---- */
.api-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.api-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  position: relative;
}
.api-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-brand);
}
.api-step strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.api-step p {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}
.api-flow-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--c-amber-bg);
  border-left: 3px solid var(--c-amber);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.api-flow-note svg { color: var(--c-amber); flex-shrink: 0; margin-top: 2px; }

/* ---- NPM Package Support ---- */
.subsection-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0 0 16px;
}
.npm-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.npm-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  position: relative;
}
.npm-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-brand);
}
.npm-step strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.npm-step p {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}
.npm-dual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.npm-dual-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.npm-dual-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.npm-dual-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.npm-dual-card li {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  padding-left: 14px;
  position: relative;
}
.npm-dual-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-green, #10b981);
}

/* ---- File type grid ---- */
.filetype-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.filetype-card {
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.filetype-card:hover {
  border-color: var(--brand-light);
  transform: translateY(-2px);
}
.filetype-ext {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
}
.filetype-desc {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.4;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .update-grid { grid-template-columns: repeat(2, 1fr); }
  .perm-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .api-flow { grid-template-columns: repeat(2, 1fr); }
  .npm-flow { grid-template-columns: repeat(2, 1fr); }
  .npm-dual { grid-template-columns: 1fr; }
  .pages-two-col { grid-template-columns: 1fr; gap: 24px; }
  .config-grid { grid-template-columns: 1fr; }
  .config-card-wide { grid-column: span 1; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-card-wide { grid-column: span 1; }
  .filetype-grid { grid-template-columns: repeat(3, 1fr); }
  .stack-grid { grid-template-columns: repeat(4, 1fr); }
  .usecase-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px 16px 16px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dur) var(--ease-out), opacity var(--dur) ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links > a {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    border-bottom: 1px solid var(--border-light);
  }
  .nav-links > a:last-child { border-bottom: none; }
  .nav-cta {
    text-align: center;
    margin-top: 8px;
  }

  .hero { padding: 56px 0 40px; }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-text { max-width: 100%; }
  .hero-text .pill, .hero-text .lead { margin-inline: auto; }
  .lead { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .runtime-status { margin-inline: auto; }
  .hero-visual { order: -1; }
  .phone-frame { max-width: 240px; }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 40px;
  }

  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }

  .card-grid { grid-template-columns: 1fr; }
  .update-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .install-grid { grid-template-columns: 1fr; }
  .perm-grid { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr; }

  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
  .cta-banner .hero-actions { width: 100%; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 24px); }
  .hero h1 { font-size: 30px; }
  .section h2 { font-size: 24px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost {
    width: 100%;
  }
  .stat { padding: 16px 12px; }
  .stat b { font-size: 20px; }
  .feature-card, .update-card, .install-card, .perm-card { padding: 22px 18px; }
  .phone-frame { max-width: 210px; }
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
  .mode-grid { grid-template-columns: 1fr; }
  .structure-grid { grid-template-columns: 1fr; }
  .structure-card-wide { grid-column: span 1; }
  .api-flow { grid-template-columns: 1fr; }
  .npm-flow { grid-template-columns: 1fr; }
  .filetype-grid { grid-template-columns: 1fr; }
  .subsection-title { font-size: 18px; margin-top: 40px; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-glow { animation: none; }
  .pill-dot { animation: none; }
  .status-dot { animation: none; }
}
