/* ============================================================
   TRAFFIC-ANALYSIS-AGENTS — Dark Academic Documentation Site
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-soft: #121212;
  --bg-card: #161616;
  --bg-card-hover: #1d1d1d;
  --bg-code: #0d0d0d;

  --yellow: #FFD60A;
  --yellow-soft: #ffe65c;
  --yellow-dim: rgba(255, 214, 10, .12);
  --yellow-glow: rgba(255, 214, 10, .08);

  --text: #F5F5F0;
  --text-dim: #a8a89c;
  --text-muted: #6b6b60;

  --line: rgba(255, 214, 10, .18);
  --line-soft: rgba(255, 255, 255, .08);

  --danger: #ff5c5c;
  --ok: #4ade80;
  --info: #5cc8ff;

  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --container: 1200px;
  --section-pad: clamp(4.5rem, 9vw, 7rem);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.003em;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  /* faint dotted grid */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 214, 10, .035) 1px, transparent 0);
  background-size: 28px 28px;
  background-position: 0 0;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--yellow); color: #000; }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.028em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.032em; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); letter-spacing: -0.02em; }
h4 { font-size: 1.05rem; font-family: var(--font-ui); font-weight: 600; letter-spacing: -0.01em; }

p { color: var(--text); }
.lede { font-size: 1.12rem; color: var(--text-dim); line-height: 1.7; }
.muted { color: var(--text-dim); }
.dim { color: var(--text-muted); }

.accent {
  color: var(--yellow);
  font-style: italic;
  font-weight: 600;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
section {
  padding: var(--section-pad) 0;
  position: relative;
}
section + section { border-top: 1px solid var(--line-soft); }

.section-eyebrow {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--yellow);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.1rem;
}
.section-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--yellow);
  opacity: .6;
}
.section-title { margin-bottom: 1rem; max-width: 18ch; }
.section-intro { color: var(--text-dim); max-width: 60ch; font-size: 1.05rem; }

.section-head { margin-bottom: 3.5rem; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: #000;
  padding: .7rem 1.1rem;
  font-weight: 600;
  font-size: .9rem;
  z-index: 9999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-soft));
  z-index: 1000;
  box-shadow: 0 0 12px var(--yellow-glow);
  transition: width .08s linear;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(10, 10, 10, .88);
  box-shadow: 0 6px 30px rgba(0, 0, 0, .4);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .9rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  color: #000;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: -.02em;
  border-radius: 6px;
  box-shadow: 0 0 22px var(--yellow-glow);
}
.brand-wordmark {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .02em;
  color: var(--text);
}
.brand-wordmark .sub { color: var(--text-muted); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.nav-link {
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: .5rem .75rem;
  border-radius: 6px;
  transition: color .2s var(--ease), background .2s var(--ease);
  position: relative;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-link.active { color: var(--yellow); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: .75rem;
  right: .75rem;
  bottom: 2px;
  height: 1px;
  background: var(--yellow);
}

.nav-actions { display: flex; align-items: center; gap: .75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .9rem;
  padding: .8rem 1.3rem;
  border-radius: var(--radius-sm);
  letter-spacing: -.005em;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--yellow);
  color: #000;
  box-shadow: 0 0 0 1px transparent, 0 8px 24px var(--yellow-glow);
}
.btn-primary:hover {
  background: var(--yellow-soft);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--yellow), 0 14px 32px rgba(255, 214, 10, .18);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translateY(-2px);
}
.btn-sm { padding: .55rem .95rem; font-size: .83rem; }

/* ---------- Hamburger / mobile menu ---------- */
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  position: relative;
  background: var(--bg-card);
}
.hamburger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }
.hamburger.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mobile-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(82vw, 360px);
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  padding: 5rem 1.75rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel a {
  padding: .85rem .25rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
}
.mobile-panel a:hover { color: var(--yellow); }
.mobile-panel .btn { margin-top: 1.5rem; }
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- HERO ---------- */
.hero { padding-top: clamp(4rem, 8vw, 6.5rem); padding-bottom: clamp(3.5rem, 6vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1.6rem;
}
.pulse-dot {
  width: 9px; height: 9px;
  background: var(--yellow);
  border-radius: 50%;
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--yellow);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}
.hero h1 { margin-bottom: 1.5rem; }
.hero .lede { max-width: 52ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; }
.hero-caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Stats strip */
.stats-strip {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--yellow);
  letter-spacing: -.03em;
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: .76rem;
  color: var(--text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: .55rem;
}
.stat-suffix { color: var(--text-muted); font-size: .6em; }

