:root{
  /* dark palette (default) */
  --bg-deep:#0a0907;
  --bg-card:#14110e;
  --bg-card-hover:#1c1814;
  --bg-accent:#1e1a15;
  --border:#2a2118;
  --border-glow:rgba(232,85,60,.25);
  --text-primary:#f5f3ff;
  --text-secondary:rgba(245,243,255,.68);
  --text-muted:rgba(255,255,255,.35);
  --purple:#E8553C;
  --purple-dim:#8a3320;
  --purple-glow:rgba(232,85,60,.12);
  --gold:#F5D97E;
  --gold-dim:#92702a;
  --green:#22c55e;
  --red:#ef4444;
  --surface-glass-bg:rgba(255,255,255,.035);
  --surface-glass-border:rgba(255,255,255,.08);
  --card-shadow:0 14px 40px -20px rgba(0,0,0,.6);
  --noise-opacity:0.035;
  --wordmark-invert:0;

  --radius:16px;
  --radius-sm:10px;
  --radius-lg:24px;
  --fs-display:clamp(2.2rem, 5vw, 3.6rem);
  --fs-h1:clamp(1.8rem, 3.4vw, 2.4rem);
  --fs-h2:clamp(1.3rem, 2.4vw, 1.7rem);
  --fs-h3:1.05rem;
  --fs-body:1rem;
  --fs-small:.875rem;
  --fs-tiny:.75rem;
  --maxw:1040px;
  font-size:120%;
}

/* light palette */
html[data-theme="light"]{
  --bg-deep:#faf6f0;
  --bg-card:#ffffff;
  --bg-card-hover:#fbf4e9;
  --bg-accent:#f3ead9;
  --border:#e4d6c0;
  --border-glow:rgba(184,66,31,.30);
  --text-primary:#221912;
  --text-secondary:rgba(34,25,18,.72);
  --text-muted:rgba(34,25,18,.45);
  --purple:#B8421F;           /* darker copper for contrast */
  --purple-dim:#6d2713;
  --purple-glow:rgba(184,66,31,.14);
  --gold:#9a7512;             /* darker gold for light bg */
  --gold-dim:#6b4f08;
  --surface-glass-bg:rgba(255,255,255,.72);
  --surface-glass-border:rgba(34,25,18,.08);
  --card-shadow:0 14px 40px -22px rgba(120,60,20,.25);
  --noise-opacity:0.025;
}

html{transition:background-color .25s ease, color .25s ease}

*{margin:0;padding:0;box-sizing:border-box}

html{
  font-size:16px;
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  font-family:'DM Sans',system-ui,-apple-system,sans-serif;
  background:var(--bg-deep);
  color:var(--text-primary);
  line-height:1.65;
  min-height:100vh;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-feature-settings:"kern" 1,"liga" 1;
}

/* noise + glow backdrop */
body::before{
  content:'';
  position:fixed;
  inset:0;
  background:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity:var(--noise-opacity);
  pointer-events:none;
  z-index:0;
}
body::after{
  content:'';
  position:fixed;
  top:-250px;
  right:-250px;
  width:700px;
  height:700px;
  background:radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  pointer-events:none;
  z-index:0;
}

/* Typography */
h1,h2,h3,h4{
  font-family:'Space Grotesk','DM Sans',sans-serif;
  font-weight:600;
  letter-spacing:-0.025em;
  color:var(--text-primary);
}
.display{
  font-family:'Space Grotesk','DM Sans',sans-serif;
  font-weight:700;
  letter-spacing:-0.035em;
  font-size:var(--fs-display);
  line-height:1;
  background:linear-gradient(135deg,#f5f3ff 0%,#E8553C 45%,#F5D97E 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-transform:none;
}
.display::before{
  content:"// ";
  background:linear-gradient(135deg,#E8553C 0%,#F5D97E 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  opacity:.5;
  font-family:'JetBrains Mono',monospace;
  font-weight:400;
  font-size:.65em;
  letter-spacing:0;
}
h1{font-size:var(--fs-h1);line-height:1.15;margin:0 0 .6em}
h2{font-size:var(--fs-h2);line-height:1.25;margin:2em 0 .6em}
h3{font-size:var(--fs-h3);line-height:1.35;margin:1.6em 0 .5em;color:var(--text-primary)}

p{margin:.75em 0;color:var(--text-secondary)}
p.lead{font-size:1.1rem;color:var(--text-primary);opacity:.9}

strong,b{color:var(--text-primary);font-weight:600}
em{color:var(--gold);font-style:normal}

a{color:var(--purple);text-decoration:none;transition:opacity .2s}
a:hover{opacity:.8;text-decoration:underline}

code,kbd,samp{
  font-family:'JetBrains Mono',ui-monospace,Menlo,monospace;
  font-size:.85em;
  background:var(--bg-accent);
  padding:.15em .4em;
  border-radius:4px;
  color:var(--purple);
  border:1px solid var(--border);
}
pre{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:14px 16px;
  overflow-x:auto;
  margin:1em 0;
  font-size:.85rem;
}
pre code{background:transparent;border:none;padding:0}

ul,ol{margin:.75em 0 .75em 1.25em;color:var(--text-secondary)}
li{margin:.3em 0}
li::marker{color:var(--purple)}

hr{
  border:none;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--border) 50%,transparent);
  margin:2.5em 0;
}

