/* OPSIN site: the live strip on the landing page, and the app pages (/lab, /notebooks, /propose, /agents).
   Tokens come from v3.css (paper, ink, two lights); nothing here introduces a new hue. */

/* Token utilities that are not live say so in place. */
.util h3 .later {
  margin-left: 6px;
  padding: 3px 6px;
  border: 1px dashed var(--line-2);
  border-radius: 5px;
  font: 500 10.5px / 1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  vertical-align: middle;
}

/* ---------- live bar: one slim line under the landing header ---------- */
.live-strip {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.ls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding-block: 8px;
}
.ls-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}
.live-strip[data-state="running"] .ls-dot {
  background: var(--excite);
  box-shadow: 0 0 0 4px var(--ex-soft);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.live-strip[data-state="halted"] .ls-dot {
  background: var(--inhibit);
  box-shadow: 0 0 0 4px var(--in-soft);
}
.live-strip[data-state="idle"] .ls-dot {
  background: var(--chain);
}
.ls-k {
  font: 600 10.5px / 1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--excite);
  flex: none;
}
.ls-line {
  flex: 1 1 auto;
  min-width: 0;
  font: 500 14px / 1.35 var(--sans);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ls-meta {
  flex: none;
  display: inline-flex;
  gap: 4px;
  font: 400 12px / 1.4 var(--mono);
  color: var(--dim);
  white-space: nowrap;
}
.ls-meta .sep {
  margin: 0 6px;
  color: var(--faint);
}
.ls-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13.5px / 1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--white);
}
.ls-go svg {
  width: 14px;
  height: 14px;
}
.ls-go:hover {
  border-color: var(--ink);
}
.live-strip.pulse-on {
  animation: lsflash 0.9s var(--ease);
}
@keyframes lsflash {
  0% {
    background: rgba(232, 240, 254, 0.95);
  }
  100% {
    background: rgba(255, 255, 255, 0.78);
  }
}
.lab-live {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 1100px) {
  .ls-meta {
    display: none;
  }
}
@media (max-width: 640px) {
  .ls-row {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding-block: 10px;
  }
  .ls-line {
    flex-basis: calc(100% - 140px);
    white-space: normal;
    font-size: 13.5px;
  }
  .ls-go {
    padding: 6px 9px;
    font-size: 13px;
  }
}

/* Notebook #001: the chart shares its column with "Ask the record" (lib/ask-card.ts). In two
   columns the card grows to the findings' height and its answers fill what is left, so neither
   column ends in empty paper; the answers stack in one cell, so switching never moves the page. */