/* ---------- Principles row (overview) ---------- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.principle {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.principle:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}
.principle-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--yellow-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  color: var(--yellow);
}
.principle h4 { font-size: 1.05rem; margin-bottom: .4rem; color: var(--text); }
.principle p { font-size: .93rem; color: var(--text-dim); }
.principle .tag {
  display: block;
  margin-top: .8rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--yellow);
  font-style: italic;
}

.overview-body { max-width: 70ch; }
.overview-body p + p { margin-top: 1rem; }
.overview-body .mission-audiences {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.audience-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.audience-card h4 { color: var(--yellow); margin-bottom: .35rem; }
.audience-card p { font-size: .9rem; color: var(--text-dim); }

/* ---------- Cards generic ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}

/* ---------- Directory tree ---------- */
.tree-block {
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.85;
  color: var(--text-dim);
}
.tree-block .dir { color: var(--yellow); font-weight: 600; }
.tree-block .file { color: var(--text); }
.tree-block .note { color: var(--text-muted); }
.tree-block .comment { color: var(--text-muted); font-style: italic; }

.topology-note {
  margin-top: 1.5rem;
  font-size: .92rem;
  color: var(--text-dim);
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}
.topology-note code { color: var(--yellow); }

.arch-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: start;
}

.blueprint-card h4 { margin-bottom: 1rem; }
.blueprint-list { display: flex; flex-direction: column; gap: .85rem; }
.blueprint-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: .8rem;
  align-items: start;
}
.blueprint-item .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: .42rem;
  flex-shrink: 0;
}
.dot-read { background: var(--yellow); box-shadow: 0 0 8px var(--yellow-glow); }
.dot-write { background: var(--info); box-shadow: 0 0 8px rgba(92, 200, 255, .25); }
.dot-gate { background: var(--danger); box-shadow: 0 0 8px rgba(255, 92, 92, .25); }
.blueprint-item code {
  font-family: var(--font-mono);
  color: var(--yellow);
  font-size: .87rem;
}
.blueprint-item .desc { display: block; color: var(--text-dim); font-size: .87rem; margin-top: .15rem; }
.legend-row {
  display: flex; gap: 1.2rem; margin-top: 1.3rem;
  padding-top: 1rem; border-top: 1px solid var(--line-soft);
  font-size: .8rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.legend-row span { display: inline-flex; align-items: center; gap: .4rem; }
.legend-row .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Pipeline rail ---------- */
.pipeline {
  position: relative;
  margin-top: 2.5rem;
  padding: 2rem 0;
}
.pipeline-rail {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .6rem;
  position: relative;
}
.pipeline-rail::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 7%;
  right: 7%;
  height: 2px;
  background: linear-gradient(90deg, var(--line) 0%, var(--yellow) 50%, var(--line) 100%);
  z-index: 0;
}
.pipeline-node {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pipeline-circle {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--yellow);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--yellow);
  font-size: 1.1rem;
  box-shadow: 0 0 0 6px var(--bg);
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.pipeline-node:hover .pipeline-circle {
  transform: scale(1.12);
  background: var(--yellow);
  color: #000;
  box-shadow: 0 0 0 6px var(--bg), 0 0 26px var(--yellow-glow);
}
.pipeline-node h4 {
  margin-top: .9rem;
  font-size: .82rem;
  letter-spacing: .02em;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text);
}
.pipeline-node .node-sub {
  font-size: .74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: .25rem;
  max-width: 14ch;
}
.pipeline-optional { color: var(--text-muted); font-style: italic; }
.pipeline-caption {
  margin-top: 2.5rem;
  text-align: center;
  font-size: .9rem;
  color: var(--text-dim);
  max-width: 70ch;
  margin-left: auto; margin-right: auto;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- Phase grid ---------- */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.phase-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), transparent);
  opacity: .6;
}
.phase-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}
.phase-head { display: flex; align-items: center; gap: .85rem; }
.phase-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--yellow);
  font-weight: 700;
  line-height: 1;
}
.phase-icon {
  width: 34px; height: 34px;
  color: var(--yellow);
  flex-shrink: 0;
}
.phase-title { font-size: 1rem; font-weight: 600; font-family: var(--font-ui); letter-spacing: .01em; }
.phase-goal { font-size: .9rem; color: var(--text-dim); }
.phase-filters {
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.phase-filters .filter-label {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .25rem;
}
.phase-filters code {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--yellow-soft);
  background: var(--bg-code);
  padding: .35rem .55rem;
  border-radius: 5px;
  display: inline-block;
  word-break: break-all;
}
.phase-filters .filter-row { display: flex; flex-wrap: wrap; gap: .35rem; }

