/* engine.nuclis.dev: one stylesheet, no build step.
   Teal carries structure; amber is reserved for the token the model emits.
   Chart colours were validated for colour-vision deficiency against --paper. */

/* Self-hosted, subset to the characters the site uses; see THIRD_PARTY_NOTICES.md. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-v1.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-v1.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #F7FAFA;
  --paper-2: #EDF3F3;
  --ink: #0F2A2E;
  --slate: #4A6569;
  --mist: #D5E2E3;
  --teal: #087F8C;
  --teal-deep: #065E68;
  --teal-wash: #CFE6E8;
  --amber: #F5A623;
  --amber-wash: #FDEBC8;

  --chart-n: #008C99;      /* nuclis */
  --chart-r: #C47A12;      /* llama.cpp */
  --text-n: #00737E;       /* the same hues, dark enough for small digits */
  --text-r: #9C5F0B;

  /* the agent's real colours: gruvbox roles on the recording's terminal */
  --t-bg: #282A36;
  --t-fg: #EBDBB2;
  --t-dim: #928374;
  --t-orange: #FE8019;
  --t-yellow: #D79921;
  --t-yellow-hi: #FABD2F;
  --t-blue: #83A598;
  --t-green: #8EC07C;
  --t-red: #FB4934;
  --t-lime: #B8BB26;
  --t-bar: #3C3836;

  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --step: clamp(96px, 12vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .86em; }
