/* RuntimeSec site. Tonal dark greens; one bright accent (lichen), one semantic
   color (ember) used only for blocked calls. */
:root {
  --pine: #0c1a13;
  --moss: #13261c;
  --moss-2: #183022;
  --fern: #24402f;
  --bone: #e8efe6;
  --sage: #93ae9b;
  --lichen: #b6e388;
  --lichen-ink: #0c1a13;
  --ember: #e0895a;
  --mint: #7fd4a6;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-gap: clamp(88px, 12vw, 152px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background-color: var(--pine);
  /* faint diagonal hatch, echoing the reference's paper texture */
  background-image: repeating-linear-gradient(135deg, rgba(147, 174, 155, 0.035) 0 1px, transparent 1px 14px);
  color: var(--bone);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.92em; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--lichen); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--lichen); color: var(--lichen-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  font: 600 0.95rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }
.btn-primary { background: var(--lichen); color: var(--lichen-ink); }
.btn-primary:hover { background: #c7ec9f; }
.btn-ghost { border-color: var(--fern); color: var(--bone); }
.btn-ghost:hover { border-color: var(--sage); background: rgba(147, 174, 155, 0.06); }

/* ---------- nav ---------- */
/* Always pinned to the top; once the page scrolls (main.js adds .is-scrolled)
   the pill gets a more opaque ground so it stays legible over content. */
.nav-wrap { position: sticky; top: 0; z-index: 30; padding: 12px var(--gutter) 0; }
.nav {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 24px;
  padding: 8px 8px 8px 18px; border: 1px solid rgba(182, 227, 136, 0.38); border-radius: 999px;
  background: rgba(12, 26, 19, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(232, 239, 230, 0.06), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.nav-wrap.is-scrolled .nav {
  background: rgba(12, 26, 19, 0.92); border-color: rgba(182, 227, 136, 0.5);
  box-shadow: inset 0 1px 0 rgba(232, 239, 230, 0.06), 0 14px 40px -14px rgba(0, 0, 0, 0.85);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); font: 700 1.14rem/1 var(--font-display); letter-spacing: -0.02em; min-height: 44px; }
.brand-mark { width: 26px; height: 26px; color: var(--sage); }
.brand-gate { fill: var(--lichen); }
.nav-links { position: relative; display: flex; gap: 4px; margin: 0 auto; padding: 0; list-style: none; }
.nav-links a, .nav-trigger {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 999px; background: none; color: var(--sage); text-decoration: none;
  font: 500 0.93rem/1 var(--font-body); cursor: pointer; transition: color .2s ease;
}
.nav-links a:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"], .nav-trigger.is-current { color: var(--bone); }
.chev { width: 14px; height: 14px; transition: transform .35s var(--ease-out); }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Sliding highlight that follows the hovered/open nav item. */
.nav-hl { position: absolute; left: 0; top: 50%; height: 38px; width: 0; margin-top: -19px; border-radius: 999px; background: var(--moss-2); border: 1px solid var(--fern); opacity: 0; pointer-events: none; transition: transform .4s var(--ease-out), width .4s var(--ease-out), opacity .2s ease; }
.nav-hl.is-on { opacity: 1; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--fern); border-radius: 999px; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 34px; padding: 0 10px; border-radius: 999px; color: var(--sage); font: 600 0.8rem/1 var(--font-body); letter-spacing: 0.04em; text-decoration: none; transition: color .2s ease, background-color .2s ease; }
.lang-switch a:hover { color: var(--bone); }
.lang-switch a[aria-current] { background: var(--moss-2); color: var(--bone); }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--fern); background: var(--moss); color: var(--bone); cursor: pointer; place-items: center; }
.nav-burger span { position: relative; display: block; width: 16px; height: 1.5px; background: currentColor; transition: background-color .2s ease; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease-out); }
.nav-burger span::before { transform: translateY(-5px); }
.nav-burger span::after { transform: translateY(5px); }
.nav-burger[aria-expanded="true"] span { background: transparent; }
.nav-burger[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span::after { transform: rotate(-45deg); }

/* ---------- mega menu ---------- */
.mega {
  position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); top: calc(100% + 10px);
  max-width: 1240px; margin: 0 auto; height: 0; overflow: hidden;
  border: 1px solid var(--fern); border-radius: 26px; background: rgba(14, 29, 21, 0.97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
  opacity: 0; visibility: hidden; transform: translateY(-12px) scale(0.985); transform-origin: 50% 0;
  transition: opacity .25s ease, transform .5s var(--ease-out), height .45s var(--ease-out), visibility 0s linear .25s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega-panel {
  position: absolute; left: 0; right: 0; top: 0; padding: 30px clamp(24px, 4vw, 48px) 34px;
  opacity: 0; transform: translateX(var(--from, 0)); pointer-events: none;
  transition: opacity .3s ease, transform .5s var(--ease-out);
}
.mega-panel.is-active { opacity: 1; transform: none; pointer-events: auto; }
.mega-panel.is-active .mi { animation: mi-in .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
@keyframes mi-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

.mega-grid { display: grid; gap: 22px 40px; }
.mega-grid-platform { grid-template-columns: 5fr 7fr; }
.mega-grid-resources { grid-template-columns: 1fr 1fr 1.15fr; }
.mega-label { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--fern); color: var(--sage); font-size: 0.82rem; font-weight: 500; }
.mega-col > * + .mega-label { margin-top: 22px; }
.mega-stack { display: grid; gap: 4px; }

.mrow { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: center; padding: 10px 12px; margin: 0 -12px; border-radius: 14px; text-decoration: none; transition: background-color .2s ease; }
.mrow:hover { background: var(--moss-2); }
.mrow:hover .micon { border-color: var(--lichen); color: var(--lichen); }
.micon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--fern); color: var(--sage); transition: border-color .2s ease, color .2s ease; }
.micon svg, .mtile-icon svg { width: 18px; height: 18px; }
.mrow strong { display: block; font: 600 0.97rem/1.3 var(--font-body); color: var(--bone); }
.mrow strong + span { display: block; margin-top: 2px; color: var(--sage); font-size: 0.86rem; }