.post-callout {
  margin-top: 2rem;
  background: var(--yellow-dim);
  border: 1px solid var(--line);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.post-callout svg { color: var(--yellow); flex-shrink: 0; margin-top: 2px; }
.post-callout p { font-size: .92rem; color: var(--text); }

/* ---------- Tabs / Tools & Skills ---------- */
.tabs-bar {
  display: flex;
  gap: .4rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.tab-btn {
  padding: .7rem 1.2rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
  letter-spacing: -.005em;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--yellow); border-bottom-color: var(--yellow); }
.tab-panel { display: none; animation: fadeIn .35s var(--ease); }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.tool-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}
.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .6rem;
}
.tool-card code.tool-name {
  font-family: var(--font-mono);
  color: var(--yellow);
  font-size: .92rem;
  font-weight: 600;
}
.tool-badge {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.tool-badge.read { color: var(--yellow); border-color: var(--line); }
.tool-badge.write { color: var(--info); border-color: rgba(92, 200, 255, .3); }
.tool-badge.gate { color: var(--danger); border-color: rgba(255, 92, 92, .3); }
.tool-card p { font-size: .88rem; color: var(--text-dim); }
.tool-card .methods {
  margin-top: .7rem;
  display: flex; flex-wrap: wrap; gap: .3rem;
}
.method-chip {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-muted);
  background: var(--bg-code);
  padding: .2rem .45rem;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.skill-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}
.skill-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.skill-card code.skill-id {
  font-family: var(--font-mono);
  color: var(--yellow);
  font-size: .88rem;
  font-weight: 600;
}
.skill-phase {
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.skill-card p { font-size: .86rem; color: var(--text-dim); }
.skill-deps {
  font-size: .76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding-top: .55rem;
  border-top: 1px solid var(--line-soft);
  margin-top: .3rem;
}
.skill-deps strong { color: var(--yellow); font-weight: 600; }

.note-callout {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--info);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  font-size: .9rem;
  color: var(--text-dim);
}
.note-callout strong { color: var(--info); }

/* ---------- Filter explorer (interactive) ---------- */
.filter-explorer {
  margin-top: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fe-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
  flex-wrap: wrap;
}
.fe-tab {
  padding: 1rem 1.4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font-mono);
  border-right: 1px solid var(--line-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.fe-tab:hover { color: var(--text); background: rgba(255, 255, 255, .02); }
.fe-tab.active { color: var(--yellow); border-bottom-color: var(--yellow); background: var(--bg-card); }
.fe-panel { display: none; padding: 1.6rem; }
.fe-panel.active { display: block; animation: fadeIn .35s var(--ease); }
.fe-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.4rem;
  align-items: center;
}
.fe-explain { color: var(--text-dim); font-size: .94rem; }
.fe-explain strong { color: var(--yellow-soft); }
.fe-filter {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg-code);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: .65rem .7rem .65rem .9rem;
  font-family: var(--font-mono);
  color: var(--yellow-soft);
  font-size: .85rem;
  min-width: 0;
}
.fe-filter code { word-break: break-all; }

