:root {
  color-scheme: dark;
  --floor: #101317;
  --flat: #181c21;
  --raised: #252c34;
  --well: #13171c;
  --line: #3c454c;
  --line-soft: #2e373e;
  --text: #ebedf0;
  --muted: #abb6bd;
  --cyan: #9ce8db;
  --amber: #f0cb87;
  --violet: #c4b4ff;
  --rose: #f1a7c8;
  --teal: #79ceb9;
  --red: #ee9690;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font: 500 14px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--floor);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; min-height: 34px; border: 1px solid transparent; border-radius: 4px; color: var(--text); font-weight: 700; }
button:disabled { cursor: wait; opacity: .65; }
button:enabled { transition: transform .12s cubic-bezier(.23, 1, .32, 1); }
button:enabled:active { transform: translateY(2px) scale(.98); box-shadow: inset 0 2px 3px #0008; }
button, a, input, select, textarea, canvas { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink, var(--cyan)); outline-offset: 2px; }
button, .topbar a { touch-action: manipulation; }
code { font-family: var(--mono); overflow-wrap: anywhere; }
.primary { padding: 0 11px; color: var(--ink, var(--cyan)); border-color: var(--edge, #52877e); background: var(--deep, #1b3432); box-shadow: 0 2px 0 #0d1215; white-space: nowrap; }
.primary:is(:hover,:focus-visible):not(:disabled) { background: var(--ink, var(--cyan)); color: var(--floor); }
.ghost { background: transparent; color: var(--muted); padding: 0 8px; }
.ghost:is(:hover,:focus-visible):not(:disabled) { color: var(--text); background: var(--raised); border-color: var(--edge, var(--line)); }
.icon-btn { width: 36px; padding: 0; font-size: 20px; }
.skip { position: absolute; left: 10px; z-index: 10; padding: 8px 12px; background: var(--cyan); color: var(--floor); transform: translateY(-120%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.frame { width: min(1720px, 100% - 20px); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: #15191e; }
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 45px; }
.brand { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; font: 800 19px/1 var(--mono); }
.brand img { animation: calibrate .32s cubic-bezier(.23, 1, .32, 1) both; }
.brand img, .agent-title img { object-fit: contain; filter: drop-shadow(0 2px 2px #0008); }
.top-status { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.social-x { display: inline-grid; place-items: center; width: 30px; height: 32px; border: 1px solid transparent; border-radius: 4px; color: var(--ink); font: 700 17px/1 system-ui, sans-serif; }
.social-x:hover, .social-x:focus-visible { border-color: var(--line); color: var(--teal); text-decoration: none; }
.social-x:active { transform: translateY(1px); }
@keyframes calibrate { from { transform: translateX(-3px) rotate(-8deg); opacity: .6; } to { transform: none; opacity: 1; } }
.topbar nav { display: flex; align-self: stretch; gap: 2px; }
.topbar nav a { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--text); font: 700 13px/1.2 var(--mono); }
.topbar nav a span { color: var(--cyan); }
.topbar nav a:is(:hover,:focus-visible) { background: var(--raised); }
.network { margin-left: auto; display: flex; align-items: center; gap: 7px; font: 600 13px/1.4 var(--mono); white-space: nowrap; }
.network i { width: 6px; height: 6px; background: var(--teal); transform: rotate(45deg); }
.network-detail { color: var(--muted); }
.workbench { display: grid; grid-template-columns: minmax(0, 1.74fr) minmax(0, 1.04fr) minmax(0, .82fr); grid-template-areas: "market tape rail" "board agent agent"; gap: 10px; margin-top: 10px; }
.panel { min-width: 0; scroll-margin-top: 10px; border: 1px solid var(--edge); border-radius: 6px; background: var(--flat); display: flex; flex-direction: column; }
.market { grid-area: market; --ink: var(--cyan); --edge: #489286; --deep: #203936; }
.tape { grid-area: tape; --ink: var(--amber); --edge: #ab814d; --deep: #3d3122; min-height: 465px; }
.rail { grid-area: rail; min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.spectrum { --ink: var(--violet); --edge: #8774c0; --deep: #30283f; }
.directory { --ink: var(--cyan); --edge: #598187; --deep: #25343e; }
.agent { grid-area: agent; --ink: var(--rose); --edge: #a96584; --deep: #402a37; }
.board { grid-area: board; --ink: var(--violet); --edge: #7765a2; --deep: #30283f; }
.section-bar { min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; gap: 6px 9px; border-bottom: 1px solid var(--line); }
.section-bar h2 { font: 800 16px/1.2 var(--mono); }
.panel-band { display: flex; flex-wrap: wrap; margin-top: auto; align-items: center; gap: 1px 8px; padding-right: 8px; border-radius: 0 0 5px 5px; background: var(--deep); color: var(--text); font: 600 12px/1.3 var(--mono); }
.panel-band b { color: #16171d; background: var(--ink); border-radius: 0 0 0 4px; padding: 4px 7px; }
.panel-band span:nth-child(3) { margin-left: auto; }
.readout, #tape-count { color: var(--ink); font: 700 12px/1.3 var(--mono); white-space: nowrap; }
.floor-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px 14px; padding: 15px 12px 13px; }
.eyebrow { font: 700 12px/1.4 var(--mono); color: var(--ink, var(--cyan)); }
h1 { font-size: 31px; line-height: 1.1; font-weight: 800; margin-top: 3px; color: var(--cyan); }
.lookup { flex: 1 1 240px; max-width: 320px; }
.lookup label, dialog label, .reply-form label { display: grid; gap: 4px; font-weight: 700; color: var(--muted); font-size: 13px; }
.lookup label { margin-bottom: 4px; }
.input-group { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
input, select, textarea { min-width: 0; width: 100%; padding: 7px 9px; border: 1px solid #505d69; border-radius: 4px; background: var(--well); color: var(--text); }
.lookup input { font: 600 13px/1.4 var(--mono); }
input::placeholder, textarea::placeholder { color: #a1adb7; }
.field-error { color: var(--red); font-size: 13px; padding: 4px 0; }
.watchstrip { display: flex; min-height: 51px; border-block: 1px solid var(--line); background: var(--well); }
.watch-label { display: flex; align-items: center; gap: 5px; padding: 0 9px; border-right: 1px solid var(--line); color: var(--muted); white-space: nowrap; font-weight: 700; font-size: 12px; }
.watch-label span { color: var(--cyan); font-size: 17px; }
.ticker { display: flex; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #54666d transparent; }
.ticker-empty { display: grid; place-items: center; padding: 0 9px; color: var(--muted); }
.ticker button { flex: 1 0 124px; display: grid; align-content: center; gap: 2px; justify-items: start; padding: 4px 8px; border: 0; border-right: 1px solid var(--line-soft); background: transparent; border-radius: 0; text-align: left; }
.ticker button:last-child { border-right: 0; }
.ticker button:hover { background: var(--raised); }
.ticker button[aria-current="true"] { background: var(--deep); box-shadow: inset 0 -2px var(--cyan); }
.ticker button:focus-visible { outline-offset: -3px; }
.ticker b { max-width: 109px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker small { display: flex; gap: 6px; font: 600 12px/1.25 var(--mono); white-space: nowrap; }
.up { color: var(--teal) !important; }
.down { color: var(--red) !important; }
.inline-actions { display: flex; gap: 4px; }
#pin[aria-pressed="true"] { color: var(--cyan); }
.quote { padding: 11px 12px 9px; }
.asset-id { display: flex; align-items: center; gap: 8px; }
.asset-badge { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border: 1px solid var(--edge); background: var(--deep); color: var(--cyan); font: 800 16px var(--mono); }
.asset-name { display: flex; gap: 2px 7px; align-items: baseline; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.asset-name h3 { font-size: 18px; }
.asset-name > span { color: var(--muted); font-size: 13px; }
.data-status { margin-left: auto; font: 700 12px/1.2 var(--mono); color: var(--cyan); border: 1px solid #4b786f; padding: 4px 5px; border-radius: 3px; text-align: center; }
.data-status:is([data-kind="stale"], [data-kind="error"]) { color: var(--amber); border-color: #8a6e47; }
.quote-number { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-height: 48px; padding-top: 4px; }
.quote-number strong { font: 800 37px/1.13 var(--mono); overflow-wrap: anywhere; }
.movement { font: 700 13px/1.35 var(--mono); color: var(--muted); }
.mint-row { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.mint-row code { color: var(--text); min-width: 0; }
.copy-btn { font-size: 12px; min-height: 31px; }
.project-mint { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 4px 12px; border-block: 1px solid var(--line-soft); background: var(--well); font-size: 12px; }
.project-mint strong { color: var(--ink); white-space: nowrap; }
.project-mint-actions { display: flex; gap: 4px; align-items: center; }
.project-mint-actions a { display: flex; align-items: center; min-height: 31px; padding: 0 7px; border-radius: 4px; color: var(--ink); font-weight: 700; }
.project-mint-actions a:is(:hover,:focus-visible) { background: var(--raised); }
.data-message { color: var(--amber); font-size: 13px; }
.chart { border-block: 1px solid var(--line); background: var(--well); }
.chart-top { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; align-items: start; padding: 8px 10px 3px 12px; }
.chart-top h3 { font-size: 14px; }
.chart-top p { color: var(--muted); font: 600 12px/1.25 var(--mono); margin-top: 3px; overflow-wrap: anywhere; }
.segments { display: flex; max-width: 100%; flex-shrink: 0; border: 1px solid var(--line); border-radius: 4px; padding: 2px; gap: 2px; align-self: start; }
.segments button { min-height: 28px; background: transparent; color: var(--muted); padding: 0 7px; font-size: 13px; border-radius: 2px; white-space: nowrap; }
.segments button:hover { background: var(--raised); }
.segments button[aria-pressed="true"] { background: var(--deep); border-color: var(--edge); color: var(--ink); }
.plot { height: 199px; position: relative; margin: 2px 7px 0; }
canvas { width: 100%; height: 100%; display: block; }
.chart-state { display: grid; place-items: center; position: absolute; inset: 0; text-align: center; padding: 20px; color: var(--muted); }
.chart-foot, .market-source { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 11px; font: 600 12px/1.4 var(--mono); color: var(--muted); }
.chart-foot a, .market-source a { color: var(--cyan); }
.chart-foot a:first-of-type { margin-left: auto; }
.chart-foot a:hover, .market-source a:hover { text-decoration: underline; }
.market-source { border-top: 1px solid var(--line); }
.market-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.market-stats div { padding: 7px 10px 8px; min-width: 0; }
.market-stats div + div { border-left: 1px solid var(--line-soft); }
.market-stats dt { color: var(--muted); font-size: 12px; }
.market-stats dd { font: 700 16px/1.35 var(--mono); overflow-wrap: anywhere; margin-top: 2px; }

[data-channel="agave"] { --channel: #98e8dc; }
[data-channel="web3"] { --channel: #b8c2ff; }
[data-channel="token"] { --channel: #f0ca86; }
[data-channel="raydium"] { --channel: #f0a8bc; }
[data-channel="pyth"] { --channel: #9bdd9c; }
[data-channel="noble"] { --channel: #b7a3fb; }
[data-channel="oqs"] { --channel: #96dfff; }
[data-channel="age"] { --channel: #e9bfff; }
[data-channel="winter"] { --channel: #89e7bb; }
.tape-tools, .board-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 8px 9px; border-bottom: 1px solid var(--line-soft); gap: 6px; }
.tape-tools select { flex: 1 1 111px; width: auto; padding: 5px 6px; min-height: 34px; font-size: 13px; }
.tape-body { flex: 1 0 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #7b6747 transparent; }
.tape-body:focus-visible { outline-offset: -2px; }
.source-list, .repo-list { margin: 0; padding: 0; list-style: none; }
.source-row { padding: 8px 10px 9px 11px; border-bottom: 1px solid var(--line-soft); position: relative; }
.source-row::before { content: ""; width: 2px; height: 13px; position: absolute; top: 10px; left: 0; background: var(--channel); }
.source-row:focus-within, .source-row:hover { background: var(--well); }
.source-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; font: 600 12px/1.35 var(--mono); color: var(--muted); }
.source-type { color: var(--channel); }
.source-name { overflow-wrap: anywhere; }
.source-meta time { margin-left: auto; white-space: nowrap; }
.source-title { display: block; padding: 4px 0 0; color: var(--text); font-weight: 650; line-height: 1.32; overflow-wrap: anywhere; }
.source-title:hover { color: var(--ink); text-decoration: underline; }
.outbound-mark { color: var(--ink); white-space: nowrap; }
.item-state { display: inline-block; color: var(--ink); font: 700 12px/1.3 var(--mono); padding-top: 4px; }
.empty-state { padding: 15px 11px; color: var(--muted); }
.spectrum-figure { padding: 7px 9px 8px; }
#spectrum-plot { min-height: 115px; background: var(--well); border: 1px solid var(--line-soft); }
#spectrum-plot svg { display: block; width: 100%; height: auto; max-height: 165px; }
.spectrum-key, .spectrum-label { font: 700 10px var(--mono); fill: var(--channel, var(--muted)); }
.spectrum-lane { stroke: #464350; }
.spectrum-tick { stroke: #41434e; stroke-dasharray: 2 3; }
.spectral-line { stroke: var(--channel); stroke-width: 2; }
.spectral-stale { opacity: .5; stroke-dasharray: 2 2; }
.spectrum-dimmed { opacity: .36; }
#spectrum-caption { padding-top: 6px; color: var(--muted); font: 600 12px/1.3 var(--mono); }
.repo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; padding: 2px 5px; border-bottom: 1px solid var(--line-soft); }
.repo-row:last-child { border-bottom: 0; }
.repo-filter { display: grid; justify-items: start; align-content: center; text-align: left; gap: 2px; min-height: 44px; overflow-wrap: anywhere; }
.repo-filter b { color: var(--channel); font-size: 14px; }
.repo-filter[aria-pressed="true"] { background: var(--deep); border-color: var(--edge); }
.repo-meta, .repo-error { color: var(--muted); font: 600 12px/1.3 var(--mono); }
.repo-error { grid-column: 1 / -1; padding: 0 8px 5px; color: var(--amber); }
.repo-link { display: grid; place-items: center; min-width: 38px; border-radius: 4px; color: var(--muted); font-weight: 800; }
.repo-link:is(:hover,:focus-visible) { color: var(--ink); background: var(--raised); }
.agent-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
#scan-sources { min-width: 114px; }
.agent-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.agent-stats div { padding: 10px 11px 8px; min-width: 0; }
.agent-stats div + div { border-left: 1px solid var(--line-soft); }
.agent-stats dt, .agent-times dt { color: var(--muted); font-size: 12px; }
.agent-stats dd { color: var(--ink); font: 800 24px/1.3 var(--mono); overflow-wrap: anywhere; }
.agent-times { display: flex; gap: 10px 22px; flex-wrap: wrap; padding: 10px 11px 0; }
.agent-times dd { font: 700 13px/1.4 var(--mono); }
.agent-state { padding: 7px 11px 12px; color: var(--muted); }

.board-tools output { color: var(--muted); font: 600 12px/1.3 var(--mono); text-align: right; }
.threads { flex: 1; max-height: 480px; overflow: auto; scrollbar-width: thin; }
.board-empty { padding: 24px 12px; }
.board-empty h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.board-empty p { color: var(--muted); }
.thread { padding: 11px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.thread:last-child { border-bottom: 0; }
.thread-meta, .thread-observation { color: var(--muted); font: 600 12px/1.4 var(--mono); }
.thread-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; color: var(--muted); font-size: 12px; }
.thread-tags span:first-child { padding: 2px 6px; border: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.thread h3 { font-weight: 800; font-size: 17px; line-height: 1.3; margin: 5px 0; }
.thread-text, .reply-body { white-space: pre-wrap; }
.invalidation { margin-top: 5px; padding-left: 8px; border-left: 2px solid var(--edge); }
.thread-observation { display: block; margin-top: 7px; }
a.thread-observation:hover { color: var(--ink); }
.thread details { margin-top: 6px; }
.thread summary { cursor: pointer; color: var(--ink); width: fit-content; padding: 6px 2px; font-size: 13px; font-weight: 700; }
.reply { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.reply-form { display: grid; gap: 7px; margin-top: 8px; }
.reply-form .primary { justify-self: start; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 11px 0 16px; color: var(--muted); font-size: 12px; }
.footer span:first-child { font-family: var(--mono); color: var(--cyan); font-weight: 700; }
dialog { --ink: var(--violet); --edge: #8774c0; --deep: #30283f; width: min(100% - 22px, 510px); max-height: calc(100% - 24px); overflow: auto; background: var(--flat); color: var(--text); border: 1px solid var(--edge); border-radius: 6px; padding: 0; }
dialog::backdrop { background: #080a0ecb; }
dialog form { display: grid; gap: 10px; padding: 15px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { font-size: 23px; line-height: 1.15; }
.dialog-mint { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: baseline; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
textarea { resize: vertical; }
.publish { justify-self: end; }
.notice { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 22px); padding: 8px 13px; border: 1px solid #6b9e96; border-radius: 4px; background: #253b39; color: var(--text); box-shadow: 0 4px 18px #0008; }

@media (max-width: 1150px) {
  .workbench { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "market tape" "rail agent" "board board"; }
}
@media (max-width: 740px) {
  .frame { width: calc(100% - 14px); }
  .workbench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "market" "tape" "rail" "agent" "board"; gap: 8px; margin-top: 8px; }
  .topbar-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; padding-top: 6px; }
  .topbar nav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-column: 1/-1; grid-row: 2; }
  .topbar nav a { justify-content: center; min-height: 44px; padding: 0 3px; gap: 4px; font-size: 12px; }
  .lookup { max-width: none; }
  .network-detail { display: none; }
  .social-x { width: 40px; height: 40px; }
  .tape { min-height: 408px; }
  .tape-body { max-height: 505px; }
  .threads { max-height: none; }
  .section-bar { padding-inline: 8px; }
  .section-bar h2 { font-size: 15px; }
  .section-bar button, .copy-btn, .segments button, .input-group button, .tape-tools select, .publish, .reply-form button { min-height: 44px; }
  .repo-link { min-width: 44px; }
  .chart-foot a:first-of-type { margin-left: 0; }
  .quote-number strong { font-size: 32px; }
}
@media (max-width: 480px) {
  .project-mint { grid-template-columns: minmax(0, 1fr) auto; padding-bottom: 9px; }
  .project-mint code { grid-row: 2; grid-column: 1/-1; }
  .project-mint-actions { grid-row: 1; grid-column: 2; }
  .project-mint-actions a { min-height: 44px; }
  .market-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .market-stats div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .market-stats div:nth-child(3) { border-left: 0; }
}
@media (max-width: 360px) {
  .network { font-size: 12px; }
  .agent-title img { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  button:enabled:active { transform: none; }
}
