/* FlakeBrake competition site · shares the M5 control-room palette,
   recomposed as an editorial product page. No external assets. */

:root {
  color-scheme: dark;
  --bg: #09100c;
  --surface: #101813;
  --raised: #17211b;
  --line: #2c3b32;
  --line-soft: #1f2b24;
  --ink: #f3f5ec;
  --muted: #a9b3ab;
  --faint: #7d877f;
  --lime: #c9f45b;
  --lime-ink: #131f0c;
  --blue: #72c9ff;
  --amber: #ffc75c;
  --red: #ff887b;
  --measure: 72ch;
  --content: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(70rem 40rem at 88% -12rem, rgb(38 59 34 / 55%) 0, transparent 70%),
    radial-gradient(50rem 30rem at -10% 20rem, rgb(24 42 54 / 35%) 0, transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgb(201 244 91 / 25%); }

a { color: var(--ink); text-decoration-color: rgb(201 244 91 / 55%); text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--lime); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

code, .mono { font-family: var(--mono); }
code { font-size: .86em; background: rgb(255 255 255 / 6%); border: 1px solid var(--line-soft); border-radius: .35rem; padding: .08em .35em; overflow-wrap: anywhere; }

img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 40;
  transform: translateY(-300%);
  background: var(--lime); color: var(--lime-ink);
  padding: .7rem 1rem; border-radius: .5rem; font-weight: 800; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line-soft);
  background: rgb(9 16 12 / 92%);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  max-width: var(--content); margin: 0 auto; padding: .8rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--lime); color: var(--lime-ink); font-weight: 900; letter-spacing: -.08em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-size: 1rem; letter-spacing: -.02em; }
.brand-name small { color: var(--muted); font-size: .72rem; }
.topnav { display: flex; flex-wrap: wrap; gap: .15rem .35rem; align-items: center; }
.topnav a {
  padding: .45rem .65rem; border-radius: .5rem; text-decoration: none;
  color: var(--muted); font-size: .88rem; font-weight: 600;
}
.topnav a:hover { color: var(--ink); background: rgb(255 255 255 / 6%); }
.topnav .nav-cta {
  color: var(--lime-ink); background: var(--lime); font-weight: 800;
}
.topnav .nav-cta:hover { color: var(--lime-ink); background: #d7f97e; }

/* ---------- Layout scaffolding ---------- */

.wrap { max-width: var(--content); margin: 0 auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); scroll-margin-top: 4.5rem; }
.section + .section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--lime);
}
.eyebrow .idx { color: var(--faint); margin-right: .6em; }
.eyebrow-blue { color: var(--blue); }

h1, h2, h3 { margin: 0; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }

