@font-face {
  font-family: "Host Grotesk";
  src: url("./fonts/host-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Commit Mono";
  src: url("./fonts/commit-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

/* ============================================================
   SpecGate landing - "the governed pipeline"
   Identity: near-black technical canvas, brand indigo accent,
   verification green reserved for verdict semantics. The page
   keeps one governance rail where the workflow is explained.
   ============================================================ */

:root {
  color-scheme: dark light;
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --accent-fg: #ffffff;
  --accent-text: #8f9bff;
  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-faint: #858b95;
  --canvas: #050506;
  --surface-1: #0e0f11;
  --surface-2: #131417;
  --surface-3: #191a1e;
  --hairline: #222329;
  --hairline-strong: #33343c;
  --ok: #46c46a;
  --ok-fill: #27a644;
  --fail: #db5c57;
  --warn: #e2a748;
  --grid: rgba(255, 255, 255, 0.03);
  --rail: var(--hairline-strong);
  --frame: rgba(255, 255, 255, 0.16);

  --font-display: "Host Grotesk", Arial, sans-serif;
  --font-body: "Host Grotesk", Arial, system-ui, sans-serif;
  --font-mono: "Commit Mono", "SF Mono", ui-monospace, monospace;

  /* one radius system: interactive 8px, panels 14px */
  --r-sm: 8px;
  --r-md: 14px;
  --maxw: 1180px;
  --pad-x: clamp(1rem, 4vw, 2.6rem);
  --rail-x: clamp(1rem, 4vw, 2.6rem);
  --section-y: clamp(4rem, 7vw, 6.5rem);
}

html[data-theme="light"] {
  --accent: #4f5ac8;
  --accent-hover: #3d47b0;
  --accent-fg: #ffffff;
  --accent-text: #4650b4;
  --ink: #101116;
  --ink-muted: #3d414a;
  --ink-subtle: #666b76;
  --ink-faint: #5d636e;
  --canvas: #f6f7f9;
  --surface-1: #ffffff;
  --surface-2: #f0f1f5;
  --surface-3: #e7e9ef;
  --hairline: #d9dce4;
  --hairline-strong: #c1c6d2;
  --ok: #1c9440;
  --ok-fill: #1f9d43;
  --fail: #d24233;
  --warn: #b07708;
  --grid: rgba(16, 17, 22, 0.045);
  --rail: var(--hairline-strong);
  --frame: rgba(16, 17, 22, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  padding: 10px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Atmosphere ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

/* ---------- Shared primitives ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dim {
  color: var(--ink-faint);
}
.accent {
  color: var(--accent-text);
}
.hl {
  color: var(--accent-text);
}
em {
  font-style: italic;
  color: var(--ink);
}
strong {
  font-weight: 600;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin: 0 0 1.2rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: var(--r-sm);
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-accent:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem var(--pad-x);
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}
.nav-links {
  display: flex;
  gap: 1.6rem;
}
.nav-links a {
  color: var(--ink-subtle);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a.active {
  color: var(--accent-text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink-subtle);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover {
  border-color: var(--hairline-strong);
  color: var(--ink);
}
@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100dvh - 68px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy,
.console,
.termcast {
  min-width: 0;
}
.hero-copy h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 4.6vw, 3.7rem);
  font-weight: 800;
}
.hero-copy h1 .hl {
  position: relative;
}
/* hand-ruled underline beneath the verified promise */
.hero-copy h1 .hl::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.08em;
  bottom: 0.02em;
  height: 0.09em;
  background: var(--accent);
  border-radius: 2px;
  transform: skewY(-0.6deg);
  opacity: 0.9;
}
.hero .lede {
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  margin: 1.25rem 0 0;
  max-width: 28rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

/* ---------- Gate frame (reticle corners) ----------
   The framing device for anything SpecGate governs: four corner
   brackets, like a checkpoint viewfinder. */
.gate-frame {
  position: relative;
}
.gate-frame > .gf {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--frame);
  pointer-events: none;
  z-index: 2;
}
.gate-frame > .gf:nth-child(1) {
  top: -7px;
  left: -7px;
  border-width: 1.5px 0 0 1.5px;
}
.gate-frame > .gf:nth-child(2) {
  top: -7px;
  right: -7px;
  border-width: 1.5px 1.5px 0 0;
}
.gate-frame > .gf:nth-child(3) {
  bottom: -7px;
  left: -7px;
  border-width: 0 0 1.5px 1.5px;
}
.gate-frame > .gf:nth-child(4) {
  bottom: -7px;
  right: -7px;
  border-width: 0 1.5px 1.5px 0;
}

/* ---------- Verdict console ---------- */
.console {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 1.5rem;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}
.console-top .mono {
  color: var(--ink-subtle);
}
.verdict-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  border: 1.5px solid var(--hairline-strong);
  color: var(--ink-subtle);
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.verdict-chip[data-state="run"] {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 50%, transparent);
}
/* the stamp lands */
.verdict-chip[data-state="pass"] {
  color: var(--ok);
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  transform: rotate(-2.5deg) scale(1.04);
  animation: stamp-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes stamp-in {
  0% {
    transform: rotate(-6deg) scale(1.6);
    opacity: 0;
  }
  100% {
    transform: rotate(-2.5deg) scale(1.04);
    opacity: 1;
  }
}
.console-eyebrow {
  color: var(--ink-faint);
  margin: 0 0 0.8rem;
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--surface-3) 60%, transparent);
  border: 1px solid var(--hairline);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.check-list .tick {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid var(--ink-faint);
  position: relative;
  transition: all 0.3s ease;
}
.check-list li[data-status="met"] {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}
.check-list li[data-status="met"] .tick {
  background: var(--ok-fill);
  border-color: var(--ok-fill);
}
.check-list li[data-status="met"] .tick::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.console-checks {
  display: flex;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
}
.chk {
  font-size: 0.66rem;
  padding: 0.28rem 0.55rem;
  border-radius: 3px;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  transition: all 0.3s ease;
}
.chk[data-on="1"] {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}
.chk[data-on="1"]::before {
  content: "✓ ";
}
.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}
.console-replay {
  background: none;
  border: none;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.console-replay:hover {
  color: var(--accent-text);
}

/* ---------- Works-with strip ---------- */
.wordmarks {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x);
  text-align: center;
  border-block: 1px solid var(--hairline);
}
.wordmarks-title {
  max-width: 34rem;
  margin: 0 auto 1.8rem;
  color: var(--ink-muted);
}
.wm-label {
  color: var(--ink-faint);
  margin: 1.4rem 0 0;
}
.wm-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 42rem;
  margin: 0 auto;
}
.wm-group {
  padding: 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-1) 74%, transparent);
}
.wm-group-muted {
  border-style: dashed;
}
.wm-group-title {
  margin: 0 0 0.9rem;
  color: var(--ink-subtle);
}
.wm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.4rem 2.4rem;
}
.wm-list img {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}
.wm-list img:hover {
  filter: none;
  opacity: 1;
  transform: translateY(-3px);
}
html[data-theme="light"] .wm-list img {
  filter: brightness(0);
  opacity: 0.6;
}
html[data-theme="light"] .wm-list img:hover {
  filter: none;
  opacity: 1;
}
@media (max-width: 700px) {
  .wm-groups {
    grid-template-columns: 1fr;
  }
}