/* ---------- Copy button ---------- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--bg-card-hover);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: .74rem;
  font-weight: 600;
  padding: .3rem .55rem;
  border-radius: 5px;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
  flex-shrink: 0;
  font-family: var(--font-ui);
  letter-spacing: .02em;
}
.copy-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.copy-btn.copied { color: var(--ok); border-color: var(--ok); }
.copy-btn svg { width: 12px; height: 12px; }

/* ---------- Code block ---------- */
.code-wrap { position: relative; margin: 1rem 0; }
pre.code-block {
  background: var(--bg-code);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.65;
  color: var(--text);
}
pre.code-block .cmt { color: var(--text-muted); }
pre.code-block .cmd { color: var(--yellow); }
pre.code-block .arg { color: var(--text); }
pre.code-block .str { color: var(--yellow-soft); }
.code-wrap > .copy-btn {
  position: absolute;
  top: .8rem;
  right: .8rem;
}

/* ---------- Input / Output ---------- */
.io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.io-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.io-card h3 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
}
.io-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 4px;
}
.io-tag.in { background: var(--yellow-dim); color: var(--yellow); }
.io-tag.out { background: rgba(92, 200, 255, .12); color: var(--info); }
.io-card ul { display: flex; flex-direction: column; gap: .7rem; margin-top: .5rem; }
.io-card li {
  font-size: .9rem;
  color: var(--text-dim);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}
.io-card li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--yellow);
  font-weight: 700;
}
.io-card li code, .io-card li strong { color: var(--yellow-soft); font-family: var(--font-mono); font-size: .86rem; }

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .5rem .8rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--yellow);
  margin-top: 1rem;
}

.terminal-card {
  margin-top: 2rem;
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
}
.terminal-dots { display: flex; gap: .4rem; }
.terminal-dots span { width: 11px; height: 11px; border-radius: 50%; }
.td-r { background: #ff5c5c; }
.td-y { background: #FFD60A; }
.td-g { background: #4ade80; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
}
.terminal-body {
  position: relative;
  padding: 1.3rem 1.4rem;
  font-family: var(--font-mono);
  font-size: .83rem;
  line-height: 1.85;
  color: var(--text);
  overflow-x: auto;
}
.terminal-body .prompt { color: var(--yellow); }
.terminal-body .path { color: var(--info); }
.terminal-body .note { color: var(--text-muted); font-style: italic; }
.terminal-card .copy-btn { position: absolute; top: .7rem; right: .7rem; }

.io-note {
  margin-top: 1.2rem;
  font-size: .88rem;
  color: var(--text-dim);
  padding: .9rem 1.1rem;
  background: var(--bg-code);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-sm);
}
.io-note code { color: var(--yellow); }

/* ---------- Safety ---------- */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 2.5rem;
}
.safety-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.safety-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}
.safety-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--yellow-dim);
  border-radius: var(--radius-sm);
  color: var(--yellow);
}
.safety-card.critical .safety-icon { background: rgba(255, 92, 92, .12); color: var(--danger); }
.safety-card h4 { font-size: .96rem; }
.safety-card p { font-size: .86rem; color: var(--text-dim); line-height: 1.6; }
.safety-card p code { color: var(--yellow-soft); font-family: var(--font-mono); font-size: .82rem; }

.warning-callout {
  margin-top: 1.75rem;
  background: linear-gradient(135deg, rgba(255, 92, 92, .08), rgba(255, 92, 92, .02));
  border: 1px solid rgba(255, 92, 92, .35);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: start;
}
.warning-callout .warn-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255, 92, 92, .15);
  border-radius: var(--radius-sm);
  color: var(--danger);
  flex-shrink: 0;
}
.warning-callout h4 { color: var(--danger); margin-bottom: .5rem; font-size: 1rem; }
.warning-callout p { font-size: .92rem; color: var(--text); line-height: 1.65; }
.warning-callout p + p { margin-top: .6rem; }