.lede { max-width: var(--measure); color: var(--muted); font-size: 1.1rem; margin: 1.1rem 0 0; }
.prose { max-width: var(--measure); }
.prose p { margin: 1.1rem 0 0; color: var(--muted); }
.prose p strong, .lede strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--ink); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.9rem); font-weight: 850; letter-spacing: -.055em;
  max-width: 21ch;
}
.hero h1 .accent { color: var(--lime); }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 62ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.hero-badges li {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 99px; padding: .38rem .8rem; color: var(--muted);
}
.hero-badges li.badge-tf { border-color: rgb(114 201 255 / 45%); color: var(--blue); background: rgb(114 201 255 / 8%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.category {
  margin: 1.6rem 0 0; max-width: 30ch;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 800; letter-spacing: -.025em;
  line-height: 1.3; color: var(--ink); text-wrap: balance;
}
.category .accent { color: var(--lime); }

.button {
  display: inline-block; border: 1px solid transparent; border-radius: .65rem;
  padding: .85rem 1.2rem; font-weight: 800; font-size: .98rem; text-decoration: none;
  transition: transform 120ms ease, background 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--lime); color: var(--lime-ink); }
.button-primary:hover { background: #d7f97e; }
.button-quiet { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button-quiet:hover { background: var(--raised); }

/* ---------- Signature: TrueForge action chain ---------- */

.chain {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid rgb(114 201 255 / 28%);
  border-radius: 1.1rem;
  background: linear-gradient(160deg, rgb(114 201 255 / 7%), rgb(9 16 12 / 10%) 45%);
  padding: 1.3rem 1.3rem 1.15rem;
}
.chain-title {
  margin: 0 0 1rem; display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
}
.chain-title .chain-mark {
  font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--blue);
}
.chain-title .chain-note { color: var(--faint); font-size: .78rem; }
.chain-track {
  display: grid; align-items: stretch; gap: .5rem .15rem; margin: 0; padding: 0; list-style: none;
  grid-template-columns:
    minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto
    minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
}
.chain-step {
  display: flex; flex-direction: column; gap: .3rem;
  border: 1px solid var(--line); border-radius: .7rem; padding: .7rem .75rem;
  background: rgb(7 12 9 / 55%); position: relative; min-width: 0;
}
.chain-step .k {
  font-family: var(--mono); font-size: .66rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); line-height: 1.35;
}
.chain-step .v { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.chain-step-human .k { color: var(--amber); }
.chain-step-human { border-color: rgb(255 199 92 / 40%); background: rgb(255 199 92 / 6%); }
.chain-step-verified .k { color: var(--lime); }
.chain-step-verified { border-color: rgb(201 244 91 / 40%); background: rgb(201 244 91 / 6%); }
.chain-sep {
  align-self: center; color: var(--faint); padding-inline: .3rem;
  font-family: var(--mono); font-size: .8rem; user-select: none;
}
.chain-footnote { margin: 1rem 0 0; color: var(--faint); font-size: .8rem; max-width: 100%; line-height: 1.55; }
.chain-footnote strong { color: var(--muted); }

/* Firewall variant: lime accent, seven stations */
.chain-firewall {
  border-color: rgb(201 244 91 / 26%);
  background: linear-gradient(160deg, rgb(201 244 91 / 6%), rgb(9 16 12 / 10%) 45%);
}
.chain-firewall .chain-mark { color: var(--lime); }
.chain-track.chain-steps-7 {
  grid-template-columns:
    minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto
    minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
}
.chain-step-fb .k { color: var(--lime); }

@media (prefers-reduced-motion: no-preference) {
  .js .chain-step { animation: chain-in 480ms ease both; }
  .js .chain-step:nth-child(1) { animation-delay: 60ms; }
  .js .chain-step:nth-child(3) { animation-delay: 180ms; }
  .js .chain-step:nth-child(5) { animation-delay: 300ms; }
  .js .chain-step:nth-child(7) { animation-delay: 420ms; }
  .js .chain-step:nth-child(9) { animation-delay: 540ms; }
  .js .chain-step:nth-child(11) { animation-delay: 660ms; }
  .js .chain-step:nth-child(13) { animation-delay: 780ms; }
  .js .chain-step:nth-child(15) { animation-delay: 900ms; }
  @keyframes chain-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Cards and grids ---------- */

.grid { display: grid; gap: .8rem; margin-top: 2rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  border: 1px solid var(--line); border-radius: .9rem; padding: 1.15rem 1.2rem;
  background: var(--surface); min-width: 0;
}
.tile h3 { margin-bottom: .45rem; }
.tile p { margin: 0; color: var(--muted); font-size: .92rem; }
.tile .mono-label {
  display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: .6rem;
}

/* Configured-facts grid (TrueForge section) */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: 2rem; }
.fact {
  border: 1px solid rgb(114 201 255 / 26%); border-radius: .8rem; padding: 1rem 1.05rem;
  background: rgb(114 201 255 / 5%); min-width: 0;
}
.fact dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.fact dd { margin: .5rem 0 0; font-size: .9rem; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.fact dd small { display: block; color: var(--muted); margin-top: .3rem; font-size: .78rem; }

/* ---------- Honesty / evidence vocabulary strip ---------- */

.vocab {
  margin-top: 2.4rem; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
}
.vocab > div { padding: 1.3rem 1.3rem 1.4rem; min-width: 0; }
.vocab > div + div { border-left: 1px solid var(--line-soft); }
.vocab h3 { display: flex; align-items: center; gap: .55rem; }
.vocab h3 .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.vocab .dot-configured { background: var(--blue); }
.vocab .dot-observed { background: var(--amber); }
.vocab .dot-verified { background: var(--lime); }
.vocab p { color: var(--muted); font-size: .9rem; margin: .7rem 0 0; }
.vocab .sample {
  margin-top: .9rem; font-family: var(--mono); font-size: .74rem; color: var(--ink);
  background: rgb(0 0 0 / 30%); border: 1px solid var(--line-soft); border-radius: .5rem;
  padding: .55rem .7rem; overflow-wrap: anywhere;
}

.honesty {
  margin-top: 2rem; border-left: 3px solid var(--blue); border-radius: .4rem;
  background: rgb(114 201 255 / 6%); padding: 1.1rem 1.3rem; max-width: 60rem;
}
.honesty p { margin: 0; color: var(--muted); font-size: .95rem; }
.honesty p + p { margin-top: .8rem; }
.honesty strong { color: var(--ink); }

/* ---------- Inter-agent checks (commitment firewall) ---------- */

.checks {
  list-style: none; margin: 2.4rem 0 0; padding: 0; max-width: 64rem;
  border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--surface);
}
.checks li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: .8rem 2rem;
  padding: 1.15rem 1.3rem; border-top: 1px solid var(--line-soft);
}
.checks li:first-child { border-top: 0; }
.check-label {
  display: block; margin-bottom: .45rem;
  font-family: var(--mono); font-size: .64rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint);
}
.check-fire .check-label { color: var(--lime); }
.check-claim { min-width: 0; font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.check-fire { min-width: 0; }
.check-fire p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.check-fire code {
  display: inline-block; margin-top: .55rem; font-size: .68rem; letter-spacing: .06em;
  color: var(--blue); background: rgb(114 201 255 / 7%); border-color: rgb(114 201 255 / 22%);
}

/* ---------- Story timeline ---------- */

.steps { list-style: none; margin: 2.4rem 0 0; padding: 0; max-width: 56rem; }
.steps li {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 1.1rem;
  position: relative; padding-bottom: 1.9rem;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: ""; position: absolute; left: 1.65rem; top: 2.6rem; bottom: .4rem;
  width: 1px; background: var(--line);
}
.steps li:last-child::before { display: none; }
.step-no {
  display: grid; place-items: center; width: 3.4rem; height: 2.2rem;
  border: 1px solid var(--line); border-radius: .55rem; background: var(--surface);
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
}
.step-denied .step-no { border-color: rgb(255 136 123 / 45%); color: var(--red); }
.step-human .step-no { border-color: rgb(255 199 92 / 45%); color: var(--amber); }
.step-verified .step-no { border-color: rgb(201 244 91 / 45%); color: var(--lime); }
.step-body h3 { font-size: 1.02rem; }
.step-body p { margin: .4rem 0 0; color: var(--muted); font-size: .92rem; max-width: var(--measure); }
.step-body .chip {
  display: inline-block; margin-left: .55rem; vertical-align: .1em;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 99px; padding: .18rem .55rem; color: var(--muted);
}
.step-denied .chip { border-color: rgb(255 136 123 / 45%); color: var(--red); }
.step-human .chip { border-color: rgb(255 199 92 / 45%); color: var(--amber); }
.step-verified .chip { border-color: rgb(201 244 91 / 45%); color: var(--lime); }

/* ---------- Figures ---------- */

.shot { margin: 2.2rem 0 0; }
.shot-frame {
  border: 1px solid var(--line); border-radius: .9rem; overflow: hidden;
  background: #0b120e; box-shadow: 0 22px 70px rgb(0 0 0 / 35%);
}
.shot figcaption { margin-top: .7rem; color: var(--faint); font-size: .8rem; max-width: var(--measure); line-height: 1.55; }
.shot figcaption strong { color: var(--muted); }

/* ---------- Boundary split ---------- */

.boundary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 2.2rem; }
.boundary article {
  border: 1px solid var(--line); border-radius: 1rem; padding: 1.3rem 1.35rem; background: var(--surface); min-width: 0;
}
.boundary article.is-owner { border-color: rgb(255 199 92 / 35%); }
.boundary article.is-policy { border-color: rgb(114 201 255 / 35%); }
.boundary .who {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 .7rem;
}
.boundary .is-policy .who { color: var(--blue); }
.boundary h3 { font-size: 1.15rem; }
.boundary p { color: var(--muted); font-size: .93rem; margin: .7rem 0 0; }
.boundary article.is-rec { border-color: rgb(114 201 255 / 35%); }
.boundary article.is-rec .who { color: var(--blue); }
.boundary article.is-gov { border-color: rgb(201 244 91 / 35%); }
.boundary article.is-gov .who { color: var(--lime); }
.digest-note {
  margin-top: 2rem; max-width: 60rem; border: 1px dashed var(--line); border-radius: .8rem;
  padding: 1rem 1.2rem; color: var(--muted); font-size: .9rem;
}
.digest-note strong { color: var(--ink); }