/* ---------- Bands + the governance rail ----------
   Every section from #how to #cta is a gate on one continuous
   rail. The rail is drawn per-band at the same x so adjacent
   bands read as a single line; each band carries a gate node
   that stamps PASS when the reader crosses it. */
.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
  position: relative;
}
.band-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--rail-x);
  width: 1px;
  background: var(--rail);
}
.band-rail {
  padding-left: calc(var(--rail-x) + clamp(1.6rem, 3.5vw, 3rem));
}

/* One checkpoint marker anchors the workflow explanation. */
.gate-node {
  position: absolute;
  top: clamp(3.8rem, 6.9vw, 5.8rem);
  left: var(--rail-x);
  transform: translateX(-50%);
  z-index: 1;
}
.gate-node::before {
  content: "";
  width: 11px;
  height: 11px;
  display: block;
  border: 1.5px solid var(--accent-text);
  background: color-mix(in srgb, var(--accent) 16%, var(--canvas));
  transform: rotate(45deg);
}

.band-head {
  max-width: 46rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
}
.band-head h2,
.cta h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
}
.band-sub {
  color: var(--ink-muted);
  font-size: 1.08rem;
  margin: 1.1rem 0 0;
  max-width: 40rem;
}

@media (max-width: 720px) {
  .band-rail::before,
  .gate-node {
    display: none;
  }
  .band-rail {
    padding-left: var(--pad-x);
  }
}

