/* One base, one ink, one accent. Red and green appear only where they mean blocked or lost,
   and passes or added. The graph in app.js reads these same tokens. */
@font-face { font-family: Geist; src: url("vendor/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("vendor/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --base: #f2f0e9; --surface: #faf9f5; --ink: #141412; --muted: #5c5a54; --rule: #d6d3c8; --faint: #e8e5dc;
  --accent: #1f3fff; --bad: #c8321e; --bad-wash: #f7e3de; --good: #0b6e45; --good-wash: #dfeee6;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px; --s7: 104px;
  --sans: Geist, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: var(--sans); color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--base); color: var(--ink); }
body { font-size: 16px; line-height: 1.5; padding: 0 var(--s5) var(--s5); max-width: 1520px; margin: 0 auto; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
code, pre, textarea { font-family: var(--mono); }
code { background: var(--faint); padding: 1px 5px; border-radius: 3px; font-size: 0.88em; overflow-wrap: anywhere; }
h1, h2, h3, h4, p { margin: 0; }
button, select { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

/* Small mono labels carry the structure; display type carries the message. */
.eyebrow, .chip-state, .foot-links, .figures small, .proof-head, .check span, .card h3, .kind, th, .legend, .graph-tools, .engine, .gh, .story li > span, .timing, .target, .graph-note, .foot {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }

.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: 56px; border-bottom: 1px solid var(--ink); position: sticky; top: 0; z-index: 30; background: var(--base); }
[id] { scroll-margin-top: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.mark { width: 12px; height: 12px; background: var(--bad); border-radius: 50%; }
.top-right { display: flex; align-items: baseline; gap: var(--s4); line-height: 1; }
.gh { text-decoration: none; }
.engine { color: var(--muted); }
.engine.ok { color: var(--good); }
.engine.ok::before { content: "● "; }
.engine.off { color: var(--bad); }

.hero { position: relative; isolation: isolate; padding: var(--s6) 0 var(--s5); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: var(--s5) var(--s6); align-items: end; }
.eyebrow { color: var(--muted); margin-bottom: var(--s4); }
.field { position: absolute; inset: 0 calc(-1 * var(--s5)); width: calc(100% + 2 * var(--s5)); height: 100%; pointer-events: none; z-index: -1; }
.hero h1 { font-size: clamp(40px, 7.4vw, 124px); line-height: 0.92; letter-spacing: -0.055em; font-weight: 600; margin-left: -0.03em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero h1 .line > span { display: block; }
.lede { font-size: clamp(18px, 1.55vw, 23px); line-height: 1.4; color: var(--muted); margin-top: var(--s5); max-width: 34em; }
.lede em { font-style: normal; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--bad); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.cta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.btn { display: inline-block; padding: 14px 22px; border-radius: 999px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; transition: background 0.15s, color 0.15s; }
.btn:hover { background: var(--ink); color: var(--base); }
.btn.primary { background: var(--ink); color: var(--base); }
@media (hover: hover) { .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; } }

.proof { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; padding: var(--s4); transition: transform 0.2s; }
.proof:hover { color: var(--ink); transform: translateY(-3px); }
.proof-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; color: var(--muted); }
.proof-head code { text-transform: none; letter-spacing: 0; background: none; padding: 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--s3) 0 var(--s4); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.check { padding: var(--s3) var(--s3) var(--s3) 0; }
.check + .check { padding-left: var(--s3); border-left: 1px solid var(--rule); }
.check span { display: block; color: var(--muted); }
.check strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; margin-top: var(--s1); }
.check.git strong { color: var(--good); }
.check.mempr strong { color: var(--bad); }
.path { display: flex; flex-direction: column; align-items: center; }
.path .fact { width: 100%; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px; padding: 10px 14px; position: relative; }
.path .fact.new { background: var(--bad-wash); border-color: var(--bad); }
.path .fact.new::after { content: "New"; position: absolute; top: 10px; right: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--surface); background: var(--bad); padding: 2px 8px; border-radius: 999px; }
.path .fact small { display: block; color: var(--muted); font-size: 13px; }
.path .fact b { font-size: 21px; font-family: var(--mono); font-weight: 600; letter-spacing: -0.02em; }
.edge { height: 30px; width: 4px; position: relative; }
.edge svg { display: block; width: 4px; height: 30px; }
.edge line { stroke: var(--bad); stroke-width: 4; stroke-dasharray: 1; }
.tick { width: 0.85em; height: 0.85em; margin-right: 0.3em; vertical-align: -0.06em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tick path { stroke-dasharray: 1; }
.stamp { display: block; }
.edge i { position: absolute; left: 12px; top: 5px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.path .entity { background: var(--ink); color: var(--base); font-weight: 600; font-size: 17px; padding: 9px 26px; border-radius: 999px; }
.proof-foot { color: var(--muted); font-size: 14px; margin-top: var(--s3); }

.story { grid-column: 1 / -1; list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.story li { padding: var(--s3) var(--s4) 0 0; color: var(--muted); font-size: 16px; }
.story li + li { padding-left: var(--s4); border-left: 1px solid var(--rule); }
.story li > span { display: block; color: var(--muted); margin-bottom: var(--s5); }
.story li > span::before { content: "0"; }
.story strong { display: block; color: var(--ink); font-size: 22px; letter-spacing: -0.025em; font-weight: 600; margin-bottom: var(--s1); }

.explorer-head { padding: var(--s7) 0 var(--s4); scroll-margin-top: 0; }
.explorer-head h2, .console-head h2 { font-size: clamp(32px, 4.2vw, 64px); letter-spacing: -0.045em; line-height: 1; font-weight: 600; }
.explorer-head p { color: var(--muted); font-size: 17px; margin-top: var(--s3); max-width: 46em; }

.views { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-bottom: var(--s4); }
.views button { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); padding: var(--s3) var(--s3) var(--s4); text-align: left; min-width: 0; background: none; border: 0; border-left: 1px solid var(--rule); transition: background 0.15s; }
.views button:first-child { border-left: 0; }
.views button:hover { background: var(--faint); }
.views button strong { font-size: 19px; letter-spacing: -0.025em; font-weight: 600; text-transform: capitalize; margin-top: var(--s3); }
.views button small { color: var(--muted); font-size: 14px; line-height: 1.35; }
.views button.on { background: var(--ink); color: var(--base); }
.views button.on small { color: #bdbab0; }
.chip-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.chip-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-state.blocked { color: var(--bad); } .chip-state.passed { color: var(--good); }
.on .chip-state.blocked { color: #ff8a75; } .on .chip-state.passed { color: #6fd6a4; } .on .chip-state.base { color: #bdbab0; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s4); align-items: start; }
.pane { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; }
.graph-pane { position: relative; display: flex; flex-direction: column; min-width: 0; }
.graph-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s3); padding: 10px var(--s3); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s1) 14px; color: var(--muted); font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 13px; height: 11px; border-radius: 2px; display: inline-block; border: 1.5px solid var(--ink); background: var(--surface); }
.key.old { border-color: #a19e94; border-style: dashed; }
.key.entity { background: var(--ink); border-radius: 50%; width: 12px; height: 12px; }
.key.agent { border-radius: 50%; width: 12px; height: 12px; border-color: var(--muted); }
.key.source { border-color: var(--muted); background: var(--faint); }
.key.line { height: 0; width: 18px; border-width: 2px 0 0; border-radius: 0; background: none; }
.key.supersedes { border-style: dashed; }
.key.added { border-color: var(--good); border-width: 2.5px; }
.key.removed { border-color: var(--bad); border-style: dashed; }
.graph-tools { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 11px; }
.graph-tools label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--ink); }
.graph-tools button, .console-actions button, .examples button, .examples select, .actions button {
  background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-family: var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); transition: background 0.15s, color 0.15s; }