/* Layout */
.container{
  max-width:var(--maxw);
  margin:0 auto;
  padding:24px 20px 80px;
  position:relative;
  z-index:1;
}
.hero-container{
  max-width:1020px;
  margin:0 auto;
  padding:64px 20px 32px;
  position:relative;
  z-index:1;
  text-align:center;
}

/* Header / Nav */
.top-nav{
  position:sticky;
  top:0;
  z-index:50;
  background:color-mix(in srgb, var(--bg-deep) 72%, transparent);
  backdrop-filter:blur(20px) saturate(160%);
  -webkit-backdrop-filter:blur(20px) saturate(160%);
  border-bottom:1px solid var(--border);
}
.top-nav-inner{
  max-width:1200px;
  margin:0 auto;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  font-size:1.05rem;
  letter-spacing:-0.01em;
  color:var(--text-primary);
}
.brand:hover{text-decoration:none;opacity:1}
.brand-text{
  font-family:'Space Grotesk','DM Sans',sans-serif;
  font-weight:700;
  letter-spacing:.02em;
  font-size:1.02rem;
  background:linear-gradient(90deg,var(--text-primary) 0%,var(--gold) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.brand-mark{
  width:32px;
  height:32px;
  display:inline-block;
  background-image:url("/assets/brand-icon.webp?v=1");
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  filter:drop-shadow(0 2px 6px rgba(232,85,60,.35));
}
.nav-links{
  display:flex;
  gap:22px;
  font-size:.9rem;
}
.nav-links a{
  color:var(--text-secondary);
  transition:color .2s;
}
.nav-links a:hover{color:var(--text-primary);text-decoration:none}
.nav-lang{
  display:flex;
  gap:6px;
  font-size:.8rem;
  align-items:center;
}
.nav-lang a{
  padding:6px 10px;
  border-radius:6px;
  color:var(--text-muted);
}
.nav-lang a.active{
  color:var(--text-primary);
  background:var(--bg-accent);
  border:1px solid var(--border);
}
.nav-theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:8px;
  background:var(--bg-accent);
  border:1px solid var(--border);
  color:var(--text-secondary);
  cursor:pointer;
  transition:all .2s;
  padding:0;
  font-size:0;
  margin-right:6px;
}
.nav-theme-toggle:hover{
  color:var(--text-primary);
  border-color:var(--border-glow);
}
.nav-theme-toggle svg{width:16px;height:16px;display:block}
.nav-theme-toggle .theme-icon-sun{display:none}
html[data-theme="light"] .nav-theme-toggle .theme-icon-sun{display:block}
html[data-theme="light"] .nav-theme-toggle .theme-icon-moon{display:none}

/* Hero wordmark — главный ассет */
.hero-wordmark{
  margin:0 auto 20px;
  max-width:720px;
  width:100%;
  line-height:0;
}
.hero-svg{
  display:block;
  width:100%;
  height:auto;
  filter:drop-shadow(0 18px 40px rgba(245,217,126,.10))
         drop-shadow(0 6px 14px rgba(232,85,60,.12));
}
html[data-theme="light"] .hero-svg{
  filter:drop-shadow(0 14px 30px rgba(184,66,31,.14))
         drop-shadow(0 4px 10px rgba(120,60,20,.12));
}
.hero-ring{
  fill:none;
  stroke:var(--purple);
  stroke-width:1;
}
.hero-ring-inner{opacity:.55}
.hero-ring-mid{opacity:.32}
.hero-ring-outer{opacity:.18}
.hero-dot{fill:var(--gold)}
.hero-dot-far{opacity:.6}
.hero-wordtext{
  font-family:'Space Grotesk','DM Sans',sans-serif;
  font-weight:700;
  font-size:56px;
  letter-spacing:0.14em;
}
.hero-underline{
  stroke:var(--purple);
  stroke-width:1;
  opacity:.5;
}
.hero-sub{
  font-family:'Space Grotesk',sans-serif;
  font-weight:600;
  font-size:16px;
  letter-spacing:0.48em;
  fill:var(--purple);
}
@media (max-width:720px){
  .hero-wordmark{max-width:92vw;margin:4px auto 16px}
}

/* Hero container */
.hero{padding:8px 0 16px}
.hero .tag{
  display:inline-block;
  font-family:'JetBrains Mono',monospace;
  font-size:.75rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--purple);
  background:var(--purple-glow);
  border:1px solid var(--border-glow);
  padding:6px 12px;
  border-radius:20px;
  margin-bottom:20px;
}
.hero .lead{
  font-size:1.15rem;
  color:var(--text-secondary);
  max-width:620px;
  margin:18px auto 28px;
}
.hero-ctas{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:28px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 22px;
  border-radius:var(--radius-sm);
  font-weight:600;
  font-size:.95rem;
  transition:all .2s;
  border:1px solid transparent;
  cursor:pointer;
  letter-spacing:-0.005em;
}
.btn:hover{text-decoration:none;transform:translateY(-1px)}
.btn-primary{
  background:linear-gradient(180deg,#8a3018 0%,#5a1e0b 100%);
  color:#fff;
  box-shadow:0 10px 28px -12px rgba(90,30,11,.85),
             inset 0 1px 0 rgba(255,255,255,.06);
  border:1px solid #4a1708;
  text-shadow:0 1px 2px rgba(0,0,0,.5);
}
.btn-primary:hover{
  background:linear-gradient(180deg,#a03a1d 0%,#6d2611 100%);
  opacity:1;
}
html[data-theme="light"] .btn-primary{
  background:linear-gradient(180deg,#a03a1d 0%,#6d2611 100%);
  box-shadow:0 8px 22px -10px rgba(90,30,11,.45),
             inset 0 1px 0 rgba(255,255,255,.1);
}
html[data-theme="light"] .btn-primary:hover{
  background:linear-gradient(180deg,#b8421f 0%,#7d2c13 100%);
}
.btn-ghost{
  background:rgba(255,255,255,.04);
  color:var(--text-primary);
  border-color:var(--border);
}
.btn-ghost:hover{background:rgba(255,255,255,.08);opacity:1}

/* Glass card */
.card{
  background:var(--surface-glass-bg);
  backdrop-filter:blur(20px) saturate(160%);
  -webkit-backdrop-filter:blur(20px) saturate(160%);
  border:1px solid var(--surface-glass-border);
  border-radius:var(--radius);
  padding:24px;
  margin:1.25em 0;
  box-shadow:var(--card-shadow);
}
.card h3:first-child{margin-top:0}

/* Info / warning callouts */
.callout{
  display:flex;
  gap:14px;
  padding:16px 18px;
  border-radius:var(--radius-sm);
  margin:1.25em 0;
  border:1px solid var(--border);
  background:var(--bg-card);
}
.callout-icon{
  flex-shrink:0;
  width:28px;
  height:28px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:.85rem;
  background:var(--purple-glow);
  color:var(--purple);
  border:1px solid var(--border-glow);
}
.callout-body{flex:1;font-size:.95rem;color:var(--text-secondary)}
.callout-body strong{color:var(--text-primary)}
.callout.info   .callout-icon{background:rgba(245,217,126,.10);color:var(--gold);border-color:rgba(245,217,126,.25)}
.callout.warn   .callout-icon{background:rgba(228,120,40,.14);color:#f08a3a;border-color:rgba(228,120,40,.30)}
.callout.accent .callout-icon{background:var(--purple-glow);color:var(--purple);border-color:var(--border-glow)}
.callout.gold   .callout-icon{background:rgba(245,217,126,.12);color:var(--gold);border-color:rgba(245,217,126,.28)}

/* Tables */
table{
  width:100%;
  border-collapse:collapse;
  margin:1em 0;
  font-size:.93rem;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  overflow:hidden;
}
thead{background:var(--bg-accent)}
th,td{
  padding:12px 14px;
  text-align:left;
  border-bottom:1px solid var(--border);
}
th{
  font-weight:600;
  color:var(--text-primary);
  font-size:.85rem;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--text-secondary);
}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover{background:var(--bg-card-hover)}
td.num{font-family:'JetBrains Mono',monospace;color:var(--gold);text-align:right}

/* TOC hint */
.toc-hint{
  margin:-.4em 0 .8em;
  font-size:.85rem;
  color:var(--text-secondary);
  opacity:.75;
  font-style:italic;
}

/* ===== Infographic figures ===== */
.fig{
  margin:1.75em auto;
  padding:0;
  display:block;
  max-width:100%;
}
.fig-svg{
  width:100%;
  height:auto;
  display:block;
  color:var(--purple);
}
.fig figcaption{
  margin-top:.8em;
  font-size:.88rem;
  color:var(--text-secondary);
  text-align:center;
  line-height:1.55;
  padding:0 12px;
  max-width:700px;
  margin-left:auto;
  margin-right:auto;
}

/* Cycle diagram (#1) — unified vertical, centered */
.fig-cycle{max-width:none}
.fig-cycle .fig-svg{
  color:var(--purple);
  display:block;
  max-width:310px;
  margin:0 auto;
}
.fig-cycle .fig-label-v text{
  font-family:inherit;
  font-size:24px;
  fill:var(--text-primary);
  font-weight:600;
  letter-spacing:.01em;
}
.fig-cycle .fig-stroke{stroke:currentColor}
.fig-cycle .fig-node{
  fill:var(--bg-card);
  stroke:var(--border-glow);
  stroke-width:1.4;
}
.fig-cycle .fig-arrow-head{fill:currentColor;stroke:none}
.fig-cycle .fig-fill-gold{fill:var(--gold);stroke:currentColor}
.fig-cycle .fig-label text{
  font-family:inherit;
  font-size:14px;
  fill:var(--text-primary);
  font-weight:500;
  letter-spacing:.01em;
}

/* Stacks (#3) */
.fig-stacks{max-width:560px}
.fig-stacks .fig-svg{color:var(--purple)}
.fig-stacks .fig-node{
  fill:var(--bg-card);
  stroke:currentColor;
  stroke-width:1.6;
}
.fig-stacks .fig-stacks-arrow{stroke:currentColor;opacity:.55}
.fig-stacks .fig-label text{
  font-family:inherit;
  font-size:13px;
  fill:var(--text-secondary);
}
.fig-stacks .fig-label-title{
  font-size:15px;
  fill:var(--text-primary);
  font-weight:600;
  letter-spacing:.02em;
}

/* Orbits (#4) */
.fig-orbits{max-width:520px}
.fig-orbits .fig-svg{color:var(--purple)}
.fig-orbits .fig-orbit-rings circle{
  stroke:currentColor;
  opacity:.35;
}
.fig-orbits .fig-orbit-rings circle:first-child{opacity:.55}
.fig-orbits .fig-orbit-rings circle:nth-child(2){opacity:.5}
.fig-orbits .fig-orbit-rings circle:nth-child(3){opacity:.45}
.fig-orbits .fig-orbit-dots{color:var(--gold)}
.fig-orbits .fig-orbit-center{
  fill:var(--gold);
  stroke:none;
}
.fig-orbits .fig-orbit-halo{
  fill:none;
  stroke:var(--gold);
  stroke-width:1.2;
  opacity:.35;
}
.fig-orbits .fig-orbit-you{
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  fill:var(--bg-card);
  letter-spacing:.04em;
}

/* Slots-table expand button */
.slots-expand{
  margin-top:-8px;
  margin-bottom:1.5em;
  display:flex;
  justify-content:center;
}
.btn-ghost-sm{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-secondary);
  padding:9px 18px;
  border-radius:999px;
  font-size:.88rem;
  font-family:inherit;
  cursor:pointer;
  transition:all .15s;
}
.btn-ghost-sm:hover{
  border-color:var(--purple);
  color:var(--text-primary);
  background:var(--purple-glow);
}

/* ===== Calculator block ===== */
.calc-card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:22px;
  margin:1.5em 0 2em;
  display:grid;
  gap:22px;
}
.calc-inputs{display:flex;flex-direction:column;gap:20px}
.calc-field{display:flex;flex-direction:column;gap:8px}
.calc-row-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
}
.calc-label{
  font-size:.92rem;
  color:var(--text-secondary);
  line-height:1.4;
}
.calc-value{
  font-family:'JetBrains Mono',monospace;
  font-weight:600;
  color:var(--gold);
  font-size:1.05rem;
  white-space:nowrap;
}
.calc-slider{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  height:4px;
  background:var(--border);
  border-radius:2px;
  outline:none;
  cursor:pointer;
}
.calc-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:20px;
  height:20px;
  background:var(--purple);
  border-radius:50%;
  cursor:pointer;
  border:2px solid var(--bg-card);
  box-shadow:0 0 0 1px var(--purple);
  transition:transform .15s;
}
.calc-slider::-webkit-slider-thumb:hover{transform:scale(1.12)}
.calc-slider::-moz-range-thumb{
  width:20px;
  height:20px;
  background:var(--purple);
  border-radius:50%;
  cursor:pointer;
  border:2px solid var(--bg-card);
  box-shadow:0 0 0 1px var(--purple);
}
.calc-scale{
  display:flex;
  justify-content:space-between;
  font-family:'JetBrains Mono',monospace;
  font-size:.75rem;
  color:var(--text-secondary);
  opacity:.6;
}
.calc-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.calc-chip{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-secondary);
  padding:8px 12px;
  border-radius:999px;
  font-size:.85rem;
  font-family:inherit;
  cursor:pointer;
  transition:all .15s;
}
.calc-chip:hover{border-color:var(--border-glow);color:var(--text-primary)}
.calc-chip.is-active{
  background:var(--purple-glow);
  border-color:var(--purple);
  color:var(--text-primary);
}
.calc-hint{
  font-size:.82rem;
  color:var(--text-secondary);
  opacity:.75;
  margin:.3em 0 0;
  line-height:1.5;
}
.calc-output{
  display:flex;
  flex-direction:column;
  border-top:1px solid var(--border);
  padding-top:18px;
  gap:10px;
}
.calc-out-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:14px;
  padding:4px 0;
}
.calc-out-label{
  font-size:.92rem;
  color:var(--text-secondary);
  line-height:1.4;
}
.calc-out-num{
  font-family:'JetBrains Mono',monospace;
  font-weight:600;
  color:var(--text-primary);
  font-size:1rem;
  white-space:nowrap;
}
.calc-out-total{
  border-top:1px dashed var(--border);
  padding-top:12px;
  margin-top:4px;
}
.calc-out-total .calc-out-label{
  color:var(--text-primary);
  font-weight:600;
  font-size:1rem;
}
.calc-out-total .calc-out-num{
  color:var(--gold);
  font-size:1.25rem;
}
.calc-out-sub .calc-out-label{
  font-size:.85rem;
  opacity:.78;
}
.calc-out-sub .calc-out-num{
  color:var(--text-secondary);
  font-size:.92rem;
  font-weight:500;
}
.calc-note{
  font-size:.82rem;
  color:var(--text-secondary);
  line-height:1.6;
  padding:14px 16px;
  background:var(--purple-glow);
  border-radius:var(--radius-sm);
  border-left:2px solid var(--purple);
}
.calc-note strong{color:var(--text-primary)}
.calc-note em{color:var(--gold);font-style:normal}

