/* Tally — The Ladder Diagram.
   Two lifelines run the full page: Agent (mint, left) and API (pale mint, right).
   Every section is a rung; colour encodes direction (source lifeline's colour). */

:root {
  /* Tally Labs: deep forest road, mint lanes, one lime lane for the money */
  --paper: #0e2a22;
  --paper-2: #123328;
  --surface: #163d30;
  --surface-2: #1c4a3a;
  --ink: #f3f7ef;
  --ink-2: #cfe6d9;
  --ink-3: #8fb5a4;
  --rule: #2a5a48;
  --rule-2: #234b3d;
  --agent: #8fd9b4;
  --agent-ink: #b3ead0;
  --agent-soft: rgba(143, 217, 180, .18);
  --api: #d6efe3;
  --api-ink: #e8f7ef;
  --api-soft: rgba(214, 239, 227, .16);
  --lime: #c8f542;
  --lime-ink: #0e2a22;
  --ok: #c8f542;
  --ok-soft: rgba(200, 245, 66, .14);
  --bad: #ff6b8a;
  --bad-soft: rgba(255, 107, 138, .16);
  --lane: 28px;    /* lane inset from the sheet edge */
  --gutter: 84px;  /* content inset from the sheet edge */
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Figtree', system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 14px;
  color-scheme: dark;
  scrollbar-color: var(--ink-3) var(--paper);
  scrollbar-width: thin;
}
@media (max-width: 720px) {
  :root { --lane: 14px; --gutter: 36px; }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body { overflow-x: clip; }
.body > *, .two-notes > *, .doors > *, .docs > *, .netgrid > *, .kv { min-width: 0; }
p code, dd code, li code { overflow-wrap: anywhere; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--lime);
}
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; font-family: var(--display); }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; }
.lime { color: var(--lime); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
code, pre, .mono { font-family: var(--mono); font-size: .82em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.hidden { display: none !important; }

/* ---------- the sheet with two lifelines ---------- */
.sheet { position: relative; max-width: 1240px; margin: 0 auto; min-height: 100vh; }
.sheet::before, .sheet::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 3px; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--c) 0 12px, transparent 12px 20px);
}
.sheet::before { left: calc(var(--lane) - 1px); --c: var(--agent); bottom: 28px; }
.sheet::after  { right: calc(var(--lane) - 1px); --c: var(--api); bottom: 28px; }
.wrap { position: relative; padding: 0 var(--gutter); }

/* actors sit at the top of their lifelines */
.actors { position: sticky; top: 0; z-index: 20; background: rgba(14, 42, 34, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule-2); }
.actors .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.actor {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: 9px 12px; border: 1.5px solid; background: var(--paper); white-space: nowrap; border-radius: 999px;
}
.actor.agent { left: var(--lane); color: var(--agent-ink); border-color: var(--agent); }
.actor.api { left: auto; right: var(--lane); transform: translate(50%, -50%); color: var(--api-ink); border-color: var(--api); }
@media (max-width: 720px) {
  .actor { font-size: 9px; padding: 6px 6px; letter-spacing: .08em; transform: translate(0, -50%); left: calc(var(--lane) - 1px); }
  .actor.api { transform: translate(0, -50%); right: calc(var(--lane) - 1px); }
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.15rem var(--display); letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; border-radius: 8px; }
.brand span { text-transform: lowercase; letter-spacing: -0.03em; }
.brand em { font: 700 .66rem var(--mono); font-style: normal; letter-spacing: .2em; color: var(--lime); margin-left: -2px; align-self: center; line-height: 1; position: relative; top: 1px; }
.actors nav { margin-left: auto; display: flex; gap: 2px; }
.actors nav a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; font-size: 1rem; font-weight: 500; border-bottom: 2px solid transparent; }
.actors nav a:hover { color: var(--ink); }
.actors nav a[aria-current] { color: var(--ink); border-bottom-color: var(--lime); }
.actors nav .nav-x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: 8px; padding: 0; border: 1.5px solid var(--agent); border-radius: 999px; color: var(--ink); }
.actors nav .nav-x:hover { background: var(--agent); color: var(--lime-ink); }
.actors nav .nav-x[hidden] { display: none; }
@media (max-width: 720px) {
  .actors .wrap { gap: 8px; padding-left: 68px; padding-right: 68px; }
  .actors nav a { padding: 6px 5px; font-size: .85rem; }
  .actors nav .nav-x { width: 28px; height: 28px; margin-left: 4px; }
}
/* narrow phones: keep Demo · Docs · X; Status and Token stay in the footer and on the page */
@media (max-width: 480px) {
  .actors nav a[href="/status"], .actors nav a[href="/token"] { display: none; }
  .actors nav .nav-x { margin-left: 2px; }
  .brand span, .brand em { display: none; }
}

