/* Verity · context, explained — dark theme, one accent, mono for artifacts */

:root {
  --bg: #0a0e13;
  --bg-2: #0d1219;
  --surface: #111824;
  --surface-2: #16202f;
  --line: #22303f;
  --line-2: #2e4052;
  --ink: #e8eef5;
  --ink-2: #a9b6c6;
  --ink-3: #66788c;
  --accent: #3aa5e4;
  --accent-2: #5eb9ef;
  --accent-dim: #1b3a52;
  --good: #56c98d;
  --warn: #e0b45a;
  --bad: #e0655f;

  /* block kind colours — shared by block list, prompt output, legend */
  --k-identity: #5ea9e6;
  --k-instructions: #4cc2a0;
  --k-flags: #d17862;
  --k-memory: #e0b45a;
  --k-transcript: #8fa3b8;
  --k-roster: #7fc36b;
  --k-divider: #5c6b7d;
  --k-user: #3aa5e4;
  --k-hdr: #c3cfdd;

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 10px;
  --r-sm: 7px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-dim); }

code { font-family: var(--mono); font-size: .92em; color: var(--accent-2); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap--narrow { max-width: 780px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: #06121c; font-weight: 600;
  padding: 10px 16px; border-radius: var(--r-sm);
  transition: top .15s var(--ease);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__row { display: flex; align-items: center; justify-content: space-between; height: 54px; gap: 16px; }
.nav__mark {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px;
  white-space: nowrap;
}
.nav__links { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex-shrink: 1; }
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; white-space: nowrap;
  padding: 4px 0; position: relative;
  transition: color .15s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .15s var(--ease);
}
@media (hover: hover) {
  .nav__links a:hover { color: var(--ink); }
  .nav__links a:hover::after { transform: scaleX(1); }
}

/* ---------- type & rhythm ---------- */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 14px;
}
h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.lede { color: var(--ink-2); font-size: 17px; max-width: 62ch; margin-bottom: 44px; }
.note { color: var(--ink-3); font-size: 13.5px; margin-top: 18px; max-width: 46ch; }

/* ---------- buttons & chips ---------- */
.btn {
  font: 600 14.5px var(--sans);
  background: var(--accent); color: #06121c;
  border: 0; border-radius: var(--r-sm);
  padding: 11px 20px; cursor: pointer;
  transition: transform .12s var(--ease), background .15s var(--ease);
}
.btn--ghost {
  background: transparent; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--sm { padding: 8px 13px; font-size: 13px; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn:not(.btn--ghost):hover { background: var(--accent-2); }
  .btn--ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
}
.btn:active { transform: translateY(1px) scale(.985); }

.chip {
  display: inline-block; font: 500 13px var(--mono); color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px;
}

.chipbtn {
  font: 500 12.5px var(--mono); color: var(--accent-2);
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  transition: transform .12s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
@media (hover: hover) {
  .chipbtn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--ink); }
}
.chipbtn:active { transform: translateY(1px); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center;
  min-height: calc(100vh - 130px); min-height: calc(100svh - 130px);
}
.hero__eyebrow {
  font: 600 13px var(--mono); color: var(--accent); letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 62px); font-weight: 700; letter-spacing: -.03em;
  line-height: 1.06; margin-bottom: 22px;
}
.hero h1 .mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero h1 .mask > span { display: inline-block; }
.hero__lead { color: var(--ink-2); font-size: 18px; max-width: 46ch; margin-bottom: 30px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px; }

/* hero entrance — once, ~1s, transform+opacity only */
html.m-enter:not(.m-enter-done) [data-rise] {
  opacity: 0; transform: translateY(14px);
}
html.m-enter:not(.m-enter-done) .hero h1 .mask > [data-rise] { transform: translateY(110%); }
html.m-enter-done [data-rise], html:not(.m-enter) [data-rise] { opacity: 1; transform: none; }
[data-rise] { transition: opacity .5s var(--ease-enter), transform .65s var(--ease-enter); }
.hero__eyebrow[data-rise] { transition-delay: .02s; }
.hero h1 .mask:nth-child(2) > [data-rise] { transition-delay: .08s; }
.hero h1 .mask:nth-child(3) > [data-rise] { transition-delay: .14s; }
.hero h1 .mask:nth-child(4) > [data-rise] { transition-delay: .2s; }
.hero__lead[data-rise] { transition-delay: .3s; }
.hero__facts[data-rise] { transition-delay: .38s; }

