:root {
  --bg: #EEF0F3;
  --bg-band: #E6E9ED;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --border: #DBDFE5;
  --border-strong: #C2C8D1;
  --ink: #181C22;
  --ink-muted: #5B6472;
  --ink-faint: #8991A0;
  --accent: #93630D;
  --accent-strong: #6E4C0A;
  --accent-soft: #F1E4C4;
  --teal: #14655F;
  --teal-soft: #DCEEEC;
  --good: #1F7A47;
  --good-soft: #E0EFE5;
  --code-bg: #14181F;
  --code-ink: #E7EAF0;
  --code-muted: #7C8494;
  --code-kw: #E0A83E;
  --code-str: #6FBDB8;
  --shadow-sm: 0 1px 2px rgba(24,28,34,0.06);
  --shadow-md: 0 6px 20px rgba(24,28,34,0.07), 0 1px 3px rgba(24,28,34,0.05);
  --shadow-lg: 0 16px 40px rgba(24,28,34,0.12);
  --shadow-hover: 0 10px 28px rgba(24,28,34,0.10), 0 2px 6px rgba(24,28,34,0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
.mono { font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------------- Nav ---------------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(238,240,243,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  flex: none;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -2px; bottom: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
nav.links { display: flex; align-items: center; gap: 1.7rem; }
nav.links a.nav-link {
  position: relative;
  font-size: 0.87rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0;
}
nav.links a.nav-link:hover, nav.links a.nav-link:focus-visible { color: var(--ink); }
nav.links a.nav-link.active { color: var(--ink); font-weight: 600; }
nav.links a.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-ctas { display: flex; gap: 0.55rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #2A303A; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-faint); }
.btn-sm { padding: 0.38rem 0.7rem; font-size: 0.78rem; }
.btn-lg { padding: 0.72rem 1.2rem; font-size: 0.94rem; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------------- Page header (inner pages) ---------------- */
.page-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin: 1.7rem 0 0;
}
.page-kicker a { color: var(--ink-muted); text-decoration: none; }
.page-kicker a:hover { color: var(--accent-strong); }
.page-header { padding: 1.6rem 0 3.4rem; }
.accent-rule { width: 44px; height: 3px; background: var(--accent); border-radius: 2px; margin: 0 0 1.1rem; }
.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}
.page-header .lede {
  font-size: 1.06rem;
  color: var(--ink-muted);
  max-width: 66ch;
  text-wrap: balance;
  margin: 0;
}

/* ---------------- Section scaffolding ---------------- */
section { padding: 5rem 0; }
section.band { background: var(--bg-band); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
section.tight { padding: 3.2rem 0; }

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.eyebrow::before { content: "-- "; color: var(--ink-faint); }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}
h3.subhead {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.section-lede {
  color: var(--ink-muted);
  max-width: 62ch;
  font-size: 1.02rem;
  margin: 0 0 2.4rem;
  text-wrap: balance;
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 4.5rem 0 3rem; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background-image: radial-gradient(circle, var(--border-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-head { max-width: 720px; margin-bottom: 2.6rem; }
h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: 60ch;
  margin: 0 0 1.8rem;
  text-wrap: balance;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2.4rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  max-width: 640px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow-sm);
}
.stat .value {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  line-height: 1.1;
}
.stat .label { font-size: 0.76rem; color: var(--ink-muted); margin-top: 0.3rem; display: block; }

/* ---------------- Demo console ---------------- */
.console {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  row-gap: 0.5rem;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.console-title {
  margin-left: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  color: var(--ink-muted);
}
.db-tabs { display: flex; gap: 0.4rem; margin-left: auto; }
.db-tab {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.db-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent-strong); }
.db-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.console-body { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 780px) { .console-body { grid-template-columns: 1fr; } }
.console-col { padding: 1.5rem; }
.console-col + .console-col { border-left: 1px solid var(--border); }
@media (max-width: 780px) { .console-col + .console-col { border-left: none; border-top: 1px solid var(--border); } }

.col-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}

textarea#question-input {
  width: 100%;
  resize: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--surface-2);
  min-height: 64px;
}
textarea#question-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 1.1rem; }
.chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.chip:hover, .chip:focus-visible { border-color: var(--accent); color: var(--accent-strong); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }

#generate-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.62rem 1.1rem;
  border-radius: 9px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
#generate-btn:hover { background: var(--accent-strong); }
#generate-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#generate-btn:disabled { opacity: 0.6; cursor: default; }

.status-line {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--teal);
  margin-top: 0.7rem;
  min-height: 1.1em;
}
.fallback-note {
  margin-top: 0.7rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: none;
}
.fallback-note a { color: var(--accent-strong); font-weight: 600; text-decoration: underline; }

.retrieved-row { margin-top: 1rem; }
.retrieved-row .col-label { margin-bottom: 0.5rem; }
.table-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  margin: 0 0.3rem 0.3rem 0;
  display: inline-block;
}

.sql-box {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  min-height: 88px;
}
.sql-box .kw { color: var(--code-kw); font-weight: 600; }
.sql-box .cursor { display: inline-block; width: 7px; height: 1em; background: var(--code-kw); vertical-align: text-bottom; animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sql-box .cursor { animation: none; } }

.exec-caption { font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; color: var(--ink-faint); margin: 0.7rem 0 0.5rem; }
.result-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.result-table { width: 100%; border-collapse: collapse; background: var(--surface); }
table.result-table th {
  text-align: left; background: var(--surface-2);
  font-family: "IBM Plex Mono", monospace; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted);
  padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border);
}
table.result-table td {
  padding: 0.5rem 0.7rem; font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--border);
}
table.result-table tr:last-child td { border-bottom: none; }
.more-rows-note { font-size: 0.76rem; color: var(--ink-faint); padding: 0.4rem 0.7rem; background: var(--surface-2); }
.row-badge {
  display: inline-block; margin-top: 0.6rem;
  font-family: "IBM Plex Mono", monospace; font-size: 0.74rem;
  background: var(--good-soft); color: var(--good); padding: 0.22rem 0.55rem; border-radius: 999px;
}
.placeholder-note { color: var(--ink-faint); font-size: 0.88rem; padding: 1.5rem 0; }