.mfeature { display: block; overflow: hidden; border-radius: 20px; border: 1px solid var(--fern); background: var(--moss); text-decoration: none; transition: border-color .25s ease; }
.mfeature:hover { border-color: rgba(182, 227, 136, 0.5); }
.mfeature-art { height: 132px; border-bottom: 1px solid var(--fern); background: radial-gradient(120% 90% at 50% 100%, rgba(182, 227, 136, 0.10), transparent 60%); }
.mfeature-art svg { width: 100%; height: 100%; }
.mfeature-body { padding: 18px 20px 20px; }
.mfeature-body strong { display: block; font: 680 1.2rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--bone); }
.mfeature-body span { display: block; margin-top: 6px; color: var(--sage); font-size: 0.9rem; }
.mfeature-body em { font-style: normal; color: var(--lichen); font-weight: 600; }

.mtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mtile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; padding: 20px; border-radius: 18px; border: 1px solid var(--fern); background: var(--moss); text-decoration: none; transition: border-color .25s ease, background-color .25s ease; }
.mtile:hover { border-color: var(--sage); background: var(--moss-2); }
.mtile-bg { position: absolute; right: -22px; top: -22px; width: 120px; height: 120px; color: var(--lichen); opacity: 0.07; transition: transform .7s var(--ease-out), opacity .4s ease; }
.mtile:hover .mtile-bg { transform: rotate(-10deg) scale(1.1); opacity: 0.16; }
.mtile-icon { display: inline-flex; color: var(--lichen); margin-bottom: 10px; }
.mtile strong { font: 650 1.05rem/1.25 var(--font-display); letter-spacing: -0.01em; color: var(--bone); }
.mtile strong + span { margin-top: 4px; color: var(--sage); font-size: 0.87rem; }

/* Platform art: calls orbit a checkpoint; one is stopped at the gate each lap. */
.orbit { transform-origin: 160px 150px; animation: orbit-spin 14s linear infinite; }
.orbit-slow { transform-origin: 160px 150px; animation: orbit-spin 26s linear infinite reverse; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.gate-pulse { transform-origin: 160px 150px; animation: gate-pulse 2.8s var(--ease-out) infinite; }
@keyframes gate-pulse { 0% { opacity: .55; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.9); } }
/* Resources art: a transcript being read; one line gets flagged. */
.scan { animation: scan 4.8s var(--ease-out) infinite; }
@keyframes scan { 0% { transform: translateY(0); } 45%, 60% { transform: translateY(52px); } 100% { transform: translateY(0); } }
.flag { animation: flag 4.8s ease infinite; }
@keyframes flag { 0%, 38% { opacity: 0; } 46%, 70% { opacity: 1; } 82%, 100% { opacity: 0; } }