/* Top FAQ block (above the fold) */
.faq-top{
  margin:2em 0 2.5em;
  padding:20px 22px 18px;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:linear-gradient(180deg, var(--purple-glow) 0%, transparent 60%);
}
.faq-top-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:.6em;
  flex-wrap:wrap;
}
.faq-top-head h3{
  margin:0;
  font-size:1.08rem;
  color:var(--text-primary);
}
.faq-top-link{
  font-size:.88rem;
  color:var(--purple);
  text-decoration:none;
  white-space:nowrap;
}
.faq-top-link:hover{text-decoration:underline}
.faq-top details.faq{
  margin:6px 0;
  background:var(--bg-card);
}

/* Accordion (details/summary) */
details.faq{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  margin:10px 0;
  overflow:hidden;
  transition:border-color .2s;
}
details.faq[open]{border-color:var(--border-glow)}
details.faq summary{
  cursor:pointer;
  padding:16px 18px;
  font-weight:600;
  color:var(--text-primary);
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-size:.98rem;
}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary::after{
  content:'+';
  font-size:1.2rem;
  color:var(--purple);
  transition:transform .2s;
  flex-shrink:0;
}
details.faq[open] summary::after{transform:rotate(45deg)}
details.faq .answer{
  padding:0 18px 18px;
  color:var(--text-secondary);
  font-size:.95rem;
  line-height:1.65;
}
details.faq .answer > *:first-child{margin-top:0}