/* ---------------- Schema cards ---------------- */
.schema-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.schema-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.schema-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.schema-card .t-name {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 0.86rem;
  background: var(--ink); color: #fff; padding: 0.55rem 0.8rem;
}
.schema-card .t-db { font-weight: 500; font-size: 0.64rem; opacity: 0.55; text-transform: none; }
.schema-card ul { list-style: none; margin: 0; padding: 0.5rem 0; }
.schema-card li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.3rem 0.8rem; font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; }
.schema-card li .col-flag { color: var(--accent); font-weight: 600; font-size: 0.68rem; }
.schema-card li .col-flag.fk { color: var(--teal); }
.schema-card li .col-type { color: var(--ink-faint); }
.schema-legend { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 2.4rem; }

/* ---------------- Pipeline ---------------- */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; align-items: stretch; }
@media (max-width: 880px) { .pipeline { grid-template-columns: 1fr; } }
.stage {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.4rem 1.2rem; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.stage:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stage .idx { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; color: var(--accent); font-weight: 700; margin-bottom: 0.6rem; }
.stage h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 0.45rem; }
.stage p { font-size: 0.86rem; color: var(--ink-muted); margin: 0 0 0.8rem; }
.stage .file {
  font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--teal);
  background: var(--teal-soft); padding: 0.2rem 0.45rem; border-radius: 5px; display: inline-block;
}
.stage .detail {
  margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--border);
  font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; color: var(--ink-muted); line-height: 1.55;
}
.stage-arrow {
  display: none; position: absolute; top: 50%; right: -0.75rem; transform: translateY(-50%);
  color: var(--border-strong); font-size: 1.1rem; z-index: 2;
}
@media (min-width: 881px) { .stage-arrow { display: block; } .stage:last-child .stage-arrow { display: none; } }