/* ---------- scroll reveal (main.js adds .is-in / .is-above) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px); filter: blur(8px);
  transition: opacity .8s var(--ease-out), transform .95s var(--ease-out), filter .8s ease;
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-above { transform: translateY(-28px); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- layout ---------- */
.section { max-width: var(--maxw); margin: var(--section-gap) auto 0; padding: 0 var(--gutter); }
.section-head { max-width: 740px; margin-bottom: 48px; }
.section-head h2, .how-intro h2, .depth-head h2, .statement-title {
  font: 680 clamp(2.1rem, 4.6vw, 3.5rem)/1.04 var(--font-display);
  letter-spacing: -0.04em; text-wrap: balance;
}
.section-head p, .how-intro p, .depth-head p { margin-top: 18px; color: var(--sage); font-size: 1.08rem; max-width: 62ch; }

/* ---------- hero ---------- */
.hero { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(72px, 11vw, 132px) var(--gutter) 0; text-align: center; isolation: isolate; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 40px; width: min(900px, 110vw); height: 560px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(182, 227, 136, 0.11), rgba(127, 212, 166, 0.05) 55%, transparent);
  filter: blur(8px); pointer-events: none;
}
.hero-title { font: 700 clamp(2.75rem, 7.4vw, 5.25rem)/0.98 var(--font-display); letter-spacing: -0.045em; text-wrap: balance; }
.hero-title span { display: block; }
.hero-accent {
  background: linear-gradient(92deg, var(--mint) 0%, #bfe38c 55%, #d4e88a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em; /* keep descenders inside the clip */
}
.hero-sub { max-width: 640px; margin: 28px auto 0; color: var(--sage); font-size: clamp(1.02rem, 1.6vw, 1.16rem); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* ---------- checkpoint lane ---------- */
.lane-figure { margin: clamp(56px, 8vw, 88px) auto 0; max-width: 1080px; }
.lane { position: relative; height: 272px; overflow: hidden; border: 1px solid var(--fern); border-radius: 24px; background: linear-gradient(180deg, rgba(19, 38, 28, 0.9), rgba(12, 26, 19, 0.9)); }
/* rails and calls get their row's top from main.js (ROW_TOP + i * ROW_GAP) */
.lane-rail { position: absolute; left: 0; right: 0; height: 1px; background: repeating-linear-gradient(90deg, var(--fern) 0 6px, transparent 6px 12px); }
.checkpoint { position: absolute; top: 44px; bottom: 50px; left: var(--gate-x, 58%); width: 2px; transform: translateX(-1px); background: var(--lichen); box-shadow: 0 0 18px 2px rgba(182, 227, 136, 0.35); border-radius: 2px; }
.checkpoint-label { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -8px); white-space: nowrap; font-size: 0.78rem; color: var(--sage); background: var(--pine); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--fern); }
.call {
  position: absolute; left: 0; display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--fern);
  background: var(--moss); white-space: nowrap; will-change: transform;
  transition: border-color .2s ease, background-color .2s ease, opacity .35s ease;
}
.call-tool { color: var(--sage); font-size: 0.82rem; font-weight: 600; }
.call-arg { font: 500 0.86rem/1 var(--font-mono); color: var(--bone); }
.call.is-passed { border-color: rgba(182, 227, 136, 0.55); }
.call.is-blocked { border-color: var(--ember); background: rgba(224, 137, 90, 0.10); }
.call.is-blocked .call-arg { color: var(--ember); }
.call.is-gone { opacity: 0; }
.lane-verdict {
  position: absolute; left: var(--gate-x, 58%); bottom: 14px; transform: translateX(-50%);
  padding: 2px 10px; border-radius: 999px; background: var(--moss);
  font-size: 0.86rem; font-weight: 500; color: var(--ember); white-space: nowrap;
  opacity: 0; transition: opacity .25s ease;
}
.lane-verdict.is-on { opacity: 1; }
.lane-figure figcaption { margin-top: 16px; color: var(--sage); font-size: 0.92rem; }