/* Feature grid */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
  margin:1.5em 0;
}
.feature{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:20px;
  transition:border-color .2s, transform .2s;
}
.feature:hover{border-color:var(--border-glow);transform:translateY(-2px)}
.feature-num{
  display:inline-block;
  font-family:'JetBrains Mono',monospace;
  font-size:.7rem;
  color:var(--purple);
  letter-spacing:.15em;
  margin-bottom:8px;
}
.feature h4{font-size:1rem;margin:0 0 6px;letter-spacing:-0.01em}
.feature p{font-size:.88rem;margin:0;color:var(--text-secondary)}

/* Venture slots table */
.slots-table td:first-child{font-weight:600;color:var(--text-primary)}

/* Section heading */
.section-head{margin:3em 0 1em;text-align:center}
.section-head .kicker{
  font-family:'JetBrains Mono',monospace;
  font-size:1.05rem;
  letter-spacing:.25em;
  color:var(--purple);
  text-transform:uppercase;
  margin-bottom:12px;
  font-weight:600;
}
.section-head h2{margin:0}

/* Step list */
.steps{
  list-style:none;
  margin:1.5em 0;
  padding:0;
  counter-reset:step;
}
.steps li{
  position:relative;
  padding:16px 18px 16px 60px;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  margin:10px 0;
  counter-increment:step;
}
.steps li::before{
  content:counter(step);
  position:absolute;
  left:18px;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'JetBrains Mono',monospace;
  font-weight:600;
  font-size:.85rem;
  background:var(--purple-glow);
  color:var(--purple);
  border:1px solid var(--border-glow);
  border-radius:50%;
}
.steps li strong{display:block;color:var(--text-primary);margin-bottom:2px}