/* ---------------- Decisions ---------------- */
.decisions { display: flex; flex-direction: column; gap: 1.1rem; }
.decision {
  display: grid; grid-template-columns: 40px 1fr; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.decision .num {
  font-family: "IBM Plex Mono", monospace; font-weight: 700; color: var(--accent); font-size: 1rem;
}
.decision h4 { margin: 0 0 0.3rem; font-size: 0.98rem; font-weight: 700; }
.decision p { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }

/* ---------------- Results ---------------- */
.bars { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2rem; }
.bar-row { display: grid; grid-template-columns: 168px 1fr 64px; align-items: center; gap: 0.8rem; }
@media (max-width: 620px) { .bar-row { grid-template-columns: 100px 1fr 52px; } }
.bar-label { font-family: "IBM Plex Mono", monospace; font-size: 0.82rem; }
.bar-label .sys-desc { display: block; color: var(--ink-faint); font-size: 0.72rem; margin-top: 0.1rem; }
.bar-track { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--ink-faint); width: 0; transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1); }
.bar-fill.in { width: var(--w); }
@media (prefers-reduced-motion: reduce) { .bar-fill { width: var(--w) !important; transition: none; } }
.bar-fill.best { background: var(--accent); }
.bar-val { font-family: "IBM Plex Mono", monospace; font-size: 0.86rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.finding {
  padding: 1rem 1.2rem; border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 10px 10px 0; font-size: 0.92rem; margin-bottom: 2.6rem;
}
.finding strong { color: var(--accent-strong); }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.mini-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.mini-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.mini-card h4 { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.9rem; display: flex; justify-content: space-between; align-items: baseline; }
.mini-card h4 span { font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; color: var(--ink-faint); font-weight: 500; }
table.mini-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.mini-table th { text-align: left; color: var(--ink-faint); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
table.mini-table td { padding: 0.42rem 0; border-bottom: 1px solid var(--border); font-family: "IBM Plex Mono", monospace; }
table.mini-table tr:last-child td { border-bottom: none; }
table.mini-table tr.win td { color: var(--good); font-weight: 600; }

.stack-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin-bottom: 0.8rem; border: 1px solid var(--border); }
.stack-seg { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.78rem; color: var(--ink-muted); }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 0.35rem; }

/* ---------------- Teasers (home) ---------------- */
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 880px) { .teaser-grid { grid-template-columns: 1fr; } }
.teaser-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.7rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  text-decoration: none; color: var(--ink);
}
.teaser-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.teaser-card .t-idx { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--accent); font-weight: 700; }
.teaser-card h3 { font-size: 1.08rem; font-weight: 700; margin: 0; }
.teaser-card p { font-size: 0.88rem; color: var(--ink-muted); margin: 0; flex: 1; }
.teaser-card .go { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; font-weight: 600; color: var(--accent-strong); }

/* ---------------- Prereq callout ---------------- */
.prereq {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.2rem 1.4rem; margin-bottom: 2.6rem; box-shadow: var(--shadow-sm);
}
.prereq h4 { margin: 0 0 0.6rem; font-size: 0.92rem; font-weight: 700; }
.prereq ul { margin: 0; padding-left: 1.1rem; color: var(--ink-muted); font-size: 0.9rem; }
.prereq li { margin-bottom: 0.3rem; }
.prereq li:last-child { margin-bottom: 0; }
.prereq code { font-family: "IBM Plex Mono", monospace; font-size: 0.85em; color: var(--ink); background: var(--surface-2); padding: 0.05rem 0.3rem; border-radius: 4px; }

/* ---------------- Run it yourself steps ---------------- */
.steps { display: flex; flex-direction: column; gap: 1.1rem; position: relative; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", monospace; font-weight: 700; color: var(--ink); flex: none; z-index: 1;
}
.step-body { padding-bottom: 0.3rem; }
.step h3 { font-size: 1.02rem; font-weight: 700; margin: 0.4rem 0 0.35rem; }
.step p { color: var(--ink-muted); font-size: 0.92rem; margin: 0 0 0.7rem; max-width: 60ch; }
.step .step-links { margin-bottom: 0.7rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ext-link { font-size: 0.82rem; font-weight: 600; color: var(--accent-strong); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.ext-link:hover { border-color: var(--accent); }

.code-block {
  position: relative; background: var(--code-bg); color: var(--code-ink); border-radius: 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 0.84rem; line-height: 1.65;
  padding: 0.9rem 3rem 0.9rem 1.05rem; overflow-x: auto; white-space: pre;
}
.code-block .cm { color: var(--code-muted); }
.stage .detail .cm { color: var(--ink-faint); }
.code-block .kw { color: var(--code-kw); }
.code-block .str { color: var(--code-str); }
.copy-btn {
  position: absolute; top: 0.55rem; right: 0.55rem; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14); color: var(--code-ink); font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.7rem; padding: 0.28rem 0.55rem; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,0.16); }

/* ---------------- Footer ---------------- */
footer { padding: 3.5rem 0 4rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem;
  padding-bottom: 2.2rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h5 {
  font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 0.8rem; font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { font-size: 0.86rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.footer-col a:hover { color: var(--accent-strong); }
.footer-col p { font-size: 0.86rem; color: var(--ink-muted); margin: 0; max-width: 32ch; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.schip { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; background: var(--surface); border: 1px solid var(--border); padding: 0.26rem 0.5rem; border-radius: 6px; color: var(--ink-muted); }
.footer-bottom { color: var(--ink-faint); font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