/* ---------- works with ---------- */
.matrix { border-top: 1px solid var(--fern); }
.matrix-row { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--fern); }
.matrix-label h3 { font: 600 1.02rem/1.3 var(--font-body); }
.matrix-label p { margin-top: 4px; color: var(--sage); font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--fern); border-radius: 12px; background: var(--moss); font-size: 0.93rem; font-weight: 500; }

/* ---------- outcomes ---------- */
.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.outcome { padding: 4px 28px 0; border-left: 1px solid var(--fern); }
.outcome:first-child { padding-left: 0; border-left: 0; }
.outcome dt { font: 650 1.12rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.outcome dd { margin: 12px 0 0; color: var(--sage); font-size: 0.97rem; }

/* ---------- how it works ---------- */
.how { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.how-intro { position: sticky; top: 112px; }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--fern); }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--fern); }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--lichen); color: var(--lichen); font: 600 0.95rem/1 var(--font-display); }
.step h3 { font: 650 1.25rem/1.25 var(--font-display); letter-spacing: -0.015em; }
.step p { margin-top: 8px; color: var(--sage); max-width: 56ch; }

/* ---------- statement ---------- */
.statement { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); align-items: end; padding: clamp(36px, 6vw, 72px); border: 1px solid var(--fern); border-radius: 28px; background: var(--moss); }
.statement-title .dim { color: var(--sage); }
.statement-body p { color: var(--sage); font-size: 1.05rem; }
.statement-body p + p { margin-top: 16px; }
.statement-body em { font-style: normal; color: var(--bone); font-weight: 600; }

/* ---------- detection depth (inverted panel) ---------- */
.depth { padding: clamp(36px, 6vw, 72px); border-radius: 28px; background: #d7eac4; color: var(--pine); }
.depth-head h2 { color: var(--pine); }
.depth-head p { color: #2e4a38; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.tier { padding: 24px; border-radius: 18px; background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(12, 26, 19, 0.12); }
.tier h3 { font: 700 1.35rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.tier-meta { margin-top: 6px !important; font-size: 0.86rem; font-weight: 600; color: #2d6b45; }
.tier p { margin-top: 12px; color: #2e4a38; }
.depth-foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(12, 26, 19, 0.15); color: #2e4a38; font-size: 0.95rem; }

/* ---------- install ---------- */
.install { max-width: 880px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--fern); background: transparent; color: var(--sage); font: 600 0.92rem/1 var(--font-body); cursor: pointer; transition: border-color .18s ease, color .18s ease, background-color .18s ease; }
.tab:hover { color: var(--bone); }
.tab[aria-selected="true"] { background: var(--moss-2); border-color: var(--lichen); color: var(--bone); }
.terminal { border: 1px solid var(--fern); border-radius: 16px; overflow: hidden; background: #08130d; }
.terminal-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--fern); background: var(--moss); }
.terminal-title { color: var(--sage); font-size: 0.85rem; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(182, 227, 136, 0.45); color: var(--lichen); font-size: 0.82rem; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lichen); }
.panel { overflow-x: auto; }
.panel:focus-visible { outline-offset: -3px; }
.panel pre { margin: 0; padding: 22px 22px 24px; font: 400 0.92rem/1.75 var(--font-mono); color: var(--bone); }
.panel .c { color: #7d9886; }
.panel .p { color: var(--lichen); user-select: none; }
.panel .deny { color: var(--ember); }

/* ---------- choices ---------- */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 30px; border-radius: 22px; border: 1px solid var(--fern); background: var(--moss); }
.choice h3 { font: 680 1.4rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.choice p { color: var(--sage); flex: 1; }
.choice-lead { background: var(--moss-2); border-color: rgba(182, 227, 136, 0.4); }

/* ---------- footer ---------- */
.footer { margin-top: var(--section-gap); border-top: 1px solid var(--fern); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.footer-inner > p { color: var(--sage); font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sage); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--bone); }

/* ---------- floating threats (pinned; main.js drives card transforms) ---------- */
.float { position: relative; height: 300vh; margin-top: var(--section-gap); }
.float-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.float-head { position: relative; max-width: 940px; padding: 0 var(--gutter); text-align: center; will-change: transform, opacity; }
.float-head h2 { font: 700 clamp(2.6rem, 6.6vw, 5.4rem)/0.98 var(--font-display); letter-spacing: -0.045em; text-wrap: balance; }
.float-head p { max-width: 560px; margin: 22px auto 0; color: var(--sage); font-size: 1.08rem; }
.fcards { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; pointer-events: none; }
.fcard { pointer-events: auto; }
.fcard {
  position: absolute; top: 0; left: var(--x); width: min(290px, 24vw); padding: 20px 20px 22px;
  border: 1px solid var(--fern); border-radius: 20px; background: rgba(19, 38, 28, 0.93);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); will-change: transform; transform: translate3d(0, 110vh, 0);
}
.fcard-ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 26px; border-radius: 50%; border: 1px solid rgba(224, 137, 90, 0.5); background: rgba(224, 137, 90, 0.10); color: var(--ember); }
.fcard-ic svg { width: 18px; height: 18px; }
.fcard h3 { font: 650 1.08rem/1.25 var(--font-display); letter-spacing: -0.01em; }
.fcard p { margin-top: 8px; color: var(--sage); font-size: 0.92rem; }
.fcard code { color: var(--bone); }