/* ---------- Ledger counts ---------- */

.ledger {
  margin-top: 2.4rem; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); background: var(--surface);
}
.ledger > div { padding: 1.1rem .5rem 1.2rem; text-align: center; min-width: 0; border-left: 1px solid var(--line-soft); }
.ledger > div:first-child { border-left: 0; }
.ledger strong { display: block; font-family: var(--mono); font-size: clamp(1.5rem, 2.6vw, 2.2rem); color: var(--lime); font-weight: 600; }
.ledger.zero-line strong { color: var(--ink); }
.ledger span { display: block; margin-top: .35rem; color: var(--faint); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--mono); line-height: 1.5; padding-inline: .2rem; }
.ledger .is-zero strong { color: var(--muted); }
.ledger-caption { margin: .8rem 0 0; color: var(--faint); font-size: .8rem; max-width: var(--measure); }

.proof-ladder { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; max-width: 62rem; }
.proof-ladder li { border: 1px solid var(--line); border-radius: .9rem; padding: 1.1rem 1.15rem; background: var(--surface); min-width: 0; }
.proof-ladder .rung { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: .55rem; }
.proof-ladder li:last-child { border-color: rgb(201 244 91 / 40%); }
.proof-ladder li:last-child .rung { color: var(--lime); }
.proof-ladder h3 { font-size: 1rem; }
.proof-ladder p { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; }

