/* =====================================================================
   ShowToCart — marketing + docs site design system
   Self-contained, no build, no external fonts/CDN. Light + dark aware.
   ===================================================================== */

:root {
  /* Brand — violet (#7c3aed). Dark enough for white text, so the same hue works
     on white and on black; --on-brand stays white. Accent is a pink for the
     gradient/glow. */
  --brand: #7c3aed;
  --brand-600: #6d28d9;
  --brand-700: #5b21b6;
  --brand-tint: #ede9fe;     /* pale violet tint (icon chips) */
  --accent: #ec4899;         /* pink accent for gradients */
  --on-brand: #ffffff;       /* text placed ON a --brand background */

  /* Neutrals (light) — clean, near-neutral grays */
  --bg: #ffffff;
  --bg-soft: #f7f8f7;
  --bg-sunken: #eef1ee;
  --surface: #ffffff;
  --border: #e5e8e5;
  --fg: #101511;
  --fg-muted: #5a635b;
  --fg-faint: #8b948c;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Inter", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, monospace;

  /* Shape + motion */
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 32, 27, .04), 0 8px 30px rgba(16, 32, 27, .07);
  --shadow-lg: 0 20px 60px rgba(16, 32, 27, .16);
  --maxw: 1160px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* Dark = the primary look: vivid purple on near-black. */
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7c3aed; --brand-600: #9f67f5; --brand-700: #6d28d9;
    --accent: #ec4899; --brand-tint: #1e1533; --on-brand: #ffffff;
    --bg: #0a0a0a; --bg-soft: #131313; --bg-sunken: #050505; --surface: #151515;
    --border: #272727; --fg: #f4f4f5; --fg-muted: #a1a1aa; --fg-faint: #71717a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 34px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 70px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --brand: #7c3aed; --brand-600: #9f67f5; --brand-700: #6d28d9;
  --accent: #ec4899; --brand-tint: #1e1533; --on-brand: #ffffff;
  --bg: #0a0a0a; --bg-soft: #131313; --bg-sunken: #050505; --surface: #151515;
  --border: #272727; --fg: #f4f4f5; --fg-muted: #a1a1aa; --fg-faint: #71717a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 34px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.6);
}
:root[data-theme="light"] {
  --brand: #7c3aed; --brand-600: #6d28d9; --brand-700: #5b21b6;
  --accent: #ec4899; --brand-tint: #ede9fe; --on-brand: #ffffff;
  --bg: #ffffff; --bg-soft: #f7f8f7; --bg-sunken: #eef1ee; --surface: #ffffff;
  --border: #e5e8e5; --fg: #101511; --fg-muted: #5a635b; --fg-faint: #8b948c;
  --shadow: 0 1px 2px rgba(16,32,27,.04), 0 8px 30px rgba(16,32,27,.07);
  --shadow-lg: 0 20px 60px rgba(16,32,27,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--font); color: var(--fg); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;   /* fallback for older browsers */
  overflow-x: clip;     /* prevents horizontal scroll WITHOUT breaking sticky nav */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .8rem; }
.lead { font-size: 1.15rem; color: var(--fg-muted); }
.muted { color: var(--fg-muted); }
.center { text-align: center; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem;
  padding: .72rem 1.25rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 18px rgba(124,58,237,.35); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 50; min-height: 66px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.02em; font-size: 1.12rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: var(--on-brand); flex: 0 0 auto; }