/* ---------- The governed loop: three stages on the rail ---------- */
.loop-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.8rem, 4vw, 2.8rem);
}
.loop-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.2rem, 3vw, 2.6rem);
  align-items: center;
  padding: clamp(1.2rem, 2.5vw, 1.8rem) 0;
}
/* stage marker sits out on the rail */
.loop-stage::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(1.6rem, 3.5vw, 3rem));
  top: 50%;
  width: clamp(1rem, 2.4vw, 2.1rem);
  height: 1px;
  background: var(--rail);
}
.loop-verb {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}
.loop-stage h3 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin-bottom: 0.65rem;
}
.loop-stage > div > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1rem;
  max-width: 30rem;
}

/* each stage carries its artifact: what actually moves through
   the gate at that step */
.loop-artifact {
  justify-self: end;
  width: min(100%, 21rem);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-1);
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.8;
  color: var(--ink-subtle);
  text-transform: none;
  letter-spacing: 0.01em;
}
.loop-artifact .la-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--ink-faint);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--hairline);
}
.loop-artifact .la-ok {
  color: var(--ok);
}
.loop-artifact .la-acc {
  color: var(--accent-text);
}
.loop-artifact .la-dim {
  color: var(--ink-faint);
}

@media (max-width: 860px) {
  .loop-stage {
    grid-template-columns: 1fr;
  }
  .loop-artifact {
    justify-self: start;
  }
}

/* ---------- See it run: cast carousel ---------- */
.cast-carousel {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cast-stage {
  position: relative;
  isolation: isolate;
}
.cast-stage::before {
  content: "";
  position: absolute;
  inset: -14% -8% -22%;
  z-index: -1;
  background: radial-gradient(
    60% 55% at 50% 42%,
    color-mix(in srgb, var(--accent) 22%, transparent),
    transparent 70%
  );
  filter: blur(36px);
  opacity: 0.5;
  pointer-events: none;
}
.termcast {
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  padding: 6px;
  box-shadow:
    0 40px 70px -45px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 color-mix(in srgb, var(--accent) 10%, transparent);
}
.term-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  border-radius: calc(var(--r-md) - 5px) calc(var(--r-md) - 5px) 0 0;
  align-items: center;
}
.term-title {
  width: auto;
  height: auto;
  max-width: min(22rem, 62vw);
  border-radius: 0;
  background: none;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.term-body {
  margin: 0;
  padding: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.85;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-muted);
  white-space: pre-wrap;
  background: var(--surface-1);
  border-radius: 0 0 calc(var(--r-md) - 5px) calc(var(--r-md) - 5px);
  min-height: 22rem;
  overflow-wrap: anywhere;
}
.cast-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}
.cast-tabs button {
  min-height: 42px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-subtle);
  font: 500 0.82rem/1 var(--font-body);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.cast-tabs button:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.cast-tabs button[aria-selected="true"] {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--hairline));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.cast-tabs button:active {
  transform: translateY(1px);
}
.cast-caption {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink-faint);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cast-caption-lead {
  color: var(--ink);
  font-weight: 600;
}
/* line reveal + typing */
.tl {
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.termcast[data-armed] .tl {
  opacity: 0;
}
.tl.show,
.termcast[data-armed] .tl.show {
  opacity: 1;
}
.tl[data-k="cmd"] {
  color: var(--ink);
}
.tl[data-k="dim"] {
  color: var(--ink-faint);
}
.tl[data-k="out"] {
  color: var(--ink-muted);
}
.tl[data-k="ok"] {
  color: var(--ok);
  font-weight: 500;
}
.tl[data-k="pass"] {
  color: var(--ok);
  font-weight: 600;
}
.tl.cur::after {
  content: "";
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.18em;
  background: var(--accent-text);
  animation: termblink 1s steps(2, start) infinite;
}
@keyframes termblink {
  50% {
    opacity: 0;
  }
}
@media (max-width: 800px) {
  .cast-stage::before {
    inset: -10% 0 -16%;
  }
  .cast-stage .term-body {
    min-height: 18rem;
    font-size: 0.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .termcast[data-armed] .tl {
    opacity: 1;
  }
  .tl.cur::after {
    animation: none;
  }
}

/* ---------- Where it fits: your stack vs the gate ---------- */
.fit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-items: stretch;
}
.fit-side {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-content: stretch;
}
.fit-card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  padding: clamp(1.25rem, 2.5vw, 1.65rem);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.fit-card:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-1);
}
.fit-card h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  margin-bottom: 0.6rem;
}
.fit-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.97rem;
}
.cmp-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-subtle);
  margin-bottom: 1rem;
}
.cmp-tag .ic {
  width: 14px;
  height: 14px;
  vertical-align: -0.18em;
  margin-right: 0.1rem;
}
/* the SpecGate panel is the gate itself: framed, elevated, and
   carrying the contract list */