/* ---------- inner pages ---------- */
.page-hero { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 9vw, 112px) var(--gutter) 0; text-align: center; isolation: isolate; overflow-x: clip; }
.page-hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 20px; width: min(820px, 110vw); height: 460px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(182, 227, 136, 0.09), transparent); pointer-events: none; }
.page-hero h1 { font: 700 clamp(2.5rem, 6.2vw, 4.5rem)/1 var(--font-display); letter-spacing: -0.045em; text-wrap: balance; }
.page-hero h1 span { display: block; }
.page-hero > p { max-width: 620px; margin: 24px auto 0; color: var(--sage); font-size: clamp(1.02rem, 1.6vw, 1.14rem); }

/* Pipeline diagram (platform) */
.flow { margin: clamp(48px, 7vw, 80px) auto 0; max-width: 1100px; }
.flow-box { padding: clamp(16px, 3vw, 28px); border: 1px solid var(--fern); border-radius: 24px; background: linear-gradient(180deg, rgba(19, 38, 28, 0.9), rgba(12, 26, 19, 0.9)); overflow-x: auto; }
.flow svg { width: 100%; min-width: 760px; height: auto; font-family: var(--font-body); }
.flow .node rect { fill: var(--moss); stroke: var(--fern); }
.flow .node text { fill: var(--bone); font-size: 13px; font-weight: 600; }
.flow .node .sub { fill: var(--sage); font-size: 11px; font-weight: 400; }
.flow .lane-label { fill: var(--sage); font-size: 12px; font-weight: 500; }
.flow .wire { stroke: var(--fern); stroke-width: 1.5; fill: none; }
.flow .pulse { stroke: var(--lichen); stroke-width: 2; fill: none; stroke-linecap: round; stroke-dasharray: 5 100; animation: pulse-run 3.4s linear infinite; }
.flow .pulse.p2 { animation-duration: 5.2s; }
.flow .pulse.deny { stroke: var(--ember); }
/* paths use pathLength="100", so one lap is 105 units whatever the wire's length */
@keyframes pulse-run { from { stroke-dashoffset: 105; } to { stroke-dashoffset: 0; } }
.flow .gate rect { fill: #233927; stroke: var(--lichen); }
.flow .deny-node rect { fill: #283022; stroke: var(--ember); }
.flow .deny-node text { fill: var(--ember); }
.flow figcaption { margin-top: 14px; color: var(--sage); font-size: 0.92rem; text-align: center; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature-rev .feature-copy { order: 2; }
.feature-copy h2 { font: 680 clamp(2rem, 4.2vw, 3.2rem)/1.04 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; }
.feature-copy > p { margin-top: 18px; color: var(--sage); font-size: 1.06rem; max-width: 56ch; }
.feature-copy .feature-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--lichen); font-weight: 600; font-size: 0.95rem; }
.feature-kicker svg { width: 18px; height: 18px; }
.ticks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; color: var(--bone); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px; border-left: 2px solid var(--lichen); border-bottom: 2px solid var(--lichen); transform: rotate(-45deg); }
.ticks li span { color: var(--sage); }

