/* The protocol's own sections (they were omtp.me/protocol), in the landing page's Ink: dark ground, blue accent. */
.spec {
  --bg: #0E100F; --surface: #161917; --surface-2: #1C201D; --fg: #ECEDE8; --muted: #9DA39C; --line: #262A27;
  --accent: #7FA0FF; --accent-soft: #1A2238; --kai: #FF8F5A; --scout: #62D2A2; --you: #DD8AEA; --stranger: #FF7D95; --new: #2E2A14;
  --font-display: 'Schibsted Grotesk', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Schibsted Grotesk', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  max-width: 1200px; margin: 0 auto; padding: 24px 24px 96px; color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
.spec code, .spec .m { font-family: var(--font-mono); }
.spec a { color: #8FAEFF; }
.spec .side { top: 16px; }
.spec .head h2 { font-size: clamp(34px, 4.4vw, 52px); max-width: none; }
.spec .kai {--c: var(--kai);}
.spec .scout {--c: var(--scout);}
.spec .you {--c: var(--you);}
.spec .stranger {--c: var(--stranger);}
.spec .chain {--c: var(--accent);}
.spec section {scroll-margin-top: 72px;}
.spec .sec {padding-block: 64px 0; display: grid; gap: 20px;}
.spec .sec h2 {font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.04; letter-spacing: -0.025em; margin: 0; text-wrap: balance; max-width: 22ch;}
.spec .sec .intro {max-width: 64ch; color: var(--muted); margin: 0; font-size: 17px;}
.spec .kicker {font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);}
.spec .cast {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;}
@media (max-width: 860px) {
  .spec .cast {grid-template-columns: minmax(0, 1fr);}
}
.spec .actor {background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 10px; align-content: start;}
.spec .actor .row {display: flex; align-items: center; gap: 12px;}
.spec .av {width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--surface); background: var(--c); flex: none;}
.spec .actor h3 {margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em;}
.spec .actor .addr {font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);}
.spec .actor p {margin: 0; font-size: 15px;}
.spec .actor q {display: block; font-size: 14.5px; color: var(--muted); border-left: 2px solid var(--c); padding-left: 10px; quotes: "\201C" "\201D";}
.spec .steps {display: flex; flex-wrap: wrap; gap: 8px;}
.spec .steps button {font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 6px 14px 6px 6px; display: inline-flex; gap: 8px; align-items: center; cursor: pointer;}
.spec .steps button:hover {border-color: var(--accent);}
.spec .steps .n {width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; background: var(--surface-2);}
.spec .steps button[aria-pressed="true"] {background: var(--accent); border-color: var(--accent); color: var(--surface);}
.spec .steps button[aria-pressed="true"] .n {background: var(--surface); color: var(--accent);}
.spec .stage {display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 16px; align-items: start;}
@media (max-width: 980px) {
  .spec .stage {grid-template-columns: minmax(0, 1fr);}
}
.spec .diagram {background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px; overflow-x: auto;}
.spec .diagram svg {display: block; width: 100%; min-width: 760px; height: auto;}
.spec .side {position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); display: grid; gap: 14px; max-height: calc(100vh - 92px); overflow-y: auto; min-width: 0; padding-bottom: 4px;}
@media (max-width: 980px) {
  .spec .side {position: static; max-height: none; overflow: visible;}
}
.spec .detail {background: var(--accent-soft); border-radius: 18px; padding: 20px; display: grid; gap: 12px; min-width: 0;}
.spec .detail .count {font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);}
.spec .detail .pn {display: flex; gap: 6px;}
.spec .detail .pn button {font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 4px 10px; cursor: pointer;}
.spec .detail .pn button:disabled {opacity: 0.4; cursor: default;}
.spec .detail h3 {margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance;}
.spec .detail p {margin: 0; font-size: 15.5px;}
.spec .detail q {display: block; font-size: 14.5px; border-left: 2px solid var(--scout); padding-left: 10px; color: var(--fg); quotes: "\201C" "\201D";}
.spec .cli {background: var(--surface); border-radius: 10px; padding: 10px 12px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; white-space: pre; color: var(--fg);}
.spec .cli .p {color: var(--muted); user-select: none;}
.spec .cost {font-size: 13.5px; color: var(--muted);}
.spec .cost b {color: var(--fg); font-weight: 600;}
.spec .state {background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 18px; min-width: 0;}
.spec .state h4 {margin: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;}
.spec .state h4 small {text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px;}
.spec .state h4 small.m {font-size: 11px; overflow-wrap: anywhere;}
.spec .tname {font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); margin: 10px 0 2px;}
.spec .tw {overflow-x: auto;}
.spec table.t {width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums;}
.spec .t th {font-weight: 500; color: var(--muted); text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); font-size: 11.5px; white-space: nowrap;}
.spec .t td {padding: 5px 6px; border-bottom: 1px solid var(--surface-2); vertical-align: top;}
.spec .t td.m {font-family: var(--font-mono); font-size: 12px; white-space: nowrap;}
.spec .t td.num {font-family: var(--font-mono); text-align: right; white-space: nowrap;}
.spec .t th.num {text-align: right;}
.spec .t tr.new td {background: var(--new);}
.spec .t td.empty {color: var(--muted); font-style: italic;}
.spec .who {display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; white-space: nowrap;}
.spec .who::before {content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c);}
.spec .lst {list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px;}
.spec .lst li {padding: 6px 8px; border-radius: 8px; background: var(--bg); min-width: 0; overflow-wrap: anywhere;}
.spec .lst li.new {background: var(--new);}
.spec .lst li.none {color: var(--muted); font-style: italic; background: transparent; padding-inline: 0;}
.spec .lst .line {border: 1px dashed var(--stranger);}
.spec .lst .tag {font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-left: 4px;}
.spec .lst .tb {font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-right: 6px;}
.spec .lst .fz {font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); white-space: nowrap;}
.spec .seq text {font-family: var(--font-body);}
.spec .seq .ll {stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 4 5;}
.spec .seq .chainbar {fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1;}
.spec .seq .chainlbl {font-family: var(--font-mono); font-size: 10.5px; fill: var(--accent); letter-spacing: 0.08em;}
.spec .seq .hd rect {fill: var(--surface); stroke: var(--c); stroke-width: 1.6;}
.spec .seq .hd.chain rect {fill: var(--accent);}
.spec .seq .hn {font-family: var(--font-display); font-weight: 800; font-size: 15px; fill: var(--fg);}
.spec .seq .ha {font-family: var(--font-mono); font-size: 10.5px; fill: var(--muted);}
.spec .seq .hd.chain .hn, .spec .seq .hd.chain .ha {fill: var(--surface);}
.spec .seq .hd.dim {opacity: 0.35;}
.spec .seq .band {fill: var(--surface); cursor: pointer;}
.spec .seq .band:hover {fill: var(--bg);}
.spec .seq .band.current, .spec .seq .band.current:hover {fill: var(--accent-soft);}
.spec .seq .sg {cursor: pointer; transition: opacity 0.25s;}
.spec .seq .sg.future {opacity: 0.3;}
.spec .seq .sg.past {opacity: 0.6;}
.spec .seq .ar {stroke: var(--c); stroke-width: 2; fill: none;}
.spec .seq .ah, .spec .seq .ad {fill: var(--c);}
.spec .seq .al {font-size: 12.5px; font-weight: 500; fill: var(--fg); paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round;}
.spec .seq .as {font-family: var(--font-mono); font-size: 10.5px; fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round;}
.spec .seq .sg.current .al, .spec .seq .sg.current .as {stroke: var(--accent-soft);}
.spec .seq .nt {fill: var(--surface); stroke: var(--c); stroke-width: 1.2; stroke-dasharray: 3 3;}
.spec .seq .ntt {font-family: var(--font-mono); font-size: 11px; fill: var(--fg);}
.spec .seq .chip {fill: var(--surface-2); stroke: var(--line);}
.spec .seq .chipn {font-family: var(--font-mono); font-size: 12px; fill: var(--fg);}
.spec .seq .sg.current .chip {fill: var(--accent); stroke: var(--accent);}
.spec .seq .sg.current .chipn {fill: var(--surface);}
.spec .legend {display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); padding: 4px 4px 0;}
.spec .legend span {display: inline-flex; align-items: center; gap: 8px;}
.spec .legend svg {color: var(--muted);}
.spec figure {margin: 0; display: grid; gap: 10px;}
.spec .fig {background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; overflow-x: auto;}
.spec .fig svg {display: block; width: 100%; min-width: 640px; height: auto; color: var(--muted);}
.spec figcaption {color: var(--muted); font-size: 14.5px; max-width: 72ch;}
.spec .d text {font-family: var(--font-body); font-size: 13px; fill: var(--fg);}
.spec .d .mono {font-family: var(--font-mono); font-size: 11px; fill: var(--muted);}
.spec .d .monofg {font-family: var(--font-mono); font-size: 12px; fill: var(--fg);}
.spec .d .cap {font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; fill: var(--c);}
.spec .d .bold {font-weight: 600;}
.spec .d .bx {fill: var(--surface); stroke: var(--line); stroke-width: 1.4;}
.spec .d .bx.c {stroke: var(--c); stroke-width: 1.6;}
.spec .d .bx.dash {stroke-dasharray: 5 4;}
.spec .d .bx.acc {fill: var(--accent-soft); stroke: var(--accent);}
.spec .d .bx.dim {fill: var(--bg); stroke: var(--line);}
.spec .d .op {fill: var(--surface-2); stroke: var(--line);}
.spec .d .ln {stroke: var(--muted); stroke-width: 1.6; fill: none;}
.spec .d .ln.dash {stroke-dasharray: 4 4;}
.spec .d .acctext {fill: var(--accent);}
.spec .grid4 {display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;}
.spec .grid3 {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;}
@media (max-width: 980px) {
  .spec .grid4 {grid-template-columns: repeat(2, minmax(0, 1fr));}
}
@media (max-width: 760px) {
  .spec .grid3, .spec .grid4 {grid-template-columns: minmax(0, 1fr);}
}
.spec .card {background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 8px; align-content: start; min-width: 0;}
.spec .card h3 {margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em;}
.spec .card p {margin: 0; font-size: 15px; color: var(--muted);}
.spec .card code {font-size: 12.5px; color: var(--fg); background: var(--bg); border-radius: 6px; padding: 6px 8px; display: block; overflow-x: auto; white-space: nowrap;}
.spec .pill {justify-self: start; font-family: var(--font-mono); font-size: 11.5px; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--line); color: var(--muted);}
.spec .pill.sealed {border-color: var(--accent); color: var(--accent);}
.spec .split {display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px;}
@media (max-width: 860px) {
  .spec .split {grid-template-columns: minmax(0, 1fr);}
}
.spec pre.code {margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.65; color: var(--fg); min-width: 0;}
.spec pre.code .c {color: var(--muted);}
.spec pre.code .k {color: var(--accent);}
.spec .note {max-width: 72ch; color: var(--muted); margin: 0; font-size: 15px;}
.spec .note code {font-size: 13.5px; color: var(--fg);}
.spec .limits {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;}
@media (max-width: 760px) {
  .spec .limits {grid-template-columns: minmax(0, 1fr);}
}
.spec .limit {border-top: 2px solid var(--fg); padding-top: 12px; display: grid; gap: 4px;}
.spec .limit h3 {margin: 0; font-size: 17px; font-weight: 600;}
.spec .limit p {margin: 0; color: var(--muted); font-size: 15px;}
.spec .costs {width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums;}
.spec .costs td {padding: 10px 0; border-bottom: 1px solid var(--line);}
.spec .costs td:last-child {text-align: right; font-family: var(--font-mono); white-space: nowrap; padding-left: 12px;}
.spec .costs td.m {font-family: var(--font-mono); font-size: 14px; color: var(--muted); padding-left: 12px;}
.spec .sec { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) {
  .spec .costs td:last-child { white-space: normal; }
}
.spec .alice { --c: #7FA0FF; }
.spec .bob { --c: #62D2A2; }
@media (min-width: 981px) {
  .spec .diagram svg { min-width: 0; }
}
/* the walkthrough: two computers and what happened behind the scenes */
.spec .computers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .spec .computers { grid-template-columns: minmax(0, 1fr); } }
.spec .computer { margin: 0; background: #080908; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.spec .computer figcaption { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--fg); font-weight: 700; font-size: 15px; max-width: none; }
.spec .computer figcaption i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.spec .computer figcaption .m { margin-left: auto; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.spec .term { margin: 0; padding: 14px 16px; min-height: 260px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.spec .term .tl { display: block; }
.spec .term .tl + .tl.cmd { margin-top: 10px; }
.spec .term .tl.out { color: #C9CBC5; }
.spec .term .tl.env { color: var(--muted); }
.spec .term .tl .p { color: var(--muted); user-select: none; }
.spec .term .tl.cmd { color: var(--fg); font-weight: 500; }
.spec .term .tl.now.cmd { color: var(--c); }
.spec .term .tl.past { opacity: 0.5; }
.spec .term .tl.idle { color: var(--muted); font-style: italic; }
.spec .behind { background: var(--accent-soft); border-radius: 18px; padding: 20px; display: grid; gap: 12px; }
.spec .behind .bh-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.spec .behind .count { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.spec .behind .pn { display: flex; gap: 6px; }
.spec .behind .pn button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.spec .behind .pn button:disabled { opacity: 0.4; cursor: default; }
.spec .behind h3 { margin: 0; font-size: 24px; letter-spacing: -0.015em; }
.spec .behind .bh-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15.5px; }
.spec .behind .bh-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spec .behind .bh-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.spec .behind .bh-chip { font-family: var(--font-mono); font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
/* two columns of cards, and code in a card that wraps instead of scrolling */
.spec .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .spec .grid2 { grid-template-columns: minmax(0, 1fr); } }
.spec .card code { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }
/* the walkthrough in one row: Bob, Alice, behind the scenes */
.spec .computers { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 1100px) { .spec .computers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spec .computers .behind { grid-column: 1 / -1; } }
@media (max-width: 760px) { .spec .computers { grid-template-columns: minmax(0, 1fr); } }
.spec .computers .behind { align-content: start; }
.spec .term { min-height: 420px; }
