:root {
  color-scheme: dark;
  --bg: #070a0d;
  --bg-elevated: #0b1015;
  --surface: rgba(14, 20, 27, .92);
  --surface-solid: #0e141b;
  --surface-raised: #121a23;
  --surface-hover: #17222c;
  --line: #202c37;
  --line-bright: #314352;
  --text: #eef4f6;
  --text-soft: #b4c0c7;
  --muted: #71808a;
  --accent: #5ae0b5;
  --accent-soft: rgba(90, 224, 181, .13);
  --accent-line: rgba(90, 224, 181, .42);
  --up: #55dbaa;
  --down: #ff6978;
  --warning: #f3bb62;
  --info: #76a9ff;
  --model: #d4a85c;
  --llm: #ad8cff;
  --radius: 10px;
  --radius-sm: 6px;
  --header-height: 64px;
  --footer-height: 32px;
  --page-gap: 14px;
  --panel-pad: 16px;
  --ease: cubic-bezier(.2,.8,.2,1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow: hidden; background:
  radial-gradient(circle at 72% 0%, rgba(52, 132, 110, .08), transparent 34%),
  linear-gradient(180deg, #080b0f 0%, #070a0d 100%); color: var(--text); }
body.compact { --page-gap: 9px; --panel-pad: 11px; }
body.reduced-motion * {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: .001ms !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { color: #07100d; background: var(--accent); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 8px; background: #293641; }
::-webkit-scrollbar-thumb:hover { background: #3b4c59; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 200; left: 12px; top: -50px; padding: 9px 13px; border-radius: 6px; background: var(--accent); color: #06100d; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 10px; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; opacity: .7; }
.ambient::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(115, 145, 150, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(115, 145, 150, .025) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 84%); }
.ambient span { position: absolute; border: 1px solid rgba(90, 224, 181, .07); border-radius: 50%; animation: ambient-drift 18s linear infinite; }
.ambient span:nth-child(1) { width: 440px; height: 440px; right: -170px; top: 7%; }
.ambient span:nth-child(2) { width: 710px; height: 710px; right: -280px; top: -6%; animation-direction: reverse; animation-duration: 29s; }
.ambient span:nth-child(3) { width: 240px; height: 240px; left: -110px; bottom: 5%; animation-duration: 14s; }

.app-shell { position: relative; z-index: 1; display: grid; grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height); height: 100dvh; min-height: 560px; }
.topbar { display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(280px, 1fr); align-items: center; gap: 20px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(8, 12, 16, .88); backdrop-filter: blur(18px); z-index: 30; }
.brand { display: inline-flex; align-items: center; width: max-content; gap: 10px; text-decoration: none; }
.brand-orbit { position: relative; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--accent-line); border-radius: 50%; }
.brand-orbit::before, .brand-orbit::after { content: ""; position: absolute; border: 1px solid rgba(90,224,181,.22); border-radius: 50%; animation: orbit 7s linear infinite; }
.brand-orbit::before { width: 19px; height: 19px; }
.brand-orbit::after { width: 3px; height: 3px; border: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); transform-origin: 0 0; animation-duration: 3.4s; }
.brand-orbit i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 15px rgba(90,224,181,.55); }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: 15px; letter-spacing: .18em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font: 600 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.primary-nav { display: flex; align-items: center; height: 100%; }
.primary-nav a { position: relative; display: grid; place-items: center; height: 100%; padding: 0 15px; color: var(--muted); font-size: 12px; font-weight: 650; text-decoration: none; transition: color .18s var(--ease), background .18s var(--ease); }
.primary-nav a:hover { color: var(--text); background: rgba(255,255,255,.018); }
.primary-nav a.active { color: var(--text); }
.primary-nav a.active::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); box-shadow: 0 -2px 14px rgba(90,224,181,.45); }
.system-cluster { display: flex; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.status-pill, .icon-button { min-height: 30px; border: 1px solid var(--line); border-radius: 6px; background: rgba(16, 23, 30, .78); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; color: var(--text-soft); font: 650 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .045em; white-space: nowrap; }
.status-pill i, .live-beacon, .wallet-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-pill.online i, .live-beacon.online { background: var(--accent); box-shadow: 0 0 0 4px rgba(90,224,181,.08), 0 0 10px rgba(90,224,181,.45); animation: beacon 2.6s ease-in-out infinite; }
.status-pill.offline i, .live-beacon.offline { background: var(--down); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; color: var(--text-soft); font-size: 10px; font-weight: 650; }
.icon-button:hover { border-color: var(--line-bright); background: var(--surface-hover); color: var(--text); }
.icon-button b { font-weight: 650; }
.wallet-trigger.connected .wallet-dot { background: var(--accent); box-shadow: 0 0 9px rgba(90,224,181,.4); }

.page-host { min-height: 0; overflow: hidden; }
.page { height: 100%; min-height: 0; padding: var(--page-gap); animation: page-in .42s var(--ease) both; }
.page-host.live-refresh .page,
.page-host.live-refresh .risk-track i,
.page-host.live-refresh .activity-row.fill,
.page-host.live-refresh .market-item.birth { animation: none; }
.page-scroll { overflow-y: auto; }
.page-loading { height: 100%; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--text-soft); }
.page-loading small { color: var(--muted); font-size: 11px; }
.loader-mark { width: 36px; height: 36px; margin-bottom: 6px; border: 1px solid var(--accent-line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: var(--page-gap); }
.page-header h1, .hero h1 { margin: 2px 0 0; font-weight: 570; letter-spacing: -.035em; }
.page-header h1 { font-size: clamp(24px, 3vw, 38px); }
.page-header p { max-width: 670px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.eyebrow { color: var(--accent); font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.section-kicker { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: var(--text-soft); font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.section-kicker a { color: var(--accent); text-decoration: none; }

.panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 15px 50px rgba(0,0,0,.16); }
.panel::before { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(160,220,205,.14), transparent); pointer-events: none; }
.panel-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 var(--panel-pad); border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 11px; font-weight: 680; letter-spacing: .035em; }
.panel-head small { color: var(--muted); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.panel-body { min-height: 0; padding: var(--panel-pad); }
.scroll-region { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border-radius: 6px; border: 1px solid var(--line-bright); text-decoration: none; font-size: 11px; font-weight: 700; transition: transform .15s var(--ease), border .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: var(--accent-line); color: #dffff5; background: var(--accent-soft); }
.button-primary:hover { background: rgba(90,224,181,.19); }
.button-ghost { color: var(--text-soft); background: var(--surface-raised); }
.button-small { min-height: 27px; padding: 0 9px; font-size: 9px; }
.button[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.full-button { width: 100%; margin-top: 14px; }
.text-link { border: 0; padding: 0; color: var(--accent); background: transparent; text-decoration: none; font-size: 10px; font-weight: 700; }
.copy-button { border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; color: var(--muted); background: var(--surface-raised); font-size: 9px; }
.copy-button:hover { color: var(--accent); border-color: var(--accent-line); }

.prov { display: inline-flex; align-items: center; min-height: 17px; padding: 0 6px; border: 1px solid currentColor; border-radius: 4px; font: 700 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; vertical-align: middle; opacity: .88; white-space: nowrap; }
.prov.chain { color: var(--up); }
.prov.model { color: var(--model); }
.prov.policy { color: var(--info); }
.prov.derived { color: var(--muted); }
.prov.journal { color: var(--text-soft); border-style: dashed; }
.prov.llm { color: var(--llm); }
.state-block { display: grid; place-content: center; justify-items: start; min-height: 90px; padding: 18px; color: var(--muted); font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.state-block b { color: var(--text-soft); font-size: 11px; }
.state-block p { max-width: 420px; margin: 7px 0 0; font: 400 10px/1.5 Inter, sans-serif; }
.skeleton { position: relative; overflow: hidden; border-radius: 5px; background: #131c24; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.045), transparent); transform: translateX(-100%); animation: shimmer 1.5s infinite; }

.status-rail { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px; border-top: 1px solid var(--line); background: rgba(8, 12, 16, .94); color: var(--muted); font: 600 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.status-rail > div { display: flex; align-items: center; gap: 8px; }
.status-rail nav { display: flex; align-items: center; gap: 15px; }
.status-rail a { text-decoration: none; }
.status-rail a:hover { color: var(--text); }
.zero-mock { color: var(--accent); }

/* Landing */
.landing { padding: 0; overflow-y: auto; }
.landing-inner { min-height: calc(100vh - var(--header-height) - var(--footer-height)); padding: clamp(22px, 4vw, 64px) clamp(18px, 6vw, 92px) 42px; display: grid; align-content: center; gap: clamp(25px, 4vh, 45px); }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(410px, .95fr); align-items: center; gap: clamp(28px, 6vw, 90px); }
.hero-copy { position: relative; z-index: 2; }
.hero .eyebrow { display: flex; align-items: center; gap: 9px; }
.hero .eyebrow::before { content: ""; width: 25px; height: 1px; background: var(--accent); }
.hero h1 { max-width: 760px; margin-top: 17px; font-size: clamp(42px, 5.3vw, 82px); line-height: .99; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-lede { max-width: 640px; margin: 23px 0 0; color: var(--text-soft); font-size: clamp(14px, 1.4vw, 18px); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.hero-network { display: flex; align-items: center; gap: 9px; margin-top: 17px; color: var(--muted); font: 600 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero-visual { position: relative; min-height: 390px; display: grid; place-items: center; }
.reactor { position: relative; width: min(32vw, 420px); aspect-ratio: 1; display: grid; place-items: center; }
.reactor-ring { position: absolute; inset: var(--inset); border: 1px solid rgba(90,224,181,var(--alpha)); border-radius: 50%; animation: orbit var(--speed) linear infinite var(--direction, normal); }
.reactor-ring::before { content: ""; position: absolute; left: 50%; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.reactor-ring:nth-child(1) { --inset: 0; --alpha: .18; --speed: 16s; }
.reactor-ring:nth-child(2) { --inset: 12%; --alpha: .28; --speed: 10s; --direction: reverse; border-style: dashed; }
.reactor-ring:nth-child(3) { --inset: 25%; --alpha: .4; --speed: 6s; }
.reactor-core { width: 35%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--accent-line); border-radius: 50%; background: radial-gradient(circle, rgba(90,224,181,.18), rgba(90,224,181,.025) 68%, transparent 70%); box-shadow: 0 0 60px rgba(90,224,181,.09); }
.reactor-core img { width: 64%; height: 64%; object-fit: contain; border-radius: 50%; filter: saturate(.8) contrast(1.1); }
.orbit-label { position: absolute; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: rgba(8,13,17,.88); color: var(--text-soft); font: 700 8px ui-monospace, monospace; letter-spacing: .06em; animation: float 4s ease-in-out infinite; }
.orbit-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.orbit-label.one { left: 0; top: 28%; }
.orbit-label.two { right: -2%; top: 19%; animation-delay: -.8s; }
.orbit-label.three { right: 3%; bottom: 21%; animation-delay: -1.7s; }
.orbit-label.four { left: 7%; bottom: 14%; animation-delay: -2.5s; }
.lifecycle { display: grid; grid-template-columns: repeat(9, minmax(70px, 1fr)); overflow-x: auto; padding: 1px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.lifecycle-step { position: relative; min-height: 70px; display: grid; align-content: center; gap: 5px; padding: 10px 13px; background: var(--surface); }
.lifecycle-step:not(:last-child)::after { content: "›"; position: absolute; z-index: 2; right: -5px; top: 24px; color: var(--accent); }
.lifecycle-step b { color: var(--text-soft); font: 700 9px ui-monospace, monospace; }
.lifecycle-step small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.lifecycle-step.active { background: var(--accent-soft); box-shadow: inset 0 -2px var(--accent); }
.landing-proof { display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr; gap: 9px; }
.proof-card { min-height: 98px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.proof-card b { display: block; font-size: 12px; }
.proof-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.evidence-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.evidence-strip div { padding: 13px; background: var(--surface-solid); }
.evidence-strip strong { display: block; font: 500 22px ui-monospace, monospace; }
.evidence-strip span { color: var(--muted); font-size: 8px; }

/* Dashboard */
.dashboard { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--page-gap); min-height: 0; overflow-y: auto; }
.dashboard-grid { min-height: 0; display: grid; grid-template-columns: minmax(210px,.78fr) minmax(390px,1.45fr) minmax(270px,1fr); grid-template-rows: minmax(190px,.9fr) minmax(210px,1.05fr); gap: var(--page-gap); }
.venue-panel { grid-row: 1 / 3; }
.market-preview { grid-row: 1 / 3; container-type: inline-size; container-name: market-preview; }
.pulse-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.pulse-stat { min-width: 0; min-height: 64px; padding: 11px; background: var(--surface-solid); }
.pulse-stat span { display: block; color: var(--muted); font: 700 8px ui-monospace, monospace; }
.pulse-stat b { display: block; overflow: hidden; margin-top: 7px; font: 500 17px ui-monospace, monospace; text-overflow: ellipsis; }
.market-list { height: calc(100% - 48px); }
.market-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 5px; padding: 11px var(--panel-pad); border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; }
.market-item:hover, .market-item.active { background: var(--surface-hover); box-shadow: inset 2px 0 var(--accent); }
.market-item.birth { animation: birth-pulse 1.7s var(--ease); }
.market-item-main { display: flex; align-items: center; gap: 8px; }
.asset-mark { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--text-soft); font: 700 8px ui-monospace, monospace; }
.market-item b { font-size: 11px; }
.market-item small { grid-column: 1 / 3; color: var(--muted); font: 8px ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; }
.countdown { color: var(--text-soft); font: 600 11px ui-monospace, monospace; }
.countdown.urgent { color: var(--warning); }
.agent-stack { display: grid; gap: 8px; }
.agent-card { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-solid); }
.agent-title { display: flex; justify-content: space-between; align-items: center; }
.agent-title b { font-size: 11px; letter-spacing: .05em; }
.agent-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 11px; }
.agent-meta div span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.agent-meta div b { display: block; margin-top: 4px; font: 500 11px ui-monospace, monospace; }
.risk-bars { display: grid; gap: 10px; }
.risk-row { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.risk-row-head { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.risk-row-head b { color: var(--text-soft); font: 600 9px ui-monospace, monospace; }
.risk-track { height: 3px; margin-top: 5px; border-radius: 4px; background: #263039; overflow: hidden; }
.risk-track i { display: block; width: var(--value); height: 100%; background: var(--accent); transform-origin: left; animation: bar-in .7s var(--ease); }
.market-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.fact { min-width: 0; padding: 11px; background: var(--surface-solid); }
.fact > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.fact > b { display: block; margin-top: 6px; overflow: hidden; color: var(--text); font: 520 12px ui-monospace, monospace; text-overflow: ellipsis; }
.market-core { display: grid; grid-template-columns: 1fr 1fr; gap: var(--page-gap); margin-top: var(--page-gap); align-items: stretch; }
.book { min-width: 0; }
.book-labels, .book-level { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 5px 7px; font: 9px ui-monospace, monospace; }
.book-labels { color: var(--muted); }
.book-level { position: relative; overflow: hidden; border-radius: 3px; color: var(--text-soft); }
.book-level::before { content: ""; position: absolute; z-index: -1; top: 1px; bottom: 1px; right: 0; width: var(--depth); opacity: .09; }
.book-level.ask::before { background: var(--down); }
.book-level.bid::before { background: var(--up); }
.book-level span:last-child, .book-labels span:last-child { text-align: right; }
.book-touch { display: flex; justify-content: space-between; margin: 5px 0; padding: 7px; border-block: 1px solid var(--line); color: var(--muted); font: 700 8px ui-monospace, monospace; }
.book-touch strong { color: var(--text); }
.fair-value, .empty-book-box { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: radial-gradient(circle at 50% 20%, rgba(212,168,92,.08), transparent 58%), var(--surface-solid); }
.empty-book-box { background: radial-gradient(circle at 50% 20%, rgba(90,224,181,.08), transparent 58%), var(--surface-solid); }
.empty-book-hero { color: var(--text-soft); display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.empty-book-hero .empty-book-unit { font-size: clamp(12px, 1.5vw, 15px); color: var(--muted); letter-spacing: .08em; font-weight: 600; }
.empty-book-track { background: rgba(255,255,255,.05); border: 1px dashed var(--line-bright); }
.empty-book-track .empty-band { background: repeating-linear-gradient(90deg, transparent, transparent 6px, var(--accent-line) 6px, var(--accent-line) 12px); opacity: .4; }
.empty-book-track .empty-marker { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: beacon 2s infinite ease-in-out; }
.empty-book-primary { color: var(--text); font-size: 12.5px; letter-spacing: .02em; }
.empty-book-note { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; font-size: 11px !important; line-height: 1.5; }
.fair-value-number { margin: 17px 0 7px; font: 450 clamp(30px, 4vw, 48px) ui-monospace, monospace; letter-spacing: -.05em; }
.band-track { position: relative; height: 5px; margin: 15px 0; border-radius: 7px; background: var(--line); }
.band-track .band { position: absolute; top: 0; bottom: 0; left: var(--left); width: var(--width); border-radius: 7px; background: var(--model); }
.band-track .marker { position: absolute; top: -4px; left: var(--marker); width: 2px; height: 13px; background: var(--text); box-shadow: 0 0 8px rgba(255,255,255,.3); }
.fair-value p, .empty-book-box p { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.activity-row { display: grid; grid-template-columns: 65px 60px minmax(80px,.8fr) minmax(90px,1fr) auto; gap: 7px; align-items: center; min-height: 31px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: 9px; }
.activity-row:hover, .activity-row.keyboard-active { background: var(--surface-hover); }
.activity-row time, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.activity-row time { color: var(--muted); }
.activity-row .actor { color: var(--accent); font-weight: 700; }
.activity-row .detail { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.activity-row.fill { animation: fill-flash .85s var(--ease); }
.settlement-row { padding: 11px var(--panel-pad); border-bottom: 1px solid var(--line); }
.settlement-row > div { display: flex; justify-content: space-between; gap: 8px; }
.settlement-row b { font-size: 10px; }
.settlement-row small { display: block; margin: 5px 0; color: var(--muted); font-size: 8px; }
.briefing { padding: 12px; border: 1px solid rgba(173,140,255,.24); border-radius: 7px; background: rgba(173,140,255,.04); }
.briefing-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.briefing blockquote { margin: 11px 0; color: var(--text-soft); font-size: 10px; line-height: 1.55; }
.briefing small { color: var(--muted); font-size: 8px; }

/* Markets */
.markets-page, .history-page { display: grid; grid-template-rows: auto auto minmax(0,1fr); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: var(--page-gap); padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filter-bar label, .settings-grid label, .wallet-trade label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.filter-bar .grow { flex: 1 1 250px; }
input, select { min-height: 34px; border: 1px solid var(--line-bright); border-radius: 6px; padding: 0 10px; outline: 0; color: var(--text); background: #0a0f14; font-size: 10px; }
input:focus, select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(90,224,181,.06); }
.segment-control { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segment-control button { min-height: 33px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: #0a0f14; font-size: 9px; }
.segment-control button:last-child { border: 0; }
.segment-control button.active { color: var(--text); background: var(--accent-soft); }
.data-table-wrap { height: 100%; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { position: sticky; z-index: 2; top: 0; height: 37px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface-solid); font: 700 8px ui-monospace, monospace; text-align: left; text-transform: uppercase; }
.data-table td { height: 52px; padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tr[data-inspect] { cursor: pointer; }
.data-table tbody tr:hover, .data-table tbody tr.keyboard-active { background: var(--surface-hover); }
.cell-main { display: flex; align-items: center; gap: 8px; }
.cell-stack { display: grid; gap: 4px; }
.cell-stack small { overflow: hidden; color: var(--muted); font: 8px ui-monospace, monospace; text-overflow: ellipsis; }
.touch-pair { display: flex; gap: 7px; font-family: ui-monospace, monospace; }
.touch-pair .up { color: var(--up); }
.touch-pair .down { color: var(--down); }

/* Market detail */
.market-detail-page { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.detail-grid { min-height: 0; display: grid; grid-template-columns: minmax(360px,1.2fr) minmax(300px,.85fr) minmax(280px,.8fr); grid-template-rows: minmax(235px,1fr) minmax(190px,.8fr); gap: var(--page-gap); }
.detail-book { grid-row: 1 / 3; }
.detail-proof { grid-column: 3; grid-row: 1 / 3; }
.detail-clock { color: var(--text); font: 400 24px ui-monospace, monospace; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.detail-id { display: flex; align-items: center; gap: 7px; max-width: 560px; color: var(--muted); font: 8px ui-monospace, monospace; overflow: hidden; }
.detail-id span { overflow: hidden; text-overflow: ellipsis; }
.detail-book .book-level { padding-block: 7px; }
.lifecycle-detail { display: flex; gap: 4px; padding: 12px 0; overflow-x: auto; }
.lifecycle-detail a { min-width: 66px; display: grid; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 700 7px ui-monospace, monospace; text-decoration: none; }
.lifecycle-detail a.done { color: var(--text-soft); border-color: var(--line-bright); }
.lifecycle-detail a.current { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.sparkline { width: 100%; height: 86px; margin-top: 8px; overflow: visible; }
.sparkline path.line { fill: none; stroke: var(--info); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sparkline path.area { fill: rgba(118,169,255,.08); }
.proof-timeline { display: grid; gap: 0; }
.proof-event { position: relative; margin-left: 7px; padding: 0 0 17px 20px; border-left: 1px solid var(--line-bright); }
.proof-event::before { content: ""; position: absolute; left: -4px; top: 2px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; background: var(--surface-solid); }
.proof-event b { display: block; font-size: 9px; }
.proof-event small { display: block; margin-top: 4px; color: var(--muted); font: 8px/1.45 ui-monospace, monospace; }

/* History */
.history-tabs { margin-bottom: var(--page-gap); }
.event-status { display: inline-flex; align-items: center; gap: 5px; }
.event-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.event-status.confirmed i { background: var(--up); }
.event-status.rejected i, .event-status.failed i { background: var(--down); }
.event-status.pending i { background: var(--warning); }

/* Pricing */
.pricing-page { overflow-y: auto; }
.pricing-inner { max-width: 1250px; margin: 0 auto; padding-bottom: 38px; }
.pricing-toggle { display: inline-flex; margin: 12px 0 20px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); }
.pricing-toggle button { min-height: 34px; padding: 0 16px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 10px; }
.pricing-toggle button.active { color: var(--text); background: var(--surface-hover); box-shadow: 0 3px 12px rgba(0,0,0,.18); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--page-gap); }
.price-card { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.price-card.featured { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(90,224,181,.05), 0 24px 70px rgba(0,0,0,.22); }
.price-card h2 { margin: 18px 0 4px; font-size: 19px; }
.price-card > p { min-height: 46px; margin: 8px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.price { margin-bottom: 18px; font: 450 31px ui-monospace, monospace; }
.price small { color: var(--muted); font: 9px Inter, sans-serif; }
.feature-list { display: grid; gap: 10px; margin: 20px 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 17px; color: var(--text-soft); font-size: 10px; line-height: 1.4; }
.feature-list li::before { content: "◇"; position: absolute; left: 0; color: var(--accent); }
.boundary-banner { display: flex; align-items: center; gap: 10px; margin: 18px 0; padding: 11px 14px; border: 1px solid rgba(173,140,255,.25); border-radius: 7px; color: var(--text-soft); background: rgba(173,140,255,.04); font-size: 10px; }

/* Docs */
.docs-page { display: grid; grid-template-columns: 220px minmax(0,1fr); padding: 0; }
.docs-sidebar-spa { min-height: 0; padding: 14px 10px; border-right: 1px solid var(--line); background: rgba(9,13,18,.76); overflow-y: auto; }
.docs-search { width: 100%; margin-bottom: 12px; }
.docs-toc { display: grid; gap: 2px; }
.docs-toc a { padding: 7px 9px; border-radius: 5px; color: var(--muted); font-size: 9px; text-decoration: none; }
.docs-toc a:hover, .docs-toc a.active { color: var(--text); background: var(--surface-hover); }
.docs-content-spa { min-width: 0; overflow-y: auto; scroll-behavior: smooth; }
.docs-article { max-width: 930px; margin: 0 auto; padding: 34px 38px 70px; }
.docs-article .doc-section { padding: 12px 0 38px; scroll-margin-top: 18px; }
.docs-article h1 { margin: 7px 0 14px; font-size: 38px; letter-spacing: -.03em; }
.docs-article h2 { margin: 0 0 15px; font-size: 25px; letter-spacing: -.02em; }
.docs-article h3 { margin: 22px 0 9px; font-size: 13px; }
.docs-article p, .docs-article li { color: var(--text-soft); font-size: 11px; line-height: 1.72; }
.docs-article a { color: var(--accent); }
.docs-article pre { overflow-x: auto; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #080c10; color: #cfe2dd; font: 9px/1.6 ui-monospace, monospace; }
.docs-article code { color: #d4e6e1; font-family: ui-monospace, monospace; }
.docs-article table { width: 100%; margin: 13px 0; border-collapse: collapse; }
.docs-article th, .docs-article td { padding: 9px; border: 1px solid var(--line); color: var(--text-soft); font-size: 9px; text-align: left; vertical-align: top; }
.docs-article th { color: var(--text); background: var(--surface-raised); }
.docs-article .status-strip, .docs-article .config-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin: 14px 0; background: var(--line); }
.docs-article .status-strip > div, .docs-article .config-grid > div { padding: 11px; background: var(--surface-solid); }
.docs-article .status-strip b, .docs-article .status-strip span, .docs-article .config-grid code, .docs-article .config-grid span { display: block; }
.docs-article .status-strip span, .docs-article .config-grid span { margin-top: 5px; color: var(--muted); font-size: 8px; }
.docs-article .callout { margin: 13px 0; padding: 13px; border-left: 2px solid var(--accent); background: var(--accent-soft); }
.docs-article .product-figure, .docs-article .page-toc, .docs-article .doc-footer { display: none; }
.docs-article .token-list { display: flex; flex-wrap: wrap; gap: 5px; }

/* overlays */
.overlay, .drawer-backdrop { position: fixed; z-index: 100; inset: 0; background: rgba(2,5,8,.7); backdrop-filter: blur(8px); }
.overlay { display: grid; place-items: start center; padding-top: 10vh; }
.drawer-backdrop { display: flex; justify-content: flex-end; }
.command-dialog, .settings-dialog { width: min(620px, calc(100vw - 28px)); border: 1px solid var(--line-bright); border-radius: 12px; background: #0c1218; box-shadow: 0 30px 100px rgba(0,0,0,.55); animation: dialog-in .24s var(--ease); overflow: hidden; }
.settings-dialog { width: min(480px, calc(100vw - 28px)); padding: 20px; }
.dialog-head { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 3px 0 0; font-size: 16px; }
.close-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface-raised); font-size: 19px; line-height: 1; }
.close-button:hover { color: var(--text); border-color: var(--line-bright); }
.command-search { display: flex; align-items: center; gap: 10px; margin: 14px; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 7px; background: #080d11; }
.command-search input { width: 100%; border: 0; padding: 0; background: transparent; }
.command-results { max-height: min(55vh, 480px); padding: 0 8px 8px; overflow-y: auto; }
.command-result { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 11px; border: 0; border-radius: 6px; color: var(--text-soft); background: transparent; text-align: left; }
.command-result:hover, .command-result.active { color: var(--text); background: var(--surface-hover); }
.command-result small { color: var(--muted); }
.key-legend { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
kbd { min-width: 20px; display: inline-grid; place-items: center; min-height: 18px; margin-right: 3px; padding: 0 4px; border: 1px solid var(--line-bright); border-radius: 4px; color: var(--text-soft); background: var(--surface-raised); font: 8px ui-monospace, monospace; }
.side-drawer { width: min(440px, 100vw); height: 100%; padding-bottom: 25px; border-left: 1px solid var(--line-bright); background: #0c1218; box-shadow: -25px 0 80px rgba(0,0,0,.42); animation: drawer-in .28s var(--ease); overflow-y: auto; }
.wide-drawer { width: min(600px, 100vw); }
.trust-callout { display: flex; gap: 10px; margin: 14px; padding: 12px; border: 1px solid var(--accent-line); border-radius: 7px; background: var(--accent-soft); }
.trust-callout b, .trust-callout small { display: block; }
.trust-callout b { font-size: 10px; }
.trust-callout small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.shield-icon { color: var(--accent); font-size: 24px; }
.wallet-panel { padding: 4px 18px 18px; }
.wallet-head { display: flex; justify-content: space-between; font-size: 10px; }
.wallet-head span { color: var(--accent); font: 700 9px ui-monospace, monospace; }
.wallet-meta, .wallet-warning, .wallet-activity { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.wallet-warning { padding: 9px; border: 1px solid rgba(243,187,98,.35); border-radius: 5px; color: var(--warning); background: rgba(243,187,98,.05); }
.wallet-warning button { margin-top: 7px; border: 1px solid currentColor; border-radius: 4px; color: inherit; background: transparent; }
.wallet-picker {
  --wallet-picker-height: 340px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transform-origin: top;
  transition:
    max-height .3s var(--ease),
    margin-top .3s var(--ease),
    opacity .2s ease,
    transform .3s var(--ease),
    visibility 0s linear .3s;
}
.wallet-picker.wallet-picker-open {
  max-height: var(--wallet-picker-height);
  margin-top: 13px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.wallet-picker-label { margin-bottom: 7px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.wallet-options { display: grid; gap: 6px; }
.wallet-option { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); background: var(--surface-solid); text-align: left; }
.wallet-option:hover:not(:disabled), .wallet-option.selected { border-color: var(--accent-line); background: var(--accent-soft); }
.wallet-option:disabled { opacity: .45; cursor: not-allowed; }
.wallet-option-mark { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--accent); font: 700 8px ui-monospace, monospace; }
.wallet-option-name, .wallet-option-state { display: block; }
.wallet-option-name { font-size: 10px; }
.wallet-option-state { margin-top: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.drawer-divider { height: 1px; margin: 18px 0; background: var(--line); }
.wallet-trade { display: grid; gap: 10px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet-summary { max-height: 270px; margin: 4px 0 0; overflow: auto; padding: 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); background: #070b0f; font: 8px/1.55 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.settings-grid { display: grid; gap: 11px; padding: 17px 0; }
.settings-truth { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 14px; background: var(--line); }
.settings-truth span { padding: 10px; color: var(--muted); background: var(--surface-solid); font-size: 8px; text-transform: uppercase; }
.settings-truth b { display: block; margin-top: 5px; color: var(--text); font: 600 9px ui-monospace, monospace; }
.toggle-row { display: flex !important; align-items: center; gap: 8px !important; }
.toggle-row input { min-height: auto; }
.settings-note { color: var(--muted); font-size: 9px; line-height: 1.5; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 20px; color: var(--text-soft); font-size: 10px; }
.drawer-section { padding: 18px; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 12px; font-size: 11px; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.drawer-grid > div { min-width: 0; padding: 10px; background: var(--surface-solid); }
.drawer-grid span, .drawer-grid b { display: block; }
.drawer-grid span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.drawer-grid b { margin-top: 5px; overflow-wrap: anywhere; font: 500 9px/1.5 ui-monospace, monospace; }
.full-hash { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); background: #080c10; font: 8px/1.55 ui-monospace, monospace; overflow-wrap: anywhere; }
.json-view { max-height: 45vh; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; color: #c5d7d2; background: #070b0f; font: 8px/1.6 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast-region { position: fixed; z-index: 180; right: 14px; bottom: 45px; display: grid; gap: 7px; }
.toast { min-width: 220px; max-width: 340px; padding: 11px 13px; border: 1px solid var(--line-bright); border-radius: 7px; color: var(--text-soft); background: #111920; box-shadow: 0 12px 30px rgba(0,0,0,.4); font-size: 9px; animation: toast-in .25s var(--ease); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes ambient-drift { 50% { transform: scale(1.08) rotate(8deg); opacity: .65; } to { transform: rotate(0); } }
@keyframes beacon { 50% { opacity: .45; } }
@keyframes float { 50% { transform: translateY(-7px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes birth-pulse { from { background: rgba(90,224,181,.32); box-shadow: inset 3px 0 var(--accent), 0 0 28px rgba(90,224,181,.12); } }
@keyframes fill-flash { from { background: rgba(243,187,98,.2); } }
@keyframes bar-in { from { transform: scaleX(0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
@keyframes drawer-in { from { transform: translateX(35px); opacity: .5; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(10px); } }

@media (max-width: 1160px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .primary-nav { justify-content: center; }
  .primary-nav a { padding-inline: 9px; }
  .desktop-status { display: none; }
  .dashboard-grid { grid-template-columns: 205px minmax(360px,1.4fr) minmax(245px,.9fr); }
  .detail-grid { grid-template-columns: minmax(340px,1.2fr) minmax(290px,1fr); }
  .detail-proof { grid-column: 2; grid-row: 2; }
  .detail-book { grid-row: 1 / 3; }
}

@media (max-width: 900px) {
  :root { --header-height: 57px; --footer-height: 30px; }
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100dvh; grid-template-rows: var(--header-height) minmax(calc(100dvh - 87px),auto) var(--footer-height); }
  .topbar { position: sticky; top: 0; grid-template-columns: 1fr auto; padding: 0 10px; }
  .primary-nav { display: none; }
  .brand-copy small { display: none; }
  .status-pill { padding-inline: 6px; }
  .system-cluster .status-pill span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
  .wallet-trigger span:last-child { display: none; }
  .icon-button b { display: none; }
  .page-host { overflow: visible; }
  .page { height: auto; min-height: calc(100dvh - 87px); overflow: visible; }
  .page-scroll, .pricing-page { overflow: visible; }
  .status-rail nav a, .zero-mock { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; }
  .reactor { width: min(75vw, 350px); }
  .landing-proof { grid-template-columns: 1fr 1fr; }
  .dashboard { display: block; }
  .dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .venue-panel, .market-preview, .detail-book, .detail-proof { grid-column: auto; grid-row: auto; }
  .market-preview { grid-column: 1 / 3; }
  .panel { min-height: 260px; }
  .market-list, .scroll-region { max-height: 340px; }
  .markets-page, .history-page, .market-detail-page { display: block; }
  .filter-bar { position: static; }
  .data-table-wrap { max-height: none; overflow-x: auto; }
  .data-table { min-width: 850px; }
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .pricing-grid { grid-template-columns: 1fr; }
  .docs-page { grid-template-columns: 1fr; }
  .docs-sidebar-spa { position: sticky; z-index: 8; top: var(--header-height); display: flex; gap: 8px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .docs-search { min-width: 170px; margin: 0; }
  .docs-toc { display: flex; }
  .docs-toc a { white-space: nowrap; }
  .docs-content-spa { overflow: visible; }
}

@media (max-width: 620px) {
  :root { --page-gap: 9px; --panel-pad: 12px; }
  .system-cluster { gap: 4px; }
  .brand-orbit { width: 27px; height: 27px; }
  .brand-copy strong { font-size: 13px; }
  .page-header { align-items: start; }
  .page-header p { display: none; }
  .page-header h1 { font-size: 25px; }
  .page-actions .button span.optional { display: none; }
  .landing-inner { padding: 38px 15px 30px; align-content: start; }
  .hero h1 { font-size: clamp(39px, 13vw, 58px); }
  .hero-lede { font-size: 14px; }
  .hero-visual { min-height: 270px; }
  .orbit-label.two { right: -1%; }
  .lifecycle { grid-template-columns: repeat(9, 92px); }
  .landing-proof { grid-template-columns: 1fr; }
  .landing-proof .evidence-strip { grid-template-columns: repeat(3,1fr); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .market-preview { grid-column: auto; }
  .market-core { grid-template-columns: 1fr; }
  .market-facts { grid-template-columns: repeat(2,1fr); }
  .pulse-grid { grid-template-columns: repeat(3, 1fr); }
  .agent-meta { grid-template-columns: repeat(2, 1fr); }
  .activity-row { grid-template-columns: 55px 54px minmax(72px,1fr) auto; }
  .activity-row .detail { display: none; }
  .pricing-inner { padding-bottom: 20px; }
  .price-card { padding: 18px; }
  .docs-article { padding: 25px 15px 55px; }
  .docs-article h1 { font-size: 30px; }
  .docs-article .status-strip, .docs-article .config-grid { grid-template-columns: 1fr; }
  .side-drawer { width: 100%; }
  .drawer-grid, .shortcut-grid { grid-template-columns: 1fr; }
}

/* Accessible reading scale, resilient action wrapping, and theme surfaces. */
body { font-size: 14px; }
.page-actions { flex-wrap: wrap; }
.page-header .page-actions { max-width: 100%; }
.brand-logo { position: relative; display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 39px; overflow: hidden; border: 1px solid var(--accent-line); border-radius: 50%; background: #05070b; box-shadow: 0 0 18px var(--accent-soft); }
.brand-logo::after { content: ""; position: absolute; inset: 2px; border: 1px solid var(--accent-line); border-radius: 50%; animation: orbit 9s linear infinite reverse; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.topbar .primary-nav a { font-size: 13px; }
.status-pill { font-size: 10px; }
.icon-button { font-size: 12px; }
.eyebrow { font-size: 10px; }
.page-header p { font-size: 14px; }
.panel-head h2, .panel-head h3 { font-size: 13px; }
.panel-head small { font-size: 10px; }
.agent-card { display: block; width: 100%; min-width: 0; color: var(--text); text-align: left; transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
.agent-card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 10px 24px var(--accent-soft); }
.agent-title b { font-size: 13px; }
.agent-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-meta div { min-width: 0; }
.agent-meta div span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 27px; font-size: 10px; line-height: 1.35; }
.agent-meta div b { margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.3; }
.prov { min-height: 19px; padding-inline: 6px; font-size: 8px; }
.drawer-grid > div { overflow: hidden; }
.drawer-grid span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 10px; line-height: 1.35; }
.drawer-grid b { font-size: 13px; line-height: 1.45; }
.fact > span { flex-wrap: wrap; font-size: 10px; line-height: 1.35; }
.fact > b { font-size: 14px; }
.activity-row { min-height: 38px; font-size: 11px; }
.activity-row time, .activity-row .actor { font-size: 10px; }
.risk-row-head { font-size: 11px; }
.risk-row-head b { font-size: 11px; }
.button { min-height: 38px; font-size: 12px; }
.button-small { min-height: 31px; font-size: 10px; }
.text-link { font-size: 11px; }
.status-rail { font-size: 9px; }
.panel, .proof-card, .agent-card, .fact, .pulse-stat, .price-card, .settlement-row { animation: box-enter .58s var(--ease) both; }
.panel::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; border-radius: inherit; border: 1px solid transparent; background: linear-gradient(110deg, transparent 20%, var(--accent-line), transparent 80%) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .32; animation: edge-sweep 8s linear infinite; }
.page-host.live-refresh .panel, .page-host.live-refresh .proof-card, .page-host.live-refresh .agent-card, .page-host.live-refresh .fact, .page-host.live-refresh .pulse-stat, .page-host.live-refresh .price-card, .page-host.live-refresh .settlement-row { animation: none; }

body.theme-dark {
  color-scheme: dark;
  --bg: #050505; --bg-elevated: #090909; --surface: rgba(13,13,13,.95); --surface-solid: #101010; --surface-raised: #171717; --surface-hover: #222; --line: #2b2b2b; --line-bright: #4a4a4a; --text: #fff; --text-soft: #e1e1e1; --muted: #999; --accent: #fff; --accent-soft: rgba(255,255,255,.09); --accent-line: rgba(255,255,255,.38); --up: #fff; --down: #b9b9b9; --warning: #fff; --info: #ddd; --model: #fff; --llm: #fff;
  background: #050505;
}
body.theme-dark .topbar, body.theme-dark .status-rail { background: rgba(5,5,5,.96); }
body.theme-dark .ambient::before { background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); }
body.theme-dark .ambient span { border-color: rgba(255,255,255,.1); }
body.theme-dark .reactor-ring { border-color: rgba(255,255,255,.3); }
body.theme-dark .reactor-ring::before, body.theme-dark .orbit-label::before { background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.65); }

body.theme-light {
  color-scheme: light;
  --bg: #f6f7ff; --bg-elevated: #fff; --surface: rgba(255,255,255,.92); --surface-solid: #fff; --surface-raised: #eef0ff; --surface-hover: #e7e9ff; --line: #d7daf0; --line-bright: #aaaed2; --text: #17172d; --text-soft: #414363; --muted: #70749a; --accent: #6658e8; --accent-soft: rgba(102,88,232,.11); --accent-line: rgba(102,88,232,.42); --up: #2b72df; --down: #c4476c; --warning: #a56800; --info: #3566c7; --model: #8651c8; --llm: #743cc8;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0efff 52%, #f7f8ff 100%);
}
body.theme-light .topbar, body.theme-light .status-rail { background: rgba(255,255,255,.9); }
body.theme-light .ambient { opacity: .45; }
body.theme-light .ambient::before { background-image: linear-gradient(rgba(102,88,232,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(102,88,232,.07) 1px, transparent 1px); }
body.theme-light .ambient span { border-color: rgba(102,88,232,.12); }
body.theme-light .button-primary { color: #292052; }
body.theme-light .full-hash, body.theme-light .json-view, body.theme-light .command-search { background: #f5f5ff; }
body.theme-light .book-level::before { opacity: .16; }
body.theme-light .status-pill,
body.theme-light .icon-button,
body.theme-light input,
body.theme-light select,
body.theme-light .segment-control button,
body.theme-light .pricing-toggle {
  color: var(--text-soft);
  border-color: var(--line);
  background: rgba(255,255,255,.92);
}
body.theme-light .status-pill,
body.theme-light .icon-button { box-shadow: 0 5px 18px rgba(63,55,145,.08); }
body.theme-light .command-dialog,
body.theme-light .settings-dialog,
body.theme-light .side-drawer { background: #fff; }
body.theme-light .docs-article pre,
body.theme-light .wallet-summary { color: #343654; background: #f7f8ff; }
body.theme-light .docs-article code { color: #433a84; }

@keyframes box-enter { from { opacity: 0; transform: translateY(7px) scale(.992); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes edge-sweep { from { transform: translateX(-70%); } to { transform: translateX(70%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

@media (max-width: 620px) {
  .brand-logo { width: 33px; height: 33px; flex-basis: 33px; }
  .agent-meta { gap: 10px; }
  .agent-meta div span { font-size: 9px; }
  .agent-meta div b { font-size: 13px; }
  .drawer-grid { grid-template-columns: 1fr; }
}

/* Final reading scale and theme-aware animated edge treatment. */
:root { --flow-a: #fff; --flow-b: #858585; }
body.theme-dark { --flow-a: #fff; --flow-b: #777; }
body.theme-light { --flow-a: #8b5cf6; --flow-b: #2672e8; }
.page-header h1 { font-size: clamp(28px, 3.4vw, 42px); }
.page-header p { font-size: 15px; }
.panel-head h2, .panel-head h3 { font-size: 14px; }
.panel-head small { font-size: 11px; }
.agent-title b { font-size: 14px; }
.agent-meta div span, .drawer-grid span, .fact > span { font-size: 11px; }
.agent-meta div b, .drawer-grid b, .fact > b { font-size: 15px; }
.activity-row { min-height: 41px; font-size: 12px; }
.risk-row-head, .risk-row-head b { font-size: 12px; }
.status-pill { font-size: 11px; }
.icon-button { font-size: 13px; }
.button { min-height: 40px; font-size: 13px; }
.button-small { min-height: 33px; font-size: 11px; }

.agent-card, .proof-card, .fact, .pulse-stat, .price-card, .settlement-row, .fair-value, .empty-book-box, .market-core > .book {
  position: relative;
  overflow: hidden;
  border-color: var(--line-bright);
}
.agent-card::before, .proof-card::before, .fact::before, .pulse-stat::before, .price-card::before, .settlement-row::before, .fair-value::before, .empty-book-box::before, .market-core > .book::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 8%, var(--flow-a) 29%, var(--flow-b) 48%, transparent 74%) border-box;
  background-size: 240% 100%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .65;
  pointer-events: none;
  animation: edge-flow 5.5s linear infinite;
}
.agent-card > *, .proof-card > *, .fact > *, .pulse-stat > *, .price-card > *, .settlement-row > *, .fair-value > *, .empty-book-box > *, .market-core > .book > * { position: relative; z-index: 1; }
.panel::after {
  background: linear-gradient(112deg, transparent 8%, var(--flow-a), var(--flow-b) 48%, transparent 74%) border-box;
  background-size: 240% 100%;
  animation: edge-flow 5.5s linear infinite;
}
.button { position: relative; overflow: hidden; border-color: var(--line-bright); }
.button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, var(--accent-soft), transparent 65%); background-size: 240% 100%; animation: edge-flow 6s linear infinite; pointer-events: none; }
.button > * { position: relative; z-index: 1; }

@keyframes edge-flow { from { background-position: 0 0; } to { background-position: 240% 0; } }

@media (max-width: 620px) {
  .page-header h1 { font-size: 28px; }
  .agent-meta div span, .drawer-grid span, .fact > span { font-size: 10px; }
  .agent-meta div b, .drawer-grid b, .fact > b { font-size: 14px; }
}

/* Dashboard panel controls and expansion behavior. */
.panel-head-title { min-width: 0; display: grid; gap: 4px; }
.panel-head-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.panel-toggle { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-bright); border-radius: 6px; color: var(--text-soft); background: var(--surface-raised); font-size: 11px; font-weight: 750; }
.panel-toggle:hover { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.panel-minimized > :not(.panel-head) { display: none !important; }
.dashboard-grid.agents-minimized { grid-template-rows: auto minmax(0, 1fr); }
.dashboard-grid.evidence-minimized { grid-template-rows: minmax(0, 1fr) auto; }
.dashboard-grid.venue-minimized { grid-template-columns: minmax(165px, .42fr) minmax(450px, 1.8fr) minmax(270px, 1fr); }
.dashboard-grid.venue-minimized .venue-panel-body { display: none; }
.dashboard-grid .agents-risk-body, .dashboard-grid .evidence-body { min-height: 0; }
.agent-meta div span, .drawer-grid span, .fact > span { font-size: 12px; }
.agent-meta div b, .drawer-grid b, .fact > b { font-size: 17px; }
.panel-body { font-size: 14px; }
.panel-toggle { position: relative; z-index: 3; }

@media (max-width: 900px) {
  .dashboard-grid.venue-minimized { grid-template-columns: 1fr 1fr; }
  .dashboard-grid.venue-minimized .venue-panel { grid-column: auto; grid-row: auto; }
}
@media (max-width: 620px) {
  .panel-toggle { min-height: 34px; font-size: 12px; }
  .dashboard-grid.agents-minimized, .dashboard-grid.evidence-minimized { grid-template-rows: auto; }
  .dashboard-grid.venue-minimized { grid-template-columns: 1fr; }
  .agent-meta div span, .drawer-grid span, .fact > span { font-size: 11px; }
  .agent-meta div b, .drawer-grid b, .fact > b { font-size: 15px; }
}

/* Mutually exclusive right-side focus and directional collapse rails. */
.panel-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 78px; }
.toggle-arrow { font-size: 19px; line-height: 1; }
.toggle-text { font-size: 11px; }
.dashboard-grid.agents-minimized.evidence-minimized { grid-template-columns: minmax(165px,.42fr) minmax(450px,2.4fr) minmax(190px,.35fr); }
.dashboard-grid.agents-minimized .agents-risk-panel,
.dashboard-grid.evidence-minimized .evidence-panel { align-self: start; }
body.theme-dark .brand-logo img, body.theme-dark .reactor-core img { filter: grayscale(1) brightness(1.55) contrast(1.18); }

@media (max-width: 900px) {
  .dashboard-grid.agents-minimized.evidence-minimized { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .toggle-text { display: none; }
  .panel-toggle { min-width: 38px; padding-inline: 7px; }
  .toggle-arrow { font-size: 21px; }
  .dashboard-grid.agents-minimized.evidence-minimized { grid-template-columns: 1fr; }
}

/* Fully minimized panels become slim directional rails so the market fills the center. */
.dashboard-grid.venue-minimized { grid-template-columns: 48px minmax(0, 1fr) 48px; }
.dashboard-grid.agents-minimized.evidence-minimized { grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.dashboard-grid.venue-minimized .venue-panel,
.dashboard-grid.agents-minimized.evidence-minimized .agents-risk-panel,
.dashboard-grid.agents-minimized.evidence-minimized .evidence-panel { min-width: 48px; }
.dashboard-grid .panel-minimized .panel-head { min-height: 0; height: 100%; flex-direction: column; justify-content: space-between; gap: 12px; padding: 14px 5px; }
.dashboard-grid .panel-minimized .panel-head-title { writing-mode: vertical-rl; transform: rotate(180deg); align-items: center; gap: 9px; }
.dashboard-grid .panel-minimized .panel-head-title small { display: none; }
.dashboard-grid .panel-minimized .panel-head-title h2 { font-size: 13px; letter-spacing: .07em; }
.dashboard-grid .panel-minimized .panel-toggle { min-width: 36px; width: 36px; min-height: 36px; padding: 0; }
.dashboard-grid .panel-minimized .panel-head-actions { flex-direction: column; }
.dashboard-grid .panel-minimized .toggle-text { display: none; }
.dashboard-grid .panel-minimized .toggle-arrow { font-size: 22px; }
.dashboard-grid.agents-minimized:not(.evidence-minimized) .agents-risk-panel,
.dashboard-grid.evidence-minimized:not(.agents-minimized) .evidence-panel { width: 48px; justify-self: end; }
.dashboard-grid.right-minimized .right-rail { grid-column: 3; grid-row: 1 / 3; min-width: 48px; }
.dashboard-grid.right-minimized .right-rail .panel-head { height: 100%; }
.dashboard-grid.right-expanded.agents-minimized.evidence-minimized {
  grid-template-rows: minmax(0, 1fr) auto;
}
.dashboard-grid.right-expanded.agents-minimized .agents-risk-panel {
  width: 48px;
  justify-self: end;
}
.dashboard-grid.right-expanded.evidence-minimized .evidence-panel {
  width: auto;
  justify-self: stretch;
}
.dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-head {
  height: auto;
  min-height: 58px;
  flex-direction: row;
  padding: 10px 12px;
}
.dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-head-title {
  writing-mode: horizontal-tb;
  transform: none;
  align-items: start;
}
.dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-toggle {
  width: auto;
  min-width: 38px;
}
.dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel {
  width: auto;
  justify-self: stretch;
}
.dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-head {
  height: auto;
  min-height: 58px;
  flex-direction: row;
  padding: 10px 12px;
}
.dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-head-title {
  writing-mode: horizontal-tb;
  transform: none;
  align-items: start;
}
.dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-head-title small {
  display: block;
}
.dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-toggle {
  width: auto;
  min-width: 38px;
}

/* Keep the center market panel expanded whenever a side panel opens. */
@media (min-width: 901px) {
  .dashboard-grid.venue-minimized {
    grid-template-columns: 48px minmax(0, 1fr) minmax(270px, 1fr);
  }

  .dashboard-grid.venue-minimized.right-minimized {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .dashboard-grid:not(.venue-minimized).right-minimized {
    grid-template-columns: minmax(210px, .78fr) minmax(0, 1fr) 48px;
  }

  .dashboard-grid:not(.venue-minimized).agents-minimized.evidence-minimized {
    grid-template-columns: minmax(210px, .78fr) minmax(0, 1fr) 48px;
  }

  .dashboard-grid.venue-minimized.agents-minimized.evidence-minimized {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .dashboard-grid.right-expanded.venue-minimized.agents-minimized.evidence-minimized {
    grid-template-columns: 48px minmax(0, 1fr) minmax(270px, 1fr);
  }
}

/* Judge-facing final polish: readable type, calm density, and premium motion. */
:root {
  --header-height: 72px;
  --footer-height: 38px;
  --page-gap: 16px;
  --panel-pad: 18px;
}

body { font-size: 16px; }
.brand-copy strong { font-size: 17px; }
.brand-copy small { font-size: 10px; line-height: 1.25; }
.topbar { grid-template-columns: minmax(190px, 1fr) auto auto; }
.primary-nav a, .topbar .primary-nav a { padding-inline: 15px; font-size: 14px; }
.status-pill { min-height: 34px; font-size: 12px; }
.icon-button { min-height: 36px; font-size: 14px; }
.status-rail { font-size: 10px; line-height: 1.3; }

.page-header { align-items: center; }
.page-header h1 { font-size: clamp(36px, 3.5vw, 48px); line-height: 1.05; }
.page-header p { max-width: 760px; margin-top: 10px; font-size: 16px; line-height: 1.55; }
.eyebrow { font-size: 12px; line-height: 1.4; }
.section-kicker { margin-bottom: 14px; font-size: 12px; line-height: 1.4; }

.panel-head { min-height: 58px; }
.panel-head h2, .panel-head h3 { font-size: 16px; line-height: 1.25; }
.panel-head small { font-size: 12px; line-height: 1.35; }
.panel-body { font-size: 15px; line-height: 1.5; }
.button { min-height: 42px; padding-inline: 16px; font-size: 14px; }
.button-small { min-height: 36px; font-size: 12px; }
.text-link { font-size: 13px; }
.copy-button { padding: 5px 9px; font-size: 11px; }
.prov { min-height: 22px; padding-inline: 7px; font-size: 10px; line-height: 1; }
.state-block { min-height: 120px; font-size: 13px; line-height: 1.5; }
.state-block b { font-size: 14px; }
.state-block p { font-size: 13px; line-height: 1.6; }

/* Landing page hierarchy. */
.hero-lede { font-size: clamp(17px, 1.45vw, 20px); }
.hero-network { font-size: 11px; }
.orbit-label { padding: 7px 10px; font-size: 10px; }
.lifecycle { grid-template-columns: repeat(8, minmax(112px, 1fr)); }
.lifecycle-step { min-height: 82px; gap: 7px; padding: 13px 15px; }
.lifecycle-step b { font-size: 11px; line-height: 1.35; }
.lifecycle-step small { font-size: 10px; line-height: 1.4; }
.lifecycle-step:not(:last-child)::after { top: 30px; font-size: 18px; }
.proof-card { min-height: 120px; padding: 18px; }
.proof-card b { font-size: 15px; }
.proof-card p { font-size: 13px; line-height: 1.6; }
.evidence-strip div { padding: 16px; }
.evidence-strip strong { font-size: 28px; }
.evidence-strip span { font-size: 10px; line-height: 1.5; }

/* Dashboard and market evidence. */
.pulse-stat { min-height: 82px; padding: 14px; }
.pulse-stat span { font-size: 11px; line-height: 1.4; }
.pulse-stat b { font-size: 21px; }
.market-item { gap: 7px; padding-block: 14px; }
.asset-mark { width: 32px; height: 32px; font-size: 10px; }
.market-item b { font-size: 14px; }
.market-item small { font-size: 11px; line-height: 1.4; }
.countdown { font-size: 14px; }
.agent-card { padding: 16px; }
.agent-title b { font-size: 16px; }
.agent-meta { gap: 12px; margin-top: 14px; }
.agent-meta div span { min-height: 30px; font-size: 12px; }
.agent-meta div b { font-size: 17px; line-height: 1.4; }
.risk-bars { gap: 15px; }
.risk-row-head, .risk-row-head b { font-size: 13px; line-height: 1.4; }
.risk-track { height: 5px; margin-top: 8px; }
.market-facts { gap: 2px; }
.fact { min-height: 82px; padding: 15px; }
.fact > span { font-size: 12px; line-height: 1.4; }
.fact > b { margin-top: 9px; font-size: 18px; line-height: 1.35; }
.book-labels, .book-level { padding: 8px 10px; font-size: 12px; line-height: 1.35; }
.book-touch { margin-block: 8px; padding: 10px; font-size: 11px; }

.market-core { align-items: stretch; }
.fair-value, .empty-book-box {
  position: relative;
  min-height: 260px;
  display: grid;
  align-content: center;
  padding: 22px;
  text-align: center;
  box-sizing: border-box;
}
.fair-value .section-kicker, .empty-book-box .section-kicker { position: absolute; top: 18px; left: 18px; right: 18px; text-align: left; }
.fair-value-number { margin: 36px 0 10px; font-size: clamp(48px, 5vw, 68px); line-height: 1; text-align: center; }
.fair-value .band-track, .empty-book-box .band-track { width: 100%; height: 7px; margin: 18px auto; }
.fair-value p, .empty-book-box p { max-width: 620px; margin: 10px auto 0; font-size: 12px; line-height: 1.6; text-align: center; }

.activity-row { grid-template-columns: 78px 76px minmax(100px,.8fr) minmax(120px,1fr) auto; gap: 10px; min-height: 48px; padding-inline: 13px; font-size: 13px; }
.activity-row time, .activity-row .actor { font-size: 12px; }
.settlement-row { padding-block: 15px; }
.settlement-row b { font-size: 14px; }
.settlement-row small { margin-block: 7px; font-size: 11px; line-height: 1.5; }
.briefing { padding: 16px; }
.briefing blockquote { font-size: 14px; line-height: 1.65; }
.briefing small { font-size: 11px; line-height: 1.5; }
.lifecycle-detail { gap: 7px; padding-block: 16px; }
.lifecycle-detail a { min-width: 88px; min-height: 58px; gap: 6px; padding: 10px; font-size: 12px; line-height: 1.3; }

/* Market list, history, and filters. */
.filter-bar { gap: 10px; padding: 13px; }
.filter-bar label, .settings-grid label, .wallet-trade label { gap: 7px; font-size: 11px; line-height: 1.3; }
input, select { min-height: 42px; padding-inline: 12px; font-size: 13px; }
.segment-control button, .pricing-toggle button { min-height: 40px; padding-inline: 14px; font-size: 12px; }
.data-table th { height: 46px; padding-inline: 12px; font-size: 11px; }
.data-table td { height: 62px; padding: 9px 12px; font-size: 12px; line-height: 1.4; }
.cell-stack { gap: 6px; }
.cell-stack small { font-size: 10px; line-height: 1.35; }
.detail-clock { font-size: 30px; }
.breadcrumb { font-size: 12px; }
.detail-id { font-size: 11px; }
.detail-book .book-level { padding-block: 9px; }
.proof-event { padding-bottom: 21px; }
.proof-event b { font-size: 13px; }
.proof-event small { font-size: 11px; line-height: 1.55; }

/* Pricing and documentation. */
.price-card { padding: 28px; }
.price-card h2 { font-size: 24px; }
.price-card > p { min-height: 58px; font-size: 14px; line-height: 1.6; }
.price { font-size: 38px; }
.price small { font-size: 12px; }
.feature-list { gap: 13px; }
.feature-list li { padding-left: 20px; font-size: 14px; line-height: 1.5; }
.boundary-banner { padding: 14px 17px; font-size: 13px; line-height: 1.5; }
.docs-search { font-size: 13px; }
.docs-toc { gap: 4px; }
.docs-toc a { padding: 9px 10px; font-size: 12px; line-height: 1.35; }
.docs-article { max-width: 1020px; }
.docs-article h1 { font-size: 44px; }
.docs-article h2 { font-size: 31px; }
.docs-article h3 { font-size: 18px; }
.docs-article p, .docs-article li { font-size: 15px; line-height: 1.75; }
.docs-article pre { padding: 18px; font-size: 12px; line-height: 1.7; }
.docs-article th, .docs-article td { padding: 12px; font-size: 12px; line-height: 1.5; }
.docs-article .status-strip > div, .docs-article .config-grid > div { padding: 15px; }
.docs-article .status-strip b, .docs-article .config-grid code { font-size: 15px; }
.docs-article .status-strip span, .docs-article .config-grid span { font-size: 11px; line-height: 1.5; }

/* Dialogs and drawers remain legible during judging. */
.dialog-head h2 { font-size: 20px; }
.key-legend, kbd { font-size: 11px; }
.trust-callout b, .wallet-head, .wallet-option-name { font-size: 14px; }
.trust-callout small, .wallet-meta, .wallet-warning, .wallet-activity, .wallet-option-state, .settings-note { font-size: 12px; }
.wallet-head span { font-size: 12px; }
.wallet-option-mark { width: 32px; height: 32px; font-size: 11px; }
.wallet-picker-label, .settings-truth span { font-size: 11px; }
.wallet-summary, .settings-truth b, .drawer-grid b, .full-hash, .json-view { font-size: 12px; line-height: 1.6; }
.drawer-section h3 { font-size: 15px; }
.drawer-grid span { font-size: 12px; }
.shortcut-grid, .toast { font-size: 13px; }

/* Animated borders: visible enough to feel alive, quiet enough for long sessions. */
.panel, .proof-card, .agent-card, .fact, .price-card, .briefing, .filter-bar, .fair-value, .empty-book-box, .market-core > .book {
  transition: border-color .28s var(--ease), box-shadow .28s var(--ease), transform .28s var(--ease);
}
.panel:hover, .proof-card:hover, .agent-card:hover, .fact:hover, .price-card:hover, .briefing:hover, .filter-bar:focus-within, .fair-value:hover, .empty-book-box:hover, .market-core > .book:hover {
  border-color: var(--accent-line);
  box-shadow: 0 18px 52px rgba(0,0,0,.24), 0 0 24px var(--accent-soft);
}
.panel::after {
  opacity: .48;
  background: linear-gradient(115deg, transparent 5%, var(--flow-a) 26%, var(--flow-b) 46%, transparent 68%) border-box;
  background-size: 320% 100%;
  animation: judge-edge-flow 9s linear infinite;
}
.panel:hover::after, .panel:focus-within::after { opacity: .82; animation-duration: 4.8s; }
.proof-card::before, .agent-card::before, .fact::before, .pulse-stat::before, .price-card::before, .settlement-row::before, .fair-value::before, .empty-book-box::before, .market-core > .book::before {
  background-size: 320% 100%;
  opacity: .5;
  animation: judge-edge-flow 8s linear infinite;
}
.proof-card:hover::before, .agent-card:hover::before, .fact:hover::before, .price-card:hover::before, .fair-value:hover::before, .empty-book-box:hover::before, .market-core > .book:hover::before { opacity: .9; animation-duration: 4s; }
.button::after { background-size: 320% 100%; animation: judge-edge-flow 7s linear infinite; }

@keyframes judge-edge-flow {
  0% { background-position: 130% 0; }
  100% { background-position: -190% 0; }
}

@media (max-width: 1100px) {
  :root { --header-height: 66px; --page-gap: 13px; --panel-pad: 15px; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .primary-nav a, .topbar .primary-nav a { padding-inline: 11px; font-size: 13px; }
  .status-pill { font-size: 10px; }
  .page-header h1 { font-size: 36px; }
  .page-header p { font-size: 15px; }
  .data-table td { font-size: 11px; }
  .activity-row { font-size: 12px; }
}

@media (max-width: 620px) {
  :root { --header-height: 58px; --footer-height: 32px; --page-gap: 10px; --panel-pad: 13px; }
  .topbar { grid-template-columns: 1fr auto; }
  body { font-size: 15px; }
  .page-header h1 { font-size: 30px; }
  .page-header p { font-size: 14px; }
  .panel-head h2, .panel-head h3 { font-size: 15px; }
  .lifecycle { grid-template-columns: repeat(8, 126px); }
  .docs-article p, .docs-article li { font-size: 14px; }
  .fact > b, .agent-meta div b { font-size: 16px; }
  .activity-row { font-size: 12px; }
}

@media (max-width: 900px) {
  .dashboard-grid.venue-minimized { grid-template-columns: 48px minmax(0, 1fr) 1fr; }
  .dashboard-grid.agents-minimized.evidence-minimized { grid-template-columns: 48px minmax(0, 1fr) 48px; }
}
@media (max-width: 620px) {
  .dashboard-grid.venue-minimized, .dashboard-grid.agents-minimized.evidence-minimized { grid-template-columns: 1fr; }
  .dashboard-grid .panel-minimized .panel-head { height: auto; min-height: 58px; flex-direction: row; padding: 10px 12px; }
  .dashboard-grid .panel-minimized .panel-head-title { writing-mode: horizontal-tb; transform: none; align-items: start; }
  .dashboard-grid .panel-minimized .panel-head-title small { display: block; }
  .dashboard-grid .panel-minimized .panel-toggle { width: auto; min-width: 38px; }
  .dashboard-grid.agents-minimized:not(.evidence-minimized) .agents-risk-panel,
  .dashboard-grid.evidence-minimized:not(.agents-minimized) .evidence-panel { width: auto; justify-self: stretch; }
}

/* The right side is a two-tab vertical rail with one active window at a time. */
.dashboard-grid.right-minimized .right-rail {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 48px;
}
.right-rail-tabs { height: 100%; display: grid; grid-template-rows: 1fr 1fr; }
.right-tab {
  min-width: 48px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  background: transparent;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
}
.right-tab:last-child { border-bottom: 0; }
.right-tab:hover { color: var(--text); background: var(--accent-soft); }
.right-tab .toggle-arrow { font-size: 20px; }

@media (min-width: 901px) {
  .dashboard-grid.right-expanded.agents-minimized .agents-risk-panel,
  .dashboard-grid.right-expanded.evidence-minimized .evidence-panel {
    width: 48px;
    justify-self: end;
  }
  .dashboard-grid.right-expanded.agents-minimized .agents-risk-panel .panel-head,
  .dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-head {
    min-height: 0;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 5px;
  }
  .dashboard-grid.right-expanded.agents-minimized .agents-risk-panel .panel-head-title,
  .dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-head-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    align-items: center;
    gap: 9px;
  }
  .dashboard-grid.right-expanded.agents-minimized .agents-risk-panel .panel-head-title small,
  .dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-head-title small {
    display: none;
  }
  .dashboard-grid.right-expanded.agents-minimized .agents-risk-panel .panel-toggle,
  .dashboard-grid.right-expanded.evidence-minimized .evidence-panel .panel-toggle {
    min-width: 36px;
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  /* The inactive tab stays horizontal beneath an expanded Agents window. */
  .dashboard-grid.right-expanded:not(.agents-minimized).evidence-minimized .evidence-panel {
    width: auto;
    justify-self: stretch;
  }
  .dashboard-grid.right-expanded:not(.agents-minimized).evidence-minimized .evidence-panel .panel-head {
    height: auto;
    min-height: 58px;
    flex-direction: row;
    padding: 10px 12px;
  }
  .dashboard-grid.right-expanded:not(.agents-minimized).evidence-minimized .evidence-panel .panel-head-title {
    writing-mode: horizontal-tb;
    transform: none;
    align-items: start;
  }
  .dashboard-grid.right-expanded:not(.agents-minimized).evidence-minimized .evidence-panel .panel-head-title small {
    display: block;
  }
  .dashboard-grid.right-expanded:not(.agents-minimized).evidence-minimized .evidence-panel .panel-toggle {
    width: auto;
    min-width: 38px;
  }

  /* The inactive tab stays horizontal above an expanded Evidence window. */
  .dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel {
    width: auto;
    justify-self: stretch;
  }
  .dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-head {
    height: auto;
    min-height: 58px;
    flex-direction: row;
    padding: 10px 12px;
  }
  .dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-head-title {
    writing-mode: horizontal-tb;
    transform: none;
    align-items: start;
  }
  .dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-head-title small {
    display: block;
  }
  .dashboard-grid.right-expanded.agents-minimized:not(.evidence-minimized) .agents-risk-panel .panel-toggle {
    width: auto;
    min-width: 38px;
  }
}

/* Mobile keeps the same controls without allowing collapsed rails to squeeze content. */
@media (max-width: 620px) {
  .brand-copy { display: none; }
  .dashboard .page-header { display: grid; grid-template-columns: minmax(0, 1fr); align-items: flex-start; }
  .dashboard .page-header h1 { font-size: 28px; }
  .dashboard .page-actions { justify-content: flex-start; }
  .dashboard-grid,
  .dashboard-grid.venue-minimized,
  .dashboard-grid.agents-minimized.evidence-minimized,
  .dashboard-grid.venue-minimized.right-minimized {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .dashboard-grid.right-minimized .right-rail {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
    min-height: 54px;
  }
  .dashboard-grid .panel-minimized { min-height: 58px; }
  .right-rail-tabs {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  .right-tab {
    min-width: 0;
    min-height: 54px;
    flex-direction: row;
    writing-mode: horizontal-tb;
    transform: none;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .right-tab:last-child { border-right: 0; }
  .right-tab .toggle-text { display: inline; font-size: 13px; }
  .market-preview { min-height: 620px; }
}

/* Responsive features for order-book & fair-value twin cards when side panels are toggled */
@container market-preview (max-width: 580px) {
  .market-core {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .fair-value, .empty-book-box, .market-core > .book {
    min-height: 220px;
    padding: 16px 14px;
  }
  .fair-value .section-kicker, .empty-book-box .section-kicker {
    top: 14px;
    left: 14px;
    right: 14px;
  }
  .fair-value-number {
    margin: 28px 0 8px;
    font-size: clamp(28px, 8cqi, 44px);
  }
  .fair-value p, .empty-book-box p {
    font-size: 11px;
    line-height: 1.5;
  }
}

@container market-preview (min-width: 581px) {
  .fair-value-number {
    font-size: clamp(32px, 5.2cqi, 58px);
  }
}

@media (max-width: 1240px) {
  .dashboard-grid:not(.venue-minimized):not(.right-minimized) .market-core {
    grid-template-columns: 1fr;
  }
}

/* Dedicated twin-card styling for UP PRICE order book box */
.market-core > .book {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 260px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: radial-gradient(circle at 50% 15%, rgba(90,224,181,.12), transparent 60%), var(--surface-solid);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.market-core > .book .book-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 8px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--line);
  font: 750 11px/1.3 ui-monospace, monospace;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.market-core > .book .book-labels span:first-child {
  color: var(--accent);
  font-weight: 800;
}
.market-core > .book .book-touch {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
}
body.theme-light .market-core > .book {
  background: rgba(255,255,255,.9);
}

/* Fluid transition when toggling market lifecycle progress */
.market-core {
  transition: margin-top .3s var(--ease), gap .3s var(--ease);
}
.market-core > .book,
.market-core > .fair-value,
.market-core > .empty-book-box {
  transition: border-color .28s var(--ease), box-shadow .28s var(--ease), transform .28s var(--ease), min-height .3s var(--ease), padding .3s var(--ease);
}

/* Before opening market lifecycle progress (docked/minimized): move twin boxes a little bit down */
.lifecycle-minimized .market-core,
.dashboard-grid.lifecycle-minimized .market-core {
  margin-top: clamp(26px, 3.8vh, 38px);
  gap: var(--page-gap);
}
.lifecycle-minimized .market-core > .book,
.lifecycle-minimized .market-core > .fair-value,
.lifecycle-minimized .market-core > .empty-book-box,
.dashboard-grid.lifecycle-minimized .market-core > .book,
.dashboard-grid.lifecycle-minimized .market-core > .fair-value,
.dashboard-grid.lifecycle-minimized .market-core > .empty-book-box {
  min-height: 275px;
  padding: 22px 20px;
}

/* After opening market lifecycle progress (expanded): adapt twin boxes responsively */
.lifecycle-expanded .market-core,
.dashboard-grid.lifecycle-expanded .market-core {
  margin-top: 10px;
  gap: 12px;
}
.lifecycle-expanded .market-core > .book,
.lifecycle-expanded .market-core > .fair-value,
.lifecycle-expanded .market-core > .empty-book-box,
.dashboard-grid.lifecycle-expanded .market-core > .book,
.dashboard-grid.lifecycle-expanded .market-core > .fair-value,
.dashboard-grid.lifecycle-expanded .market-core > .empty-book-box {
  min-height: clamp(185px, 24vh, 230px);
  padding: clamp(12px, 1.6vw, 18px);
}
.lifecycle-expanded .fair-value-number {
  margin: clamp(12px, 1.8vh, 22px) 0 6px;
  font-size: clamp(28px, 4vw, 44px);
}
.lifecycle-expanded .band-track {
  margin: clamp(8px, 1.3vh, 14px) auto;
}
.lifecycle-expanded .fair-value p,
.lifecycle-expanded .empty-book-box p {
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.45;
}
.lifecycle-expanded .book-level,
.lifecycle-expanded .book-labels {
  padding: 3px 6px;
  font-size: 11px;
}
.lifecycle-expanded .book-touch {
  margin-block: 4px;
  padding: 5px 8px;
  font-size: 10px;
}

/* Full-width bottom lifecycle progression in the dashboard (01 BIRTH -> 08 ROLL) */
.dashboard-lifecycle-panel {
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  margin-top: 2px;
  flex-shrink: 0;
}
.dashboard-lifecycle-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 8%, var(--flow-a) 29%, var(--flow-b) 48%, transparent 74%) border-box;
  background-size: 320% 100%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .35;
  pointer-events: none;
  animation: judge-edge-flow 10s linear infinite;
}
.dashboard-lifecycle-panel > * { position: relative; z-index: 1; }
.dashboard-lifecycle-panel.panel-minimized {
  padding: 8px 16px;
  min-height: 0;
  margin-top: 0;
}
.dashboard-lifecycle-panel.panel-minimized .dashboard-lifecycle-head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-lifecycle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dashboard-lifecycle-head .panel-head-title h2 {
  margin: 0;
  font: 700 13px/1.3 ui-monospace, monospace;
  letter-spacing: .05em;
  color: var(--text);
  text-transform: uppercase;
}
.dashboard-lifecycle-head .panel-head-title small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .03em;
}
.dashboard-lifecycle-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dashboard-lifecycle-actions .status-pill {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}
.dashboard-lifecycle-actions .status-pill b {
  color: var(--accent);
}

.dashboard-lifecycle-track {
  display: grid;
  grid-template-columns: repeat(8, minmax(115px, 1fr));
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}
.dash-life-step {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 82px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.dash-life-step:hover {
  border-color: var(--accent-line);
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.dash-life-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.dash-life-num {
  font: 750 14px/1 ui-monospace, monospace;
  color: var(--muted);
}
.dash-life-status {
  font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: .06em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.dash-life-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-life-name {
  display: block;
  font: 750 15px/1.2 ui-monospace, monospace;
  letter-spacing: .04em;
  color: var(--text-soft);
}
.dash-life-copy {
  display: block;
  font: 500 11.5px/1.35 Inter, sans-serif;
  color: var(--muted);
}
.dash-life-bar {
  height: 3px;
  width: 100%;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  margin-top: 2px;
}
.dash-life-bar .dash-life-progress {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .3s var(--ease);
}

.dash-life-step.done {
  border-color: var(--line-bright);
}
.dash-life-step.done .dash-life-num {
  color: var(--text-soft);
}
.dash-life-step.done .dash-life-name {
  color: var(--text);
}
.dash-life-step.done .dash-life-status {
  background: rgba(90,224,181,.1);
  color: var(--accent);
}
.dash-life-step.done .dash-life-bar .dash-life-progress {
  width: 100%;
  background: var(--line-bright);
}

.dash-life-step.active {
  border-color: var(--accent);
  background: radial-gradient(circle at 50% 0%, rgba(90,224,181,.14), transparent 75%), var(--accent-soft);
  box-shadow: 0 0 16px rgba(90,224,181,.14), inset 0 0 0 1px var(--accent-line);
}
.dash-life-step.active .dash-life-num {
  color: var(--accent);
}
.dash-life-step.active .dash-life-name {
  color: var(--accent);
  font-weight: 800;
}
.dash-life-step.active .dash-life-copy {
  color: var(--text);
  font-weight: 550;
}
.dash-life-step.active .dash-life-status {
  background: var(--accent);
  color: #081116;
  font-weight: 800;
}
.dash-life-step.active .dash-life-bar .dash-life-progress {
  width: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.dash-life-step.upcoming {
  opacity: .72;
}

body.theme-light .dash-life-step.active .dash-life-status {
  background: var(--accent);
  color: #ffffff;
}
body.theme-light .dash-life-step {
  background: rgba(255,255,255,.9);
}
body.theme-light .dash-life-head .dash-life-status {
  background: rgba(0,0,0,.05);
}

/* Full-width navigation chrome. Neutral tokens intentionally keep palette decisions open. */
.topbar {
  --nav-bg: #f7f7f5;
  --nav-surface: #e7e7e3;
  --nav-surface-strong: #242424;
  --nav-line: #d4d4cf;
  --nav-text: #202020;
  --nav-muted: #747470;
  --nav-inverse: #fafaf8;
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  padding: 0 clamp(24px, 2.25vw, 32px);
  border: 0;
  border-bottom: 1px solid var(--nav-line);
  background: var(--nav-bg);
  color: var(--nav-text);
  box-shadow: none;
  backdrop-filter: none;
}

.topbar .brand {
  gap: 11px;
  color: var(--nav-text);
}

.topbar .brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--nav-line);
  background: var(--nav-surface);
  box-shadow: none;
}

.topbar .brand-logo::after {
  border-color: rgba(32, 32, 32, .2);
}

.topbar .brand-logo img {
  filter: grayscale(1) contrast(1.12);
}

.topbar .brand-copy {
  line-height: 1;
}

.topbar .brand-copy strong {
  color: var(--nav-text);
  font-size: 16px;
  font-weight: 780;
  letter-spacing: .21em;
}

.topbar .brand-copy small {
  margin-top: 5px;
  color: var(--nav-muted);
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}

.topbar .primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(20px, 2vw, 30px);
  height: 100%;
}

.topbar .primary-nav a {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 1px 0 0;
  color: var(--nav-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.topbar .primary-nav a:hover {
  color: var(--nav-text);
  background: transparent;
}

.topbar .primary-nav a.active {
  color: var(--nav-text);
  font-weight: 720;
}

.topbar .primary-nav a.active::after {
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--nav-text);
  box-shadow: none;
}

.topbar .system-cluster {
  gap: 6px;
}

.topbar .status-pill {
  min-height: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  color: var(--nav-muted);
  background: transparent;
  box-shadow: none;
  font: 680 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .055em;
  white-space: nowrap;
}

.topbar .status-pill b {
  font: inherit;
}

.topbar .status-pill-filled.status-pill-network {
  border-color: var(--nav-surface);
  color: var(--nav-text);
  background: var(--nav-surface);
}

.topbar .status-pill-primary {
  border-color: var(--nav-surface-strong);
  color: var(--nav-inverse);
  background: var(--nav-surface-strong);
}

.topbar .status-pill-control:hover {
  border-color: var(--nav-muted);
  color: var(--nav-text);
  background: transparent;
}

.topbar .status-pill-primary:hover {
  border-color: #000;
  color: var(--nav-inverse);
  background: #000;
}

.topbar .status-pill i,
.topbar .wallet-dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  box-shadow: none;
}

.topbar .status-pill.online i,
.topbar .wallet-trigger.connected .wallet-dot {
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(32, 32, 32, .12);
  animation: none;
}

.topbar .status-pill.offline i {
  background: var(--nav-muted);
}

body.theme-light .topbar,
body.theme-light .topbar .status-pill {
  box-shadow: none;
}

body.theme-dark .topbar {
  --nav-bg: #111;
  --nav-surface: #303030;
  --nav-surface-strong: #ededeb;
  --nav-line: #393939;
  --nav-text: #f2f2ef;
  --nav-muted: #999995;
  --nav-inverse: #171717;
  background: var(--nav-bg);
}

body.theme-dark .topbar .brand-logo {
  background: var(--nav-surface);
}

body.theme-dark .topbar .brand-logo::after {
  border-color: rgba(255, 255, 255, .24);
}

body.theme-dark .topbar .status-pill-primary:hover {
  border-color: #fff;
  background: #fff;
}

@media (max-width: 1160px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    padding-inline: 22px;
  }

  .topbar .primary-nav {
    gap: 18px;
  }

  .topbar .desktop-status {
    display: inline-flex;
  }
}

@media (max-width: 940px) {
  :root {
    --header-height: 64px;
  }

  .app-shell {
    grid-template-rows: var(--header-height) minmax(calc(100dvh - var(--header-height) - var(--footer-height)), auto) var(--footer-height);
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    padding-inline: 18px;
  }

  .topbar .primary-nav {
    display: none;
  }

  .topbar .brand-copy small {
    display: block;
  }

  .topbar .wallet-trigger span:last-child {
    display: inline;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 60px;
  }

  .topbar {
    gap: 10px;
    padding-inline: 12px;
  }

  .topbar .brand-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .topbar .brand-copy {
    display: none;
  }

  .topbar .system-cluster {
    gap: 4px;
  }

  .topbar .status-pill {
    min-height: 26px;
    height: 26px;
    padding-inline: 8px;
    font-size: 8px;
  }

  .topbar .status-pill-control b,
  .topbar .wallet-trigger span:last-child {
    display: none;
  }
}