.brand-mark svg { width: 17px; height: 17px; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav-links a { font-size: .93rem; font-weight: 500; color: var(--fg-muted); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--fg-muted); }
.icon-btn:hover { color: var(--fg); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 66px 0 auto 0; z-index: 60; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 8px 24px 20px; margin: 0;
    transform: translateY(-130%); transition: transform .28s var(--ease); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 2px; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-toggle { display: grid; }
  /* nav-links is now fixed (out of flow), so push the controls to the right edge. */
  .nav-cta { margin-left: auto; }
  .nav-cta .btn-ghost { display: none; }
}

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 80px); }
.hero::before { content: ""; position: absolute; inset: -40% 0 auto 0; height: 620px; z-index: -1;
  background: radial-gradient(60% 60% at 20% 0%, rgba(124,58,237,.22), transparent 70%),
              radial-gradient(50% 60% at 85% 10%, rgba(236,72,153,.14), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 span { background: linear-gradient(120deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 32ch; margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.1rem; font-size: .85rem; color: var(--fg-faint); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Phone / reel mock */
.reel-stack { position: relative; display: flex; justify-content: center; gap: 16px; }
.phone { width: 208px; aspect-ratio: 9/19; border-radius: 30px; background: linear-gradient(160deg, #1a1f1d, #0b0f0d);
  border: 6px solid #05080700; box-shadow: var(--shadow-lg); overflow: hidden; position: relative; flex: 0 0 auto; }
.phone::after { content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 74px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.25); }
.phone .screen { position: absolute; inset: 0; background: linear-gradient(200deg, #2a3a34, #101815 60%, #0a100e); }
.phone .rec { position: absolute; top: 22px; left: 16px; font: 700 10px var(--font); color: #fff; display: flex; gap: 6px; align-items: center; }
.phone .rec i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; }
.phone .prod { position: absolute; left: 12px; right: 12px; bottom: 14px; background: rgba(255,255,255,.94); border-radius: 12px; padding: 10px; display: flex; gap: 10px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.phone .prod .thumb { width: 42px; height: 42px; border-radius: 8px; background: linear-gradient(135deg,#c9d6d0,#e8efec); flex: 0 0 auto; }
.phone .prod .t { font: 700 12px var(--font); color: #10201b; }
.phone .prod .p { font: 600 12px var(--font); color: var(--brand); }
.phone .cart { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.phone.small { width: 150px; align-self: flex-end; margin-bottom: 26px; opacity: .92; }
@media (max-width: 520px) { .phone.small { display: none; } }

/* ---- Sections ---- */
section { padding: clamp(48px, 7vw, 96px) 0; }
.section-head { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.bg-soft { background: var(--bg-soft); }

/* ---- Feature grid ---- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: transform .18s var(--ease), box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ficon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 14px; }
.card .ficon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: .35rem; }
.card p { margin: 0; font-size: .93rem; color: var(--fg-muted); }
.card a.more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 600; font-size: .88rem; color: var(--brand); }

/* ---- Feature deep-dive rows ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.split.reverse > .split-media { order: -1; }
.split-media { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-sunken);
  aspect-ratio: 16/11; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.split-media .badge-demo { position: absolute; top: 14px; left: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px; font: 700 11px var(--font); color: var(--fg-muted); }
.split ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.split ul li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--fg-muted); font-size: .96rem; }
.split ul li svg { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.reverse > .split-media { order: 0; } }

/* ---- Steps ---- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.step { position: relative; padding-top: 8px; }
.step .n { counter-increment: step; width: 40px; height: 40px; border-radius: 11px; background: var(--brand); color: var(--on-brand);
  font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.step .n::before { content: counter(step); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* ---- Stat band ---- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat { text-align: center; }
.stat .v { font-size: clamp(1.7rem, 6vw, 2.2rem); font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .k { font-size: .85rem; color: var(--fg-muted); }
@media (max-width: 680px) { .stats { grid-template-columns: repeat(2,1fr); gap: 26px; } }

/* ---- Pricing ---- */
.price-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; align-items: stretch; }
@media (max-width: 1080px) { .price-grid { grid-template-columns: repeat(2,1fr); } }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; }
.plan.pop { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); position: relative; }
.plan.pop::before { content: "Most popular"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: var(--on-brand); font: 700 11px var(--font); padding: 4px 12px; border-radius: 999px; }
.plan .name { font-weight: 700; font-size: 1.05rem; }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--fg-muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.plan ul li { display: flex; gap: 9px; padding: 6px 0; font-size: .9rem; color: var(--fg-muted); }
.plan ul li svg { width: 18px; height: 18px; color: var(--brand); flex: 0 0 auto; }
@media (max-width: 900px) { .price-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .price-grid { grid-template-columns: 1fr; } }

/* ---- CTA band ---- */
/* Purple → pink gradient; white text is readable across it in both themes. */
.cta-band { background: linear-gradient(120deg, #4c1d95, #7c3aed 55%, #ec4899); color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: #fff; color: #5b21b6; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-faint); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: 5px 0; }
.footer ul li a { color: var(--fg-muted); font-size: .92rem; }
.footer ul li a:hover { color: var(--fg); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--fg-faint); font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Badges / pills ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--brand);
  background: var(--brand-tint); border-radius: 999px; padding: 5px 11px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg-faint); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; }

/* =====================================================================
   Docs layout
   ===================================================================== */
.docs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 44px; align-items: start; padding: 40px 0 90px; }
.docs-side { position: sticky; top: 90px; align-self: start; }
.docs-side nav { display: flex; flex-direction: column; gap: 2px; }
.docs-side .group { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-faint);
  font-weight: 700; margin: 18px 0 6px; }
.docs-side a { padding: 7px 12px; border-radius: 8px; color: var(--fg-muted); font-size: .92rem; }
.docs-side a:hover { background: var(--bg-soft); color: var(--fg); }
.docs-side a.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.docs-main { min-width: 0; }
.docs-main h2 { scroll-margin-top: 90px; margin-top: 2.4em; padding-top: .4em; }
.docs-main h2:first-of-type { margin-top: 0; }
.docs-main img { border-radius: var(--radius); border: 1px solid var(--border); margin: 16px 0; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--brand); background: var(--bg-soft);
  border-radius: 10px; padding: 14px 16px; margin: 18px 0; font-size: .93rem; }
.callout.tip { border-left-color: var(--brand); }
.callout.warn { border-left-color: #d98324; }
.callout strong { display: block; margin-bottom: 3px; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 16px 0; }
.steps-list li { counter-increment: s; position: relative; padding: 10px 0 10px 42px; border-bottom: 1px solid var(--border); }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 9px; width: 27px; height: 27px; border-radius: 8px;
  background: var(--brand-tint); color: var(--brand); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
kbd { font: 600 .82em var(--mono); background: var(--bg-sunken); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px; color: var(--fg); }
code { font: .88em var(--mono); background: var(--bg-sunken); border-radius: 5px; padding: 1px 6px; }
.docs-toc { margin: 10px 0 0; }
@media (max-width: 900px) {
  /* minmax(0,1fr) lets the column shrink below its content so the pill bar
     scrolls INSIDE the sidebar instead of blowing out the page width. */
  .docs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .docs-side { position: static; min-width: 0; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 8px; }
  /* Sidebar becomes a WRAPPING row of pills — every item visible, nothing cut,
     no horizontal scroll. */
  .docs-side nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .docs-side .group { display: none; }
  .docs-side a { border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; }
  .docs-side a.active { border-color: var(--brand); background: var(--brand-tint); }
}

/* ---- Blog ---- */
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s var(--ease); }
.post:hover { transform: translateY(-3px); }
.post .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--brand-tint), var(--bg-sunken)); position: relative; }
.post .cover .cat { position: absolute; left: 12px; top: 12px; }
.post .body { padding: 18px; }
.post .body h3 { margin-bottom: .3rem; }
.post .body p { font-size: .9rem; color: var(--fg-muted); margin: 0; }
.post .meta { margin-top: 12px; font-size: .8rem; color: var(--fg-faint); }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--fg); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: .96rem; color: var(--fg); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,.18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: start; }
@media (max-width: 840px) { .contact-grid { grid-template-columns: 1fr; gap: 30px; } }
.contact-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.contact-card .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center; flex: 0 0 auto; }
.contact-card .ic svg { width: 20px; height: 20px; }
.contact-card h3 { margin: 0 0 2px; font-size: 1rem; }
.contact-card p { margin: 0; font-size: .9rem; color: var(--fg-muted); }
.contact-card a { color: var(--brand); font-weight: 600; }