.mock { border: 1px solid var(--fern); border-radius: 20px; background: #0a160f; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.mock-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--fern); background: var(--moss); color: var(--sage); font-size: 0.85rem; }
.mock-body { padding: 18px; }
.mock-note { padding: 0 18px 16px; color: #7d9886; font-size: 0.8rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--fern); color: var(--sage); white-space: nowrap; }
.pill-ember { border-color: rgba(224, 137, 90, 0.5); color: var(--ember); background: rgba(224, 137, 90, 0.08); }
.pill-lichen { border-color: rgba(182, 227, 136, 0.45); color: var(--lichen); }

.tx { margin: 0; padding: 0; list-style: none; font: 400 0.84rem/1.9 var(--font-mono); counter-reset: tx 11; }
.tx li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 0 8px; border-radius: 6px; color: #b7c7bb; counter-increment: tx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx li::before { content: counter(tx); color: #7d9886; text-align: right; }
.tx li.hit { background: rgba(224, 137, 90, 0.10); color: var(--bone); box-shadow: inset 2px 0 0 var(--ember); }
.tx .red { color: var(--mint); }
.verdict-card { margin-top: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--fern); background: var(--moss); }
.verdict-card strong { display: block; font-weight: 600; }
.verdict-card p { margin-top: 4px; color: var(--sage); font-size: 0.88rem; }
.verdict-card .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.dec { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.dec th { padding: 0 10px 10px; color: #7d9886; font-weight: 500; text-align: left; font-size: 0.8rem; }
.dec td { padding: 11px 10px; border-top: 1px solid var(--fern); white-space: nowrap; }
.dec td:nth-child(1) { color: #7d9886; font-variant-numeric: tabular-nums; }
.dec code { color: var(--bone); }
.dec-wrap { overflow-x: auto; }

.alert-card { padding: 18px; border-radius: 16px; border: 1px solid var(--fern); background: var(--moss); }
.alert-top { display: flex; flex-wrap: wrap; gap: 6px; }
.alert-card h3 { margin-top: 14px; font: 650 1.1rem/1.3 var(--font-display); }
.alert-card > p { margin-top: 6px; color: var(--sage); font-size: 0.9rem; }
.alert-evidence { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #0a160f; font: 400 0.8rem/1.6 var(--font-mono); color: #b7c7bb; overflow-x: auto; white-space: nowrap; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.alert-actions span { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--fern); font-size: 0.84rem; color: var(--sage); }
.alert-actions span.on { border-color: var(--lichen); color: var(--lichen); }
.case-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--fern); color: var(--sage); font-size: 0.87rem; }

.inv { list-style: none; margin: 0; padding: 0; }
.inv li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--fern); font-size: 0.9rem; }
.inv li:first-child { border-top: 0; }
.inv .n { color: var(--sage); font-variant-numeric: tabular-nums; font-size: 0.85rem; }

.tactics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tactic { padding: 20px 18px; border-radius: 18px; border: 1px solid var(--fern); background: var(--moss); }
.tactic h3 { font: 650 1.02rem/1.25 var(--font-display); letter-spacing: -0.01em; }
.tactic .count { margin-top: 4px; color: var(--lichen); font-size: 0.85rem; font-weight: 600; }
.tactic ul { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--fern); display: grid; gap: 8px; }
.tactic li { color: var(--sage); font-size: 0.86rem; line-height: 1.4; }
.section-foot { margin-top: 22px; color: var(--sage); font-size: 0.95rem; }
.section-foot a { color: var(--lichen); text-underline-offset: 3px; }

