:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #1a2a3b;
  background: #f1f3f5;
  font-synthesis: none;
  --ink: #1a2a3b;
  --muted: #526172;
  --line: #cbd3db;
  --accent: #233c60;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
:focus-visible { outline: 3px solid #237caf; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 2; background: white; color: var(--ink); padding: .8rem; }
.skip:focus { top: .4rem; }
.masthead { background: #fff; color: #18283b; border-bottom: 1px solid var(--line); }
.topbar { max-width: 83rem; margin: auto; min-height: 4.4rem; padding: 0 2.5rem; display: flex; align-items: center; gap: 2.5rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; letter-spacing: -.035em; font-size: 1.2rem; }
.brand-icon { display: flex; align-items: end; gap: 2px; padding: 4px; width: 29px; height: 29px; background: #f2a455; transform: skewX(-8deg); }
.brand-icon i { flex: 1; height: 60%; background: #24364c; }
.brand-icon i:nth-child(2) { height: 82%; }
.brand-icon i:nth-child(3) { height: 100%; }
nav { display: flex; align-self: stretch; gap: 1.3rem; }
nav a { display: grid; place-items: center; position: relative; color: #56687a; text-decoration: none; font-size: .94rem; padding: .4rem .15rem; }
nav a[aria-current] { color: var(--ink); font-weight: 650; }
nav a[aria-current]::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: #cf7a30; }
nav a:hover { color: var(--ink); }
.quiet, .desk-link { color: var(--ink); background: #f7f9fa; border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 4px; font-size: .88rem; }
.desk-link { margin-left: auto; text-decoration: none; font-weight: 600; }
.desk-label-short { display: none; }
#market-mode { color: var(--muted); font-size: .86rem; margin-top: .6rem; }
.quiet { margin-left: -1.7rem; }
main { max-width: 83rem; padding: clamp(1rem, 3vw, 2.5rem) 2.5rem 5rem; margin: auto; }
.workspace { margin-top: clamp(1.8rem, 3.5vw, 3.2rem); scroll-margin-top: 1rem; }
.market-intro { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin: 0 0 1.65rem; }
.market-title h1 { font: 510 clamp(2.7rem,5vw,4.7rem)/1.04 "Instrument Serif", Georgia, serif; letter-spacing: -.055em; color: #192e3b; }
.market-title h1 em { color: #176956; font-weight: 400; }
.market-title p { margin: .5rem 0 0; color: #4c606d; font-size: 1rem; line-height: 1.5; }
.market-terms { display: flex; gap: 1.75rem; margin: 0 0 .2rem; }
.market-terms div { border-left: 1px solid #c2ced1; padding-left: .95rem; }
.market-terms dt { font-size: .82rem; color: var(--muted); }
.market-terms dd { margin: .26rem 0 0; font-weight: 650; font-size: .97rem; color: #253b43; white-space: nowrap; }
.intro { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem 1.2rem; border-bottom: 1px solid #bbc5cf; padding-bottom: 1.05rem; margin-bottom: 1.2rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.06em; font-weight: 650; line-height: 1.06; }
.intro h2 { font-size: clamp(1.9rem, 3.7vw, 2.95rem); letter-spacing: -.055em; font-weight: 620; line-height: 1.1; }
.intro p { color: var(--muted); line-height: 1.55; max-width: 52rem; }
h2 { font-size: 1.24rem; letter-spacing: -.035em; }
h3 { font-size: .94rem; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.seller-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, .75fr); }
.panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: .4rem; padding: clamp(1.1rem, 2.5vw, 1.65rem); }
.narrow { max-width: 36rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.panel p { line-height: 1.5; }
.subtle { color: var(--muted); }
.small { font-size: .89rem; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .4rem; font-weight: 620; font-size: .94rem; }
input, textarea, select { color: var(--ink); width: 100%; background: #fbfcfc; border: 1px solid #839592; border-radius: 5px; padding: .65rem .78rem; font-size: 1rem; font-weight: 400; }
select { appearance: none; padding-right: 2.35rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; }
.check input { width: 1.1rem; height: 1.1rem; flex: none; margin: .12rem 0 0; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #607276; }
.money-input { display: flex; align-items: center; position: relative; max-width: 12rem; }
.money-input span { position: absolute; left: .8rem; color: var(--muted); font-weight: 500; }
.money-input input { padding-left: 1.75rem; font-variant-numeric: tabular-nums; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; padding: .65rem 1rem; font-weight: 640; font-size: .94rem; }
.primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.primary:hover:enabled { background: #102944; }
.secondary { color: var(--accent); background: #fff; border: 1px solid #8ca49f; }
.secondary:hover:enabled { background: #eef2f6; }
.actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.demo-section { padding-top: 1.15rem; margin-top: 1.25rem; border-top: 1px solid var(--line); display: grid; justify-items: start; gap: .75rem; }
.login-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .68fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.login-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; }
.login-choices, .desk-views { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.login-choices { margin: .9rem 0 1.1rem; }
.mode-option, .view-option { background: transparent; border: 1px solid transparent; color: var(--muted); font-size: .95rem; padding: .38rem .65rem; border-radius: 4px; font-weight: 580; }
.mode-option[aria-pressed=true], .view-option[aria-pressed=true] { color: var(--ink); border-color: #b8c6d3; background: #edf2f7; }
.mode-option:hover, .view-option:hover { color: var(--ink); background: #f4f6f8; }
.desk-views { margin-bottom: .9rem; gap: .5rem; }
.wallet-panel { max-width: 52rem; }
.wallet-balances { margin: .85rem 0 1.2rem; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.wallet-balances .account-bar { padding: .8rem .65rem; display: block; background: #f6f8fa; min-width: 0; }
.wallet-balances .account-bar + .account-bar { border-left: 1px solid var(--line); }
.wallet-balances dd { margin: .35rem 0 0; font: 600 clamp(.94rem,1.9vw,1.35rem) ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.wallet-panel .account-section { margin-top: 1rem; }
.wallet-panel form { justify-items: start; margin-bottom: .8rem; }
.wallet-panel p[role=status] { margin-top: .8rem; }
.login-terms { margin: 1rem 0 0; }
.login-terms a, .ticket-notice a { color: var(--accent); text-underline-offset: .14em; }
.ticket-preview { display: grid; gap: .42rem; border: 1px solid #cad8d7; padding: .9rem 1rem; background: #f2f8f6; border-radius: 4px; }
.ticket-preview div { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; color: #53656b; font-size: .88rem; }
.ticket-preview div:first-child { font-size: .99rem; color: var(--ink); }
.ticket-preview div span:last-child, .ticket-preview strong { font-variant-numeric: tabular-nums; }
.ticket-notice { font-size: .87rem; color: var(--muted); }
.login-panel .demo-section { align-self: stretch; border-top: 0; border-left: 1px solid var(--line); margin: 0; padding: 0 0 0 1.75rem; align-content: center; }
.docs-links { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: 2.2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.docs-links a { color: var(--accent); font-size: .9rem; text-underline-offset: .2em; }
.docs-links strong { margin-right: auto; }
.token-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.trust-box { padding: .9rem; border-left: 3px solid #be7031; background: #fff4e8; }
.trust-box p { margin: .4rem 0 .7rem; font-size: .92rem; }
.speed-terms { border-top: 1px solid var(--line); padding-top: .8rem; }
.speed-terms input { max-width: 12rem; }
.speed-terms p { margin-top: .45rem; }
.speed-outcome { padding: .55rem .7rem; border-left: 3px solid #37735a; background: #e7f4ec; }
.speed-outcome.missed { border-color: #ad723c; background: #fff1e1; }
.job-model { font: .87rem ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.account-bar, .account-tools { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
.account-section + .account-section { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1.2rem; }
.account-console details { margin: .7rem 0; }
.account-console details summary { cursor: pointer; font-weight: 620; color: var(--accent); }
.account-console p, .account-console form { margin-top: .55rem; }
.account-node, .account-pricing { min-width: 0; }
.account-key, .account-command { overflow-wrap: anywhere; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.mode-note { color: var(--muted); margin-top: 1rem; font-size: .88rem; line-height: 1.4; }
.notice { background: #e0f2e9; border-left: 3px solid #34735c; padding: .75rem 1rem; line-height: 1.45; margin-bottom: 1.2rem; }
.notice.problem { background: #fff2e7; border-color: #ae5b28; color: #693b1d; }
.empty { padding: .8rem 0; line-height: 1.5; color: var(--muted); }
.job, .offer-group { border-top: 1px solid var(--line); padding: 1rem 0; }
.job:last-child, .offer-group:last-child { padding-bottom: 0; }
.job summary { display: flex; gap: .6rem; align-items: center; cursor: pointer; list-style: none; flex-wrap: wrap; }
.job summary::-webkit-details-marker { display: none; }
.job summary::before { content: "+"; font: 1.2rem ui-monospace, monospace; color: var(--muted); width: .85rem; }
.job[open] summary::before { content: "−"; }
.price { font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.035em; font-size: 1.2rem; }
.status { margin-left: auto; font-size: .85rem; color: #364d54; background: #edf1f2; padding: .2rem .55rem; border-radius: 3px; }
.status.complete { background: #def3e7; color: #225c43; }
.status.failed { background: #fff0e7; color: #813b1b; }
.job-body { padding: 1.05rem .05rem .15rem; }
.job-body h3 { color: var(--muted); margin: .85rem 0 .35rem; }
.job-body h3:first-child { margin-top: 0; }
.job-body p { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 24rem; overflow: auto; }
.turn-message { border-left: 2px solid #a7bdc3; background: #f4f7f8; padding: .65rem .85rem; margin: .65rem 0; }
.turn-message.assistant { border-color: #5b9a83; background: #f0f7f4; }
.job-body .turn-message h3 { margin: 0 0 .3rem; color: #37524e; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.offer .price { font-size: 1.65rem; }
.standing { margin-top: 1.15rem; }
.standing form { margin-top: 1rem; }
.bid-form { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-top: 1rem; }
.bids { padding: .7rem 0; }
.bids p { margin-top: .55rem; }
.bid { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.job-body > button { margin-top: .8rem; }
.job-body > p + p { margin-top: .5rem; }
.api-box { margin-top: 1rem; font-size: .93rem; }
.api-box summary { cursor: pointer; color: var(--accent); }
.api-box code { display: block; overflow-wrap: anywhere; margin: .8rem 0; }
.api-box p { margin: .5rem 0; }
@media (max-width: 46rem) {
  .grid { grid-template-columns: 1fr; }
  main { padding: 1rem 1rem 3rem; }
  .topbar { padding: 0 1rem; gap: 1.25rem; }
  nav { gap: .9rem; }
  .quiet { margin-left: 0; }
  .login-panel { grid-template-columns: 1fr; }
  .login-panel .demo-section { border-left: 0; border-top: 1px solid var(--line); padding: .9rem 0 0; }
  .market-intro { align-items: start; flex-direction: column; gap: .75rem; margin-bottom: 1.05rem; }
  .market-terms { flex-wrap: wrap; gap: .8rem 1.25rem; }
  .market-terms div { display: flex; gap: .35rem; align-items: baseline; border: 0; padding: 0; }
  .market-terms dd { margin: 0; font-size: .88rem; }
  .dev-nav { display: none; }
  .docs-links strong { width: 100%; }
}
@media (max-width: 27rem) {
  .topbar { gap: .7rem; }
  .brand { font-size: 1rem; gap: .4rem; }
  nav { gap: .7rem; }
  .quiet { font-size: .81rem; padding: .34rem .4rem; }
  .desk-link { display: none; }
  .topbar:has(#logout[hidden]) .desk-link { display: inline-flex; }
  .desk-label-full { display: none; }
  .desk-label-short { display: inline; }
  .quiet { margin-left: auto; }
  .login-fields { grid-template-columns: 1fr; }
}