/* ---------- Architecture stack ---------- */

.stack { list-style: none; margin: 2.4rem 0 0; padding: 0; max-width: 62rem; }
.stack li {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.2rem; align-items: start;
  border: 1px solid var(--line); border-radius: .9rem; background: var(--surface);
  padding: 1.05rem 1.2rem; margin-top: .6rem;
}
.stack .layer {
  font-family: var(--mono); font-size: .78rem; color: var(--blue); letter-spacing: .08em;
  padding-top: .15rem;
}
.stack h3 { font-size: 1rem; }
.stack p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.stack li.is-tf { border-color: rgb(114 201 255 / 40%); background: rgb(114 201 255 / 5%); }

/* ---------- Qodo quality ---------- */

.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 2.2rem; }
.pr-card { border: 1px solid var(--line); border-radius: .9rem; padding: 1.2rem 1.25rem; background: var(--surface); min-width: 0; display: flex; flex-direction: column; gap: .6rem; }
.pr-card .pr-no { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.pr-card h3 { font-size: 1.02rem; }
.pr-card ul { margin: .2rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; }
.pr-card ul li { margin-top: .35rem; }
.pr-card .sev { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--amber); }
.pr-card a { font-size: .88rem; margin-top: auto; }
.quality-note { margin-top: 1.6rem; max-width: var(--measure); color: var(--faint); font-size: .88rem; }
.quality-note a { color: var(--muted); }

/* ---------- Video placeholder ---------- */

.video-panel {
  margin-top: 2.2rem; border: 1px solid var(--line); border-radius: 1.1rem; overflow: hidden;
  background: var(--surface); max-width: 62rem;
}
.video-frame {
  aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(30rem 16rem at 50% 120%, rgb(201 244 91 / 8%) 0, transparent 70%),
    #0b120e;
  border-bottom: 1px solid var(--line-soft); padding: 1.5rem;
}
.video-frame .play {
  display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%;
  border: 2px solid rgb(201 244 91 / 55%); color: var(--lime); font-size: 1.4rem;
  margin: 0 auto 1rem;
}
.video-frame p { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; max-width: 44ch; }
.video-frame .mono-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.video-meta { padding: 1rem 1.3rem; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; color: var(--faint); font-size: .82rem; }
.video-meta span strong { color: var(--muted); font-weight: 600; }

/* ---------- Quickstart ---------- */