/* Resources: field guide with a sticky contents rail */
.guide { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.toc { position: sticky; top: 112px; }
.toc p { color: var(--sage); font-size: 0.85rem; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--fern); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; }
.toc a { display: flex; align-items: center; min-height: 40px; padding-left: 14px; border-left: 2px solid var(--fern); color: var(--sage); text-decoration: none; font-size: 0.93rem; transition: color .2s ease, border-color .3s ease; }
.toc a:hover { color: var(--bone); }
.toc a.is-current { color: var(--bone); border-left-color: var(--lichen); }
.article { min-width: 0; }
.chapter + .chapter { margin-top: clamp(80px, 10vw, 128px); }
.chapter h2 { font: 680 clamp(2rem, 4.2vw, 3.1rem)/1.04 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; }
.chapter-lead { margin-top: 18px; color: var(--sage); font-size: 1.08rem; max-width: 64ch; }
.prose { margin-top: 28px; display: grid; gap: 16px; max-width: 68ch; }
.prose p { color: #c9d6cc; }
.prose strong { color: var(--bone); }
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.job { padding: 22px; border-radius: 18px; border: 1px solid var(--fern); background: var(--moss); }
.job h3 { display: flex; align-items: center; gap: 10px; font: 650 1.15rem/1.2 var(--font-display); }
.job h3 svg { width: 18px; height: 18px; color: var(--lichen); }
.job p { margin-top: 10px; color: var(--sage); font-size: 0.93rem; }
.tactic-block { margin-top: 36px; }
.tactic-block > h3 { display: flex; align-items: baseline; gap: 12px; font: 650 1.3rem/1.25 var(--font-display); letter-spacing: -0.015em; }
.tactic-block > h3 span { color: var(--sage); font: 500 0.88rem/1 var(--font-body); }
.tactic-block > p { margin-top: 6px; color: var(--sage); max-width: 64ch; }
.techniques { margin: 16px 0 0; border-top: 1px solid var(--fern); }
.technique { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--fern); }
.technique dt { font: 500 0.82rem/1.6 var(--font-mono); color: var(--sage); }
.technique dd { margin: 0; }
.technique dd strong { display: block; font-weight: 600; }
.technique dd span { display: block; margin-top: 4px; color: var(--sage); font-size: 0.93rem; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.rule { padding: 22px; border-radius: 18px; border: 1px solid var(--fern); background: var(--moss); }
.rule h3 { font: 650 1.12rem/1.25 var(--font-display); }
.rule p { margin-top: 8px; color: var(--sage); font-size: 0.93rem; }
.rule ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.rule li code { display: inline-block; padding: 3px 8px; border-radius: 8px; background: #0a160f; border: 1px solid var(--fern); font-size: 0.78rem; color: #c9d6cc; }
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 28px 0 0; }
.glossary div { padding: 18px 0; border-top: 1px solid var(--fern); }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 6px 0 0; color: var(--sage); font-size: 0.94rem; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tactics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .nav-links, .nav > .btn { display: none; }
  .nav-burger { display: grid; margin-left: auto; }
  .lang-switch { margin-left: auto; }
  .lang-switch ~ .nav-burger { margin-left: 0; }
  .nav-wrap.is-sheet .mega { height: auto !important; max-height: calc(100vh - 96px); overflow-y: auto; }
  .mega-panel { position: static; opacity: 1; transform: none; pointer-events: auto; padding: 22px 22px 8px; }
  .mega-panel + .mega-panel { border-top: 1px solid var(--fern); }
  .mega-grid-platform, .mega-grid-resources { grid-template-columns: 1fr; }
  .mfeature-art, .mtile-bg { display: none; }
  .mtile { min-height: 0; }
  .mega-sheet-cta { display: flex !important; }
  .feature, .guide { grid-template-columns: 1fr; }
  .feature-rev .feature-copy { order: 0; }
  .toc { position: static; }
  .jobs { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .outcome:nth-child(3) { padding-left: 0; border-left: 0; }
  .how { grid-template-columns: 1fr; }
  .how-intro { position: static; }
  .statement { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tactics, .rules, .glossary { grid-template-columns: 1fr; }
  .technique { grid-template-columns: 1fr; gap: 4px; }
  .mtiles { grid-template-columns: 1fr; }
  .matrix-row { grid-template-columns: 1fr; gap: 14px; }
  .outcomes { grid-template-columns: 1fr; }
  .outcome { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--fern); }
  .outcome:first-child { padding-top: 0; border-top: 0; }
  .footer-links { margin-left: 0; }
}

/* Floating threats: pinned on wide screens with motion; a plain grid otherwise. */
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .float { height: auto; margin-top: var(--section-gap); }
  .float-stage { position: static; height: auto; overflow: visible; display: block; max-width: var(--maxw); margin: 0 auto; }
  .float-head { will-change: auto; }
  .fcards { position: static; pointer-events: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 40px; padding: 0 var(--gutter); }
  .fcard { position: static; width: auto; transform: none; will-change: auto; }
}

.mega-sheet-cta { display: none; gap: 10px; flex-wrap: wrap; padding: 18px 22px 24px; border-top: 1px solid var(--fern); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}