/* ---------- pipeline ---------- */
.pipe {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 26px 20px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .55);
}
.pipe__track { position: relative; padding-left: 34px; }
.pipe__rail {
  position: absolute; left: 12px; top: 18px; bottom: 18px; width: 2px;
  background: var(--line-2); border-radius: 1px;
}
.pipe__packet {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 26px; height: 26px; color: var(--accent);
  display: grid; place-items: center;
  background: var(--surface-2); border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: transform .55s var(--ease), opacity .3s var(--ease), border-color .3s, color .3s;
}
.pipe__packet svg { width: 13px; height: 13px; }
.pipe__packet.is-in { opacity: 1; }
.pipe__packet.is-reply { color: var(--good); border-color: var(--good); }

.pipe__steps { list-style: none; display: flex; flex-direction: column; gap: 26px; }
.pipe__step { position: relative; }
.pipe__node {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; padding: 0;
  font: 600 15.5px var(--sans); color: var(--ink-3);
  transition: color .2s var(--ease);
}
.pipe__num {
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 1.5px solid var(--line-2); border-radius: 50%;
  font: 600 12px var(--mono); color: var(--ink-3);
  background: var(--surface);
  transition: border-color .25s, color .25s, background .25s, transform .25s var(--ease);
}
.pipe__cap { color: var(--ink-3); font-size: 13px; margin: 4px 0 0 34px; }
.pipe__step.is-active .pipe__node { color: var(--ink); }
.pipe__step.is-active .pipe__num {
  border-color: var(--accent); color: var(--accent); transform: scale(1.15);
}
.pipe__step.is-done .pipe__node { color: var(--ink-2); }
.pipe__step.is-done .pipe__num { border-color: var(--ink-3); color: var(--ink-2); }
@media (hover: hover) {
  .pipe__node:hover { color: var(--ink); }
  .pipe__node:hover .pipe__num { border-color: var(--ink-2); }
}

.pipe__panel {
  margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px;
}
.pipe__detail { min-height: 74px; transition: opacity .15s var(--ease); }
.pipe__detail.is-swap { opacity: 0; }
.pipe__detail-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.pipe__detail-body { color: var(--ink-2); font-size: 14px; max-width: 46ch; }
.pipe__detail-chip {
  display: inline-block; margin-top: 8px;
  font: 500 12px var(--mono); color: var(--accent-2);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 5px;
}
.pipe__controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pipe__controls .btn { flex: 0 0 auto; }
#pipePlay { min-width: 132px; }