.graph-tools button:hover, .console-actions button:hover, .examples button:hover, .actions button:hover { background: var(--ink); color: var(--base); }
.cy-wrap { position: relative; }
.cy-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px 22px var(--surface); }
.cy { height: clamp(460px, 68vh, 780px); width: 100%; touch-action: none; }
.graph-note { padding: 10px var(--s3); color: var(--muted); border-top: 1px solid var(--rule); font-size: 11px; }

.side { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.card { padding: var(--s4); position: relative; }
.card h2 { font-size: 24px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; margin-bottom: var(--s2); overflow-wrap: anywhere; }
.card h3 { color: var(--muted); margin: var(--s4) 0 var(--s2); }
.card p { color: var(--muted); }
.card .meta { font-size: 15px; }
.card .meta strong { color: var(--ink); }
.verdict { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; padding: 0 0 var(--s3); margin-bottom: var(--s3); border-bottom: 1px solid var(--rule); }
.verdict::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.verdict.blocked, .tag.blocked { color: var(--bad); }
.verdict.passed, .tag.passed { color: var(--good); }
.delta { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s3) 0 var(--s1); font-family: var(--mono); font-size: 13px; }
.delta .plus { color: var(--good); } .delta .minus { color: var(--bad); }
.ok { margin-top: var(--s3); color: var(--good) !important; }
.live { margin-top: var(--s3); font-size: 14px; color: var(--good) !important; padding: var(--s2) 0 0; border-top: 1px solid var(--rule); }
.live::before { content: "✓ "; }
.live.edited { color: var(--bad) !important; }
.live.edited::before { content: ""; }