/* ---------- rungs ---------- */
.rung { position: relative; padding: 0 var(--gutter); margin-bottom: 64px; }
.rung .msg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 10px; }
.rung .msg code { font-size: 1rem; font-weight: 600; color: inherit; }
.rung .msg span { color: var(--ink-2); font-size: 1rem; }
.rung .line {
  position: relative; height: 2px; background: currentColor;
  margin: 0 calc(var(--lane) - var(--gutter));
  transform-origin: left center;
}
.rung .line::after {
  content: ''; position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  width: 13px; height: 14px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.rung.to-api { color: var(--agent); }
.rung.to-agent { color: var(--api); }
.rung.to-agent .msg code { color: var(--api-ink); }
.rung.to-agent .line { transform-origin: right center; }
.rung.to-agent .line::after { right: auto; left: 0; clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.rung .body { color: var(--ink); margin-top: 18px; }
.rung.to-agent .body, .rung.to-api .body { display: grid; gap: 18px; }
@media (min-width: 900px) { .rung .body.two { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }

/* calls into Tally: the API (right lifeline) calls the centre activation bar and gets answers back */
.rung.tally .msg { justify-content: center; margin-bottom: 54px; }
.rung.tally .calls { position: relative; display: grid; gap: 14px; padding: 10px 0; }
.rung.tally .calls::before {
  content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 12px; transform: translateX(-50%); background: var(--ink);
}
.rung.tally .calls::after {
  content: 'TALLY'; position: absolute; top: -38px; left: 50%; transform: translateX(-50%);
  font: 700 10px/1 var(--mono); letter-spacing: .14em; color: var(--ink); background: var(--paper); padding: 5px 7px; border: 2px solid var(--ink);
}
.call { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-items: center; min-height: 44px; }
.call .aside { text-align: right; font-size: .875rem; color: var(--ink-2); padding-right: 14px; max-width: 34ch; justify-self: end; }
.call .wire-msg { position: relative; padding: 4px 0; min-width: 0; }
.call .wire-msg code { position: relative; z-index: 1; display: inline-block; background: var(--paper); padding: 2px 8px; margin-left: 20px; font-weight: 600; font-size: .875rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call .wire-msg::after { content: ''; position: absolute; top: 50%; left: -13px; right: calc(var(--lane) - var(--gutter)); height: 2px; }
.call .wire-msg::before { content: ''; position: absolute; top: 50%; transform: translateY(-50%); width: 11px; height: 12px; z-index: 1; }
.call.req .wire-msg code { color: var(--api-ink); }
.call.req .wire-msg::after { background: var(--api); }
.call.req .wire-msg::before { left: -7px; background: var(--api); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.call.res .wire-msg code { color: var(--ink); }
.call.res .wire-msg::after { background: repeating-linear-gradient(to right, var(--ink) 0 8px, transparent 8px 14px); }
.call.res .wire-msg::before { right: calc(var(--lane) - var(--gutter) - 1px); background: var(--ink); clip-path: polygon(0 0, 100% 50%, 0 100%); }
@media (max-width: 720px) {
  .rung.tally .calls::before { left: 0; transform: none; width: 8px; }
  .rung.tally .calls::after { left: 0; transform: none; }
  .call { grid-template-columns: 1fr; gap: 4px; }
  .call .aside { text-align: left; justify-self: start; padding: 0 0 0 20px; order: 2; }
  .call .wire-msg::after { left: 8px; }
  .call.req .wire-msg::before { left: 8px; }
}

/* the settlement: one thick transfer, agent → merchant */
.rung.money { color: var(--lime); }
.rung.money .line { height: 8px; }
.rung.money .line::after { width: 22px; height: 26px; }
.rung.money .amount {
  font: 800 clamp(2rem, 5vw, 3.6rem)/1 var(--sans); letter-spacing: -0.03em; color: var(--ink);
  font-variant-numeric: tabular-nums; margin-bottom: 14px;
}
.rung.money .amount small { font-size: .45em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-left: .35em; }

/* notes: the sequence-diagram note box, tethered to a lifeline */
.note {
  position: relative; border: 1.5px solid var(--rule); background: var(--surface); padding: 22px 24px; border-radius: var(--r);
}
.note::after { content: none; }
.note.agent { border-color: var(--agent); }

.note.api { border-color: var(--api); }

.tether { position: relative; min-width: 0; }
.tether > .note { height: 100%; }
.tether::before { content: ''; position: absolute; top: 50%; height: 2px; width: calc(var(--gutter) - var(--lane) + 4px); z-index: 0; }
.tether.agent::before { right: 100%; background: repeating-linear-gradient(to right, var(--agent) 0 6px, transparent 6px 11px); }
.tether.api::before { left: 100%; background: repeating-linear-gradient(to right, var(--api) 0 6px, transparent 6px 11px); }
.note-over {
  margin: 0 calc(var(--lane) - var(--gutter)); padding: 28px var(--gutter);
  border-top: 2px dashed var(--ink-3); border-bottom: 2px dashed var(--ink-3); background: var(--paper-2);
}

/* doors */
.doors { display: grid; gap: 22px; margin-top: 44px; }
@media (min-width: 820px) { .doors { grid-template-columns: 1fr 1fr; gap: 40px; } }
.door { display: block; text-decoration: none; transition: background .2s var(--ease), transform .3s var(--ease); }
.door h3 { font-size: 1.35rem; }
.door p { color: var(--ink-2); margin: 8px 0 14px; font-size: 1rem; max-width: 34ch; }
.door .go { font: 600 .85rem var(--mono); letter-spacing: .02em; }
.door.agent .go { color: var(--agent-ink); }
.door.api .go { color: var(--api-ink); }
.door.agent:hover { background: var(--agent-soft); }
.door.api:hover { background: var(--api-soft); }
.door:hover { transform: translateY(-2px); }

/* wire messages (HTTP on the wire) */
.wire { border: 1.5px solid var(--rule); background: #0a1f19; padding: 14px 16px; overflow-x: auto; border-radius: 12px; }
.wire pre { margin: 0; font-size: .8rem; line-height: 1.65; }
.wire .h { color: var(--ink-3); }
.wire .k { color: var(--agent-ink); }
.wire .a { color: var(--api-ink); }
.wire .s { color: var(--ok); }
.wire .c { color: var(--ink-3); font-style: italic; }
.rung.to-agent .wire { border-color: var(--api); }
.rung.to-api .wire { border-color: var(--agent); }
.body p.why { color: var(--ink-2); font-size: 1rem; max-width: 46ch; }
.body p.why b { color: var(--ink); font-weight: 650; }

/* code notes */
.code-note { border: 1.5px solid var(--rule); background: #0a1f19; min-width: 0; border-radius: var(--r); overflow: hidden; }
.code-note.agent { border-color: var(--agent); }
.code-note.api { border-color: var(--api); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-bottom: 2px solid inherit; font: 600 .78rem var(--mono); }
.code-note.agent .code-head { border-bottom: 2px solid var(--agent); color: var(--agent-ink); }
.code-note.api .code-head { border-bottom: 2px solid var(--api); color: var(--api-ink); }
.code-note pre { margin: 0; padding: 16px; overflow-x: auto; font-size: .78rem; line-height: 1.65; color: var(--ink); }
.code-note .k { color: var(--agent-ink); }
.code-note .s { color: var(--api-ink); }
.code-note .c { color: var(--ink-3); }
.two-notes { display: grid; gap: 28px; }
@media (min-width: 960px) { .two-notes { grid-template-columns: 1fr 1fr; } }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 650 1rem var(--sans); text-decoration: none; cursor: pointer; border-radius: 2px;
  transition: transform .15s var(--ease), background .2s, color .2s;
}
.btn:hover { background: #daf76e; border-color: #daf76e; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--agent); }
.btn.ghost:hover { background: var(--agent-soft); border-color: var(--agent-ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.sm { height: 30px; padding: 0 12px; font-size: .78rem; }
.btn.agent { background: var(--agent); border-color: var(--agent); color: var(--lime-ink); }
.btn.agent:hover { background: var(--agent-ink); border-color: var(--agent-ink); }
.btn.api { background: var(--api); border-color: var(--api); color: var(--lime-ink); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.urlbox {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 8px 8px 8px 14px; border: 1.5px solid var(--rule); background: var(--surface); border-radius: 999px;
}
.urlbox code { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 7px; font: 600 .78rem var(--mono); padding: 3px 10px; border: 1.5px solid; border-radius: 999px; }
.pill.ok { color: var(--lime); border-color: var(--lime); background: var(--ok-soft); }
.pill.bad { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.pill.warn { color: var(--api-ink); border-color: var(--api); background: var(--api-soft); }
.pill::before { content: ''; width: 7px; height: 7px; background: currentColor; }

/* definition lists (facts, networks) */
.facts { display: grid; gap: 0 48px; margin: 0; }
@media (min-width: 820px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { padding: 18px 0; border-top: 1.5px solid var(--rule); }
.facts dt { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); font-size: 1rem; max-width: 42ch; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: .875rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }

.endpoints { margin: 0; padding: 0; list-style: none; }
.endpoints li { display: grid; grid-template-columns: 62px 1fr; gap: 16px; padding: 14px 0; border-top: 1.5px solid var(--rule); align-items: baseline; }
.endpoints .m { font: 700 .72rem var(--mono); letter-spacing: .08em; color: var(--ink-3); }
.endpoints code { font-size: 1rem; font-weight: 650; }
.endpoints p { color: var(--ink-2); font-size: 1rem; margin-top: 2px; }

/* frame divider  == label == */
.divider { display: flex; align-items: center; gap: 14px; margin: 0 calc(var(--lane) - var(--gutter)); color: var(--ink-3); font: 600 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.divider::before, .divider::after { content: ''; flex: 1; height: 2px; background: var(--ink); }

/* section heads inside the frame */
.head { margin-bottom: 26px; }
.head h2 { margin-bottom: 10px; }
.head p { color: var(--ink-2); max-width: 58ch; font-size: 1.15rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--rule); background: var(--surface); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1.5px solid var(--rule-2); vertical-align: top; }
td.mono, th { white-space: nowrap; }
th { font: 600 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td.mono { font-family: var(--mono); font-size: .78rem; }
td .to { color: var(--agent); font-weight: 700; padding: 0 4px; }

/* footer terminus: lifelines end in × */
.end { position: relative; padding: 24px 0 64px; margin-top: 40px; }
.terminus { position: absolute; bottom: 12px; font: 800 26px/1 var(--sans); line-height: 1; padding: 0 2px; }
.terminus.agent { left: var(--lane); transform: translateX(-50%); color: var(--agent); }
.terminus.api { right: var(--lane); transform: translateX(50%); color: var(--api); }
.end .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: baseline; font-size: .875rem; color: var(--ink-2); }
.end nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.end a { text-decoration: none; }
.end a:hover { text-decoration: underline; }

/* ---------- motion: rungs draw in, in protocol order ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not(.settled) .rung:not([data-state]) .line { transform: scaleX(0); transition: transform .9s var(--ease); }
  html:not(.settled) .rung:not([data-state]) .msg, html:not(.settled) .rung:not([data-state]) .body, html:not(.settled) .rung:not([data-state]) .calls { opacity: 0; transform: translateY(8px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
  html:not(.settled) .rung.in .line { transform: scaleX(1); }
  html:not(.settled) .rung.in .msg { opacity: 1; transform: none; transition-delay: .35s; }
  html:not(.settled) .rung.in .body, html:not(.settled) .rung.in .calls { opacity: 1; transform: none; transition-delay: .55s; }
}

/* ---------- demo: the executing diagram ---------- */
.rung[data-state] .line { background: repeating-linear-gradient(to right, var(--rule) 0 8px, transparent 8px 14px); }
.rung[data-state] .line::after { background: var(--rule); }
.rung[data-state] .msg code { color: var(--ink-3); }
.rung[data-state="active"] .line { background: repeating-linear-gradient(to right, currentColor 0 8px, transparent 8px 14px); background-size: 28px 2px; animation: march .5s linear infinite; }
.rung[data-state="active"] .line::after, .rung[data-state="done"] .line::after { background: currentColor; }
.rung[data-state="active"] .msg code { color: inherit; }
.rung[data-state="done"] .line { background: currentColor; }
.rung[data-state="done"] .msg code { color: inherit; }
.rung.to-agent[data-state="done"] .msg code, .rung.to-agent[data-state="active"] .msg code { color: var(--api-ink); }
.rung[data-state="error"] { color: var(--bad) !important; }
.rung[data-state="error"] .line { background: var(--bad); }
.rung[data-state="error"] .msg code { color: var(--bad); }
.rung[data-state="error"] .line::after { background: var(--bad); }
@keyframes march { to { background-position: 28px 0; } }
.rung[data-state="skipped"] { opacity: .55; }
.rung[data-state="skipped"] .mark { color: var(--ink-3); }
.rung[data-state="skipped"] .line { background: repeating-linear-gradient(to right, var(--rule) 0 3px, transparent 3px 9px); }
.rung.tally[data-state="pending"] .calls { opacity: .4; }
.rung.tally[data-state="active"] .calls::before { animation: throb 1s ease-in-out infinite; }
.rung.tally[data-state="error"] .calls::before, .rung.tally[data-state="error"] .calls::after { background: var(--bad); border-color: var(--bad); color: #fff; }
@keyframes throb { 50% { box-shadow: 0 0 0 6px var(--agent-soft); } }
.rung .detail { font-size: .875rem; color: var(--ink-2); margin-top: 10px; overflow-wrap: anywhere; }
.rung .detail code, .rung .detail b { font-weight: 600; }
.rung .detail a { color: var(--agent-ink); }
.rung .mark { font: 700 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rung[data-state="done"] .mark { color: var(--ok); }
.rung[data-state="error"] .mark { color: var(--bad); }
.rung[data-state="active"] .mark { color: var(--ink); }
.wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 1rem; color: var(--ink-2); }
.wallet b { color: var(--ink); }
.result { margin-top: 18px; padding: 16px 18px; border: 1.5px solid var(--lime); background: var(--ok-soft); font-size: 1.15rem; border-radius: 12px; }
.result.err { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.result.err a { color: inherit; }

/* ---------- docs ---------- */
.doc { max-width: 72ch; }
.doc > p, .doc li { color: var(--ink-2); }
.doc h2 { font-size: 1.55rem; margin: 64px 0 12px; padding-top: 22px; border-top: 2px solid var(--ink); scroll-margin-top: 90px; }
.doc .code-note, .doc .wire, .doc .table-wrap { margin: 18px 0; }
.doc .callout { border: 1.5px solid var(--agent); background: var(--agent-soft); padding: 12px 16px; margin: 18px 0; font-size: 1rem; border-radius: 12px; }
.toc { position: sticky; top: 84px; align-self: start; font-size: .875rem; }
.toc a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; border-left: 2px solid var(--rule-2); padding-left: 12px; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.docs { display: grid; gap: 40px; }
@media (min-width: 1000px) { .docs { grid-template-columns: 180px minmax(0, 1fr); } }
@media (max-width: 999px) { .toc { display: none; } }
.netgrid { display: grid; gap: 22px; }
@media (min-width: 820px) { .netgrid { grid-template-columns: 1fr 1fr; } }


/* ---------- graphics in the diagram's own grammar ---------- */

/* traffic on the lifelines: the dashes flow toward the API */
@media (prefers-reduced-motion: no-preference) {
  .sheet::before, .sheet::after { animation: flow 1.4s linear infinite; }
  @keyframes flow { to { background-position: 0 20px; } }
}

/* hero: headline left, the looping exchange right */
.hero-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; } }
.exchange { position: relative; border: 1.5px solid var(--rule); background: var(--surface); padding: 16px 18px 12px; border-radius: 18px; min-width: 0; box-shadow: 0 24px 60px -30px rgba(0,0,0,.7); }

.exchange-head { display: flex; justify-content: space-between; font: 600 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.exchange svg { width: 100%; height: auto; display: block; font-family: var(--mono); }
.exchange text { font-size: 11.5px; font-weight: 600; fill: var(--agent-ink); }
.exchange text.api-t { fill: var(--api-ink); }
.exchange text.ink-t { fill: var(--ink); }
.exchange .act { fill: var(--paper); stroke-width: 2; }
.exchange .act.agent { stroke: var(--agent); } .exchange .act.api { stroke: var(--api); } .exchange .act.ink { stroke: var(--ink); }
.exchange .act-t { font-size: 10px; letter-spacing: .14em; font-weight: 700; }
.exchange .act-t.agent { fill: var(--agent-ink); } .exchange .act-t.api { fill: var(--api-ink); } .exchange .act-t.ink { fill: var(--ink); }
.exchange .life { stroke-width: 2; stroke-dasharray: 8 6; }
.exchange .life.agent { stroke: var(--agent); } .exchange .life.api { stroke: var(--api); } .exchange .life.ink { stroke: var(--ink); opacity: .35; }
.exchange .activation { fill: var(--ink); transform-origin: 260px 268px; transform: scaleY(0); transition: transform .5s var(--ease) 2.4s; }
.exchange .w { fill: none; stroke-width: 2; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset .55s var(--ease) var(--d); }
.exchange .w.thick { stroke-width: 7; }
.exchange .w.dashed { stroke-dasharray: 6 5; stroke-dashoffset: 0; opacity: 0; transition: opacity .3s var(--ease) var(--d); }
.exchange .w.agent { stroke: var(--agent); } .exchange .w.api { stroke: var(--api); } .exchange .w.ink { stroke: var(--ink); }
.exchange .h { opacity: 0; transition: opacity .2s var(--ease) calc(var(--d) + .45s); }
.exchange .h.agent { fill: var(--agent); } .exchange .h.api { fill: var(--api); } .exchange .h.ink { fill: var(--ink); }
.exchange .r text { opacity: 0; transition: opacity .3s var(--ease) calc(var(--d) + .1s); }
.exchange .coin { opacity: 0; transition: transform 1s var(--ease) calc(var(--d) + .15s), opacity .2s var(--ease) var(--d); }
.exchange .coin circle { fill: var(--paper); stroke: var(--agent); stroke-width: 2.5; }
.exchange .coin text { font-size: 7px; font-weight: 700; opacity: 1; fill: var(--agent-ink); transition: none; }
.exchange.play .w { stroke-dashoffset: 0; }
.exchange.play .w.dashed, .exchange.play .h, .exchange.play .r text { opacity: 1; }
.exchange.play .activation { transform: scaleY(1); }
.exchange.play .coin { transform: translateX(364px); opacity: 1; }
.exchange:not(.play) .w, .exchange:not(.play) .h, .exchange:not(.play) .r text, .exchange:not(.play) .activation, .exchange:not(.play) .coin, .exchange:not(.play) .w.dashed { transition-delay: 0s; transition-duration: .35s; }
.exchange.static * { transition: none !important; }

/* the coin that rides the money line */
.rung.money .line { overflow: visible; }
.rung.money .coin { position: absolute; top: 50%; left: 0; width: 40px; height: 40px; transform: translate(-50%, -50%) scale(.7); transition: left 1.1s var(--ease) .7s, transform .4s var(--ease) .7s; }
.rung.money .coin svg { width: 100%; height: 100%; }
.rung.money .coin circle { fill: var(--paper); stroke: var(--lime); stroke-width: 2.5; }
.rung.money .coin circle.inner { fill: none; stroke-width: 1.5; }
.rung.money .coin text { font: 700 7.5px var(--mono); fill: var(--lime); }
html.settled .rung.money .coin, .rung.money.in .coin { left: calc(100% - 26px); transform: translate(-50%, -50%) scale(1); }

/* drawn icons on the facts */
.facts.icons div { display: grid; grid-template-columns: 34px 1fr; column-gap: 16px; }
.facts.icons dt { grid-column: 2; }
.facts.icons dd { grid-column: 2; }
.facts .ico { grid-row: 1 / span 2; width: 30px; height: 30px; fill: none; stroke: var(--lime); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.facts .ico .slash { stroke: var(--api); }
.facts .ico .dash { stroke-dasharray: 4 3; }

/* token placeholder coin */
.token-lead { display: flex; gap: 22px; align-items: flex-start; }
.token-coin { width: 84px; height: 84px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; margin-top: 4px; }
.token-coin .dash { stroke-dasharray: 6 5; }
.token-coin text { font: 700 28px var(--sans); fill: var(--ink-3); stroke: none; }
@media (max-width: 720px) { .token-lead { flex-direction: column; } }

/* demo: a packet travels the active message */
.rung[data-state="active"] .line::before {
  content: ''; position: absolute; top: 50%; left: 0; width: 10px; height: 10px; border-radius: 50%; background: currentColor;
  transform: translate(-50%, -50%); animation: packet 1.1s linear infinite;
}
.rung.to-agent[data-state="active"] .line::before { animation-direction: reverse; }
@keyframes packet { from { left: 0; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .rung[data-state="active"] .line::before { animation: none; left: 50%; } }

/* Tally additions */
.exchange .money .w, .exchange .money .w.agent { stroke: var(--lime); }
.exchange .money .h { fill: var(--lime); }
.exchange .money text { fill: var(--lime); }
.exchange .coin circle { stroke: var(--lime); }
.exchange .coin text { fill: var(--lime); }
.exchange .act { fill: var(--paper-2); rx: 14; }
.exchange .activation { fill: var(--api); }
.exchange .life.ink { stroke: var(--ink-3); }
.exchange .w.ink { stroke: var(--ink-2); } .exchange .h.ink { fill: var(--ink-2); } .exchange text.ink-t { fill: var(--ink); }
.rung.tally .calls::before { background: var(--api); }
.rung.tally .calls::after { color: var(--lime-ink); background: var(--api); border-color: var(--api); border-radius: 999px; }
.call.res .wire-msg code { color: var(--ink); }
.call.res .wire-msg::after { background: repeating-linear-gradient(to right, var(--ink-2) 0 8px, transparent 8px 14px); }
.call.res .wire-msg::before { background: var(--ink-2); }
.call .wire-msg code { background: var(--paper); border-radius: 6px; }
.divider::before, .divider::after { background: var(--rule); }
.divider { color: var(--ink-3); }
.wire .k { color: var(--agent-ink); } .wire .a { color: var(--api-ink); } .wire .s { color: var(--lime); } .wire .h { color: var(--ink-3); }
.code-note .k { color: var(--agent-ink); } .code-note .s { color: #eaf6ef; } .code-note .c { color: var(--ink-3); }
.code-note.agent .code-head { border-bottom-color: var(--rule); color: var(--agent-ink); }
.code-note.api .code-head { border-bottom-color: var(--rule); color: var(--api-ink); }
.code-head { border-bottom: 1.5px solid var(--rule); background: var(--surface); }
.facts .ico { stroke: var(--lime); }
.facts .ico .slash { stroke: var(--bad); }
.token-coin { stroke: var(--agent); }
.token-coin text { fill: var(--agent-ink); }
th { background: var(--paper-2); }
.endpoints .m { color: var(--lime); }
.door.agent:hover { background: var(--agent-soft); border-color: var(--agent); }
.door.api:hover { background: var(--api-soft); border-color: var(--api); }
.door .go { color: var(--lime); }
.door.agent .go, .door.api .go { color: var(--lime); }
textarea { background: var(--paper) !important; border-color: var(--rule) !important; color: var(--ink) !important; border-radius: 10px; }
.note-over { background: var(--paper-2); border-color: var(--rule); border-radius: var(--r); }
.terminus { background: transparent; }

.chip { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border: 1.5px solid var(--rule); background: var(--surface); padding: 6px 12px; border-radius: 999px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }

/* ===================== Tally — depth pass ===================== */
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(200, 245, 66, .10), transparent 60%),
    radial-gradient(900px 700px at 0% 30%, rgba(143, 217, 180, .16), transparent 60%),
    radial-gradient(900px 700px at 100% 70%, rgba(214, 239, 227, .10), transparent 60%),
    var(--paper);
  background-attachment: fixed;
}
h1 { font-size: clamp(2.8rem, 6.6vw, 5.6rem); letter-spacing: -0.03em; line-height: 1; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); letter-spacing: -0.025em; }
.hero { padding-top: 96px !important; }
.hero .lede, .hero > .hero-grid > div > p.muted { font-size: 1.2rem; color: var(--ink-2); }

/* light rails instead of dashed lifelines */
.sheet::before, .sheet::after { width: 2px; opacity: .9;
  background: linear-gradient(to bottom, transparent 0, var(--c) 120px, var(--c) calc(100% - 160px), transparent 100%) !important;
  box-shadow: 0 0 18px 1px color-mix(in srgb, var(--c) 45%, transparent); animation: none !important; }
.sheet::before { --c: var(--agent); }
.sheet::after { --c: var(--api); }

/* the road: a perspective scene behind the hero */
.road { position: absolute; left: 50%; top: -96px; width: min(1700px, 170vw); transform: translateX(-50%); z-index: -1; pointer-events: none; opacity: 1;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%); }
.road .l1 { fill: url(#laneL); } .road .l3 { fill: url(#laneR); } .road .l2 { fill: url(#laneC); filter: url(#glow); }
.road .horizon { fill: url(#horizon); }
.road .marks { stroke: rgba(200, 245, 66, .55); stroke-width: 6; stroke-dasharray: 40 60; animation: drive 2.4s linear infinite; }
@keyframes drive { to { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) { .road .marks { animation: none; } }
@media (max-width: 720px) { .road { top: 0; opacity: .8; } }

/* actor row */
.actors { background: rgba(14, 42, 34, .72); }
.actor { font-size: 10.5px; padding: 8px 12px; box-shadow: 0 0 0 4px var(--paper); }
.actor.agent { box-shadow: 0 0 0 4px var(--paper), 0 0 22px rgba(143,217,180,.45); }
.actor.api { box-shadow: 0 0 0 4px var(--paper), 0 0 22px rgba(205,184,251,.45); }

/* glass cards */
.note, .exchange, .code-note, .table-wrap, .wire {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0)) , var(--surface);
  border: 1px solid rgba(143,217,180,.32);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
}
.note { border-radius: 20px; padding: 26px 28px; }
.note.agent { border-color: rgba(143,217,180,.6); }
.note.api { border-color: rgba(205,184,251,.55); }
.exchange { border-radius: 22px; padding: 18px 20px 14px; }
.code-note, .wire { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)), #0b211a; border-radius: 16px; }
.door { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.door:hover { transform: translateY(-4px); box-shadow: 0 40px 80px -40px rgba(143,217,180,.55), inset 0 1px 0 rgba(255,255,255,.08); }
.door h3 { font-size: 1.45rem; }
.door .go { font-size: .9rem; }

/* pills that glow */
.btn { height: 50px; padding: 0 26px; font-weight: 700; letter-spacing: -.01em; box-shadow: 0 12px 34px -10px rgba(200,245,66,.55); transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(200,245,66,.7); }
.btn.ghost { box-shadow: none; background: rgba(143,217,180,.08); }
.btn.ghost:hover { box-shadow: 0 14px 34px -14px rgba(143,217,180,.7); }
.btn.agent { box-shadow: 0 12px 34px -10px rgba(143,217,180,.6); }
.btn.api { box-shadow: 0 12px 34px -10px rgba(205,184,251,.5); }
.btn.sm { height: 32px; padding: 0 14px; box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { box-shadow: none; transform: none; }

/* rungs: arrows with light */
.rung .line { box-shadow: 0 0 14px color-mix(in srgb, currentColor 55%, transparent); }
.rung .line::after { filter: drop-shadow(0 0 6px currentColor); }
.rung.money .line { height: 10px; border-radius: 6px; box-shadow: 0 0 30px rgba(200,245,66,.6); }
.rung.money .amount { font-size: clamp(2.4rem, 5.6vw, 4.2rem); color: var(--lime); text-shadow: 0 0 30px rgba(200,245,66,.35); }
.rung.money .coin circle { fill: var(--paper); }
.rung .msg code { font-size: 1.05rem; }
.rung .msg span { color: var(--ink-2); }

/* the stats ticker */
.note-over { background: linear-gradient(90deg, rgba(143,217,180,.14), rgba(200,245,66,.08) 60%, rgba(205,184,251,.10)), var(--surface); border: 1px solid rgba(143,217,180,.35); border-style: solid; border-radius: 20px; padding: 34px var(--gutter); box-shadow: 0 30px 70px -40px rgba(0,0,0,.8); }
.note-over p b.num { font: 800 1.35em var(--display); color: var(--lime); letter-spacing: -.02em; }
.note-over p b { color: var(--ink); }

/* section heads and dividers */
.head h2 { margin-bottom: 14px; }
.head p { font-size: 1.1rem; }
.divider { font-size: .8rem; color: var(--lime); letter-spacing: .14em; }
.divider::before, .divider::after { height: 1px; background: linear-gradient(90deg, transparent, var(--rule), transparent); }
section.rung { margin-bottom: 88px; }

/* facts as lit cards */
.facts.icons { gap: 18px; }
.facts.icons div { grid-template-columns: 52px 1fr; column-gap: 18px; border: 1px solid rgba(143,217,180,.28); border-radius: 18px; padding: 22px 22px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--surface); }
.facts .ico { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: rgba(200,245,66,.12); box-shadow: inset 0 0 0 1px rgba(200,245,66,.35); margin-top: 0; }
.facts dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.facts dd { margin-top: 6px; }

/* endpoints + kv */
.endpoints li { border-top-color: var(--rule-2); }
.endpoints code { color: var(--ink); }
.kv dt { color: var(--ink-3); }
.kv dd { color: var(--api-ink); }

/* token */
.token-coin { width: 96px; height: 96px; }
.token-coin .dash { stroke: rgba(143,217,180,.7); stroke-dasharray: 5 6; }
.token-coin circle:not(.dash) { fill: var(--paper); stroke: var(--agent); }
.token-coin .lane1 { fill: var(--agent); } .token-coin .lane2 { fill: var(--lime); } .token-coin .lane3 { fill: var(--api); }
.urlbox { box-shadow: 0 20px 50px -30px rgba(0,0,0,.8); }

/* demo: rung states with light */
.rung[data-state="active"] .line { box-shadow: 0 0 22px color-mix(in srgb, currentColor 70%, transparent); }
.rung[data-state="active"] .line::before { box-shadow: 0 0 12px currentColor; }
.rung[data-state="done"] .mark { color: var(--lime); }
.result { background: linear-gradient(180deg, rgba(200,245,66,.14), rgba(200,245,66,.06)); border-color: rgba(200,245,66,.6); border-radius: 14px; }

/* footer */
.end { margin-top: 64px; padding-bottom: 80px; }
.end .wrap { color: var(--ink-3); }
.terminus { color: inherit; text-shadow: 0 0 14px currentColor; }
.chip { border-color: rgba(200,245,66,.4); background: rgba(200,245,66,.08); color: var(--ink); }
.hero { isolation: isolate; }
.hero .hero-grid { position: relative; z-index: 1; }
.road { z-index: 0; }

/* token strip at the top of the landing */
.ca-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px var(--gutter) 0; padding: 10px 12px 10px 14px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(143,217,180,.16), rgba(200,245,66,.08)), var(--surface); border: 1px solid rgba(143,217,180,.35); box-shadow: 0 20px 50px -30px rgba(0,0,0,.8); }
.ca-bar .ca-name { font: 700 .95rem var(--display); white-space: nowrap; }
.ca-bar .ca-label { font: 700 .68rem var(--mono); letter-spacing: .14em; color: var(--lime); }
.ca-bar .ca-code { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); }
.ca-bar .ca-more { margin-left: auto; font-size: .85rem; color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.ca-bar .ca-more:hover { color: var(--ink); }
@media (max-width: 720px) { .ca-bar { border-radius: 18px; padding: 12px 14px; } .ca-bar .ca-more { margin-left: 0; } .ca-bar .ca-code { flex-basis: 100%; } }

/* ---------- fixed depth layer ---------- */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: var(--paper); }
.bg svg { width: 100%; height: 100%; display: block; }
.bg .blob { opacity: .22; will-change: transform; }
.bg .b1 { animation: drift1 26s ease-in-out infinite alternate; }
.bg .b2 { opacity: .12; animation: drift2 32s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-140px, -110px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .bg .blob { animation: none; } }
.bg .grain { mix-blend-mode: soft-light; opacity: .7; }
body { background: var(--paper); }
.sheet { z-index: 0; }
.hero .road { opacity: .95; }
@media (max-width: 720px) { .bg .lanes { opacity: .6; } }

/* ---------- section tabs ---------- */
.tabs { position: sticky; top: 72px; z-index: 15; display: flex; gap: 6px; flex-wrap: wrap; margin: 0 var(--gutter) 36px; padding: 6px; border-radius: 999px;
  background: rgba(22, 61, 48, .85); backdrop-filter: blur(12px); border: 1px solid rgba(143,217,180,.35); box-shadow: 0 20px 50px -30px rgba(0,0,0,.8); width: fit-content; max-width: calc(100% - 2 * var(--gutter)); }
.tab { border: 0; background: transparent; color: var(--ink-2); font: 600 .92rem var(--sans); padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.tab:hover { color: var(--ink); background: rgba(143,217,180,.14); }
.tab[aria-selected="true"] { background: var(--lime); color: var(--lime-ink); box-shadow: 0 8px 24px -10px rgba(200,245,66,.6); }
.panel { display: none; }
.panel.active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .panel.enter { animation: panel-in .55s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes panel-in { from { opacity: 0; transform: translateY(18px) scale(.995); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
}
@media (max-width: 720px) { .tabs { top: 64px; border-radius: 18px; margin-inline: 16px; max-width: calc(100% - 32px); } .tab { padding: 8px 12px; font-size: .85rem; } }

/* header dropdown */
.menu { position: relative; }
.menu > button { border: 0; background: transparent; color: var(--ink-2); font: 500 .92rem var(--sans); padding: 6px 10px; cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.menu > button:hover, .menu:focus-within > button { color: var(--ink); }
.menu > button svg { width: 10px; height: 10px; transition: transform .2s; }
.menu:hover > button svg, .menu:focus-within > button svg { transform: rotate(180deg); }
.menu ul { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px; border-radius: 16px;
  background: rgba(22, 61, 48, .96); border: 1px solid rgba(143,217,180,.35); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); display: none; }
.menu:hover ul, .menu:focus-within ul { display: block; }
.menu li a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.menu li a small { display: block; color: var(--ink-3); font-size: .78rem; }
.menu li a:hover { background: rgba(143,217,180,.16); }
.actors nav .menu > button { border-bottom: 2px solid transparent; }
@media (max-width: 720px) { .menu ul { left: auto; right: 0; } }

.btn { border-radius: 999px !important; }
/* API key panel */
.key-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.key-plan { border: 1.5px solid var(--rule); border-radius: 14px; padding: 12px 14px; background: var(--paper); cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.key-plan b { display: block; font-family: var(--display); font-size: 1.05rem; }
.key-plan span { color: var(--ink-3); font-size: .875rem; }
.key-plan[aria-pressed="true"] { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 10px 30px -16px rgba(200,245,66,.6); }
.keybox { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--lime); }
.keybox code { display: block; word-break: break-all; font-size: .85rem; color: var(--lime); }
.keybox .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.keybox pre { margin: 12px 0 0; font-size: .78rem; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }
@media (max-width: 720px) { .key-plans { grid-template-columns: 1fr; } }

@media (min-width: 960px) { .two-notes { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); } }
/* header: links and the Developers menu share one baseline and size */
.actors nav { align-items: center; }
.actors nav a, .actors nav .menu > button { font: 500 1rem var(--sans); line-height: 1; padding: 8px 10px; border-bottom: 2px solid transparent; margin: 0; }
.actors nav .menu { display: inline-flex; align-items: center; }
.actors nav .menu > button { color: var(--ink-2); }
.actors nav .menu > button svg { width: 10px; height: 10px; margin-top: 1px; }
.actors nav .nav-x { margin-left: 8px; }

/* light-trail canvas over the lane grid */
.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg svg { opacity: .55; }
.bg .lanes { opacity: .7; }
.bg .grain { opacity: .5; }

/* hero ask box */
.ask { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 26px; max-width: 640px; }
.ask input { height: 50px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(143,217,180,.45); background: rgba(20,10,38,.8); color: var(--ink); font: 500 1rem var(--sans); outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.ask input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,245,66,.18); }
.ask input::placeholder { color: var(--ink-3); }
.ask-out { grid-column: 1 / -1; padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(143,217,180,.32); font-size: 1rem; }
.ask-out p { white-space: pre-wrap; }
.ask-out small { display: block; margin-top: 8px; color: var(--ink-3); font: 500 .8rem var(--mono); }
@media (max-width: 720px) { .ask { grid-template-columns: 1fr; } }

/* activity feed */
.feed { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ev { display: inline-flex; align-items: center; gap: 8px; font: 500 .75rem var(--mono); color: var(--ink-2); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); }
.ev i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.ev.bad i { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