/* TOC */
.toc{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:20px 22px;
  margin:2em 0;
}
.toc h3{margin:0 0 .5em;font-size:.9rem;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted)}
.toc ol{margin:0;padding:0;list-style:none;counter-reset:toc}
.toc li{margin:.5em 0;counter-increment:toc;padding-left:32px;position:relative}
.toc li::before{
  content:counter(toc,decimal-leading-zero);
  position:absolute;
  left:0;
  top:0;
  color:var(--purple);
  font-family:'JetBrains Mono',monospace;
  font-size:.8rem;
  opacity:.6;
}
.toc a{color:var(--text-primary)}
.toc a:hover{color:var(--purple);text-decoration:none}

/* Footer */
.footer{
  border-top:1px solid var(--border);
  margin-top:80px;
  padding:32px 20px 48px;
  text-align:center;
  color:var(--text-muted);
  font-size:.85rem;
}
.footer a{color:var(--text-secondary)}
.footer-links{
  display:flex;
  gap:18px;
  justify-content:center;
  margin-bottom:14px;
  flex-wrap:wrap;
}

/* Section divider */
.divider-label{
  text-align:center;
  position:relative;
  margin:3em 0;
}
.divider-label::before{
  content:'';
  position:absolute;
  left:0;
  right:0;
  top:50%;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--border) 50%,transparent);
}
.divider-label span{
  position:relative;
  background:var(--bg-deep);
  padding:0 16px;
  font-family:'JetBrains Mono',monospace;
  font-size:.75rem;
  letter-spacing:.25em;
  color:var(--text-muted);
  text-transform:uppercase;
}

/* Anchor offset for sticky header */
.anchor{
  display:block;
  position:relative;
  top:-64px;
  visibility:hidden;
}

/* Mobile */
@media (max-width:720px){
  .nav-links{display:none}
  .hero-container{padding:40px 16px 16px}
  .container{padding:16px 14px 48px}
  table{font-size:.85rem}
  th,td{padding:10px}
  .grid{grid-template-columns:1fr}
  /* Hide less-essential columns on mobile to avoid overflow */
  .slots-table th:nth-child(4),
  .slots-table td:nth-child(4),
  .slots-table th:nth-child(5),
  .slots-table td:nth-child(5){
    display:none;
  }
}

/* Print */
@media print{
  .top-nav,.footer,.hero-ctas,body::before,body::after{display:none!important}
  body{background:#fff;color:#111}
  *{color:#111!important}
  a{color:#000!important;text-decoration:none}
  .card,.callout,details.faq{
    background:#fff!important;
    border:1px solid #ccc!important;
    break-inside:avoid;
  }
  details.faq[open] .answer{display:block}
}