p code, dd code, li code { background: var(--paper-2); padding: .08em .35em; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; }
.noscript { margin: 16px 0 0; color: var(--slate); font-size: .95rem; max-width: 46rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* inline icons size to the text they sit in */
.icon-link, .link-btn, .foot-links a { display: inline-flex; align-items: center; gap: 7px; }
.icon-link svg, .link-btn svg, .foot-links svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--mist); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand span { font-weight: 650; font-size: 1.2rem; letter-spacing: -.01em; font-variation-settings: "wdth" 118; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: .95rem; }
.top nav a { color: var(--slate); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.nav-icon svg { width: 21px; height: 21px; }
.top nav .nav-dl {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px 0 11px; border-radius: 8px;
  background: var(--ink); color: var(--paper); font-weight: 550;
}
.top nav .nav-dl:hover { background: var(--teal-deep); color: #fff; }
.nav-dl svg { width: 17px; height: 17px; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(64px, 10vw, 136px); }
.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 8.4rem);
  line-height: .92;
  font-weight: 660;
  letter-spacing: -.045em;
  font-variation-settings: "wdth" 125;
}
.hero h1 span { display: inline-block; }
.hero-sub {
  display: grid; grid-template-columns: minmax(0, 37rem) auto;
  gap: 32px 56px; align-items: end; justify-content: space-between;
  margin-top: clamp(32px, 4.5vw, 52px);
}
.lede { margin: 0; font-size: 1.2rem; line-height: 1.55; color: var(--slate); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-fine { margin: 12px 0 0; font-size: .88rem; color: var(--slate); }

/* buttons: one corner cut on the diagonal, like the mark's bands */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px 0 20px;
  font-weight: 600; font-size: 1.02rem; text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%);
  border-radius: 7px 0 0 7px;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { font-weight: 450; opacity: .78; font-size: .86em; margin-left: 2px; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-quiet { background: var(--paper-2); color: var(--ink); }
.btn-quiet:hover { background: var(--mist); color: var(--ink); }

/* ---------- the terminal replay ---------- */
.replay-fig { margin-top: clamp(56px, 7vw, 88px); }
.term {
  border-radius: 12px;
  background: var(--t-bg);
  color: var(--t-fg);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 42, 46, .06), 0 30px 60px -30px rgba(15, 42, 46, .45);
  font: 400 13.5px/1.55 var(--mono);
  font-feature-settings: "calt" 0, "liga" 0;
}
.term-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; background: #21222C; color: #6E7183; font-size: 12px; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3A3C4A; }
.term-bar span { margin-left: 10px; }
.term-body { padding: 14px 18px 10px; }
.term-scroll { height: 430px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
#term-out > div { white-space: pre-wrap; min-height: 1.55em; }
.term-input { margin-top: 10px; height: 64px; padding: 6px 12px; border: 1px solid var(--t-yellow); border-radius: 3px; position: relative; }
.t-spin { position: absolute; top: -.8em; left: 14px; background: var(--t-bg); color: var(--t-yellow); padding: 0 2px; }
.t-prompt { color: var(--t-fg); margin-right: .6ch; }
.t-cursor { display: inline-block; width: .6em; height: 1.15em; background: #F4F4F4; vertical-align: -.2em; }
.term-hint { color: var(--t-dim); margin: 6px 4px 4px; overflow: hidden; white-space: nowrap; }
.term-status { display: flex; background: var(--t-bar); white-space: nowrap; overflow: hidden; margin: 0 -18px -10px; padding: 3px 18px; }
.term-status span { padding: 0 1ch; border-right: 1px solid var(--t-dim); }
.term-status span:first-child { padding-left: 0; min-width: 25ch; }
.term-status span:last-child { border: 0; }
.term-status b { font-weight: 400; }
.term-status .y, .t-hi { color: var(--t-yellow-hi); }
.t-dim { color: var(--t-dim); }
.t-user { color: var(--t-orange); font-weight: 700; }
.t-think { color: var(--t-yellow); }
.t-call { color: var(--t-blue); font-weight: 700; }
.t-bul { color: var(--t-yellow); }
.t-bul-edit { color: var(--t-blue); }
.t-green { color: var(--t-green); }
.t-greenb { color: var(--t-green); font-weight: 700; }
.t-dhead { color: var(--t-yellow-hi); font-weight: 700; }
.t-rm { background: #3F2222; }
.t-rm b { background: #6B2A26; color: var(--t-red); font-weight: 400; }
.t-rm .m { color: var(--t-red); }
.t-add { background: #2F3A1E; }
.t-add b { background: #4B5A1F; color: var(--t-lime); font-weight: 400; }
.t-add .m { color: var(--t-lime); }
.t-ln, .t-sep { color: var(--t-dim); }
.half { white-space: pre; display: inline-block; width: 50ch; overflow: hidden; vertical-align: top; }

.replay-fig figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 16px; color: var(--slate); font-size: .92rem; }
.link-btn { font: inherit; font-weight: 550; color: var(--teal-deep); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.link-btn:hover { color: var(--teal); }

/* ---------- sections ---------- */
.sec { padding-top: var(--step); }
.sec h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.5vw, 2.85rem); line-height: 1.08;
  font-weight: 630; letter-spacing: -.03em;
  font-variation-settings: "wdth" 118;
}
.sec h3 { margin: 0; font-size: 1.05rem; font-weight: 620; letter-spacing: -.005em; }
.sec-lede { max-width: 42rem; margin: 20px 0 0; font-size: 1.12rem; color: var(--slate); }
.aside { max-width: 44rem; margin: 28px 0 0; color: var(--slate); font-size: .98rem; }
.fine { color: var(--slate); font-size: .85rem; }

/* ---------- the engine strip ---------- */
.engine { margin-top: 56px; padding: 28px 28px 24px; background: #fff; border: 1px solid var(--mist); border-radius: 16px; }
.engine-head { display: flex; justify-content: space-between; gap: 24px; min-height: 1.6em; }
.engine-head p { margin: 0; font-size: .92rem; }
.phase { font-weight: 600; }
.probe { color: var(--slate); display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.probe .ok { color: var(--teal); font-weight: 600; }
.engine-row { display: flex; align-items: flex-start; gap: 16px; margin-top: 18px; }
.layers { flex: 1; display: grid; grid-template-columns: repeat(64, 1fr); gap: 3px; }
.L { display: flex; flex-direction: column; gap: 4px; cursor: default; }
.L .bar { height: 56px; border-radius: 3px; transition: transform .18s ease-out, background-color .18s; transform-origin: 50% 100%; }
.L.delta .bar { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--mist); }
.L.attn .bar { background: var(--teal); }
.L.hot .bar { transform: scaleY(1.12); }
.L.delta.hot .bar { background: var(--teal-wash); }
.L.attn.hot .bar { background: var(--teal-deep); }
/* memory under each layer: a growing cache, or a fixed state */
.mem { height: 68px; display: flex; flex-direction: column; gap: 1px; }
.mem i { display: block; height: 3px; border-radius: 1px; background: var(--teal); opacity: .38; transition: opacity .5s, background-color .5s; }
.mem i.new { opacity: 1; background: var(--teal-deep); }
.L.delta .mem i { height: 12px; opacity: 1; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--mist); border-radius: 2px; }
.L.delta .mem i.new { background: var(--teal-wash); }
.kernel { width: 46px; height: 46px; flex: none; margin-top: 5px; fill: var(--amber); transition: transform .25s cubic-bezier(.3,1.6,.5,1), filter .25s; }
.kernel.fire { transform: scale(1.3); filter: drop-shadow(0 0 10px rgba(245, 166, 35, .7)); }
.stream { margin: 14px 0 0; min-height: 2.2em; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.stream .tk { font: 400 .95rem/1.2 var(--sans); padding: 4px 6px; border-radius: 5px; background: var(--paper-2); white-space: pre; }
.stream .tk.in { color: var(--slate); }
.stream .tk.out { color: var(--ink); background: var(--teal-wash); transition: background-color .6s; }
.stream .tk.fresh { background: var(--amber); }
.stream .sep { width: 18px; height: 1px; background: var(--mist); margin: 0 6px; }
.engine-key { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--paper-2); }
.engine-key p { margin: 0; color: var(--slate); font-size: .93rem; }
.engine-key b { color: var(--ink); font-weight: 600; }
.k { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.k-attn { background: var(--teal); }
.k-delta { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--mist); }

.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 64px 0 0; }
.checks div { border-top: 2px solid var(--ink); padding-top: 16px; }
.checks dt { font-weight: 640; font-size: 1.3rem; letter-spacing: -.015em; font-variation-settings: "wdth" 115; }
.checks dd { margin: 8px 0 0; color: var(--slate); font-size: .98rem; }

/* ---------- charts ---------- */
.chart-card { margin-top: 48px; background: #fff; border: 1px solid var(--mist); border-radius: 16px; padding: 26px 28px 22px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.chart-head h3 { margin-right: auto; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 8px; padding: 3px; }
.seg button { font: 500 .88rem var(--sans); color: var(--slate); background: none; border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--mist); }
.legend { display: flex; gap: 24px; margin-top: 18px; font-size: .9rem; color: var(--slate); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.dot-n { background: var(--chart-n); }
.dot-r { background: var(--chart-r); }
.dot-off { box-shadow: inset 0 0 0 2px var(--slate); }
.chart { margin-top: 8px; }
.chart svg { overflow: visible; }
.chart .grid { stroke: var(--paper-2); }
.chart .axis { fill: var(--slate); font: 400 12px var(--sans); }
.chart .row-label { fill: var(--ink); font: 500 14px var(--sans); }
.chart .ratio { fill: var(--ink); font: 600 13px var(--sans); }
.chart .ratio.lose { fill: var(--slate); font-weight: 400; }
.chart .link { fill: var(--mist); }
.chart .link, .chart g { transform-box: view-box; transform-origin: 0 0; }
.chart .hit { fill: transparent; }
.chart-note { margin: 14px 0 0; color: var(--slate); font-size: .88rem; max-width: 52rem; }
.chart-note .icon-link { margin-left: 4px; }
.chart-table { margin-top: 12px; font-size: .88rem; color: var(--slate); }
.chart-table summary { cursor: pointer; color: var(--teal-deep); width: fit-content; }
.chart-table table { margin-top: 10px; border-collapse: collapse; width: 100%; }
.chart-table th, .chart-table td { text-align: right; padding: 6px 0 6px 16px; border-bottom: 1px solid var(--paper-2); font-weight: 400; }
.chart-table th:first-child { text-align: left; padding-left: 0; }
.chart-table tbody th { color: var(--ink); }
.seg-label { align-self: center; padding: 0 8px 0 9px; font: 500 .78rem var(--sans); color: var(--slate); text-transform: uppercase; letter-spacing: .06em; }
.chart-table summary .v-n, .chart-table summary .v-r { font-weight: 600; }
.v-n { color: var(--text-n); }
.v-r { color: var(--text-r); }
.table-scroll { overflow-x: auto; }
.vs-table table { margin-top: 14px; }
.vs-table thead th { color: var(--slate); font-size: .8rem; letter-spacing: .02em; padding-bottom: 8px; }
.vs-table td { font-variant-numeric: tabular-nums; white-space: nowrap; padding: 9px 12px 9px 20px; vertical-align: top; }
.vs-table td .v { font-weight: 600; font-size: .95rem; }
.vs-table .v-sep { margin: 0 .35em; color: var(--mist); }
.vs-table .v-x { display: block; margin-top: 2px; font-size: .78rem; color: var(--slate); }
.vs-table .v-x.win { color: var(--text-n); font-weight: 600; }
.vs-table .grp th { padding: 20px 0 6px; text-align: left; font: 600 .74rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); border-bottom: 1px solid var(--mist); }
.vs-table tbody:first-of-type .grp th { padding-top: 8px; }
.vs-table tbody.on .grp th { color: var(--ink); }
.vs-table thead th.on { color: var(--ink); font-weight: 600; }
.vs-table td.on { background: var(--paper); }
.vs-table tbody.on td.on { background: var(--teal-wash); background: color-mix(in srgb, var(--teal-wash) 55%, #fff); }

.spec { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 80px; }
.spec-copy h3 { font-size: 1.5rem; font-variation-settings: "wdth" 115; letter-spacing: -.02em; line-height: 1.2; }
.spec-copy > p { color: var(--slate); }
.spec .chart-card { margin-top: 0; }

/* the drafter, illustrated */
.draft { margin-top: 20px; padding: 18px; border-radius: 12px; background: #fff; border: 1px solid var(--mist); }
.draft-line { margin: 0; min-height: 5.6em; display: flex; flex-wrap: wrap; row-gap: 4px; align-content: flex-start; font: 400 13px/1.2 var(--mono); }
.draft-line .tk { padding: 4px 3px; border-radius: 4px; white-space: pre; transition: background-color .3s, color .3s, opacity .3s; }
.draft-line .tk.ok { color: var(--ink); padding-left: 0; padding-right: 0; }
.draft-line .tk:not(.ok) { margin: 0 1px; }
.draft-line .tk.guess { color: var(--slate); box-shadow: inset 0 0 0 1px var(--slate); border-radius: 4px; background: repeating-linear-gradient(135deg, transparent 0 4px, var(--paper-2) 4px 6px); }
.draft-line .tk.kept { color: var(--ink); background: var(--teal-wash); box-shadow: none; }
.draft-line .tk.no { color: var(--slate); text-decoration: line-through; box-shadow: none; background: none; }
.draft-line .tk.gone { opacity: 0; }
.draft-line .tk.model { background: var(--amber); color: var(--ink); }
.draft-line .tk.end { font-family: var(--sans); font-size: 11px; color: var(--slate); }
.draft-tally { margin: 10px 0 0; font-size: .85rem; color: var(--slate); min-height: 1.4em; }

.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 8px 11px; font-size: .85rem; line-height: 1.4; max-width: 280px; }
.tip b { font-weight: 600; }

/* ---------- models ---------- */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 40px; margin-top: 48px; }
.shelf article { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; }
.shelf h3 { font-size: 1.2rem; font-variation-settings: "wdth" 112; letter-spacing: -.01em; }
.shelf p { margin: 8px 0 18px; color: var(--slate); font-size: .97rem; flex: 1; }
.shelf footer { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .9rem; }
.shelf footer code { color: var(--teal-deep); }
.shelf footer span { color: var(--slate); }
.shelf .shelf-more { border-top: 2px dashed var(--mist); }

/* ---------- agent tools ---------- */
.tools { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); }
.tools li { padding: 22px 18px 22px 0; display: flex; flex-direction: column; gap: 6px; }
.tools li + li { padding-left: 18px; border-left: 1px solid var(--mist); }
.tools code { background: none; padding: 0; font-size: 1.05rem; font-weight: 700; color: var(--teal-deep); }
.tools span { color: var(--slate); font-size: .9rem; line-height: 1.4; }
.routes code { overflow-wrap: anywhere; }
.trio { grid-template-columns: repeat(3, 1fr); }
.nw { white-space: nowrap; }

/* ---------- decisions ---------- */
.decide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.snip, .cmd pre { margin: 24px 0 0; padding: 18px 20px; border-radius: 10px; background: var(--ink); color: #DCEBEC; overflow-x: auto; font: 400 13.5px/1.7 var(--mono); }
.snip .c, .cmd .c { color: #6F9599; }
.snip .c { user-select: none; }
.dungeons {
  margin-top: 20px; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; border-radius: 16px; text-decoration: none;
  background: var(--ink); color: #DCEBEC;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.dungeons:hover { color: #fff; background: #12343A; }
.dg-head { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 640; letter-spacing: -.015em; font-variation-settings: "wdth" 115; color: #fff; }
.dg-head svg { width: 26px; height: 26px; color: var(--amber); }
.dg-copy { color: #A9C4C7; font-size: .97rem; }
.dg-rooms { display: block; min-height: 7.4em; padding: 16px 0; border-top: 1px solid #23474D; border-bottom: 1px solid #23474D; }
.room { display: grid; gap: 4px; transition: opacity .35s; }
.room.fade { opacity: 0; }
.room-name { font-size: .82rem; color: #7FA3A7; }
.room-q { font-size: 1.12rem; color: #fff; font-weight: 500; }
.room-a { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: #A9C4C7; }
.room-a i { display: inline-block; width: 8px; height: 8px; transform: rotate(45deg); background: var(--amber); border-radius: 1px; }
.dg-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.dg-go svg { width: 18px; height: 18px; }

/* ---------- install ---------- */
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; margin-top: 36px; align-items: start; }
.seg-lg button { font-size: .95rem; padding: 8px 16px; }
.start-note { color: var(--slate); max-width: 30rem; margin: 20px 0 0; }
.start-links { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 0; }
.cmd { position: relative; }
.cmd pre { margin: 0; padding: 24px 26px; min-height: 100%; }
.copy {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px;
  font: 500 .8rem var(--sans); color: #CFE3E5; background: rgba(255,255,255,.08);
  border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer;
}
.copy svg { width: 14px; height: 14px; }
.copy:hover { background: rgba(255,255,255,.16); }

/* ---------- open ---------- */
.open { padding-bottom: var(--step); }
.open-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 32px; align-items: start; }
.open-grid > p { margin: 0; color: var(--slate); font-size: 1.08rem; max-width: 34rem; }
.reads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--mist); }
.reads a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--mist); text-decoration: none; color: var(--slate); }
.reads a:hover { color: var(--ink); }
.reads svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--teal); }
.reads span { display: flex; flex-direction: column; font-size: .93rem; }
.reads b { color: var(--ink); font-weight: 600; font-size: 1rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--mist); padding: 36px 0 48px; color: var(--slate); font-size: .9rem; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.foot-name { display: flex; gap: 14px; align-items: center; }
.foot-name svg { width: 32px; height: 32px; flex: none; }
.foot-name p { margin: 0; max-width: 34rem; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--slate); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
  .tools li:nth-child(4) { border-left: 0; padding-left: 0; }
  .tools li:nth-child(n + 4) { border-top: 1px solid var(--mist); }
}
@media (max-width: 900px) {
  .hero-sub, .spec, .decide, .start-grid, .open-grid { grid-template-columns: minmax(0, 1fr); }
  .shelf { grid-template-columns: 1fr 1fr; }
  .checks, .engine-key { grid-template-columns: 1fr; gap: 24px; }
  .top nav a:not(.nav-dl):not(.nav-icon) { display: none; }
  .term { font-size: 11.5px; }
  .term-scroll { height: 360px; }
  .layers { gap: 2px; }
  .L .bar { height: 40px; border-radius: 2px; }
  .kernel { width: 30px; height: 30px; }
  .engine, .chart-card { padding: 20px 16px; }
}
@media (max-width: 760px) {
  .half.ctx-r, .t-sep { display: none; }
  .half { display: block; width: auto; }
}
@media (max-width: 560px) {
  .seg-ctx { flex-wrap: wrap; }
  .vs-table td { padding: 8px 6px 8px 10px; }
  .vs-table td .v { display: block; font-size: .88rem; }
  .vs-table .v-sep { display: none; }
  .shelf { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; }
  .tools li, .tools li + li { padding: 16px 12px 16px 0; border-left: 0; border-top: 1px solid var(--mist); }
  .tools li:nth-child(-n + 2) { border-top: 0; }
  .trio { grid-template-columns: 1fr; }
  .trio li:nth-child(2) { border-top: 1px solid var(--mist); }
  .layers { grid-template-columns: repeat(32, 1fr); row-gap: 10px; }
  .mem { height: 50px; }
  .engine-head { flex-direction: column; gap: 4px; min-height: 3.2em; }
  .probe { display: block; }
  .replay-fig figcaption { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- 404 ---------- */
.lost-main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.lost-main .brand { margin-bottom: 40px; }
.lost-main h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; font-weight: 660; letter-spacing: -.04em; font-variation-settings: "wdth" 125; }
.lost-main .lede { max-width: 34rem; margin: 16px 0 24px; }