.quickstart {
  margin-top: 2.2rem; border: 1px solid var(--line); border-radius: 1rem; background: #0b120e;
  overflow: hidden; max-width: 46rem;
}
.quickstart-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--line-soft); padding: .6rem 1rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}
.copy-button {
  border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); color: var(--muted);
  font: inherit; letter-spacing: .08em; padding: .3rem .6rem; cursor: pointer;
}
.copy-button:hover { color: var(--ink); background: var(--raised); }
.quickstart pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; }
.quickstart pre code { background: none; border: 0; padding: 0; font-size: .88rem; line-height: 1.8; color: var(--ink); }
.quickstart pre code .cmt { color: var(--faint); }
.try-note { margin-top: 1.2rem; color: var(--faint); font-size: .88rem; max-width: var(--measure); }

/* ---------- Footer ---------- */

footer.site-footer { border-top: 1px solid var(--line-soft); padding: 2.8rem 0 3.4rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem 4rem; justify-content: space-between; }
.footer-brand { max-width: 34ch; color: var(--faint); font-size: .88rem; }
.footer-brand .brand { margin-bottom: .8rem; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; }
.footer-col h3 { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.footer-col ul { list-style: none; margin: .8rem 0 0; padding: 0; }
.footer-col li { margin-top: .45rem; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .4rem 2rem; }
.footer-legal a { color: var(--muted); }

/* ---------- Blog article ---------- */

.article-header { padding-block: clamp(3rem, 8vw, 5.5rem) 0; }
.article-header h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 850; letter-spacing: -.045em; max-width: 24ch; }
.article-byline { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1.4rem; color: var(--faint); font-size: .85rem; font-family: var(--mono); }
.article-byline span strong { color: var(--muted); font-weight: 600; }
.article { padding-block: clamp(2.2rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 6rem); }
.article-body { max-width: var(--measure); }
.article-body p { color: #cdd4cb; margin: 1.25rem 0 0; }
.article-body h2 { font-size: 1.55rem; margin-top: 3rem; }
.article-body h2 + p { margin-top: 1rem; }
.article-body a { color: var(--ink); }
.article-body ul { color: #cdd4cb; margin: 1.1rem 0 0; padding-left: 1.3rem; }
.article-body ul li { margin-top: .45rem; }
.pull {
  margin: 2.6rem 0; padding: 1.4rem 1.6rem; border-left: 3px solid var(--lime);
  background: rgb(201 244 91 / 5%); border-radius: .4rem;
  font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.45; color: var(--ink);
}
.seq {
  margin: 1.8rem 0 0; padding: .95rem 1.15rem;
  border: 1px solid var(--line); border-radius: .7rem; background: #0b120e;
  font-family: var(--mono); font-size: .8rem; line-height: 2; color: var(--muted);
  overflow-wrap: anywhere;
}
.seq .arrow { color: var(--faint); padding-inline: .2rem; }
.seq .hot { color: var(--lime); }
.seq .warm { color: var(--amber); }

.article-chain { margin: 2.6rem 0; }
.article-chain .chain { margin-top: 0; }
.article-chain .chain-sep { display: none; }
.article-chain .chain-track { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 1121px) {
  .article-chain .chain-track { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
.article-footer { margin-top: 3.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: .88rem; max-width: var(--measure); }
.article-footer a { color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ledger > div { border-top: 1px solid var(--line-soft); }
  .ledger > div:nth-child(-n+4) { border-top: 0; }
  .ledger > div:nth-child(5) { border-left: 0; }
  .pr-grid { grid-template-columns: 1fr; }
  .proof-ladder { grid-template-columns: 1fr; }
}

@media (max-width: 1120px) {
  .chain-sep { display: none; }
  .chain-track, .chain-track.chain-steps-7 { gap: .5rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 981px) {
  .grid-3 { grid-template-columns: 1fr; }
  .vocab { grid-template-columns: 1fr; }
  .vocab > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
  .boundary { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 2.9rem minmax(0, 1fr); gap: .9rem; }
  .steps li::before { left: 1.4rem; }
  .step-no { width: 2.9rem; }
  .stack li { grid-template-columns: 1fr; gap: .4rem; }
  .topbar-inner { justify-content: center; }
}

@media (max-width: 620px) {
  .chain-track, .chain-track.chain-steps-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks li { grid-template-columns: 1fr; gap: .7rem; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger > div:nth-child(-n+4) { border-top: 1px solid var(--line-soft); }
  .ledger > div:nth-child(-n+2) { border-top: 0; }
  .ledger > div:nth-child(odd) { border-left: 0; }
  .hero-actions .button { width: 100%; text-align: center; }
}