.nb-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nb-ask {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--white);
}
.nar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nar-src {
  font: 400 11.5px / 1.3 var(--mono);
  color: var(--dim);
}
.nb-ask-q {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nb-ask-q button {
  position: relative;
  overflow: hidden;
  font: 500 13px / 1 var(--sans);
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background-color 0.2s;
}
.nb-ask-q button:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.nb-ask-q button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
/* While the card cycles by itself, the chosen chip fills like a timer. */
.nb-ask-q button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--excite);
  transform: scaleX(0);
  transform-origin: left;
}
.nb-ask[data-cycling] .nb-ask-q button[aria-pressed="true"]::after {
  animation: nar-timer 7s linear forwards;
}
@keyframes nar-timer {
  to {
    transform: scaleX(1);
  }
}
.nar-out {
  display: grid;
  position: relative;
}
.nar-a {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s linear 0.3s;
}
.nar-a[data-on] {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.3s ease 0.08s,
    transform 0.3s ease 0.08s,
    visibility 0s;
}
.nar-ans {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.nar-ans a {
  color: var(--excite);
}
/* One grid per answer, rows on a subgrid: the verdict column is as wide as its widest chip and
   the names line up. */
.nar-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
}
.nar-rows li {
  display: contents;
}
.nar-rows li[hidden] {
  display: none;
}
.nar-rows a {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-areas: "v n e" "v m e";
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.nar-rows .vchip {
  grid-area: v;
  justify-self: start;
}
.nar-rows b {
  grid-area: n;
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nar-rows small {
  grid-area: m;
  font: 400 11.5px / 1.3 var(--mono);
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nar-rows a:hover b {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nar-fx {
  grid-area: e;
  justify-self: end;
  font: 400 22px / 1 var(--serif);
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}
.nar-fx[data-v="excites"] {
  color: var(--excite);
}
.nar-fx[data-v="inhibits"] {
  color: var(--inhibit);
}
.nar-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 10px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--dim);
  font: 400 15px / 1 var(--sans);
  text-align: left;
  cursor: text;
  transition: border-color 0.2s;
}
.nar-bar:hover {
  border-color: var(--ink);
}
.nar-bar svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.nar-bar span {
  flex: 1;
}
.nar-bar kbd {
  font: 500 12px / 1 var(--mono);
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--dim);
}
@media (min-width: 1001px) {
  .nb-split {
    align-items: stretch;
  }
  .nb-side .nb-ask {
    flex: 1 1 auto;
  }
  /* The answers take whatever height is left and never push the column past the findings.
     /js/ask.js then shows whole rows only (data-fit); without it, the last row fades out. */
  .nar-out {
    flex: 1 1 0;
    min-height: 0;
    contain: size;
    overflow: hidden;
  }
  .nb-ask:not([data-fit]) .nar-out {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
  }
  .nar-bar {
    margin-top: auto;
  }
}
@media (hover: none), (max-width: 640px) {
  .nar-bar kbd {
    display: none;
  }
}
@media (max-width: 480px) {
  .nar-rows {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .nar-rows a {
    grid-template-areas: "v e" "n e" "m e";
  }
  .nar-rows b,
  .nar-rows small {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nar-a,
  .nar-a[data-on] {
    transition: none;
    transform: none;
  }
}

/* ---------- app shell ---------- */
.app {
  min-height: 100svh;
  position: relative;
  z-index: 1;
}
.app-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 246, 242, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-nav .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}
.app-nav .logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.app-nav .logo svg {
  width: 26px;
  height: 26px;
}
.app-nav .logo span {
  font: 600 19px / 1 var(--sans);
  letter-spacing: 0.02em;
}
.app-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.app-links a {
  font: 500 14.5px / 1 var(--sans);
  color: var(--ink-2);
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 8px;
}
.app-links a[aria-current="page"],
.app-links a:hover {
  color: var(--ink);
  background: rgba(14, 19, 22, 0.06);
}
.app-nav .btn {
  margin-left: auto;
  padding: 10px 14px;
  font-size: 14px;
}
.app-head {
  padding: 40px 0 22px;
}
.app-head .eyebrow {
  margin-bottom: 14px;
}
.app-head h1 {
  font-size: clamp(34px, 25.3px + 2.2vw, 56px);
}
.app-head .sub {
  margin-top: 10px;
  max-width: 70ch;
}
@media (max-width: 760px) {
  .app-links {
    display: none;
  }
}

/* ---------- /lab HUD ---------- */
.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  padding-bottom: 60px;
  align-items: start;
}
.side {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.panel > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font: 500 10.5px / 1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.panel > header b {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.panel > header .cd {
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
  color: var(--eyespot);
}
.panel > header .st[data-s="awaiting_beacon"] {
  color: var(--eyespot);
}
.panel > header .st {
  white-space: nowrap;
}
.panel > header .st[data-s="running"] {
  color: var(--excite);
}
.panel > header .st[data-s="published"] {
  color: var(--chain);
}
.panel > header .r {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
}
.panel-body {
  padding: 14px 16px;
}
.cyc-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cyc-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.cyc-meta dt {
  font: 500 10px / 1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.cyc-meta dd {
  margin: 0;
  font: 500 13px / 1.3 var(--mono);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.cyc-meta a {
  color: inherit;
}
.look {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.look-bar {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.look-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e3e3db;
}
.look-bar i.on {
  background: var(--excite);
}
.look-bar i.mark {
  box-shadow: 0 0 0 1.5px var(--ink-2);
}
.look-l {
  margin-top: 8px;
  font: 400 12px / 1.4 var(--mono);
  color: var(--dim);
}
.hud-arm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px 184px;
  gap: 8px 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.hud-arm:last-child {
  border-bottom: 0;
}
.arm-l {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.arm-l b {
  font: 500 14.5px / 1.25 var(--sans);
}
.arm-l span {
  font: 400 11.5px / 1.35 var(--mono);
  color: var(--dim);
}
.hud-arm.ctrl {
  background: linear-gradient(90deg, rgba(14, 19, 22, 0.025), transparent 70%);
}
.arm-prog {
  display: grid;
  gap: 6px;
}
.arm-dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.arm-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e3e3db;
}
.arm-dots i.d {
  background: var(--ink-2);
}
.arm-dots i.x {
  background: var(--excite);
}
.arm-r {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.pred {
  font: 400 11px / 1.2 var(--mono);
  color: var(--alga);
  white-space: nowrap;
}
.callbtns {
  display: inline-flex;
  gap: 3px;
  margin: 0;
  min-width: 0;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.callbtns button {
  font: 500 11.5px / 1 var(--sans);
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.callbtns button:hover:not(:disabled) {
  background: var(--white);
  border-color: var(--line);
}
.callbtns button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.callbtns button:disabled {
  cursor: default;
  opacity: 0.55;
}
.qlist li,
.vlist li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.qlist li:last-child,
.vlist li:last-child {
  border-bottom: 0;
}
.qlist .n {
  font: 500 12px / 1 var(--mono);
  color: var(--dim);
}
.qlist .lbl,
.vlist .lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qlist .s {
  font: 400 11px / 1 var(--mono);
  color: var(--dim);
}
.vlist a {
  color: inherit;
  text-decoration: none;
  display: contents;
}
.empty {
  padding: 16px;
  font-size: 14px;
  color: var(--dim);
}
.gauge {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin: 6px 0 8px;
}
.gauge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e3e3db;
}
.gauge i.on {
  background: var(--eyespot);
}
.gauge-l {
  font: 400 12.5px / 1.4 var(--mono);
  color: var(--ink-2);
}
.halt {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--in-soft);
  color: var(--inhibit);
  font: 500 13px / 1.4 var(--sans);
}
.log {
  max-height: 400px;
  overflow: auto;
  overscroll-behavior: contain;
}
.log li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
}
.log li.fresh {
  animation: logfresh 1.2s var(--ease);
}
@keyframes logfresh {
  from {
    background: var(--ex-soft);
  }
  to {
    background: transparent;
  }
}
.log time {
  font: 400 11.5px / 1.6 var(--mono);
  color: var(--faint);
}
.log b {
  color: var(--ink);
  font-weight: 600;
}
.log .k {
  font: 600 10px / 1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: 6px;
}
.lab-foot {
  margin-top: 10px;
  font: 400 12px / 1.5 var(--mono);
  color: var(--dim);
  overflow-wrap: anywhere;
}
.lab-foot a {
  color: inherit;
  white-space: nowrap;
}
.rs-p .safety {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.call-note {
  margin: 0;
  padding: 0 16px 14px;
}
.pause {
  margin-left: 8px;
  font: 500 11px / 1 var(--mono);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--white);
  cursor: pointer;
}
@media (max-width: 1100px) {
  .hud {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .side {
    grid-template-columns: minmax(0, 1fr);
  }
  .cyc-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hud-arm {
    grid-template-columns: minmax(0, 1fr);
  }
  .arm-r {
    justify-content: flex-start;
  }
}

/* ---------- forms (/propose) ---------- */
.form {
  display: grid;
  gap: 18px;
  max-width: 760px;
  padding-bottom: 72px;
}
.fld {
  display: grid;
  gap: 8px;
}
.fld > label,
.choices > legend {
  font: 500 10.5px / 1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.fld textarea,
.fld input[type="text"],
.fld select {
  width: 100%;
  font: 400 15px / 1.45 var(--mono);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 11px 12px;
}
.fld textarea {
  min-height: 120px;
  resize: vertical;
}
.fld textarea:focus,
.fld input:focus,
.fld select:focus {
  outline: none;
  border-color: var(--excite);
  box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.15);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.choices > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 4px;
}
.choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 14px / 1 var(--sans);
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--white);
  cursor: pointer;
}
.choices input {
  accent-color: var(--ink);
}
.choices label:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.hint {
  font-size: 13.5px;
  color: var(--dim);
  line-height: 1.5;
}
.result {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 15px;
  line-height: 1.5;
}
.result.ok {
  border-color: rgba(19, 138, 125, 0.5);
  background: var(--chain-soft);
}
.result.err {
  border-color: rgba(217, 130, 0, 0.5);
  background: var(--in-soft);
}

/* ---------- notebook pages ---------- */
.nb-page {
  padding-bottom: 80px;
}
.nb-summary {
  margin-top: 14px;
  max-width: 70ch;
  font: 400 clamp(19px, 16.6px + 0.6vw, 23px) / 1.45 var(--serif);
  color: var(--ink);
}
.rs-json {
  font: 400 11px / 1.3 var(--mono);
  color: var(--dim);
}
.rs-e small {
  display: block;
  margin-top: 3px;
  font: 400 10.5px / 1 var(--mono);
  color: var(--dim);
  white-space: nowrap;
}
.nb-foot {
  margin-top: 16px;
  max-width: 80ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--dim);
}
.nb-page .results {
  margin-top: 18px;
}
.nb-page .rs-row {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) 100px 72px 80px;
}
.receipts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.receipt {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  display: grid;
  gap: 6px;
  min-width: 0;
}
.receipt dt {
  font: 500 10px / 1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.receipt dd {
  margin: 0;
  font: 400 12.5px / 1.45 var(--mono);
  overflow-wrap: anywhere;
  color: var(--ink);
}
.callout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: var(--white);
}
.callout.warn {
  background: var(--in-soft);
  border-color: rgba(217, 130, 0, 0.45);
}
.safety {
  font: 400 11.5px / 1.3 var(--mono);
  color: var(--dim);
}
@media (max-width: 1000px) {
  .receipts {
    grid-template-columns: minmax(0, 1fr);
  }
  .nb-page .rs-row {
    grid-template-columns: minmax(0, 1fr) 96px 64px;
  }
  .nb-page .rs-row .dots {
    grid-column: 1 / -1;
  }
}

/* ---------- docs (/agents) ---------- */
.docs {
  display: grid;
  gap: 18px;
  padding-bottom: 80px;
  max-width: 900px;
}
.docs h2 {
  font-size: clamp(26px, 21px + 1vw, 34px);
  margin-top: 14px;
}
.docs p {
  color: var(--ink-2);
  line-height: 1.6;
}
.docs pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #0f1518;
  color: #dbe3e4;
  font: 400 12.5px / 1.65 var(--mono);
  overflow-x: auto;
}
.docs code {
  font-family: var(--mono);
}

/* ---------- landing header pulse: the lab's state, live (replaces the artifact's simulated count) ---------- */
a.pulse {
  text-decoration: none;
}
a.pulse:hover b {
  text-decoration: underline;
}
.pulse[data-state="running"] i {
  background: var(--excite);
  box-shadow: 0 0 0 3px var(--ex-soft);
}
.pulse[data-state="halted"] i {
  background: var(--inhibit);
  box-shadow: 0 0 0 3px var(--in-soft);
  animation: none;
}
.pulse[data-state="offline"] i {
  background: var(--faint);
  box-shadow: none;
  animation: none;
}

/* ---------- /agents: on-chain requests ---------- */
.vlog {
  display: grid;
  gap: 6px;
  font: 400 13px / 1.5 var(--mono);
  color: var(--ink-2);
}

/* ---------- landing header: live chip, Ask OPSIN, a CTA that follows the lab ---------- */
.nav .pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
}
.nav .pulse:hover {
  border-color: var(--ink);
}
.pulse .ring {
  width: 18px;
  height: 18px;
  flex: none;
  transform: rotate(-90deg);
}
.ring-bg {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 2.2;
}
.ring-fg {
  fill: none;
  stroke: var(--excite);
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--ease);
}
.ring-dot {
  fill: var(--chain);
}
.pulse[data-state="running"] .ring-dot {
  fill: var(--excite);
}
.pulse[data-state="halted"] .ring-dot {
  fill: var(--inhibit);
}
.pulse[data-state="offline"] .ring-dot {
  fill: var(--faint);
}
.pulse[data-deadline] .ring-dot {
  fill: var(--eyespot);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.pulse [data-live="pulse-v"] {
  font-variant-numeric: tabular-nums;
}
.ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink-2);
  font: 500 13.5px / 1 var(--sans);
  cursor: pointer;
  flex: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.ask-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.ask-btn kbd {
  font: 500 11px / 1 var(--mono);
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  color: var(--dim);
}
.ask-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.nav .nav-cta[data-tone="call"] {
  background: var(--eyespot);
  border-color: var(--eyespot);
}
.nav .nav-cta [data-live="cta-label"] {
  font-variant-numeric: tabular-nums;
}
.app-nav .ask-btn {
  margin-left: auto;
}
.app-nav .ask-btn + .btn {
  margin-left: 0;
}
@media (max-width: 900px) {
  .nav .pulse {
    max-width: 150px;
  }
  .nav .pulse span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 900px) {
  .ask-btn span,
  .ask-btn kbd {
    display: none;
  }
  .ask-btn {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .nav .ask-btn {
    margin-left: auto;
  }
  .nav .nav-cta {
    margin-left: 0;
  }
}
@media (max-width: 420px) {
  .nav .pulse b {
    font-size: 11px;
  }
  .nav-row {
    gap: 10px;
  }
  .nav .nav-cta {
    padding: 10px 12px;
    font-size: 13.5px;
  }
}

/* ---------- Ask OPSIN: a palette over the signed record ---------- */
dialog.ask {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(720px, calc(100vw - 24px));
  max-width: none;
  max-height: min(80vh, 720px);
  margin: 10vh auto auto;
  overflow: visible;
}
dialog.ask::backdrop {
  background: rgba(14, 19, 22, 0.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.ask-box {
  display: flex;
  flex-direction: column;
  max-height: min(80vh, 720px);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(14, 19, 22, 0.25);
  overflow: hidden;
}
.ask-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.ask-row svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--dim);
  stroke-width: 1.8;
  stroke-linecap: round;
  flex: none;
}
.ask-in {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 400 19px / 1.3 var(--sans);
  color: var(--ink);
}
.ask-row kbd {
  font: 500 11px / 1 var(--mono);
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  color: var(--dim);
}
.ask-ans {
  padding: 14px 18px 4px;
  font: 400 17.5px / 1.45 var(--serif);
  color: var(--ink);
}
.ask-list {
  overflow: auto;
  padding: 6px 8px 8px;
  overscroll-behavior: contain;
}
.ask-item a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.ask-item b {
  font: 500 15px / 1.3 var(--sans);
}
.ask-meta {
  grid-column: 2 / -1;
  font: 400 12px / 1.45 var(--mono);
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-eff {
  font: 500 14px / 1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.ask-item[aria-selected="true"] a,
.ask-item a:hover {
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.ask-act a {
  grid-template-columns: 1fr;
  color: var(--excite);
  font: 500 14.5px / 1.3 var(--sans);
}
.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px 12px;
}
.ask-chip {
  font: 500 13px / 1 var(--sans);
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink-2);
  cursor: pointer;
}
.ask-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.ask-foot {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--line);
  font: 400 12px / 1.4 var(--mono);
  color: var(--dim);
}
.ask-foot a {
  color: inherit;
}
html.ask-open {
  overflow: hidden;
}

/* ---------- OPSIN narrates: one toast per lab event ---------- */
.narrator {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 4px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 21, 24, 0.94);
  color: #e8eef0;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}
.narrator.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.nr-k {
  font: 600 10.5px / 1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fe3d8;
}
.nr-t {
  font: 400 14px / 1.4 var(--sans);
}
@media (prefers-reduced-motion: reduce) {
  .narrator {
    transition: none;
    transform: none;
  }
}

/* ---------- What OPSIN found ---------- */
.findings {
  padding: 72px 0 32px;
}
.fd-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}
.fd-head h2 {
  font-size: clamp(34px, 24px + 2.4vw, 56px);
  line-height: 1.02;
}
.fd-head .sub {
  max-width: 52ch;
}
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--excite);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.fd {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s;
}
.fd:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}
.fd-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.fd-nb {
  font: 400 11.5px / 1.2 var(--mono);
  color: var(--dim);
  text-align: right;
}
.fd-name {
  font: 500 17px / 1.25 var(--sans);
}
.fd-q {
  font: italic 400 15px / 1.45 var(--serif);
  color: var(--ink-2);
}
.fd-eff b {
  display: block;
  font: 400 44px / 1 var(--serif);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.fd[data-v="excites"] .fd-eff b {
  color: var(--excite);
}
.fd[data-v="inhibits"] .fd-eff b {
  color: var(--inhibit);
}
.fd[data-v="inhibits"] .dots i.on {
  --c: var(--inhibit);
}
.fd-eff small {
  display: block;
  margin-top: 6px;
  font: 400 11.5px / 1.35 var(--mono);
  color: var(--dim);
}
@media (max-width: 1000px) {
  .fd-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .fd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .findings {
    padding: 52px 0 20px;
  }
  .fd-grid {
    display: flex;
    gap: 12px;
    margin: 22px calc(-1 * var(--gut)) 0;
    padding: 0 var(--gut) 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .fd-grid > li {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
}

/* header refinements: the CTA has a short form; the chip keeps its words on phones */
.nav .nav-cta .cta-s {
  display: none;
}
.fd-d {
  font: 400 12.5px / 1.45 var(--mono);
  color: var(--dim);
}
.ask-in::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
@media (max-width: 640px) {
  .nav .nav-cta .cta-l {
    display: none;
  }
  .nav .nav-cta .cta-s {
    display: inline;
  }
}

/* ---------- phones: long card stacks become swipeable rows (the page was ~30 screens tall) ---------- */
@media (max-width: 640px) {
  .unlocks {
    display: flex;
    gap: 12px;
    margin: 28px calc(-1 * var(--gut)) 0;
    padding: 0 var(--gut) 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .unlocks > li {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .loop {
    display: flex;
    gap: 16px;
    margin-left: calc(-1 * var(--gut));
    margin-right: calc(-1 * var(--gut));
    padding: 0 var(--gut) 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .loop > li {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }
  .unlocks::-webkit-scrollbar,
  .loop::-webkit-scrollbar,
  .fd-grid::-webkit-scrollbar {
    display: none;
  }
}

/* ---------- chapters: a rail on wide screens, a button and a sheet on phones ---------- */
.ch-rail {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 40;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
html[data-past-top] .ch-rail {
  opacity: 1;
  pointer-events: auto;
}
.ch-dot {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
  transition:
    background-color 0.25s,
    transform 0.25s var(--ease);
}
.ch-dot span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font: 500 12px / 1 var(--sans);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ch-dot:hover span,
.ch-dot:focus-visible span {
  opacity: 1;
}
.ch-dot[aria-current] {
  background: var(--excite);
  transform: scale(1.35);
}
.ch-rail.flash .ch-dot[aria-current] span {
  opacity: 1;
}
.ch-rail:hover .ch-dot[aria-current]:not(:hover) span {
  opacity: 0;
}
.ch-btn {
  display: none;
}
.ch-sheet {
  border: 0;
  padding: 8px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(78vh, 640px);
  margin: auto auto 16px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(14, 19, 22, 0.3);
}
.ch-sheet::backdrop {
  background: rgba(14, 19, 22, 0.3);
}
.ch-sheet ol {
  display: grid;
}
.ch-sheet button {
  display: flex;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  padding: 12px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  font: 500 16px / 1.2 var(--sans);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.ch-sheet li[data-on] button {
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.ch-n {
  font: 500 11.5px / 1 var(--mono);
  color: var(--dim);
}
@media (max-width: 1100px) {
  .ch-rail {
    display: none;
  }
  .ch-btn {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 45;
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font: 500 12.5px / 1 var(--mono);
    color: var(--ink);
    box-shadow: 0 10px 24px -12px rgba(14, 19, 22, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }
  html[data-past-top] .ch-btn {
    opacity: 1;
    pointer-events: auto;
  }
  .narrator {
    bottom: 64px;
  }
}

/* "How it works" cards: `.step` is a grid with no explicit column, so its implicit column took the
   width of its widest child (1,020 px at tablet widths) and the first card ran off the screen. */
.step {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.step .fig {
  min-width: 0;
  overflow: hidden;
}

/* Header at laptop and tablet widths: labels never wrap onto two lines. Ask collapses to its icon
   below 1240 px; below 1180 px the section links give way (the chapters button navigates there). */
.nav .links a,
.nav .nav-cta {
  white-space: nowrap;
}
@media (max-width: 1240px) {
  .nav .ask-btn span,
  .nav .ask-btn kbd {
    display: none;
  }
  .nav .ask-btn {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 1180px) {
  .nav .links {
    display: none;
  }
  .nav .ask-btn {
    margin-left: auto;
  }
}

/* Phones: carousels snap to the gutter, not the screen edge; the CTA drops its arrow so the live
   chip keeps its words. */
@media (max-width: 640px) {
  .fd-grid,
  .unlocks,
  .loop {
    scroll-padding-inline: var(--gut);
  }
}
@media (max-width: 420px) {
  .nav .nav-cta svg {
    display: none;
  }
  .nav .pulse {
    max-width: 140px;
    padding-right: 8px;
  }
}

/* /agents: long code lines scroll inside their block; they never widen the page. */
.docs {
  grid-template-columns: minmax(0, 1fr);
}
.docs pre {
  max-width: 100%;
}
.docs p {
  overflow-wrap: anywhere;
}

/* Hero at laptop widths: a narrower replay card, so it no longer covers the visual's labels. */
@media (max-width: 1240px) and (min-width: 1001px) {
  .hero-vis .trial {
    width: 280px;
    padding: 14px 14px 12px;
  }
}

/* ======================================================================================
   Phones (640 px and under): their own first screen, a tab bar, and "Right now".
   The landing on a phone was the desktop page stacked: a four-control header, a three-row live
   bar, a five-line lede, a cropped hero picture and ~29 screens. Here the header keeps the logo
   and the live chip; the hero is a live card, the headline, one sentence, "Ask the record" and
   two buttons; the way around moves to a tab bar under the thumb. Wide screens are unchanged.
   ====================================================================================== */

/* Pieces that exist only on phones, hidden elsewhere. */
.hero-live,
.hero-ask,
.tabbar,
.cl-more,
.rs-more,
.btn .lbl-short,
.pulse .pv-s {
  display: none;
}

/* ---------- "Right now": the header chip opens it (a popover, on every width) ---------- */
.nav .pulse {
  cursor: pointer;
}
.pulse .pv-c {
  width: 12px;
  height: 12px;
  flex: none;
  margin-left: -1px;
  color: var(--faint);
  transition: transform 0.2s var(--ease);
}
.nav .pulse:has(+ .rn:popover-open) {
  border-color: var(--ink);
  background: var(--white);
}
.nav .pulse:has(+ .rn:popover-open) .pv-c {
  transform: rotate(180deg);
}
.rn {
  position: fixed;
  inset: auto;
  top: 70px;
  left: 12px;
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100dvh - 96px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 70px -24px rgba(14, 19, 22, 0.4);
}
.rn::backdrop {
  background: rgba(14, 19, 22, 0.12);
}
.now-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 0 16px;
}
.now-k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 10.5px / 1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--excite);
}
.now-k i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--excite);
  box-shadow: 0 0 0 4px var(--ex-soft);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.rn[data-state="halted"] .now-k {
  color: var(--inhibit);
}
.rn[data-state="halted"] .now-k i {
  background: var(--inhibit);
  box-shadow: 0 0 0 4px var(--in-soft);
}
.rn[data-state="offline"] .now-k i,
.rn[data-state="idle"] .now-k i {
  animation: none;
}
.now-x {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--ink-2);
  cursor: pointer;
}
.now-x svg {
  width: 14px;
  height: 14px;
}
.now-line {
  margin: 10px 16px 0;
  font: 500 15.5px / 1.45 var(--sans);
  color: var(--ink);
  text-wrap: pretty;
}
.now-sub {
  margin: 16px 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 500 10.5px / 1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.now-feed {
  display: grid;
  margin: 4px 0 0;
  padding: 0 16px;
}
.now-feed li {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 11px 0 11px 18px;
}
.now-feed li + li {
  border-top: 1px dashed var(--line);
}
.now-feed li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}
.now-feed li[data-tone="result"]::before {
  background: var(--excite);
}
.now-feed li[data-tone="decide"]::before {
  background: var(--eyespot);
}
.now-feed li[data-tone="chain"]::before {
  background: var(--chain);
}
.now-feed li[data-tone="stop"]::before {
  background: var(--inhibit);
}
.now-feed p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font: 400 14px / 1.45 var(--sans);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.now-feed time {
  font: 400 11.5px / 1 var(--mono);
  color: var(--faint);
}
.now-feed .now-empty {
  padding-left: 0;
}
.now-feed .now-empty::before {
  display: none;
}
.now-go {
  display: flex;
  justify-content: center;
  margin: 8px 16px 16px;
}

/* ---------- the "Notebook" rows a phone keeps short ---------- */
.more-rows {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px dashed var(--line-2);
  background: var(--white);
  font: 500 14.5px / 1 var(--sans);
  color: var(--ink);
  cursor: pointer;
}
.more-rows:hover {
  border-color: var(--ink);
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  /* ---------- header: the logo and the live chip; Ask and the way in move down ---------- */
  .nav-row {
    min-height: 60px;
    gap: 10px;
  }
  .nav .nav-cta,
  .nav .ask-btn {
    display: none;
  }
  .nav .pulse {
    margin-left: auto;
    max-width: none;
    height: 36px;
    gap: 7px;
    padding: 0 10px 0 9px;
    font-size: 12.5px;
  }
  .nav .pulse b {
    font-size: 12.5px;
  }
  .live-strip {
    display: none;
  }
  .rn {
    top: 66px;
    left: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 66px - 82px - env(safe-area-inset-bottom));
  }

  /* ---------- hero ---------- */
  .hero {
    padding-block: 18px 30px;
  }
  .hero-grid {
    gap: 0;
  }
  .hero-copy {
    gap: 0;
  }
  .lede-more {
    display: none;
  }
  /* The copy's pieces join the hero grid, so the visual can sit between the buttons and "Ask the
     record": live card, eyebrow, headline, lede, buttons, visual, ask, readers. */
  .hero-copy {
    display: contents;
  }
  .hero-copy > .hero-live {
    order: 1;
  }
  .hero-copy > .eyebrow {
    order: 2;
    margin-top: 30px;
  }
  .hero-copy > h1 {
    order: 3;
  }
  .hero-copy > .lede {
    order: 4;
  }
  .hero-copy > .ctas {
    order: 5;
  }
  .hero-grid > .hero-vis {
    order: 6;
    margin: 28px calc(-1 * var(--gut)) 0;
  }
  .hero-copy > .hero-ask {
    order: 7;
  }
  .hero-copy > .starts {
    order: 8;
  }
  /* The flagship visual, whole: the network under the beam, the replay card over its lower edge
     as on wide screens. */
  .hero-vis .field {
    height: 380px;
  }
  .hero-vis .trial {
    margin: -52px var(--gut) 0;
    max-width: none;
  }
  .hero-live {
    display: grid;
    gap: 9px;
    padding: 13px 15px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 18px 40px -30px rgba(14, 19, 22, 0.45);
    color: var(--ink);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .hero-live:active {
    border-color: var(--line-2);
  }
  .hl-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .hl-k {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px 5px 8px;
    border-radius: 999px;
    background: var(--ex-soft);
    font: 600 10.5px / 1 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--excite);
  }
  .hl-k i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1.6s steps(2, jump-none) infinite;
  }
  .hero-live[data-state="halted"] .hl-k {
    background: var(--in-soft);
    color: var(--inhibit);
  }
  .hero-live[data-state="idle"] .hl-k {
    background: var(--chain-soft);
    color: var(--chain);
  }
  .hero-live[data-state="offline"] .hl-k {
    background: rgba(14, 19, 22, 0.06);
    color: var(--dim);
  }
  .hero-live[data-state="idle"] .hl-k i,
  .hero-live[data-state="offline"] .hl-k i {
    animation: none;
  }
  .hl-go {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font: 500 13.5px / 1 var(--sans);
    color: var(--ink);
    white-space: nowrap;
  }
  .hero-live[data-tone="call"] .hl-go {
    color: var(--eyespot);
  }
  .hl-go svg {
    width: 14px;
    height: 14px;
  }
  .hl-line {
    font: 400 15px / 1.45 var(--sans);
    color: var(--ink-2);
    text-wrap: pretty;
  }
  .hero-copy h1 {
    margin-top: 14px;
    font-size: clamp(36px, 10.6vw, 44px);
    line-height: 1.04;
    letter-spacing: -0.022em;
  }
  .hero-copy .lede {
    margin-top: 14px;
    max-width: 34ch;
    font-size: 17px;
    line-height: 1.5;
  }
  .hero-ask {
    display: grid;
    gap: 10px;
    margin-top: 30px;
  }
  .ha-k {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font: 500 10.5px / 1 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
  }
  .ha-k span + span {
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--faint);
  }
  .ha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    padding: 0 6px 0 15px;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: var(--white);
    color: var(--dim);
    font: 400 16px / 1 var(--sans);
    text-align: left;
    cursor: text;
    box-shadow: 0 10px 30px -24px rgba(14, 19, 22, 0.5);
    -webkit-tap-highlight-color: transparent;
  }
  .ha-box:active {
    border-color: var(--ink);
  }
  .ha-box svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }
  .ha-ph {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ha-go {
    flex: none;
    display: grid;
    place-items: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font: 500 15px / 1 var(--sans);
  }
  .ha-try {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline: calc(-1 * var(--gut));
    padding: 2px var(--gut);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .ha-try::-webkit-scrollbar {
    display: none;
  }
  .ha-try span {
    flex: none;
    margin-right: 2px;
    font: 400 12.5px / 1 var(--mono);
    color: var(--faint);
  }
  .ha-try button {
    flex: none;
    height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.8);
    font: 500 12.5px / 1 var(--mono);
    color: var(--ink-2);
    white-space: nowrap;
    cursor: pointer;
  }
  .hero-copy .ctas {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 24px;
  }
  .hero-copy .ctas .btn {
    justify-content: center;
    min-height: 52px;
    padding: 0 20px;
  }
  .ctas .btn .lbl-long {
    display: none;
  }
  .ctas .btn .lbl-short {
    display: inline;
  }
  .hero-copy .starts {
    flex-wrap: nowrap;
    gap: 8px;
    margin: 24px calc(-1 * var(--gut)) 0;
    padding: 2px var(--gut);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hero-copy .starts::-webkit-scrollbar {
    display: none;
  }
  .hero-copy .starts-l {
    width: auto;
    flex: none;
    margin-right: 2px;
  }
  .hero-copy .starts a {
    flex: none;
  }
  .creds {
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
  }
  .creds li,
  .creds li + li {
    margin: 0;
    padding: 13px 16px 14px;
    border-left: 0;
  }
  .creds li + li {
    border-top: 1px solid var(--line);
  }
  .creds a {
    position: relative;
    display: block;
    padding-right: 24px;
    border-bottom: 0;
  }
  .creds a::after {
    content: "\2192";
    position: absolute;
    top: 0;
    right: 0;
    color: var(--faint);
  }

  /* ---------- Notebook #001: the first rows, then one tap for the rest ---------- */
  .cl-rows:not([data-all]) > .cl-row:nth-child(n + 5),
  .rs-rows:not([data-all]) > .rs-row:nth-child(n + 7) {
    display: none;
  }
  .cl-more,
  .rs-more {
    display: block;
    padding: 14px;
  }
  .cl-more {
    border-top: 1px solid var(--line);
  }

  /* ---------- the tab bar ---------- */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0 6px env(safe-area-inset-bottom);
    background: rgba(246, 246, 242, 0.94);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border-top: 1px solid var(--line);
  }
  .tabbar > a,
  .tabbar > button {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    height: 64px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dim);
    font: 500 11px / 1 var(--sans);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tabbar [aria-current="page"] {
    color: var(--ink);
  }
  .tabbar [aria-current="page"]::before {
    content: "";
    position: absolute;
    inset: 7px 8px;
    z-index: -1;
    border-radius: 14px;
    background: rgba(14, 19, 22, 0.07);
  }
  .tabbar a[data-state="running"]::after {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(50% + 6px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--eyespot);
    box-shadow: 0 0 0 2px var(--paper);
    animation: blink 1.6s steps(2, jump-none) infinite;
  }
  .tabbar .tb-ask {
    align-content: end;
    padding-bottom: 9px;
    color: var(--ink);
  }
  .tb-ring {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-top: -20px;
    border-radius: 50%;
    background: var(--ink);
    box-shadow:
      0 0 0 5px var(--paper),
      0 12px 26px -10px rgba(14, 19, 22, 0.55);
  }
  .tabbar .tb-ring svg {
    stroke: #fff;
    stroke-width: 1.9;
  }
  .tabbar > :active {
    opacity: 0.7;
  }
  .ch-btn {
    display: none;
  }
  .narrator {
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    max-width: none;
  }
}

/* ---------- More: every page, and on the landing its chapters (a sheet from the bottom) ---------- */
.more-sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  max-height: min(84dvh, 760px);
  margin: 0;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 -24px 70px rgba(14, 19, 22, 0.28);
  transition:
    transform 0.32s var(--ease),
    overlay 0.32s allow-discrete,
    display 0.32s allow-discrete;
}
.more-sheet:not(:popover-open) {
  transform: translateY(100%);
}
@starting-style {
  .more-sheet:popover-open {
    transform: translateY(100%);
  }
}
.more-sheet::backdrop {
  background: rgba(14, 19, 22, 0.32);
}
.more-h {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 8px;
  background: var(--paper);
}
.more-h::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 2px;
  background: var(--line-2);
}
.more-h b {
  font: 600 12px / 1 var(--mono);
  letter-spacing: 0.16em;
}
.more-k {
  margin: 14px 2px 8px;
  font: 500 10.5px / 1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
[data-chapters]:empty {
  display: none;
}
.more-ch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.more-ch button {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font: 500 14px / 1.2 var(--sans);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.more-ch li[data-on] button {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.more-pages {
  display: grid;
  gap: 6px;
}
.more-pages a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}
.more-pages a[aria-current="page"] {
  border-color: var(--ink);
}
.more-pages b {
  font: 500 15px / 1.2 var(--sans);
}
.more-pages span {
  font-size: 13px;
  line-height: 1.35;
  color: var(--dim);
}
@media (prefers-reduced-motion: reduce) {
  .more-sheet {
    transition: none;
  }
}

/* ---------- phones, the rest of the landing: shorter gaps, compact facts, smaller pictures ---------- */
@media (max-width: 640px) {
  .sec {
    padding-block: 60px;
  }
  .findings {
    padding: 44px 0 8px;
  }
  /* The three market facts as a table: the figure, then what it counts. */
  .stats {
    margin-top: 36px;
  }
  .stats .stat,
  .stats .stat + .stat {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 16px 0;
    border-left: 0;
  }
  .stats .stat + .stat {
    border-top: 1px solid var(--line);
  }
  .stat b {
    font-size: 36px;
  }
  .stat span {
    font-size: 14.5px;
    line-height: 1.4;
  }
  /* The fee legend: one column for the names, one for what each does. */
  .fee-l {
    grid-template-columns: 12px auto minmax(0, 1fr);
    column-gap: 10px;
  }
  .fee-l li {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }
}

/* ---------- phones, app pages: the tab bar has Ask; a verdict row reads top to bottom ---------- */
@media (max-width: 640px) {
  .app-nav .ask-btn {
    display: none;
  }
  .app-nav .wrap {
    height: 60px;
  }
  .nb-page .rs-row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "p p" "v e" "d d";
    row-gap: 10px;
  }
  .nb-page .rs-row > .rs-e {
    justify-self: end;
    text-align: right;
  }
  .nb-page .rs-row > .vchip {
    justify-self: start;
  }
  .ask-row kbd {
    display: none;
  }
}

/* Tablets and phones: the header chip says the short form ("#002 24:17"), whole, beside its chevron. */
@media (max-width: 900px) {
  .pulse .pv-l {
    display: none;
  }
  .pulse .pv-s {
    display: inline;
    font-variant-numeric: tabular-nums;
  }
  .nav .pulse {
    max-width: none;
  }
}

/* With viewport-fit=cover (app/layout.tsx) a landscape iPhone draws under its notch: keep the gutter
   at least as wide as the safe area. */
.wrap {
  padding-left: max(var(--gut), env(safe-area-inset-left));
  padding-right: max(var(--gut), env(safe-area-inset-right));
}

/* Narrow phones: "An autonomous lab for the agent economy" stays on one line. */
@media (max-width: 380px) {
  .hero-copy > .eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.08em;
  }
}
