/* Treasury page. Tokens follow design/treasury-*.png; see docs/superpowers/specs/2026-09-26-treasury-page-design.md. */
:root {
  --bg: #F4F2EE; --surface: #FFFFFF; --surface-2: #FAF9F6; --tag: #E9E6DF; --footer: #ECE9E3;
  --ink: #151513; --ink-2: #5F5B54; --ink-3: #A19C93; --line: #E4E0D8;
  --lime: #E3F25A; --lime-soft: #F6FAD6; --lime-line: #D6E27A;
  --blue: #4E6AF0; --blue-soft: #D9E0FC; --olive: #B6C957; --red: #C4432F; --green: #3FA66B;
  --serif: "Newsreader", Georgia, serif; --sans: "Geist", system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; }
code, .mono { font-family: var(--mono); }
.wrap { max-width: 1200px; margin: 0 auto; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* which sections a state shows */
body[data-state="out"] .in-only,
body:not([data-state="out"]) .out-only,
body:not([data-state="vault"]) .vault-only,
body:not([data-state="novault"]) .novault-only,
[hidden] { display: none !important; }

/* top bar */
.topbar { border-bottom: 1px solid var(--line); padding: 0 24px; }
.topbar .providers { padding: 0 24px 12px; }
.topbar .providers:empty { display: none; }
.topbar .wrap { padding: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font: 22px var(--serif); letter-spacing: -.3px; text-decoration: none; }
.brand::before { content: ""; width: 22px; height: 22px; background: url(/inferest-icon.svg) center / contain no-repeat; }
.account { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: end; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.pick { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; font: 12px var(--mono); color: var(--ink-3); }
.pick.on { color: var(--ink); border-color: var(--ink-3); }
.linkbtn { background: none; border: 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.linkbtn:hover { color: var(--ink); }
.providers { display: flex; flex-wrap: wrap; gap: 8px; }

/* sections */
section { padding: 56px 24px; }
section + section { border-top: 1px solid var(--line); }
.tag { display: inline-flex; gap: 8px; align-items: center; padding: 4px 10px; background: var(--tag); border-left: 2px solid var(--ink-3); font-size: 12px; color: var(--ink-2); }
.tag select { border: 0; background: none; font-size: 12px; color: var(--ink-2); padding: 0; }
.flag { padding: 1px 6px; border-radius: 4px; font-size: 11px; background: #F6DCD6; color: var(--red); }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -1px; line-height: 1.1; }
h1 { font-size: 48px; }
h2 { font-size: 32px; letter-spacing: -.5px; line-height: 1.15; }
h1 .second, h2 .second { display: block; color: var(--ink-3); }
.head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.head.row { flex-direction: row; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }

/* cards, buttons, inputs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn-small { padding: 7px 12px; font-size: 12px; font-weight: 400; }
.btn-danger { color: var(--red); }
.btn-lime { background: var(--lime); border-color: var(--lime); padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 400; }
.field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; }
.field:focus-within { border-color: var(--ink); }
.pillfield { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.pillfield label { font-size: 12px; color: var(--ink-3); }
.pillfield input { border: 0; outline: none; background: none; font: 13px var(--mono); width: 120px; }
.pillfield input[type="number"] { width: 40px; }

/* signed out */
.hero { padding: 96px 24px; }
.hero .wrap { display: flex; gap: 80px; align-items: center; }
.pitch { flex: 1; display: flex; flex-direction: column; gap: 36px; }
.pitch h1 { font-size: 72px; letter-spacing: -2px; line-height: 1.02; }
.pitch p { margin: 0; max-width: 520px; font-size: 17px; color: var(--ink-2); }
.facts { display: flex; }
.facts div { flex: 1; padding: 16px 24px 0 0; border-top: 1px solid var(--line); }
.facts b { display: block; font-weight: 500; }
.facts span { font-size: 13px; color: var(--ink-2); }
.intro { flex: 1; display: flex; flex-direction: column; gap: 32px; }
.intro .notes { max-width: 520px; border-top: 1px solid var(--line); }
.intro .notes li { gap: 14px; padding: 16px 0; border-top: 0; border-bottom: 1px solid var(--line); }
.intro .notes b { font-size: 14px; line-height: 1.3; margin-bottom: 4px; }
.intro .notes span { display: block; line-height: 1.3; }
.intro .noteicon { padding-top: 1px; }
.homelink { margin: 0; font-size: 14px; color: var(--ink-2); }
.homelink a { color: var(--ink); font-weight: 500; text-decoration: none; margin-left: 2px; }
.homelink a:hover { text-decoration: underline; }
.signin { width: 440px; flex: none; padding: 32px; border-radius: 20px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 12px 40px #1A181410; }
.signin h3 { margin: 0 0 6px; font: 26px var(--serif); letter-spacing: -.4px; font-weight: 400; }
.signin p { margin: 0; font-size: 13px; color: var(--ink-2); }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-3); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fine { font-size: 12px !important; color: var(--ink-3) !important; }

/* treasury */
.treasury .grid { display: flex; gap: 20px; align-items: start; }
.yieldcard { flex: 1; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.yieldhead { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.label { font-size: 13px; color: var(--ink-2); }
.figure { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.figure b { font: 400 72px/1 var(--serif); letter-spacing: -2px; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--lime); font: 12px var(--mono); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.vaultmeta { text-align: right; font-size: 13px; color: var(--ink-2); }
.vaultmeta a { display: block; font: 12px var(--mono); color: var(--ink-3); text-decoration: none; }
.bars { display: flex; flex-direction: column; gap: 6px; }
.yieldbar { display: flex; gap: 3px; height: 52px; }
.seg { border-radius: 6px; padding: 0 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.seg small { font-size: 12px; }
.seg span { font: 13px var(--mono); }
.seg.used { background: var(--blue); color: #fff; }
.seg.used small { color: #FFFFFFCC; }
.seg.open { background: var(--blue-soft); flex: 1; }
.seg.open small { color: var(--ink-2); }
.hatch { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 6px, #DDD8CE 6px 7px); }
.principal { height: 52px; border-radius: 6px; border: 1px solid var(--line); padding: 8px 12px; }
.principal div { display: inline-flex; flex-direction: column; padding: 4px 8px; border-radius: 4px; background: var(--surface-2); }
.principal small { font-size: 12px; color: var(--ink-2); line-height: 1.2; }
.principal span { font: 13px var(--mono); }
.breakdown { display: flex; border-top: 1px solid var(--line); padding-top: 20px; }
.breakdown div { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.breakdown small { font-size: 12px; color: var(--ink-2); }
.breakdown span { font: 14px var(--mono); }
.breakdown em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.side { width: 360px; flex: none; display: flex; flex-direction: column; gap: 20px; }
.side .card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cardhead h3 { margin: 0; font-size: 15px; font-weight: 500; }
.amountfield input { font: 18px var(--mono); }
.foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.foot .linkbtn { font-size: 12px; color: var(--red); text-decoration: underline; }
.preview div { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.preview div:last-child { border-bottom: 0; }
.preview small { display: block; font-size: 12px; color: var(--ink-3); }
.preview span { font: 14px var(--mono); }
.preview .yours b { font-weight: 500; }
.preview .yours span { background: var(--lime); padding: 3px 6px; border-radius: 4px; }
.keeper { display: flex; justify-content: center; gap: 16px; }
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .num { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 13px var(--mono); }
.step.done .num { background: var(--ink); border-color: var(--ink); color: #fff; }
.step.now .num { background: var(--lime); border-color: var(--lime); }
.step:not(.done):not(.now) { opacity: .55; }
.step b { display: block; font-size: 16px; font-weight: 500; }
.step p { margin: 4px 0 0; color: var(--ink-2); }

/* keys */
.keytable { overflow: hidden; }
.keytable table { width: 100%; border-collapse: collapse; }
.keytable th { text-align: left; font-weight: 400; font-size: 12px; color: var(--ink-2); background: var(--surface-2); padding: 12px 24px; border-bottom: 1px solid var(--line); }
.keytable td { padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.keytable tr:last-child td { border-bottom: 0; }
.keyname { display: flex; gap: 12px; align-items: center; }
.glyph { width: 32px; height: 32px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.keyname b { font: 400 14px var(--mono); }
.keyname small { display: block; font-size: 12px; color: var(--ink-3); }
.badge { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px; font: 11px var(--sans); }
.badge.new { background: var(--lime); }
.badge.revoked { border: 1px solid var(--line); color: var(--ink-2); }
tr.revoked { opacity: .55; }
tr.revoked b { text-decoration: line-through; }
.amt { font-family: var(--mono); font-size: 13px; }
.spend { width: 300px; padding-right: 56px !important; }
.spend .nums { display: flex; justify-content: space-between; gap: 8px; }
.spend .nums small { font-size: 11px; color: var(--ink-3); }
.spendbar { display: flex; gap: 2px; height: 6px; margin-top: 8px; border-radius: 3px; background: #EEEBE5; overflow: hidden; }
.spendbar i { display: block; border-radius: 3px; background: var(--blue); }
.spendbar i + i { background: var(--olive); }
.actions { text-align: right; white-space: nowrap; }
.actions .btn + .btn { margin-left: 8px; }
.empty { text-align: center; padding: 40px 24px !important; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-weight: 500; }

/* use a key */
.split { display: flex; gap: 64px; }
.explain { width: 380px; flex: none; display: flex; flex-direction: column; gap: 24px; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.notes b { display: block; font-weight: 500; font-size: 13px; }
.notes span { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.codeside { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.newkey { background: var(--lime-soft); border: 1px solid var(--lime-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.newkey .cardhead { justify-content: start; }
.newkey .cardhead b { font-weight: 500; }
.newkey .cardhead span { font-size: 13px; color: var(--ink-2); flex: 1; }
.secretrow { display: flex; gap: 8px; align-items: center; }
.secret { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--lime-line); font: 14px var(--mono); word-break: break-all; }
.window { border-radius: 14px; overflow: hidden; }
.windowbar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #DAD5CC; }
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tabs button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; color: var(--ink-2); }
.tabs button.on { background: var(--surface); border-color: var(--line); color: var(--ink); }
.window pre { margin: 0; padding: 20px 24px 24px; font: 13px/1.6 var(--mono); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* activity */
.feed { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.feed li:last-child { border-bottom: 1px solid var(--line); }
.feed time { width: 56px; flex: none; font: 12px var(--mono); color: var(--ink-3); }
.feed .glyph { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.feed li.error .glyph { color: var(--red); border-color: #F0C9C1; }
.feed .what { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.feed .what b { font-weight: 500; }
.feed .what span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.feed li.error .what span { color: var(--red); }
.feed a { font: 12px var(--mono); color: var(--blue); text-decoration: none; white-space: nowrap; }
.feed .none { color: var(--ink-3); }

/* footer */
footer { background: var(--footer); padding: 28px 24px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
footer .brand { font-size: 17px; }
footer .brand::before { width: 16px; height: 16px; }
footer .tagline { font-size: 13px; color: var(--ink-3); margin-left: 10px; }
.contracts { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.contracts span b { font: 400 12px var(--mono); color: var(--ink-2); margin-left: 6px; }
/* phones: the account chips wrap under the brand and nav instead of pushing the page sideways */
@media (max-width: 600px) {
  .topbar .wrap { flex-wrap: wrap; height: auto; min-height: 64px; padding: 12px 0; row-gap: 10px; }
  .topbar .account { justify-content: start; }
}
details.operator summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 999px; border: 1px solid #D8D3CA; font-size: 12px; color: var(--ink-2); }
details.operator summary::-webkit-details-marker { display: none; }
details.operator[open] { display: flex; gap: 8px; align-items: center; }
.operatorfield input { width: 200px; }

@media (max-width: 900px) {
  h1 { font-size: 36px; } .pitch h1 { font-size: 48px; } .figure b { font-size: 48px; }
  .hero .wrap, .treasury .grid, .split { flex-direction: column; align-items: stretch; }
  .signin, .side, .explain { width: auto; }
  .breakdown, .facts { flex-wrap: wrap; row-gap: 16px; } .breakdown div, .facts div { flex-basis: 50%; }
  .keytable thead { display: none; }
  .keytable tr { display: grid; grid-template-columns: 1fr 1fr; padding: 16px; border-bottom: 1px solid var(--line); }
  .keytable td { border: 0; padding: 4px 0; }
  .keytable td:first-child, .keytable td.spend, .keytable td.actions { grid-column: 1 / -1; }
  .spend { width: auto; padding-right: 0 !important; }
  .actions { text-align: left; }
}
.signin p:empty, #operatorslot:empty { display: none; }
#contracts { display: inline-flex; gap: 16px; }

/* polish: note icons, the funded chip, the first-call line */
.notes li { align-items: start; }
.noteicon { flex: none; color: var(--ink-2); padding-top: 2px; display: inline-flex; }
.notes b { margin-bottom: 3px; }
.notes b.mono { font-family: var(--mono); font-weight: 500; }
.btn-lime:disabled { opacity: 1; cursor: default; }
.result { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12px; }
.result #resulttext { flex: 1; min-width: 0; font-family: var(--mono); color: var(--ink-2); }
.result .status { padding: 2px 6px; border-radius: 4px; background: #DDF1E3; color: #1F6B3A; font: 12px var(--mono); }
.result .status.wait { background: var(--tag); color: var(--ink-3); }

/* nav */
.topbar .left { display: flex; align-items: center; }
.nav { display: flex; gap: 18px; margin-left: 28px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.nav a[aria-current] { color: var(--ink); }

/* agents */
.bookcard { padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.splitbar { position: relative; display: flex; gap: 3px; height: 52px; }
.seg.parked { background: var(--blue); color: #fff; }
.seg.parked small { color: #FFFFFFCC; }
.seg.working { background: var(--blue-soft); }
.seg.working small { color: var(--ink-2); }
.splitbar .floor { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--ink); }
.positions { border: 1px solid var(--line); border-radius: 12px; }
.positions td.up { color: #2f7d4f; }
.positions td.down { color: var(--red); }
.icon { display: inline-flex; flex: none; }
.icon svg { width: 14px; height: 14px; }
/* the head: the thinking chip while a run is running, and the agent's address */
.headtags { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.headtags #agentaddr { font-size: 12px; text-decoration: none; }
.chip.thinking { gap: 6px; padding: 4px 8px; border: 0; border-radius: 6px; background: var(--lime); font: 12px var(--mono); }
.chip.thinking .dot, .runcard .status.thinking::before { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }
/* the book and the fence side by side, equal heights */
.bookgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; }
.bookgrid:has(> .fence[hidden]) { grid-template-columns: minmax(0, 1fr); }
.fence { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.fence .fenceby { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.fence .fenceby svg { width: 12px; height: 12px; }
.fence .sub { margin: 0; font-size: 13px; color: var(--ink-2); }
.fencerows div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.fencerows span { color: var(--ink-2); }
.fencerows b { font-weight: 400; font-size: 12px; text-align: right; }
.fencenote { margin: auto 0 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
/* run cards */
.runcards { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.runcards .none { margin: 0; color: var(--ink-3); }
.runcards .more { align-self: flex-start; margin-top: 4px; cursor: pointer; color: var(--ink); }
.explain .cadence { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.runcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.runcard.running { border-color: var(--ink); }
.runcard .runhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.runcard time { font: 13px var(--mono); color: var(--ink); }
.runcard .runhead .faint { font: 12px var(--mono); }
.runcard .cost { margin-left: auto; font: 12px var(--mono); color: var(--ink-2); }
.runcard .status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 4px; font: 12px var(--mono); background: var(--tag); color: var(--ink-2); }
.runcard .status.done { background: #DDF1E3; color: #1F6B3A; }
.runcard .status.thinking { background: var(--lime); color: var(--ink); }
.runcard .status.thinking::before { content: ""; }
.runcard .status.out, .runcard .status.failed { background: #F6E1DC; color: var(--red); }
.runcard .note { margin: 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.runcard .note.done { font: 19px/1.4 var(--serif); letter-spacing: -.2px; color: var(--ink); }
.actrows { display: flex; flex-direction: column; }
.actrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.actrow .glyph { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.actrow .glyph svg { width: 12px; height: 12px; }
.actrow .glyph.refused { background: #F6E1DC; border-color: #F6E1DC; color: var(--red); }
.actrow b { font-weight: 500; overflow-wrap: anywhere; }
.actrow.bad b { color: var(--red); }
.actrow .detail { flex: 1; min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.actrow .links { display: flex; gap: 10px; white-space: nowrap; }
.actrow .links a { font: 12px var(--mono); color: var(--blue); text-decoration: none; }
.runfoot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--ink-3); }
.runfoot svg { width: 13px; height: 13px; flex: none; }
.runfoot span { overflow-wrap: anywhere; }
/* yield sources: a bar per rate, scaled to the best known one */
.sources td b { display: block; font-weight: 500; }
.sources td small { display: block; font-size: 12px; }
.sources td small a { color: inherit; text-decoration: none; }
.sources .rate { display: flex; align-items: center; gap: 14px; }
.sources .track { width: 220px; flex: none; height: 6px; }
.sources .bar { display: block; height: 100%; border-radius: 3px; background: var(--blue-soft); }
.sources tr.current .bar { background: var(--blue); }
.sources .rate .mono { font-size: 13px; white-space: nowrap; }
.sources .here { width: 80px; text-align: right; }
.sources .badge { margin: 0; padding: 2px 8px; font: 12px var(--mono); }
.sourcefoot { margin: 0; padding: 14px 24px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
/* your own agent: two link cards under the snippet */
.linkcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card.link { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px; text-decoration: none; min-width: 0; }
.card.link:hover { border-color: var(--ink-3); }
.card.link .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card.link b { font-weight: 500; }
.card.link small { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.card.link .icon svg { width: 18px; height: 18px; }
.card.link .go svg { width: 16px; height: 16px; }
.card.link.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.card.link.dark small { color: #FFFFFF99; }
.card.link.dark .icon:first-child { color: var(--lime); }
@media (prefers-reduced-motion: reduce) {
  .chip.thinking .dot, .runcard .status.thinking::before { animation: none; }
}
@media (max-width: 900px) {
  .bookgrid, .linkcards { grid-template-columns: minmax(0, 1fr); }
  .runcard { padding: 18px 16px; }
  .runcard .cost { margin-left: 0; flex-basis: 100%; }
  .actrow { flex-wrap: wrap; }
  .actrow .detail, .actrow .links { flex-basis: 100%; padding-left: 34px; }
  .sources .track { width: 100px; }
  .sources .here { width: auto; }
}

/* home: the hero at 88px and the calculator; scoped to body.home so the Treasury hero is untouched */
.home .hero { padding: 88px 24px 56px; }
.home .hero .pitch { gap: 40px; }
.home .headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 64px; }
.home .hero h1 { font-size: 88px; letter-spacing: -2.6px; line-height: 1.02; }
.home .hero .lede { width: 440px; flex: none; margin: 0 0 10px; font-size: 16px; color: var(--ink-2); }
.calc { padding: 72px 24px 80px; }
.calc .head { margin-bottom: 24px; align-items: start; }
.headrow { align-self: stretch; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.headrow .aside { width: 400px; flex: none; margin: 0; font-size: 15px; color: var(--ink-2); }
.presets { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.presets .fine { font-size: 13px !important; color: var(--ink-2) !important; }
.presetlist { display: flex; gap: 10px; flex-wrap: wrap; }
.preset { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--ink-3); box-shadow: 0 2px 6px #1A18140F; font-size: 13px; font-weight: 500; }
.preset:hover { border-color: var(--ink); }
.preset svg { width: 14px; height: 14px; flex: none; }
.calc-card { display: grid; grid-template-columns: 380px minmax(0, 1fr); overflow: hidden; }
.calc-card .inputs { padding: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 28px; }
.calc-card .group { display: flex; flex-direction: column; gap: 10px; }
.calc-card .group .fine { margin: 0; }
.grouphead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grouphead .faint { font-size: 12px; }
.grouphead b { font-weight: 500; font-size: 13px; }
.amountfield.big { background: var(--surface); border-color: var(--ink-3); }
.amountfield.big input { font: 24px var(--mono); }
.logslider input { width: 100%; margin: 8px 0 4px; accent-color: var(--ink); }
.logslider .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button { border: 1px solid transparent; background: none; border-radius: 7px; padding: 7px 0; font: 13px var(--mono); color: var(--ink-2); }
.segmented button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); }
.models { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.model { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.model:first-child { border-top: 0; }
.model input { position: absolute; opacity: 0; pointer-events: none; }
.model .radio { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1px solid var(--ink-3); background: var(--surface); }
.model .name { flex: 1; min-width: 0; }
.model .price { font-size: 12px; color: var(--ink-3); }
.model.on { background: var(--blue-soft); }
.model.on .radio { border: 4px solid var(--blue); }
.model.on .price { color: var(--ink); }
.model:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; }
.calc-card .outputs { padding: 28px 32px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.calc-card .outputs .label { font-size: 12px; }
.calc-card .outputs .fine { margin: 8px 0 0; }
.figure.huge { align-items: baseline; flex-wrap: wrap; gap: 12px 16px; }
.figure.huge b { font: 400 88px/1 var(--serif); letter-spacing: -2px; }
.unit { font: 32px var(--serif); color: var(--ink-3); }
.callschip { align-self: center; padding: 3px 8px; border-radius: 4px; background: var(--lime); font: 12px var(--mono); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.tiles div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tiles b { font: 400 16px var(--mono); }
.tiles span { font-size: 12px; color: var(--ink-2); }
.others { display: flex; flex-direction: column; gap: 16px; }
.otherrows { display: flex; flex-direction: column; gap: 12px; }
.calc-card a.btn { text-decoration: none; }
.other { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.other .name { width: 140px; flex: none; }
.other.on .name { color: var(--ink); font-weight: 500; }
.other .track { flex: 1; min-width: 0; height: 14px; }
.other .bar { display: block; height: 100%; min-width: 2px; border-radius: 3px; background: var(--blue-soft); }
.other.on .bar { background: var(--blue); }
.other .num { width: 80px; flex: none; text-align: right; font-size: 12px; color: var(--ink); }
@media (max-width: 900px) {
  .home .hero { padding-top: 56px; }
  .home .hero h1 { font-size: 48px; letter-spacing: -1.4px; }
  .home .headline, .headrow { flex-direction: column; align-items: stretch; gap: 20px; }
  .home .hero .lede, .headrow .aside { width: auto; }
  .calc-card { grid-template-columns: minmax(0, 1fr); }
  .calc-card .inputs, .calc-card .outputs { padding: 24px 20px; min-width: 0; }
  .calc-card .inputs { border-right: 0; border-bottom: 1px solid var(--line); }
  .figure.huge b { font-size: 56px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other .name { width: 110px; }
  .other .num { width: 56px; }
}

/* home: use cases, the two doors with their glimpses */
.usecases, .how { padding: 72px 24px 80px; }
.usecases h2 { margin: 20px 0 40px; font-size: 40px; letter-spacing: -.8px; line-height: 1.12; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.door { padding: 36px; border-radius: 16px; display: flex; flex-direction: column; align-items: start; gap: 0; min-width: 0; }
.door h3 { font: 400 32px/1.15 var(--serif); letter-spacing: -.6px; margin: 28px 0 14px; }
.door > p { margin: 0 0 28px; font-size: 15px; color: var(--ink-2); }
.door .doorlink { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; text-decoration: none; }
.door .doorlink:hover { text-decoration: underline; }
.door.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.door.dark .tag { background: #FFFFFF14; border-left-color: var(--lime); color: #FFFFFFCC; }
.door.dark > p { color: #FFFFFFA6; }
.door.dark .doorlink { color: var(--lime); }
.glimpse { align-self: stretch; margin-bottom: 28px; padding: 18px 20px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 12px; color: var(--ink-3); }
.glimpsehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.examplechip { padding: 1px 6px; border-radius: 4px; background: var(--tag); color: var(--ink-2); font: 11px var(--mono); }
.glimpsebar { display: flex; gap: 3px; height: 44px; }
.glimpsebar .seg { padding: 0 12px; }
.glimpsebar .seg span { font-size: 12px; }
.glimpsebar .seg:last-child { flex: 1; }
.glimpseline { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.glimpseline .note:first-child { grid-column: 1 / -1; }
.glimpseline .when { color: var(--ink-3); }
.glimpseline .note { min-width: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.glimpseline .cost { grid-column: 2; font-size: 12px; color: var(--ink); }
.door.dark .glimpse { background: #FFFFFF0A; border-color: #FFFFFF1F; color: #FFFFFF80; }
.door.dark .glimpseline { border-top-color: #FFFFFF1F; }
.door.dark .glimpseline .when { color: #FFFFFF80; }
.door.dark .glimpseline .note { color: #fff; }
.door.dark .glimpseline .cost { color: var(--lime); }
.door.dark .seg.working { color: var(--ink); }

/* how it works: the step-through from design/prototypes/how-it-works.html, scoped under .how */
.how .head { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 64px; margin: 20px 0 40px; }
.how .head h2 { margin: 0; font-size: 40px; letter-spacing: -.8px; line-height: 1.12; }
.how .aside { width: 400px; flex: none; margin: 0; font-size: 15px; color: var(--ink-2); }
.how .sim { background: var(--surface); border: 1px solid var(--ink); font-family: var(--mono); }
.how .bar { display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.how .bar > button { background: var(--blue); color: #fff; border: 0; font: 13px var(--mono); padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.how .bar > button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.how .bar .title { flex: 1; padding: 0 16px; font-weight: 700; }
.how .dots { display: flex; gap: 6px; padding: 0 16px; }
.how .dots .dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.how .dots .dot.on { background: var(--blue); }
.how .dots .dot:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.how .caption { padding: 14px 16px; border-bottom: 1px solid var(--ink); color: var(--ink-2); font-size: 13px; min-height: 72px; }
.how .panels { display: grid; grid-template-columns: 1fr 300px 320px; border-bottom: 1px solid var(--ink); height: 300px; }
.how .panel { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.how .panel + .panel { border-left: 1px solid var(--ink); }
.how .panel h5 { margin: 0; font: 700 13px var(--mono); }
.how svg text { font: 12px var(--mono); }
.how .legend { font-size: 11px; color: var(--ink-2); }
.how .legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }
.how .chart { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.how .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; }
.how .col .v { font-size: 10px; color: var(--ink-2); }
.how .col .b { width: 40px; background: var(--line); transition: height .8s cubic-bezier(.3,0,.2,1), background .4s; }
.how .col.open .b { background: var(--blue); } .how .col.open .v { color: var(--blue); }
.how .col.spent .b { background: var(--ink); }
/* the chart's principal column shares a class name with the Treasury split bar's .principal; undo that rule here */
.how .col.principal { height: auto; border: 0; border-radius: 0; padding: 0; }
.how .col.principal .b { display: block; padding: 0; border-radius: 0; background: var(--line); }
.how .col.principal > span { font: 11px var(--mono); line-height: 1.5; }
.how .col.principal > .v { font-size: 10px; color: var(--ink-2); }
.how .rows { font-size: 12px; }
.how .row { display: flex; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line); animation: how-in .5s ease both; }
.how .row .i { color: var(--ink-3); font-size: 11px; } .how .row .op { flex: 1; } .how .row.new { background: var(--blue-soft); } .how .row.off { color: var(--ink-3); }
@keyframes how-in { from { opacity: 0; transform: translateY(-4px); } }
.how .wallet { padding: 16px; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.how .box { border: 1px solid var(--ink); padding: 8px 12px; display: flex; gap: 10px; }
.how .box small { color: var(--ink-3); font-size: 10px; align-self: center; }
.how .wallet .note { flex: 1; text-align: right; color: var(--ink-3); font-size: 11px; }
.how .fine { font-size: 10px !important; color: var(--ink-3); }
.how .stepstrip { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--ink); border-top: 0; background: var(--surface); }
.how .stepstrip .cell { padding: 14px 16px 16px; border-top: 3px solid transparent; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.how .stepstrip .cell + .cell { border-left: 1px solid var(--line); }
.how .stepstrip .cell b { font: 400 12px var(--mono); color: var(--ink); }
.how .stepstrip .cell span { font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.how .stepstrip .cell.on { border-top-color: var(--blue); background: var(--blue-soft); }
.how .stepstrip .cell.on b { color: var(--blue); }
@media (prefers-reduced-motion: reduce) {
  .how .row { animation: none; }
  .how .col .b { transition: none; }
}
@media (max-width: 900px) {
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door { padding: 24px 20px; }
  .usecases h2, .how .head h2 { font-size: 32px; }
  .how .head { flex-direction: column; align-items: stretch; gap: 20px; }
  .how .aside { width: auto; }
  .how .sim { overflow-x: auto; }
  .how .panels { grid-template-columns: minmax(0, 1fr); height: auto; }
  .how .panel + .panel { border-left: 0; border-top: 1px solid var(--ink); }
  .how .panel:first-child { height: 240px; }
  .how .chart { min-height: 180px; }
  .how .wallet { flex-wrap: wrap; }
  .how .wallet .note { flex-basis: 100%; text-align: left; }
  .how .stepstrip { grid-template-columns: minmax(0, 1fr); }
  .how .stepstrip .cell + .cell { border-left: 0; border-top: 1px solid var(--line); }
  .how .stepstrip .cell.on { border-top: 3px solid var(--blue); }
}