.fit-card-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--surface-1);
  padding: clamp(1.6rem, 3.2vw, 2.4rem);
}
.fit-card-hero h3 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--accent-text);
}
.fit-card-hero p {
  font-size: 1.02rem;
  max-width: 32rem;
}
.fit-owns {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1.2rem;
}
.fit-owns li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}
.fit-owns li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--accent-text);
  transform: rotate(45deg);
}
.cmp-note {
  margin: clamp(1.4rem, 3vw, 2rem) 0 0;
  color: var(--ink-faint);
  line-height: 1.55;
  max-width: 46rem;
}
@media (max-width: 860px) {
  .fit-grid {
    grid-template-columns: 1fr;
  }
  .fit-owns {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 48rem;
}
.faq-item {
  break-inside: avoid;
  margin-bottom: 0.8rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-1);
  padding: 0 1.3rem;
  transition: border-color 0.2s ease;
}
.faq-item[open] {
  border-color: var(--hairline-strong);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  color: var(--accent-text);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  margin: 0 0 1.2rem;
  color: var(--ink-muted);
  font-size: 0.96rem;
}
.faq-item code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.08em 0.35em;
}
@media (max-width: 860px) {
  .faq-list {
    columns: 1;
  }
}

/* ---------- CTA: the last gate ---------- */
.cta {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 8rem) var(--pad-x);
  text-align: left;
  border-top: 1px solid var(--hairline);
}
.cta h2 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
}
.cta-sub {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 1.3rem 0 0;
}
.cta .hero-actions {
  justify-content: flex-start;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.2rem var(--pad-x) 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 1.3rem;
}
.footer-links a {
  color: var(--ink-subtle);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Icons ---------- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ic {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ic-btn {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}
.btn:hover .ic-btn {
  transform: translateX(3px);
}
.nav-github .ic {
  fill: currentColor;
  stroke: none;
  width: 16px;
  height: 16px;
}

/* ---------- Reveal animations ---------- */
.reveal,
.reveal-up {
  opacity: 0;
}
.reveal {
  transform: translateY(10px);
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}
.reveal-up {
  transform: translateY(16px);
}
.reveal-up.in {
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-up {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .console {
    order: 2;
  }
}

@media (max-width: 768px) {
  .band,
  .hero,
  .wordmarks,
  .cta {
    width: 100%;
    padding-inline: 1rem;
  }

  .cast-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .nav {
    gap: 0.75rem;
    padding-inline: 0.9rem;
  }
  .theme-toggle {
    display: none;
  }
  .nav-github {
    padding: 0.58rem 0.68rem;
  }
  .nav-github span {
    display: none;
  }
  .hero {
    padding-top: 2.6rem;
  }
  .hero-copy h1 {
    font-size: clamp(2.6rem, 11vw, 3.45rem);
    line-height: 1.05;
  }
  .hero-copy h1 br {
    display: none;
  }
  .hero .lede {
    font-size: 1rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .console {
    padding: 1rem;
  }
  .console-top,
  .console-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .check-list li {
    font-size: 0.86rem;
  }
  .termcast .term-body {
    overflow-x: auto;
  }
}
