/* OPSIN v5: Notebook #001 (real), pocket trial on the visitor's Claude, the lab loop, agents, token ledger. */

/* ---------- hero bits ---------- */
.lede b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.creds a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.creds a:hover { border-color: var(--ink); }

/* ---------- notebook ---------- */
.nb-meta { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 44px 0 0; border-top: 1px solid var(--ink); }
.nb-meta div { display: grid; gap: 6px; align-content: start; padding: 16px 16px 0 0; }
.nb-meta div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.nb-meta dt { font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.nb-meta dd { margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--ink); font-variant-numeric: tabular-nums; }
.nb-meta dd a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.nb-meta dd a:hover { border-bottom-color: var(--ink); }

/* call it */
.callit { margin-top: 36px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); overflow: hidden; box-shadow: 0 40px 80px -60px rgba(14, 19, 22, .45); }
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 18px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.cl-ask { display: grid; gap: 3px; }
.cl-ask b { font: 400 24px/1.1 var(--serif); letter-spacing: -.012em; }
.cl-ask span { font-size: 14.5px; color: var(--ink-2); }
.cl-score { font: 400 12.5px/1 var(--mono); color: var(--dim); white-space: nowrap; }
.cl-score b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.cl-score .sep { margin: 0 8px; color: var(--faint); }
.cl-row { display: grid; grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr); align-items: center; gap: 12px 20px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.cl-part { display: grid; gap: 3px; min-width: 0; }
.cl-part b { font: 500 15.5px/1.25 var(--sans); }
.cl-part span { font: 400 12px/1.35 var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-guess { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.cl-guess button { font: 500 13px/1 var(--sans); color: var(--ink-2); background: transparent; border: 0; padding: 9px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.cl-guess button:hover:not(:disabled) { background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.cl-guess button:disabled { cursor: default; }
.cl-guess button.picked { background: var(--ink); color: #fff; }
.cl-guess button.picked.right { background: var(--chain); }
.cl-guess button.picked.wrong { background: var(--eyespot); }
.cl-guess button.truth:not(.picked) { box-shadow: inset 0 0 0 1.5px var(--chain); color: var(--chain); }
.cl-out { display: flex; align-items: center; gap: 12px; min-width: 0; justify-content: flex-end; font: 400 12.5px/1.2 var(--mono); color: var(--faint); }
.cl-out .cl-q { letter-spacing: .3em; }
.cl-out .vchip { flex: none; }
.cl-out .eff { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; }
.cl-out .chl { color: var(--dim); white-space: nowrap; }
.cl-out .chl.hit { color: var(--chain); }
.cl-row.shown .cl-out { animation: clin .5s var(--ease); }
@keyframes clin { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.cl-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 20px; background: var(--paper); font-size: 13.5px; color: var(--dim); }
.cl-foot .btn { padding: 10px 14px; font-size: 14px; }

/* results */
.results { margin-top: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); overflow: hidden; }
.rs-top { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.rs-base { font: 400 12.5px/1.4 var(--mono); color: var(--dim); }
.rs-base b { color: var(--ink); font-weight: 500; }
.rs-row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr) 100px 72px 70px; align-items: center; gap: 10px 16px; padding: 11px 20px; border-bottom: 1px solid var(--line); font: 400 13px/1.2 var(--mono); }
.rs-head { padding-block: 10px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.rs-p { display: grid; gap: 3px; min-width: 0; }
.rs-p b { font: 500 14.5px/1.25 var(--sans); color: var(--ink); }
.rs-p span { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-row.ctrl { background: linear-gradient(90deg, rgba(14, 19, 22, .025), transparent 70%); }
.rs-row.ctrl .rs-p b::after { content: "control"; margin-left: 8px; font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 4px; vertical-align: 2px; }
.rs-e { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.rs-c { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rs-c.warn { color: var(--eyespot); }
.rs-row .vchip { justify-self: start; }
.dots { position: relative; display: flex; align-items: center; justify-content: space-between; height: 16px; }
.dots i { position: relative; z-index: 1; width: 5px; height: 5px; border-radius: 50%; background: #dddcd2; flex: none; }
.dots i.bd { background: #cfcfc4; }
.dots i.z { background: transparent; box-shadow: 0 0 0 1.25px var(--ink-2); }
.dots i.on { background: var(--c, var(--excite)); transform: scale(1.3); }
.dots i.est { transform: scale(1.9); }
.rs-row[data-v="excites"], .cl-row[data-v="excites"] { --c: var(--excite); }
.rs-row[data-v="inhibits"], .cl-row[data-v="inhibits"] { --c: var(--inhibit); }
.rs-row[data-v="inert"], .cl-row[data-v="inert"] { --c: #8c979a; }
.rs-row[data-v="unresolved"], .cl-row[data-v="unresolved"] { --c: var(--unres); }
.rs-note { padding: 14px 20px 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); background: var(--paper); }
.rs-note b { color: var(--ink); font-weight: 500; }

/* frontier + takes */
.nb-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 4vw, 56px); margin-top: 28px; align-items: start; }
.frontier { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--white); padding: 14px 14px 12px; }
.frontier canvas { display: block; width: 100%; height: 360px; }
.frontier figcaption { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); font: 400 12px/1.4 var(--mono); color: var(--dim); }
.nb-take { display: grid; gap: 18px; padding-top: 6px; }
.takes { display: grid; gap: 0; border-top: 1px solid var(--ink); counter-reset: tk; }
.takes li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.takes b { font: 400 30px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.takes b.ex { color: var(--excite); }
.takes b.in { color: var(--inhibit); }
.takes b.dim { color: var(--ink-2); }
.takes p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.takes p strong { color: var(--ink); font-weight: 500; }
.nb-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.nb-files a { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--mono); color: var(--ink-2); text-decoration: none; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--white); transition: border-color .2s, color .2s; }
.nb-files a::before { content: ""; width: 9px; height: 9px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg) translate(1px, -2px); }
.nb-files a:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- try it ---------- */
.split-run { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
.run-notes { display: grid; gap: 10px; margin-top: 6px; }
.run-notes li { font-size: 15.5px; color: var(--ink-2); padding-left: 18px; position: relative; }
.run-notes li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--excite); }
.run-notes b { color: var(--ink); font-weight: 600; }
.run-badge { color: var(--chain); border-color: rgba(19, 138, 125, .5); border-style: solid; }
.run-badge.off { color: var(--dim); border-color: var(--line-2); border-style: dashed; }
.run-form { display: grid; gap: 10px; padding: 16px 16px 14px; }
.run-form label { font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.run-form textarea { width: 100%; resize: vertical; min-height: 64px; font: 400 14.5px/1.45 var(--mono); color: var(--ink); background: var(--white); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; }
.run-form textarea:focus { outline: none; border-color: var(--excite); box-shadow: 0 0 0 3px rgba(31, 111, 229, .15); }
.run-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.run-presets button { font: 500 12px/1 var(--mono); color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; cursor: pointer; }
.run-presets button:hover { border-color: var(--ink); color: var(--ink); }
.run-presets button[aria-pressed="true"] { border-color: var(--excite); color: var(--excite); background: var(--ex-soft); }
.run-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.run-act .btn { padding: 12px 16px; font-size: 14.5px; }
.run-act .btn:disabled { opacity: .45; cursor: not-allowed; }
.run-tier { font: 400 11.5px/1.3 var(--mono); color: var(--faint); }
.run-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.pc { display: grid; gap: 4px; justify-items: center; padding: 6px 0 5px; border-radius: 7px; background: var(--white); border: 1px solid var(--line); transition: border-color .3s, background-color .3s; }
.pc i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #d7d7cd; transition: background-color .3s, box-shadow .3s; }
.pc.run { border-color: #8fb4ef; animation: pcrun 1.1s ease-in-out infinite; }
@keyframes pcrun { 50% { background: var(--ex-soft); } }
.pc i.y.off { background: var(--ink-2); box-shadow: none; }
.pc i.n.off { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.pc i.y.on { background: var(--excite); box-shadow: none; }
.pc i.n.on { box-shadow: inset 0 0 0 1.5px var(--excite); }
.pc.diff-up { border-color: rgba(31, 111, 229, .55); }
.pc.diff-dn { border-color: rgba(217, 130, 0, .6); background: var(--in-soft); }
.run-out { display: grid; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.run-ci { display: flex; align-items: center; justify-content: space-between; height: 16px; }
.run-ci i { width: 6px; height: 6px; border-radius: 50%; background: #dddcd2; }
.run-ci i.bd { background: #cfcfc4; }
.run-ci i.z { background: transparent; box-shadow: 0 0 0 1.25px var(--ink-2); }
.run-ci i.on { background: var(--c, #8fb4ef); transform: scale(1.3); }
.run-ci i.est { transform: scale(1.9); }
.run-out[data-v="excites"] { --c: var(--excite); }
.run-out[data-v="inhibits"] { --c: var(--inhibit); }
.run-out[data-v="inert"] { --c: #8c979a; }
.run-out[data-v="unresolved"] { --c: var(--unres); }
.run-ax { display: flex; justify-content: space-between; font: 400 10.5px/1 var(--mono); color: var(--faint); margin-top: -4px; }
.run-res { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.run-est { font: 400 28px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.run-msg { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.run-msg b { color: var(--ink); font-weight: 500; }
.run-msg.err { color: var(--eyespot); }

/* ---------- lab loop ---------- */
.feed:empty::before { content: "Loading the notebook\2026"; display: block; padding: 11px 0; color: var(--faint); font-size: 14px; }
.feed li.hot span { color: var(--ink); }
.feed li a { color: inherit; }
.agent-live.done i { animation: none; }
.loop { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: clamp(44px, 5vw, 68px); border-top: 1px solid var(--ink); counter-reset: lp; }
.loop li { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px 18px 0 0; transition: opacity .4s; }
.loop li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.loop li::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: transparent; transition: background-color .4s; }
.loop li.on::before { background: var(--excite); }
.lp-n { font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--dim); }
.loop li.on .lp-n { color: var(--excite); }
.loop b { font: 400 24px/1.1 var(--serif); font-weight: 400; letter-spacing: -.012em; }
.loop p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

/* ---------- agents ---------- */
.hire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.hire-c { display: grid; grid-template-rows: auto 1fr; border-radius: 16px; overflow: hidden; background: #0f1518; border: 1px solid #0f1518; box-shadow: 0 40px 80px -56px rgba(14, 19, 22, .6); min-width: 0; }
.hire-c header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #243034; }
.hc-k { font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #9fb0b4; }
.hc-t { font: 400 11.5px/1.2 var(--mono); color: #6f8185; white-space: nowrap; }
.hire-c pre { margin: 0; padding: 14px 14px 16px; overflow-x: auto; font: 400 12.5px/1.65 var(--mono); color: #dbe3e4; tab-size: 2; }
.hire-c code { font: inherit; }
.c-p { color: #8db8ff; }
.c-d { color: #6f8185; }
.c-x { color: #6aa5ff; font-weight: 600; }
.c-i { color: #f0a640; font-weight: 600; }
.c-n { color: #a9b5b8; font-weight: 600; }
.c-m { color: #f0a640; }
.hire-note { margin-top: 22px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 80ch; }
.hire-note b { color: var(--ink); font-weight: 600; }
.hire-note span { display: block; margin-top: 6px; font: 400 12px/1.4 var(--mono); color: var(--faint); }

/* ---------- token ledger ---------- */
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.lg-col { display: grid; gap: 12px; align-content: start; padding: 20px 22px 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--white); }
.lg-k { font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--chain); }
.lg-col.no .lg-k { color: var(--eyespot); }
.lg-col.cost .lg-k { color: var(--ink-2); }
.lg-col ul { display: grid; gap: 9px; }
.lg-col li { position: relative; padding-left: 24px; font-size: 15px; color: var(--ink-2); }
.lg-col li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 11px; height: 6px; border-left: 2px solid var(--chain); border-bottom: 2px solid var(--chain); transform: rotate(-45deg); }
.lg-col.no li::before { width: 12px; height: 2px; top: .7em; border: 0; background: var(--eyespot); transform: none; }
.lg-big { font: 400 46px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lg-col.cost p:last-child { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.agents-too { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 15.5px; color: var(--ink-2); }
.agents-too .st-mark { width: 18px; height: 18px; color: var(--ink); flex: none; }

/* ---------- roadmap ---------- */
.road li.done::before { background: var(--chain); border-color: var(--chain); }
.road .done span { color: var(--chain); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nb-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nb-meta div:nth-child(4) { padding-left: 0; border-left: 0; }
  .nb-meta div:nth-child(n + 4) { border-top: 1px solid var(--line); margin-top: 14px; }
  .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  .loop li:nth-child(4) { padding-left: 0; border-left: 0; }
  .hire { grid-template-columns: minmax(0, 1fr); }
  .hire-c { grid-template-columns: minmax(0, .42fr) minmax(0, 1fr); grid-template-rows: auto; }
  .hire-c header { flex-direction: column; align-items: flex-start; justify-content: flex-start; border-bottom: 0; border-right: 1px solid #243034; }
}
@media (max-width: 1000px) {
  .nb-split, .split-run { grid-template-columns: minmax(0, 1fr); }
  .rs-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 96px 64px; }
  .rs-row > :nth-child(5) { display: none; }
  .ledger { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cl-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cl-out { justify-content: flex-start; }
  .rs-row { grid-template-columns: minmax(0, 1fr) 92px 58px; grid-template-areas: "p v e" "d d d"; row-gap: 8px; }
  .rs-row > .rs-p { grid-area: p; }
  .rs-row > .dots { grid-area: d; }
  .rs-row > .vchip { grid-area: v; }
  .rs-row > .rs-e { grid-area: e; }
  .rs-head { display: none; }
  .hire-c { grid-template-columns: minmax(0, 1fr); }
  .hire-c header { flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid #243034; }
}
@media (max-width: 680px) {
  .nb-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-meta div:nth-child(n) { padding-left: 0; border-left: 0; padding-right: 12px; }
  .nb-meta div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .nb-meta div:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 12px; }
  .cl-head, .cl-row, .cl-foot, .rs-top, .rs-row, .rs-note { padding-inline: 14px; }
  .cl-guess { width: 100%; }
  .cl-guess button { flex: 1; padding-inline: 6px; }
  .frontier canvas { height: 300px; }
  .takes li { grid-template-columns: minmax(0, 1fr); }
  .run-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); padding-inline: 12px; }
  .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loop li:nth-child(n) { padding-left: 0; border-left: 0; padding-right: 12px; }
  .loop li:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .pc.run, .cl-row.shown .cl-out { animation: none; }
}

/* hero replay: the card's scale is +/-50 points, so the INERT band (+/-5) is 45% to 55% */
.trial .ci-band { left: 45%; width: 10%; }
.verdict[data-v="unresolved"] { color: var(--unres); background: #f1eefd; border-style: dashed; }
.trial-ci[data-tone="unresolved"] .ci-bar { background: rgba(109, 84, 232, .14); border-color: var(--unres); }
.trial-ci[data-tone="unresolved"] .ci-dot { border-color: var(--unres); }
.run-act .btn[hidden] { display: none; }
@media (max-width: 680px) {
  .run-form textarea { min-height: 92px; }
  .rs-seg { width: 100%; }
  .rs-seg .seg-b { flex: 1; justify-content: center; }
}

.btn[hidden] { display: none !important; }
.nb-dl-msg { margin-top: 10px; min-height: 1em; font: 400 12px/1.3 var(--mono); color: var(--chain); }
.feed code { font: 500 12.5px/1 var(--mono); color: var(--ink); }
.cl-foot .cl-share { margin-left: auto; }
.cl-note { font: 400 12px/1.3 var(--mono); color: var(--chain); }

/* use cases: one real fact per path */
.pane-real { margin-top: 12px; padding: 10px 0 10px 14px; border-left: 2px solid var(--excite); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.pane-real:empty { display: none; }
.pane-real::before { content: "Real \00b7  Notebook #001"; display: block; margin-bottom: 4px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--excite); }
.pane-real b { color: var(--ink); font-weight: 600; }
