/* Normandy demo. One stylesheet, no dependencies, dark only.
   Tokens are shared with anthonykubeka.com (same accent, same dark background). */

:root {
  --bg: #0b0e14;
  --bg-2: #10141d;
  --panel: #131825;
  --panel-2: #181e2d;
  --line: #242b3d;
  --line-2: #323b52;
  --text: #e8ebf2;
  --muted: #9099ad;
  --dim: #6a7388;
  --accent: #ff5a4e;
  --accent-soft: rgba(255, 90, 78, 0.14);
  --ok: #5ee0c0;
  --ok-soft: rgba(94, 224, 192, 0.13);
  --warn: #f5c05a;
  --warn-soft: rgba(245, 192, 90, 0.13);
  --bad: #ff7a70;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* a faint grid behind everything: the "ship console" hint */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
}

a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

b, strong { font-weight: 650; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
h1, h2, h3, p, ul, ol, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: #14060a; padding: 8px 12px; border-radius: 8px; }

.dim { color: var(--dim); }
.sep { color: var(--dim); margin: 0 0.35em; }
.accent { color: var(--accent); }
.mt { margin-top: 22px; }

/* the red stripe: the one decorative mark */
.stripe {
  display: inline-block;
  width: 5px; height: 15px;
  margin-right: 10px;
  background: var(--accent);
  border-radius: 1px;
  vertical-align: -2px;
}

/* ── top bar ───────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 12px var(--gutter);
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__brand { font: 700 13px/1 var(--mono); letter-spacing: 0.2em; text-decoration: none; white-space: nowrap; }
.top__nav { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top__nav::-webkit-scrollbar { display: none; }
.top__nav a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.top__nav a:hover, .top__nav a.is-active { color: var(--text); background: var(--panel-2); }
.top__out { font: 500 13px/1 var(--mono); color: var(--muted); text-decoration: none; white-space: nowrap; }
.top__out:hover { color: var(--accent); }

/* ── layout ────────────────────────────────────────────── */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(56px, 9vw, 104px) 0 0; }
.section--last { padding-bottom: clamp(56px, 9vw, 104px); }

.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 26px; }
.num { font: 600 13px/1 var(--mono); color: var(--accent); letter-spacing: 0.12em; }
h2 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: -0.005em; }

.prose p + p { margin-top: 14px; }
.prose { color: #cfd4df; max-width: 60ch; }
.prose--wide { max-width: 72ch; margin-bottom: 28px; }
.prose b { color: var(--text); }

.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }

.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--stacks { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--research { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.panel, .card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card p, .panel p { color: #c5cbd8; font-size: 15.5px; }
.card h3, .panel h3 { margin-bottom: 8px; }
.card p + p, .panel p + p { margin-top: 10px; }
.card--rule { border-top: 2px solid var(--accent); border-top-left-radius: 4px; border-top-right-radius: 4px; }

.caption, p.caption { font-size: 13.5px; color: var(--dim); margin-top: 12px; }
.caption b { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 14px/1 var(--sans);
  color: #1a0705; background: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 11px 16px; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--accent); }

/* ── hero ──────────────────────────────────────────────── */
.hero { padding: clamp(44px, 9vw, 96px) 0 8px; }
.eyebrow { font: 500 13px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.04em; margin-bottom: 22px; display: flex; align-items: center; flex-wrap: wrap; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 10px;
  box-shadow: 0 0 0 0 rgba(94, 224, 192, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(94, 224, 192, 0.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(94, 224, 192, 0); } }

h1 {
  font-size: clamp(31px, 5.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 750;
  text-wrap: balance;
}
.lede { margin-top: 26px; max-width: 62ch; font-size: clamp(17px, 2vw, 19.5px); color: #cfd4df; }
.lede b { color: var(--text); }

.stats {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 44px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.stat { padding: 18px 16px 16px; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.stat:first-child { border-left: 0; }
.stat dd { font: 650 clamp(26px, 3.4vw, 38px)/1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat dt { font-size: 12.5px; line-height: 1.3; color: var(--muted); }

.hardware { margin-top: 16px; font: 400 13px/1.7 var(--mono); color: var(--dim); display: flex; flex-wrap: wrap; }
.hardware span { white-space: nowrap; }
.hardware span + span::before { content: "·"; margin: 0 0.6em; color: var(--line-2); }

/* ── 01 pipeline ───────────────────────────────────────── */
.facts { margin-top: 22px; display: grid; gap: 8px; font-size: 15.5px; color: var(--muted); }
.facts li { padding-left: 18px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--accent); }
.facts b { color: var(--text); font-family: var(--mono); font-weight: 600; }

.pipeline__bar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.pipeline__bar label { font: 500 12px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.pipeline__bar select {
  appearance: none; -webkit-appearance: none;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239099ad' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text); border: 1px solid var(--line-2); border-radius: 10px;
  font: 500 14px/1 var(--mono); padding: 10px 32px 10px 12px; min-width: 0; flex: 1;
}
.pipeline__steps { display: grid; grid-template-columns: repeat(6, 1fr); margin-bottom: 16px; }
.pipeline__steps li {
  position: relative; text-align: center;
  font: 500 11.5px/1.2 var(--mono); color: var(--dim);
  padding-top: 22px; transition: color 0.2s;
}
.pipeline__steps li::before {
  content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line-2);
  transition: background 0.3s;
}
.pipeline__steps li:first-child::before { display: none; }
.pipeline__steps .node {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2); z-index: 1;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.pipeline__steps li.is-active { color: var(--text); }
.pipeline__steps li.is-active .node { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.pipeline__steps li.is-done { color: var(--muted); }
.pipeline__steps li.is-done .node { border-color: var(--ok); background: var(--ok); }
.pipeline__steps li.is-done::before, .pipeline__steps li.is-active::before { background: var(--ok); }

.log {
  font: 400 13px/1.65 var(--mono); color: #b9c1d1;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; min-height: 236px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.log .ok { color: var(--ok); }
.log .hot { color: var(--accent); }
.log .dim { color: var(--dim); }

/* ── 02 stacks ─────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.stack__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stack__head h3 { margin: 0; }
.stack__count { font: 500 12px/1 var(--mono); color: var(--dim); white-space: nowrap; }
.stack__role { font-size: 14px !important; color: var(--muted) !important; margin: -6px 0 0 !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 12px/1 var(--mono); color: #c9cfdc;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px; cursor: default; position: relative;
}
.chip[data-tip]:hover, .chip[data-tip]:focus { border-color: var(--accent); color: var(--text); outline: none; }
.chip[data-tip]:hover::after, .chip[data-tip]:focus::after {
  content: attr(data-tip);
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5;
  width: max-content; max-width: 240px;
  font: 400 12.5px/1.4 var(--sans); color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.chip--more { color: var(--dim); border-style: dashed; }

/* ── 03 watch ──────────────────────────────────────────── */
.status { margin-top: 14px !important; font: 500 13px/1.5 var(--mono) !important; display: flex; gap: 8px; align-items: flex-start; }
.status::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--dim); }
.status.is-ok { color: var(--ok) !important; }
.status.is-ok::before { background: var(--ok); }
.status.is-bad { color: var(--bad) !important; }
.status.is-bad::before { background: var(--bad); }

.day { margin-top: 16px; }
.day__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.day__head h3, .day__head .caption { margin: 0; }
.day__track {
  position: relative; height: 62px; margin: 0 6px 6px;
  border-bottom: 1px solid var(--line-2);
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 24 - 1px), var(--line) calc(100% / 24 - 1px), var(--line) calc(100% / 24));
}
.day__hour { position: absolute; bottom: -22px; transform: translateX(-50%); font: 400 11px/1 var(--mono); color: var(--dim); }
.day__pin {
  position: absolute; bottom: 0; width: 2px; background: var(--accent); transform: translateX(-50%);
  border: 0; padding: 0; cursor: pointer;
}
.day__pin::before {
  content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.day__pin::after { content: ""; position: absolute; inset: -10px -9px 0; } /* bigger hit area */
.day__pin.is-on::before, .day__pin:hover::before { background: #fff; box-shadow: 0 0 0 6px var(--accent-soft); }
.day__now { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ok); opacity: 0.8; }
.day__now::after { content: "now"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font: 500 10.5px/1 var(--mono); color: var(--ok); }

.day__list { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; }
.day__list li {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: baseline;
  font-size: 14.5px; color: #c5cbd8; padding: 7px 8px; border-radius: 8px;
  transition: background 0.15s;
}
.day__list li.is-on { background: var(--accent-soft); }
.day__list .when { font: 500 12.5px/1.4 var(--mono); color: var(--accent); }
.day__list .state { font: 500 12px/1.4 var(--mono); color: var(--dim); white-space: nowrap; }
.day__list .state.is-ok { color: var(--ok); }

/* ── 04 crew ───────────────────────────────────────────── */
.path { margin-top: 16px; }
.path h3 { margin-bottom: 18px; }
.path__nodes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; }
.path__nodes li { position: relative; }
.path__nodes li + li::before {
  content: ""; position: absolute; left: -50%; top: 19px; width: 100%; height: 2px; background: var(--line-2);
}
.path__nodes li.is-past + li::before, .path__nodes li.is-on::before { background: var(--accent); }
.path__nodes button {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0;
  font: 500 12.5px/1.2 var(--mono);
}
.path__nodes .n {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg); border: 1.5px solid var(--line-2);
  font: 600 13px/1 var(--mono); color: var(--muted);
  transition: all 0.2s;
}
.path__nodes li.is-past .n { border-color: var(--accent); color: var(--accent); }
.path__nodes li.is-on .n { background: var(--accent); border-color: var(--accent); color: #1a0705; box-shadow: 0 0 0 6px var(--accent-soft); }
.path__nodes li.is-on button { color: var(--text); }
.path__detail { margin-top: 22px !important; min-height: 3.3em; font-size: 16.5px !important; color: var(--text) !important; max-width: 70ch; }
.path__detail b { color: var(--accent); font-family: var(--mono); font-size: 0.85em; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 10px; }

.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; font-size: 15px; color: #c5cbd8; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: "?"; position: absolute; left: 0; top: 0.2em; width: 15px; height: 15px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font: 700 10px/15px var(--mono); text-align: center; }

.score { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg); margin: 14px 0 12px; }
.score span { display: block; }
.score .s-ok { background: var(--ok); }
.score .s-bad { background: var(--accent); }
.score .s-cancel { background: var(--line-2); }
.score-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 13px/1.4 var(--mono); color: var(--muted); margin-bottom: 14px; }
.score-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; }

/* ── 05 harness ────────────────────────────────────────── */
.tree {
  font: 400 13px/1.9 var(--mono); color: #b9c1d1;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto;
}
.tree .real { color: var(--text); font-weight: 600; }
.tree .ok { color: var(--ok); }
.tree .dim { color: var(--dim); }
.skill-group { margin-top: 14px; }
.skill-group h4 { margin: 0 0 8px; font: 500 12px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── 06 memory ─────────────────────────────────────────── */
.flow { display: flex; align-items: stretch; gap: 10px; }
.flow__box { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.flow__box b { font: 600 14px/1.2 var(--mono); }
.flow__box span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.flow__box--hot { border-color: var(--accent); background: var(--accent-soft); }
.flow__arrow { align-self: center; color: var(--dim); font-family: var(--mono); }

.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.mini div { display: flex; flex-direction: column-reverse; gap: 4px; }
.mini dd { font: 650 24px/1 var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini dt { font-size: 12px; color: var(--muted); }

/* ── 07 research ───────────────────────────────────────── */
.note { display: flex; flex-direction: column; gap: 12px; }
.note__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.note__id { font: 600 12px/1 var(--mono); color: var(--dim); letter-spacing: 0.08em; }
.badge { font: 600 11.5px/1 var(--mono); padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.badge--ok { color: var(--ok); background: var(--ok-soft); }
.badge--warn { color: var(--warn); background: var(--warn-soft); }
.badge--bad { color: var(--bad); background: var(--accent-soft); }
.note__q { font-size: 16.5px !important; font-weight: 600; color: var(--text) !important; line-height: 1.35; }
.note__q::before { content: "› "; color: var(--accent); font-family: var(--mono); }
.note__a { font-size: 15px !important; }
.note__meta { font: 400 12px/1 var(--mono) !important; color: var(--dim) !important; margin-top: auto !important; padding-top: 4px; }

/* ── 08 rules ──────────────────────────────────────────── */
.rules { counter-reset: rule; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px); border-top: 1px solid var(--line); }
.rules li { counter-increment: rule; position: relative; padding: 22px 0 22px 46px; border-bottom: 1px solid var(--line); }
.rules li::before { content: counter(rule, decimal-leading-zero); position: absolute; left: 0; top: 25px; font: 600 12.5px/1 var(--mono); color: var(--accent); }
.rules h3 { margin-bottom: 6px; }
.rules p { font-size: 15.5px; color: #b9c1d1; }

/* ── 09 terminal ───────────────────────────────────────── */
.term { border: 1px solid var(--line-2); border-radius: var(--radius); background: #080a0f; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.term__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.term__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.term__bar span:first-child { background: var(--accent); }
.term__bar b { margin-left: 10px; font: 500 12.5px/1 var(--mono); color: var(--muted); }
.term__out { font: 400 13.5px/1.65 var(--mono); color: #b9c1d1; padding: 16px 18px 4px; height: 320px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.term__out .cmd { color: var(--text); }
.term__out .cmd::before { content: "guest@normandy:~$ "; color: var(--ok); }
.term__out .ok { color: var(--ok); }
.term__out .hot { color: var(--accent); }
.term__out .dim { color: var(--dim); }
.term__out .hd { color: var(--text); font-weight: 600; }
.term__in { display: flex; align-items: center; gap: 9px; padding: 8px 18px 14px; font: 400 13.5px/1.6 var(--mono); }
.term__in label { color: var(--ok); white-space: nowrap; }
.term__in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; caret-color: var(--accent); padding: 4px 0; }
.term__keys { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.term__keys button { font: 500 12px/1 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.term__keys button:hover { color: var(--text); border-color: var(--accent); }

/* ── colophon / footer ─────────────────────────────────── */
.cta h3 { font-size: 22px; letter-spacing: -0.015em; }
.cta__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.foot { border-top: 1px solid var(--line); padding: 26px var(--gutter) 40px; text-align: center; font: 400 13px/1.5 var(--mono); color: var(--dim); }

/* ── reveal on scroll ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .cols, .cols--even { grid-template-columns: minmax(0, 1fr); }
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { border-left: 0; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .top__out { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { gap: 12px; }
  .section__head { flex-direction: column; gap: 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .day__list { grid-template-columns: minmax(0, 1fr); }
  .day__list li { grid-template-columns: 80px 1fr; }
  .day__list .state { grid-column: 2; }
  .path__nodes { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; }
  .path__nodes li:nth-child(5)::before { display: none; }
  .ticks { grid-template-columns: minmax(0, 1fr); }
  .flow { flex-direction: column; }
  .flow__arrow { transform: rotate(90deg); }
  .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .pipeline__steps li { font-size: 10px; }
  .log { min-height: 250px; font-size: 12px; }
  .term__out { height: 280px; font-size: 12.5px; }
  .term__in { font-size: 16px; } /* stops iOS zooming the page on focus */
  .term__in label { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