/* ---------- Instruction hierarchy (stacked bands) ---------- */
.hierarchy-stack {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 2.5rem;
  max-width: 920px;
  margin-left: auto; margin-right: auto;
}
.hier-band {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
}
.hier-band:hover {
  background: var(--bg-card-hover);
  transform: translateX(6px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 24px var(--yellow-glow);
}
.hier-rank {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--yellow);
}
.hier-name { font-weight: 600; font-size: .98rem; color: var(--text); }
.hier-detail { font-size: .82rem; color: var(--text-dim); font-family: var(--font-mono); margin-top: .15rem; }
.hier-authority {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.hier-band.band-1 { margin: 0 0; }
.hier-band.band-2 { margin: 0 2%; }
.hier-band.band-3 { margin: 0 4%; }
.hier-band.band-4 { margin: 0 6%; opacity: .92; }
.hier-band.band-5 {
  margin: 0 8%;
  border-style: dashed;
  border-color: rgba(255, 92, 92, .35);
  background: rgba(255, 92, 92, .04);
}
.hier-band.band-5 .hier-rank { color: var(--danger); }

.hierarchy-callout {
  margin-top: 1.75rem;
  text-align: center;
  font-size: .92rem;
  color: var(--text-dim);
  max-width: 60ch;
  margin-left: auto; margin-right: auto;
}
.hierarchy-callout strong { color: var(--danger); }

/* ---------- Report anatomy ---------- */
.report-bar {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: .25rem;
  margin-top: 2.5rem;
}
.report-seg {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem .5rem;
  text-align: center;
  position: relative;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem;
}
.report-seg:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: var(--yellow);
  box-shadow: 0 0 24px var(--yellow-glow);
}
.report-seg .seg-num {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
}
.report-seg .seg-name {
  font-size: .72rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.report-legend {
  margin-top: 2.5rem;
}
.report-legend h4 { margin-bottom: 1rem; font-size: 1rem; }
.callout-types {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .8rem;
}
.callout-type {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.callout-type .emoji { font-size: 1.3rem; display: block; margin-bottom: .4rem; }
.callout-type .ctype { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.callout-type .cenv {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--yellow);
  background: var(--bg-code);
  padding: .25rem .4rem;
  border-radius: 4px;
  display: inline-block;
}
.callout-type .cdesc { font-size: .76rem; color: var(--text-muted); margin-top: .45rem; display: block; }

/* ---------- Rubric ---------- */
.rubric-intro {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: start;
}
.rubric-flow {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.rubric-flow ol { display: flex; flex-direction: column; gap: .7rem; counter-reset: rf; }
.rubric-flow li {
  counter-increment: rf;
  padding-left: 2.2rem;
  position: relative;
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.rubric-flow li::before {
  content: counter(rf);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px; height: 26px;
  background: var(--yellow-dim);
  color: var(--yellow);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .82rem;
}
.rubric-flow li code { color: var(--yellow); font-family: var(--font-mono); font-size: .84rem; }

.rubric-target {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.rubric-target .big {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
}
.rubric-target .frac { color: var(--text-muted); }
.rubric-target .label {
  margin-top: .5rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.rubric-target .note { margin-top: 1rem; font-size: .82rem; color: var(--text-muted); }

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.rubric-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.rubric-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 22px var(--yellow-glow);
}
.rubric-card .rcode {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--yellow);
  letter-spacing: .04em;
}
.rubric-card h4 { font-size: .9rem; margin: .35rem 0 .7rem; line-height: 1.3; }
.mini-bar {
  height: 6px;
  background: var(--bg-code);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-soft));
  width: 0%;
  border-radius: 3px;
  transition: width 1.1s var(--ease-out);
}
.rubric-card .score-row {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .45rem;
  font-family: var(--font-mono);
}
.rubric-card .score-val { color: var(--yellow); }

.antigame {
  margin-top: 2rem;
  font-style: italic;
  color: var(--text-dim);
  font-size: .92rem;
  text-align: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- How to use ---------- */
.howto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.howto-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.howto-block h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}
.howto-letter {
  width: 28px; height: 28px;
  background: var(--yellow);
  color: #000;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .9rem;
}
.howto-block .note-line {
  font-size: .86rem;
  color: var(--text-dim);
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line-soft);
}
.howto-block .note-line code { color: var(--yellow); }

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}
.workflow-step {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1.1rem;
  align-items: start;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.workflow-step:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: 0 0 24px var(--yellow-glow);
}
.workflow-step .ws-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
}
.workflow-step p { font-size: .92rem; color: var(--text-dim); line-height: 1.65; }
.workflow-step p code { color: var(--yellow); font-family: var(--font-mono); font-size: .85rem; }
.workflow-step p strong { color: var(--text); }