/* ---------- builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }

.blocks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.blk {
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--blk, var(--line-2));
  border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s, opacity .2s;
}
.blk.is-drag { opacity: .35; }
.blk.is-off { opacity: .55; }
.blk__grip {
  flex: 0 0 30px; display: grid; place-items: center; cursor: grab;
  color: var(--ink-3); touch-action: none;
}
.blk__grip:active { cursor: grabbing; }
.blk__grip svg { width: 12px; height: 14px; }
.blk__body { flex: 1; min-width: 0; padding: 9px 10px 10px 0; }
.blk__head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.blk__name {
  font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--blk, var(--ink-2));
}
.blk__hint { font: 400 11.5px var(--mono); color: var(--ink-3); margin-left: auto; }
.blk__tools { display: flex; gap: 2px; margin-left: auto; }
.blk__btn {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 5px; cursor: pointer;
  color: var(--ink-3); font-size: 13px; line-height: 1;
  transition: color .15s, background .15s;
}
@media (hover: hover) { .blk__btn:hover { color: var(--ink); background: var(--surface-2); } }
.blk__btn--del:hover { color: var(--bad) !important; }
.blk__static {
  font: 400 12.5px/1.5 var(--mono); color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.blk__fields { display: flex; gap: 7px; }
.blk__fields .blk__in { min-width: 0; }
.blk__in {
  width: 100%; font: 400 13px var(--mono); color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 6px 9px;
  transition: border-color .14s, box-shadow .14s;
}
.blk__in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 165, 228, .15); }
.blk__in--k { flex: 0 0 34%; }
.blk__in--from { flex: 0 0 26%; }
textarea.blk__in { resize: vertical; min-height: 34px; line-height: 1.45; }
.blk__toggle { flex: 0 0 auto; display: grid; place-items: center; padding: 0 10px 0 2px; }
.blk__toggle input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.blk.drop-above { box-shadow: 0 -2px 0 0 var(--accent); }
.blk.drop-below { box-shadow: 0 2px 0 0 var(--accent); }

.builder__adds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.promptbox {
  position: sticky; top: 74px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
}
.promptbox__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.promptbox__title { font: 500 12px var(--mono); color: var(--ink-3); }
.copybtn {
  font: 600 12px var(--sans); color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 5px;
  padding: 5px 11px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
@media (hover: hover) { .copybtn:hover { color: var(--ink); border-color: var(--ink-3); } }
.copybtn.is-done { color: var(--good); border-color: var(--good); }
.promptbox__pre {
  font: 400 12.5px/1.6 var(--mono); color: var(--ink-2);
  padding: 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  max-height: 560px; overflow-y: auto;
}
.tok {
  border-radius: 4px; padding: 1px 3px; margin: 0 -3px;
  background: color-mix(in srgb, var(--blk, var(--accent)) 7%, transparent);
  transition: background .18s, color .18s;
}
.tok.is-hl { background: color-mix(in srgb, var(--blk, var(--accent)) 26%, transparent); color: var(--ink); }
.tok--hdr { color: var(--k-hdr); font-weight: 600; }
.tok--divider { color: var(--ink-3); }
.tok--cut { color: var(--ink-3); font-style: italic; }
.promptbox__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line);
  font: 500 12px var(--mono); color: var(--ink-3);
}
.promptbox__tok { color: var(--ink-3); }

/* ---------- memory trick ---------- */
.memsim {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px;
}
.memsim__stage { min-height: 380px; }
.memstep { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.memstep__title { grid-column: 1 / -1; font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.memstep__title span { color: var(--accent); font-family: var(--mono); font-size: 13px; font-weight: 500; margin-right: 8px; }
.memcol__label { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.memchat { display: flex; flex-direction: column; gap: 8px; }
.bubble {
  max-width: 88%; padding: 9px 13px; border-radius: 13px;
  font-size: 14px; line-height: 1.45;
  background: var(--surface-2); border: 1px solid var(--line);
}
.bubble .from { display: block; font: 600 11px var(--mono); color: var(--accent-2); margin-bottom: 2px; }
.bubble--verity { align-self: flex-end; background: var(--accent-dim); border-color: #2a5a7d; }
.bubble--verity .from { color: var(--accent-2); text-align: right; }
.bubble .mk {
  font-family: var(--mono); font-size: 12px;
  background: rgba(224, 180, 90, .14); color: var(--warn);
  border-radius: 4px; padding: 1px 4px;
}
.bubble.is-new { animation: pop .35s var(--ease-enter); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.memdb {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; align-self: start;
}
.memdb__bar {
  font: 500 11.5px var(--mono); color: var(--ink-3);
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between;
}
.memdb table { width: 100%; border-collapse: collapse; font: 400 12.5px var(--mono); }
.memdb th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.memdb td { padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.memdb tr:last-child td { border-bottom: 0; }
.memdb td:first-child { color: var(--warn); }
.memdb tr.is-new td { animation: rowin .5s var(--ease-enter); }
@keyframes rowin { from { background: rgba(224, 180, 90, .25); } to { background: transparent; } }
.memdb__empty { padding: 14px 12px; font: 400 12.5px var(--mono); color: var(--ink-3); }

.memprompt {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  font: 400 12px/1.65 var(--mono); color: var(--ink-2);
  padding: 14px; white-space: pre-wrap; word-break: break-word;
}
.memprompt .seg { display: block; padding: 3px 6px; border-radius: 4px; margin: 0 -6px; }
.memprompt .seg--mem { background: rgba(224, 180, 90, .12); }
.memprompt .seg--new { animation: pop .4s var(--ease-enter); }
.memprompt .who {
  display: inline-block; margin-left: 6px; font-size: 10.5px;
  color: var(--warn); border: 1px solid rgba(224, 180, 90, .4);
  border-radius: 4px; padding: 0 5px; vertical-align: 1px;
}
.memcallout {
  grid-column: 1 / -1;
  border-left: 3px solid var(--accent); padding: 4px 0 4px 16px;
  color: var(--ink); font-size: 15.5px; max-width: 60ch;
}
.memfly {
  font: 500 12px var(--mono); color: var(--warn);
  background: rgba(224, 180, 90, .14); border: 1px solid rgba(224, 180, 90, .4);
  border-radius: 6px; padding: 6px 10px; display: inline-block;
}
.memarrow { color: var(--ink-3); font-family: var(--mono); font-size: 13px; padding: 4px 0; }

.memsim__controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); gap: 14px;
}
.memsim__dots { display: flex; gap: 8px; }
.memsim__dot {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0;
  background: var(--line-2); cursor: pointer;
  transition: background .2s, transform .2s var(--ease);
}
.memsim__dot.is-on { background: var(--accent); transform: scale(1.25); }
.memsim__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- what falls off ---------- */
.wind { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: start; }
.wind__panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px;
}
.wind__label { display: block; font: 600 13px var(--sans); margin-bottom: 10px; }
input[type="range"] {
  width: 100%; accent-color: var(--accent); height: 26px; cursor: pointer;
}
.wind__readout {
  font: 500 12.5px var(--mono); color: var(--ink-2); margin: 10px 0 16px;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
}
.wind__readout b { color: var(--accent-2); font-weight: 600; }
.wind__readout .lost { color: var(--bad); }
.wind__list {
  max-height: 440px; overflow-y: auto; position: relative;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-2); padding: 8px;
  scroll-behavior: smooth;
}
.wmsg {
  display: flex; gap: 8px; align-items: baseline;
  padding: 5px 8px; border-radius: 6px;
  font: 400 12.5px/1.45 var(--mono); color: var(--ink-2);
  transition: opacity .3s, transform .3s var(--ease), filter .3s;
}
.wmsg .n { flex: 0 0 22px; color: var(--ink-3); font-size: 11px; text-align: right; }
.wmsg .a { color: var(--accent-2); flex: 0 0 auto; }
.wmsg .a--v { color: var(--good); }
.wmsg .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wmsg.is-future { display: none; }
.wmsg.is-out { opacity: .22; filter: grayscale(.6); }
.wmsg.is-out .t { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.wmsg.is-newest { background: rgba(58, 165, 228, .1); }
.wmsg.is-newest .t::after {
  content: " ← being answered"; color: var(--accent); font-size: 11px;
}
.wedge {
  display: flex; align-items: center; gap: 8px; margin: 6px 0;
  font: 500 10.5px var(--mono); color: var(--warn); letter-spacing: .04em;
}
.wedge::before, .wedge::after { content: ""; flex: 1; height: 1px; background: rgba(224, 180, 90, .4); }

.wind__sub { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.wind__ta {
  width: 100%; font: 400 12.5px/1.5 var(--mono); color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; resize: vertical; min-height: 96px;
}
.wind__ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 165, 228, .15); }
.wind__meter { height: 5px; background: var(--line); border-radius: 3px; margin: 12px 0 8px; overflow: hidden; }
.wind__meterfill {
  height: 100%; width: 0; background: var(--accent); border-radius: 3px;
  transition: width .15s linear, background .3s;
}
.wind__meterfill.is-over { background: var(--bad); }
.wind__count { font: 500 12px var(--mono); color: var(--ink-3); margin-bottom: 12px; }
.wind__count b { color: var(--ink); }
.wind__count .over { color: var(--bad); }
.wind__echo {
  font: 400 12px/1.6 var(--mono); color: var(--ink-2);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px; white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow-y: auto;
}
.wind__echo .cut {
  color: var(--ink-3); text-decoration: line-through; opacity: .6;
}
.wind__echo .cutmark {
  color: var(--bad); font-weight: 600;
}

/* ---------- marker playground ---------- */
.play { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.play__label { display: block; font: 600 13px var(--sans); margin-bottom: 10px; }
.play__ta {
  width: 100%; font: 400 13px/1.6 var(--mono); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; resize: vertical; min-height: 190px;
}
.play__ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 165, 228, .15); }
.play__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.play__out {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; margin-bottom: 16px;
}
.play__outlabel { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.play__count { color: var(--accent-2); }
.play__visible { font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.play__visible .unk {
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  border-bottom: 1px dashed var(--ink-3);
}
.play__visible:empty::before { content: "— nothing left to send"; color: var(--ink-3); font-size: 13px; }
.play__fx { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fx {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); border-left: 3px solid var(--fxc, var(--accent));
  border-radius: var(--r-sm); padding: 10px 12px;
  background: var(--bg-2);
}
.fx__icon { font: 600 11px var(--mono); color: var(--fxc, var(--accent)); padding-top: 2px; white-space: nowrap; }
.fx__body { font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.fx__body code { word-break: break-all; }
.fx.is-dropped { opacity: .5; }
.fx.is-dropped .fx__icon { color: var(--bad); }
.fx__drop { color: var(--bad); font-size: 12px; font-family: var(--mono); }
.play__fx:empty::after { content: "No markers — the reply ships as-is."; color: var(--ink-3); font-size: 13px; }

.depth {
  margin-top: 40px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px; align-items: center;
}
.depth__copy p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 16px; max-width: 40ch; }
.depth__chain {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
}
.depth__node {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--bg-2); border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  padding: 10px 14px; min-width: 74px;
  transition: border-color .3s, box-shadow .3s;
}
.depth__node.is-live { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 165, 228, .18); }
.depth__node--dead { border-style: dashed; opacity: .55; }
.depth__node--dead.is-dead { border-color: var(--bad); opacity: 1; }
.depth__name { font: 600 13.5px var(--mono); color: var(--ink); }
.depth__tag { font: 500 10.5px var(--mono); color: var(--ink-3); }
.depth__node--dead.is-dead .depth__tag { color: var(--bad); }
.depth__hop { position: relative; width: 44px; height: 2px; background: var(--line-2); }
.depth__hop::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  border-left: 7px solid var(--line-2); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.depth__hop.is-live { background: var(--accent); }
.depth__hop.is-live::after { border-left-color: var(--accent); }
.depth__hop--dead.is-dead { background: var(--bad); }
.depth__hop--dead.is-dead::after { border-left-color: var(--bad); }
.depth__hoplabel {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font: 500 9.5px var(--mono); color: var(--ink-3); white-space: nowrap;
}
.depth__hop--dead.is-dead .depth__hoplabel { color: var(--bad); }

/* ---------- constants & code ---------- */
.consts {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 40px;
}
.const {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 16px 18px;
  transition: transform .15s var(--ease), border-color .15s;
}
@media (hover: hover) { .const:hover { transform: translateY(-2px); border-color: var(--line-2); } }
.const code {
  display: block; font-size: 14.5px; color: var(--warn); margin-bottom: 6px;
}
.const span { font-size: 13.5px; color: var(--ink-2); }

.codebox {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.codebox__bar {
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  font: 500 12px var(--mono); color: var(--ink-3);
}
.codebox__pre {
  font: 400 13px/1.65 var(--mono); padding: 18px 20px;
  overflow-x: auto; color: var(--ink-2);
}
.c-kw { color: #d17862; }
.c-ty { color: #5ea9e6; }
.c-fn { color: #7fc36b; }
.c-str { color: #e0b45a; }
.c-com { color: var(--ink-3); }
.c-cst { color: var(--accent-2); font-weight: 600; }

/* ---------- faq ---------- */
.faq { display: flex; flex-direction: column; }
.faq__qa { padding: 22px 0; border-top: 1px solid var(--line); }
.faq__qa:first-child { border-top: 0; padding-top: 4px; }
.faq__qa h3 { font-size: 16.5px; }
.faq__qa p { color: var(--ink-2); font-size: 15px; max-width: 62ch; }

/* ---------- footer & hint ---------- */
.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; }
.foot p { color: var(--ink-3); font-size: 13.5px; }

.hint {
  position: fixed; left: 20px; bottom: 20px; z-index: 60;
  max-width: 330px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 14px 14px 14px 16px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.hint.is-gone { opacity: 0; transform: translateY(10px); pointer-events: none; }
.hint__x {
  background: none; border: 0; color: var(--ink-3); cursor: pointer;
  font-size: 13px; padding: 2px 4px; flex: 0 0 auto;
  transition: color .15s;
}
@media (hover: hover) { .hint__x:hover { color: var(--ink); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; min-height: 0; }
  .hero { padding-top: 56px; }
  .builder, .play, .wind, .depth, .memstep { grid-template-columns: minmax(0, 1fr); }
  .promptbox { position: static; }
  .consts { grid-template-columns: repeat(2, 1fr); }
  .memsim__stage { min-height: 0; }
}
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 18px; }
  .nav__mark { font-size: 12.5px; }
  .nav__links { gap: 14px; }
  .consts { grid-template-columns: 1fr; }
  .memsim { padding: 18px; }
  .memsim__controls { flex-wrap: wrap; }
  .depth__chain { gap: 4px; }
  .depth__node { min-width: 60px; padding: 8px 10px; }
  .depth__hop { width: 26px; }
  .hint { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  [data-rise] { opacity: 1 !important; transform: none !important; }
  .pipe__packet { display: none; }
  .wind__list { scroll-behavior: auto; }
}