/* ---- Article (single blog post) ---- */
.article { max-width: 748px; margin: 0 auto; padding: 34px 0 84px; }
.breadcrumb { font-size: .85rem; color: var(--fg-faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--fg-muted); } .breadcrumb a:hover { color: var(--fg); }
.article-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin: 10px 0 14px; }
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--fg-muted); font-size: .9rem; margin-bottom: 22px; }
.article-meta .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); flex: 0 0 auto; }
.article-meta .dot { color: var(--fg-faint); }
.article .cover { aspect-ratio: 16/8; border-radius: var(--radius-lg); border: 1px solid var(--border); margin: 0 0 30px;
  background: linear-gradient(120deg, var(--brand-tint), var(--bg-sunken)); position: relative; overflow: hidden; display: grid; place-items: center; }
.article .cover .play { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--brand); box-shadow: var(--shadow); }
.prose { font-size: 1.06rem; line-height: 1.75; }
.prose > p:first-of-type { font-size: 1.16rem; color: var(--fg-muted); }
.prose h2 { font-size: 1.5rem; margin: 1.9em 0 .5em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.prose ul { padding-left: 1.15rem; } .prose li { margin: .3em 0; }
.prose a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose figure { margin: 26px 0; } .prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand);
  color: var(--fg-muted); font-size: 1.12rem; }
.article-cta { margin-top: 40px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.article-tags { margin-top: 30px; display: flex; gap: 8px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
/* If JS is off, never leave reveal content invisible. */
@media (scripting: none) { .reveal { opacity: 1 !important; transform: none !important; } }

/* =====================================================================
   Responsive refinements — tighten the small-screen experience
   ===================================================================== */
.prose { overflow-wrap: break-word; }

/* Tablet: give the 4-up feature/stat grids a comfortable 2-up middle step */
@media (min-width: 621px) and (max-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* Phones: compact the nav so nothing overflows */
@media (max-width: 600px) {
  .nav-inner { gap: .55rem; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 27px; height: 27px; }
  .nav-cta { gap: .4rem; }
  .nav-cta .btn-primary { padding: .56rem 1rem; font-size: .85rem; }
  .icon-btn { width: 36px; height: 36px; }
}
/* Very small phones: drop the theme toggle to save the row */
@media (max-width: 400px) {
  .nav-cta [data-theme-toggle] { display: none; }
}

/* Phones: full-width, stacked CTAs read better than side-by-side */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .article-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { justify-content: center; text-align: center; }
  section { padding: clamp(40px, 9vw, 96px) 0; }
}