/* ---------- Learning path ---------- */
.learn-arc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
  position: relative;
}
.learn-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.learn-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 30px var(--yellow-glow);
}
.learn-card .learn-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
  opacity: .9;
}
.learn-card h3 {
  margin: .7rem 0 .6rem;
  font-size: 1.2rem;
}
.learn-card p { font-size: .9rem; color: var(--text-dim); }
.learn-card .verb {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1rem;
  display: block;
}

.identity-ladder {
  margin-top: 3.5rem;
  max-width: 720px;
  margin-left: auto; margin-right: auto;
}
.identity-ladder h4 {
  text-align: center;
  margin-bottom: 1.75rem;
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ladder {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.rung {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1.3rem;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.rung:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px var(--yellow), 0 0 22px var(--yellow-glow);
}
.rung-1 { margin: 0 12%; }
.rung-2 { margin: 0 8%; }
.rung-3 { margin: 0 4%; }
.rung-4 { margin: 0 0; }
.rung .rung-num {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--yellow);
  font-weight: 600;
}
.rung .rung-name { font-weight: 600; font-size: .95rem; color: var(--text); }
.rung .rung-detail { font-size: .8rem; color: var(--text-dim); font-family: var(--font-mono); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand .logo-mark { margin-bottom: 1rem; }
.footer-tag {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: .8rem;
}
.footer-note {
  font-size: .82rem;
  color: var(--text-muted);
  max-width: 50ch;
  line-height: 1.6;
}
.footer-meta {
  text-align: right;
  font-size: .82rem;
  color: var(--text-muted);
}
.footer-meta .built { margin-top: .6rem; font-style: italic; }
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--yellow);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .8rem;
  transition: gap .2s var(--ease);
}
.back-to-top:hover { gap: .65rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: .7rem 1.2rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 0 1px var(--yellow);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- SVG flow path animation ---------- */
.flow-path {
  stroke-dasharray: 6 6;
  animation: dashflow 1.4s linear infinite;
}
@keyframes dashflow {
  to { stroke-dashoffset: -24; }
}
.flow-path-static { stroke-dasharray: 5 5; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { gap: 0; }
  .nav-link { padding: .5rem .55rem; font-size: .82rem; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .arch-grid { grid-template-columns: 1fr; }
  .io-grid { grid-template-columns: 1fr; }
  .rubric-intro { grid-template-columns: 1fr; }
  .howto-grid { grid-template-columns: 1fr; }
  .overview-body .mission-audiences { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

@media (max-width: 900px) {
  .principles-grid,
  .phase-grid,
  .safety-grid,
  .learn-arc,
  .rubric-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid,
  .skills-grid { grid-template-columns: 1fr; }
  .callout-types { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .report-bar { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 760px) {
  .nav-links, .nav-actions .btn-primary { display: none; }
  .hamburger { display: block; }
  section { padding: clamp(3.5rem, 10vw, 5rem) 0; }
  .fe-row { grid-template-columns: 1fr; }
  .warning-callout { grid-template-columns: 1fr; }
  .pipeline-rail { grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
  .pipeline-rail::before { display: none; }
  .hier-band.band-2, .hier-band.band-3, .hier-band.band-4, .hier-band.band-5 { margin: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .principles-grid,
  .phase-grid,
  .safety-grid,
  .learn-arc,
  .rubric-grid,
  .stats-strip,
  .callout-types { grid-template-columns: 1fr; }
  .report-bar { grid-template-columns: repeat(3, 1fr); }
  .workflow-step { grid-template-columns: 1fr; }
  .pipeline-rail { grid-template-columns: repeat(2, 1fr); }
  .rung-1, .rung-2, .rung-3 { margin: 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .flow-path { animation: none; }
  .pulse-dot::after { animation: none; opacity: 0; }
}