.problems { list-style: none; counter-reset: p; padding: 0; margin: var(--s3) 0 0; display: flex; flex-direction: column; gap: var(--s2); }
.problem { counter-increment: p; border: 1px solid var(--rule); border-left: 3px solid var(--bad); border-radius: 4px; padding: 12px 14px; background: var(--base); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.problem:hover { border-color: var(--bad); }
.problem.warn { border-left-color: var(--muted); }
.problem.on { border-color: var(--bad); background: var(--bad-wash); }
.card a, .foot a { text-decoration-thickness: 2px; }
.problem h4 { font-size: 16px; letter-spacing: -0.015em; font-weight: 600; margin-bottom: var(--s1); }
.problem h4::before { content: counter(p) ". "; color: var(--muted); }
.problem h4 em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; }
.problem p { font-variant-ligatures: none; font-size: 14px; overflow-wrap: anywhere; color: var(--ink); }
.problem code { background: #0000000d; }
.problem .fix { color: var(--muted); margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.pulls { display: flex; flex-direction: column; }
.pull { text-align: left; display: flex; flex-direction: column; gap: 2px; background: none; border: 0; border-top: 1px solid var(--rule); padding: 12px 0; transition: padding 0.15s; }
.pull:hover { padding-left: var(--s2); }
.pull span:last-child { font-size: 14px; color: var(--muted); }
.tag { align-self: flex-start; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

details { margin-top: var(--s3); }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
pre { background: var(--base); border: 1px solid var(--rule); border-radius: 4px; padding: 12px; font-size: 12.5px; overflow: auto; max-height: 300px; white-space: pre-wrap; overflow-wrap: anywhere; margin: var(--s2) 0 0; }
.kind { color: var(--muted) !important; }
.tags { margin-bottom: var(--s2); }
.close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 22px; color: var(--muted); line-height: 1; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--s3); margin: var(--s2) 0 0; font-size: 14px; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.chip { background: var(--faint); border: 1px solid var(--rule); border-radius: 3px; padding: 1px 7px; font-family: var(--mono); font-size: 12.5px; margin: 1px 0; text-align: left; overflow-wrap: anywhere; }
.chip:hover { border-color: var(--ink); }
.state { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; color: var(--muted); }
.state.added, .state.current { color: var(--good); }
.state.removed { color: var(--bad); }
.state.changed { color: var(--ink); }

.console { grid-column: 1 / -1; padding: var(--s7) 0 0; min-width: 0; scroll-margin-top: 0; background: none; border: 0; border-radius: 0; }
.console-head { margin-bottom: var(--s4); padding-bottom: var(--s4); border-bottom: 1px solid var(--ink); }
.console-head .eyebrow { margin-bottom: var(--s3); }
.console-head h2 { margin-bottom: var(--s3); }
.target { color: var(--muted); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.examples select { max-width: 100%; }
textarea { width: 100%; background: var(--ink); color: #f2f0e9; border: 0; border-radius: 4px; padding: var(--s3); font-size: 14.5px; line-height: 1.55; resize: vertical; }
.console-actions { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }
.console-actions .primary { background: var(--ink); color: var(--base); padding: 8px 30px; font-weight: 500; }
.console-actions .primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.timing { color: var(--muted); }
.result { margin-top: var(--s3); }
.result .note { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.table { overflow-x: auto; border-top: 1px solid var(--ink); max-height: 380px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { position: sticky; top: 0; background: var(--base); color: var(--muted); font-size: 11px; }
td { font-family: var(--mono); font-size: 13px; }
.null { color: #a19e94; } .rel { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.error { color: var(--bad); border-color: var(--bad); }
.foot { color: var(--muted); padding: var(--s5) 0 var(--s4); margin-top: var(--s7); border-top: 1px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s5); font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.foot-about p { margin-top: var(--s3); max-width: 34em; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); align-content: start; }
.foot-links a { padding: 12px 0; border-top: 1px solid var(--rule); text-decoration: none; display: flex; justify-content: space-between; gap: var(--s2); }
.foot-links a::after { content: ""; width: 7px; height: 7px; border: solid var(--ink); border-width: 1.5px 1.5px 0 0; align-self: center; transition: transform 0.2s; }
.foot-links a:hover::after { transform: translate(3px, -3px); }

/* Motion. Every animation only has a "from" state and lives inside this query, so with
   reduced motion, or if a script fails, the content is simply there. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes up { from { transform: translateY(108%); } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  @keyframes pop { from { opacity: 0; transform: scale(0.6); } }
  @keyframes stamp { 0% { opacity: 0; transform: scale(1.3) rotate(-5deg); } 60% { opacity: 1; transform: scale(0.96) rotate(0deg); } 100% { transform: none; } }
  @keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
  .hero h1 .line > span { animation: up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero h1 .line:nth-child(2) > span { animation-delay: 0.09s; }
  .eyebrow, .lede, .cta, .top { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .top { animation-name: fade; } .lede { animation-delay: 0.3s; } .cta { animation-delay: 0.42s; }
  .field { animation: fade 1.6s 0.3s both; }
  /* The proof card plays the story: git says clean, the facts arrive, the path draws, the review blocks. */
  .proof { animation: rise 0.7s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .proof .check.git strong { animation: fade 0.4s 0.8s both; }
  .proof .tick path { animation: draw 0.45s 0.95s ease-out both; }
  .proof .fact.new { animation: rise 0.5s 1.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .proof .fact.new::after { animation: pop 0.35s 1.85s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  .proof .fact:not(.new) { animation: rise 0.5s 1.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .proof .edge:nth-of-type(2) line { animation: draw 0.4s 2.2s ease-in both; }
  .proof .edge i { animation: fade 0.3s 2.5s both; }
  .proof .entity { animation: pop 0.4s 2.55s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  .proof .edge:nth-of-type(4) line { animation: draw 0.4s 2.8s ease-out both; }
  .proof .stamp { animation: stamp 0.5s 3.3s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  .proof .path { animation: shake 0.3s 3.45s; }
  .proof .proof-foot { animation: fade 0.5s 3.7s both; }
  .proof.still, .proof.still * , .proof.still *::after { animation: none !important; }
  .story li { animation: rise 0.6s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .story li:nth-child(2) { animation-delay: 0.72s; } .story li:nth-child(3) { animation-delay: 0.84s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* The measured result and how it works. */
.measured { padding: var(--s6) 0 0; }
.figures { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.figures li { padding: var(--s3) var(--s4) 0 0; display: flex; flex-direction: column; gap: var(--s1); }
.figures li + li { padding-left: var(--s4); border-left: 1px solid var(--rule); }
.figures b { font-size: clamp(56px, 7vw, 112px); line-height: 0.9; letter-spacing: -0.06em; font-weight: 600; font-variant-numeric: tabular-nums; margin: var(--s3) 0 var(--s2) -0.04em; }
.figures strong { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.figures small { color: var(--muted); }
.how { padding: var(--s6) 0 0; }
.flow { list-style: none; margin: 0; padding: var(--s3) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.flow li { position: relative; padding: var(--s5) var(--s4) 0 0; display: flex; flex-direction: column; gap: var(--s1); color: var(--muted); font-size: 15px; }
.flow li::before { content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); z-index: 1; }
.flow li::after { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--ink); transform-origin: 0 50%; }
.flow li:last-child::after { display: none; }
.flow li:last-child::before { background: var(--base); border: 2px solid var(--ink); }
.flow b { color: var(--ink); font-size: 22px; letter-spacing: -0.025em; font-weight: 600; }
.flow i { font-style: normal; } .flow .good { color: var(--good); } .flow .bad { color: var(--bad); }
.flow .packet { position: absolute; top: calc(var(--s3) + 1px); left: 0; width: 75%; height: 0; pointer-events: none; opacity: 0; }
.flow .packet::before { content: ""; position: absolute; left: -5px; top: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }

/* Scenario cards: a sliding marker and a highlight that follows the pointer. */
.views { position: relative; }
.views button { position: relative; overflow: hidden; }
.views button::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(180px circle at var(--px, 50%) var(--py, 50%), #1f3fff1f, transparent 70%); }
.views button:hover::before { opacity: 1; }
.views button:hover { background: none; }
.views button.on:hover { background: var(--ink); }
.views button:active { transform: scale(0.985); }
.marker { position: absolute; top: 0; left: 0; width: 100px; height: 4px; background: var(--accent); transform-origin: 0 0; pointer-events: none; transition: transform 0.45s cubic-bezier(0.3, 0.9, 0.3, 1); }
.btn, .graph-tools button, .console-actions button, .examples button, .actions button { transition: background 0.15s, color 0.15s, transform 0.15s; }
.btn { background: var(--base); }
.btn:active, .graph-tools button:active, .console-actions button:active, .examples button:active, .actions button:active { transform: scale(0.96); }
.card a, .foot-about p a, .explorer-head a { text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1.5px no-repeat; transition: background-size 0.25s; }
.card a:hover, .foot-about p a:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* The graph on touch screens, the query progress line and the row highlight. */
.touch { position: absolute; inset: 0; touch-action: pan-y; z-index: 2; }
.progress { height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; margin-top: -2px; position: relative; }
.console.running .progress { transform: scaleX(0.85); transition: transform 0.18s ease-out; }
.console.done .progress { transform: scaleX(1); opacity: 0; transition: transform 0.12s, opacity 0.4s 0.12s; }
#views { min-height: 120px; } #review { min-height: 380px; } #legend { min-height: 18px; } #examples { min-height: 34px; } #graph-note { min-height: 38px; } #target { min-height: 18px; }
.engine { min-width: 21em; text-align: right; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes flash { from { background: #1f3fff26; } }
  @keyframes sheet { from { transform: translateY(100%); } }
  @keyframes line { from { transform: scaleX(0); } }
  @keyframes travel { 0% { transform: translateX(0); opacity: 0; } 8%, 92% { opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
  .reveal-on [data-reveal] { transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
  .reveal-on [data-reveal]:not(.in) { opacity: 0; transform: translateY(28px); }
  .reveal-on .in .figures li, .reveal-on .in .flow li { animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .reveal-on .in :is(.figures, .flow) li:nth-child(2) { animation-delay: 0.12s; } .reveal-on .in :is(.figures, .flow) li:nth-child(3) { animation-delay: 0.24s; }
  .reveal-on .in :is(.figures, .flow) li:nth-child(4) { animation-delay: 0.36s; }
  .reveal-on .in .flow li::after { animation: line 0.6s 0.3s ease-in-out both; }
  .reveal-on .in .flow li:nth-child(2)::after { animation-delay: 0.5s; } .reveal-on .in .flow li:nth-child(3)::after { animation-delay: 0.7s; }
  .reveal-on .in .flow .packet { animation: travel 4.5s 1.4s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
  .swap .verdict { animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .swap .verdict::before { animation: pop 0.4s 0.15s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  .swap .problem { animation: rise 0.45s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .swap .problem:nth-child(2) { animation-delay: 0.2s; } .swap .problem:nth-child(3) { animation-delay: 0.28s; }
  .console.done .result { animation: rise 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .console.done tbody tr { animation: flash 1.1s ease-out both; }
  .console.done tbody tr:nth-child(2) { animation-delay: 0.05s; } .console.done tbody tr:nth-child(3) { animation-delay: 0.1s; }
  .console.done tbody tr:nth-child(n + 4) { animation-delay: 0.15s; }
  #detail:not([hidden]) { animation: rise 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .btn.primary { will-change: transform; }
}

/* Write a memory: the form, the note it becomes, the review. */
.write { padding: var(--s5) 0 0; }
.write-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s3) var(--s6); align-items: end; padding-bottom: var(--s3); border-bottom: 1px solid var(--ink); }
.write-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.write-head h2 { font-size: clamp(30px, 3.4vw, 54px); letter-spacing: -0.045em; line-height: 1; font-weight: 600; }
.write-head > p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.write-head strong { color: var(--ink); font-weight: 600; }
.starters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); min-height: 44px; }
.starters button, .chip-pick, .mine-item, .mine-reset, .tabs button { background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 9px 16px; font-size: 14.5px; transition: background 0.15s, color 0.15s, transform 0.15s; }
.starters button::before { content: "+ "; color: var(--accent); font-weight: 600; }
.starters button:hover, .chip-pick:hover, .mine-item:hover:not(:disabled), .mine-reset:hover { background: var(--ink); color: var(--base); }
.starters button:hover::before { color: inherit; }
.starters button:active, .chip-pick:active, .tabs button:active { transform: scale(0.96); }
.write-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr) minmax(0, 1fr); border-bottom: 1px solid var(--ink); }
.write-grid > * { padding: var(--s3) var(--s4); min-width: 0; }
.write-grid > * + * { border-left: 1px solid var(--rule); }
.draft { padding-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px var(--s3); align-content: start; }
.draft .wide { grid-column: 1 / -1; }
.fld-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 24px; }
.fld-top .chip-pick { padding: 2px 9px; font-size: 11.5px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > label, .fld > .label { min-height: 24px; display: flex; align-items: center; }
.fld label, .fld .label, .mine .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.draft input, .draft select { font: inherit; font-family: var(--mono); font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-bottom-color: var(--ink); border-radius: 4px 4px 0 0; padding: 9px 12px; width: 100%; min-height: 42px; transition: border-color 0.15s, background 0.15s; }
.draft input:hover, .draft select:hover { border-color: var(--ink); }
.draft input:focus-visible, .draft select:focus-visible { outline: 0; border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.draft input:disabled { color: var(--muted); background: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-pick { padding: 5px 11px; font-size: 12.5px; font-family: var(--mono); border-color: var(--rule); }
.chip-pick.on { background: var(--ink); color: var(--base); border-color: var(--ink); }
.quiet, .also { color: var(--muted); font-size: 14px; }
.draft-actions { display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s1); }
.draft-actions .btn { padding: 11px 20px; font-size: 15px; cursor: pointer; }
.btn[aria-disabled="true"] { opacity: 0.6; }
.btn.loading::after { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.6em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -0.1em; }
.note-pane { display: flex; flex-direction: column; background: var(--surface); }
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: var(--s3); flex-wrap: wrap; }
.tabs button { padding: 6px 14px; font-size: 13.5px; border-color: var(--rule); }
.tabs button.on { background: var(--ink); color: var(--base); border-color: var(--ink); }
.note-path { margin-left: auto; background: none; color: var(--muted); font-size: 12px; padding: 0; }
.md-note { flex: 1; margin: 0; background: var(--ink); color: #f2f0e9; border: 0; padding: var(--s3); font-size: 13px; line-height: 1.55; max-height: none; min-height: 300px; }
.md-note.empty { background: none; color: var(--muted); border: 1px dashed #a19e94; }
.md-note.empty b { display: block; font-family: var(--sans); font-weight: 500; font-size: 15px; color: var(--ink); margin-bottom: var(--s3); white-space: normal; }
.mini { flex: 1; min-height: 300px; border: 1px solid var(--rule); border-radius: 4px; background: var(--base); }
.outcome { display: flex; flex-direction: column; gap: var(--s3); padding-right: 0; }
.outcome-empty { color: var(--muted); font-size: 15px; border: 1px dashed var(--rule); border-radius: 4px; padding: var(--s4); margin: auto 0; }
.stampbox { border: 2px solid currentColor; border-radius: 6px; padding: var(--s3) var(--s4); display: flex; flex-direction: column; transform-origin: 30% 50%; }
.stampbox strong { font-size: clamp(30px, 3.1vw, 46px); line-height: 1; letter-spacing: -0.045em; font-weight: 600; }
.stampbox span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }
.stampbox.blocked { color: var(--bad); background: var(--bad-wash); }
.stampbox.passed { color: var(--good); background: var(--good-wash); }
.adds { color: var(--muted); font-size: 14.5px; }
.outcome .problems { margin: 0; }
.outcome .problem { cursor: default; background: var(--surface); }
.outcome-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; }
.outcome-actions .btn { padding: 11px 18px; font-size: 15px; cursor: pointer; }
.mine { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding-top: var(--s3); min-height: 20px; }
.mine-item { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; font-size: 13.5px; border-color: var(--rule); }
.mine-item.on { border-color: var(--ink); }
.mine-item:disabled { opacity: 0.7; cursor: default; }
.mine-reset { margin-left: auto; padding: 6px 14px; font-size: 13.5px; }
.hint { color: var(--muted); font-size: 15px; margin-bottom: var(--s3); }
.hint strong { color: var(--ink); }
.examples .write-preset { border-style: dashed; }
.examples .write-preset::before { content: "+ "; color: var(--accent); font-weight: 600; }
.card .actions { margin-top: var(--s3); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes spin { to { transform: rotate(360deg); } }
  .btn.loading::after { animation: spin 0.8s linear infinite; }
  .outcome.play .stampbox { animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  .outcome.play .adds, .outcome.play .problem, .outcome.play .outcome-actions { animation: rise 0.45s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .outcome.play .problem:nth-child(2) { animation-delay: 0.38s; } .outcome.play .problem:nth-child(3) { animation-delay: 0.46s; }
  .outcome.play .outcome-actions { animation-delay: 0.5s; }
}
@media (max-width: 1240px) {
  .write-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .outcome { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--rule); padding-left: 0; }
  .outcome .problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 760px) {
  .write-head, .write-grid { grid-template-columns: minmax(0, 1fr); }
  .write-grid > * { padding-inline: 0; }
  .write-grid > * + * { border-left: 0; border-top: 1px solid var(--rule); }
  .note-pane { background: none; }
  .md-note, .mini { min-height: 280px; }
  .starters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * clamp(16px, 3.2vw, 56px)); padding-inline: clamp(16px, 3.2vw, 56px); }
  .starters button { flex: none; }
  .draft-actions .btn, .outcome-actions .btn { flex: 1 1 auto; }
  .mine-reset { margin-left: 0; }
}

/* Layouts. Wide, laptop, tablet, phone. Type and spacing are fluid in between. */
body { padding-inline: clamp(16px, 3.2vw, 56px); max-width: 1760px; }
.field { inset: 0 calc(-1 * clamp(16px, 3.2vw, 56px)); width: calc(100% + 2 * clamp(16px, 3.2vw, 56px)); }
.layout { grid-template-columns: minmax(0, 1fr) clamp(340px, 29vw, 480px); }
.cy { height: clamp(480px, 70vh, 860px); }
@media (max-width: 1240px) {
  .views { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .views button:nth-child(4) { border-left: 0; } .views button:nth-child(n + 4) { border-top: 1px solid var(--rule); }
  .hero { gap: var(--s5); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .hero h1 { font-size: clamp(40px, 6.6vw, 124px); }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: var(--s5); }
  .proof { max-width: 620px; }
  .hero h1 { font-size: clamp(40px, 10.5vw, 96px); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: grid; grid-template-columns: minmax(0, 1fr); }
  .problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .cy { height: clamp(420px, 62vh, 640px); }
  .figures, .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s5); }
  .figures li:nth-child(3), .flow li:nth-child(3) { padding-left: 0; border-left: 0; }
  .flow li:nth-child(2)::after, .flow .packet { display: none; }
  .explorer-head, .console { padding-top: var(--s6); }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .engine { min-width: 0; }
  /* A tapped node opens as a sheet from the bottom edge, in reach of the thumb. */
  #detail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 62vh; overflow: auto; border-radius: 14px 14px 0 0; border: 0; border-top: 1px solid var(--ink); box-shadow: 0 -18px 50px #14141226; padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  #detail:not([hidden]) { animation-name: sheet; }
  #detail .close { width: 44px; height: 44px; top: 4px; right: 4px; font-size: 26px; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .top { height: 52px; }
  .gh { display: none; }
  .engine { font-size: 10.5px; }
  .story { grid-template-columns: minmax(0, 1fr); }
  .story li, .story li + li { padding: var(--s3) 0; border-left: 0; border-top: 1px solid var(--rule); }
  .story li:first-child { border-top: 0; }
  .story li > span { margin-bottom: var(--s2); }
  .btn { flex: 1 1 100%; text-align: center; }
  .figures li { padding-right: var(--s3); } .figures li + li { padding-left: var(--s3); }
  .figures li:nth-child(3) { padding-left: 0; }
  .figures strong { font-size: 15px; }
  .flow { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .flow li, .flow li:nth-child(3) { padding: 0 0 var(--s4) var(--s5); }
  .flow li::after { top: 0; bottom: 0; left: 6px; right: auto; width: 1px; height: auto; transform-origin: 50% 0; display: block !important; }
  .flow li:last-child::after { display: none !important; }
  .flow b { line-height: 1; margin-top: -3px; }
  /* The scenarios become one row to swipe, each card snapping into place. */
  .views { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * clamp(16px, 3.2vw, 56px)); padding-inline: clamp(16px, 3.2vw, 56px); scroll-padding-inline: clamp(16px, 3.2vw, 56px); -webkit-overflow-scrolling: touch; }
  .views::-webkit-scrollbar { display: none; }
  .views button, .views button:nth-child(n + 4) { flex: 0 0 72%; max-width: 280px; scroll-snap-align: start; border: 0; border-left: 1px solid var(--rule); }
  .views button:first-child { border-left: 0; }
  .marker { display: none; }
  .views button.on { box-shadow: inset 0 4px 0 var(--accent); }
  .cy { height: min(72svh, 620px); min-height: 400px; }
  .legend { font-size: 10px; gap: 2px 10px; }
  .graph-tools button, .console-actions button, .examples button, .examples select, .actions button { min-height: 44px; padding-inline: 16px; }
  .examples { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * clamp(16px, 3.2vw, 56px)); padding-inline: clamp(16px, 3.2vw, 56px); }
  .examples > * { flex: none; }
  .problem { padding: 14px; }
  .foot-links { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1700px) {
  .hero { padding-top: var(--s7); }
  .hero h1 { font-size: 132px; }
}
/* Nothing may widen the page: the travelling dot and the swipe rows are clipped at its edge. */
html, body { overflow-x: clip; }
.flow { overflow-x: clip; }
[hidden] { display: none !important; }
