/* meshbots — flight-deck instrument design. Dark by default, light on request. */
:root {
  --bg: #04080b;
  --bg-2: #071017;
  --panel: #0b151c;
  --panel-2: #0f1d26;
  --line: #1c2c36;
  --line-2: #2a4050;
  --text: #d7e6ea;
  --muted: #7e959e;
  --faint: #4d626c;
  --accent: #5cf2d6;
  --accent-ink: #032a24;
  --coral: #ff7a6b;
  --tank-1: #0c1c24;
  --tank-2: #03070a;
  --art-body: #cfeaf0;
  --art-eye: #ffffff;
  --art-ink: #a08cff;
  --art-bubble: #4d9fbe;
  --art-accent: #5cf2d6;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: dark;
}
/* Dark is the house style; light is opt-in from the header toggle. */
:root[data-theme="light"] {
  --bg: #eef2ef; --bg-2: #e3e9e6; --panel: #f7faf8; --panel-2: #e9efec; --line: #c4d0cc; --line-2: #9fb1ab;
  --text: #0b1a20; --muted: #4b5f66; --faint: #8a9ca1; --accent: #0a8f7a; --accent-ink: #ffffff; --coral: #c8473a;
  --tank-1: #10222b; --tank-2: #050b0f; color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
small { font-size: inherit; color: var(--faint); }

/* header */
.topbar { display: flex; align-items: center; gap: 28px; height: 88px; padding: 0 3.5%; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 38px/1 var(--display); letter-spacing: -2px; }
.brand-mark { width: 34px; height: 34px; fill: var(--accent); }
.brand-mark circle { fill: var(--bg); }
.brand.small { font-size: 26px; }
.header-note { font-size: 10px; line-height: 1.7; letter-spacing: .06em; color: var(--muted); }
.topbar nav { display: flex; gap: 24px; margin-left: auto; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.btn-outline { border: 1px solid var(--line-2); background: transparent; padding: 12px 15px; font-size: 11px; letter-spacing: .04em; display: inline-flex; gap: 14px; white-space: nowrap; }
.btn-outline:hover, .btn-outline.connected { border-color: var(--accent); color: var(--accent); }
.btn-ghost { border: 0; background: none; font-size: 11px; color: var(--muted); padding: 8px 4px; letter-spacing: .06em; }
.btn-ghost:hover { color: var(--text); }
.btn-solid { background: var(--accent); color: var(--accent-ink); border: 0; padding: 16px 20px; display: inline-flex; justify-content: space-between; gap: 40px; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.btn-solid:hover { filter: brightness(1.1); }
.btn-line { background: transparent; border: 1px solid var(--line-2); padding: 14px 18px; font-size: 12px; letter-spacing: .04em; }
.btn-line:hover { border-color: var(--text); }

main { max-width: 1800px; margin: 0 auto; padding: 0 3.5%; }

/* contract address: thin bar under the header */
.ca-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; padding: 9px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .04em; }
.ca-label { color: var(--accent); font-weight: 700; letter-spacing: .08em; }
.ca-addr { font: 500 12px var(--mono); color: var(--text); user-select: all; }
.ca-short { display: none; }
.ca-copy { border: 1px solid var(--accent); background: transparent; color: var(--accent); padding: 4px 11px; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.ca-copy:hover { background: var(--accent); color: var(--accent-ink); }
.ca-link { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.ca-link:hover { color: var(--text); }
@media (max-width: 720px) {
  .ca-bar { gap: 8px 12px; font-size: 10px; }
  .ca-full, .ca-link { display: none; }
  .ca-short { display: inline; }
}
.strapline { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 16px; font-size: 11px; letter-spacing: .08em; color: var(--muted); }

/* control room */
.rig { border: 1px solid var(--line-2); background: var(--bg-2); padding: 6px; }
.rig-top { display: flex; justify-content: space-between; border: 1px solid var(--line); padding: 9px 12px; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.rig-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px; gap: 6px; margin-top: 6px; }
.rack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.panel { position: relative; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel-2), var(--panel) 60%); padding: 11px; }
.panel::before, .panel::after { content: '◦'; position: absolute; bottom: 1px; font-size: 9px; color: var(--faint); }
.panel::before { left: 4px; } .panel::after { right: 4px; }
.panel.grow { flex: 1; }
.panel label { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .08em; color: var(--muted); }
.tiny { font-size: 9px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 8px; letter-spacing: .04em; }
.scale { text-align: center; font-size: 9px; color: var(--faint); }
.rotary { cursor: grab; touch-action: none; user-select: none; }
.rotary:active { cursor: grabbing; }
.knob { position: relative; width: 92px; height: 92px; margin: 12px auto 8px; border-radius: 50%; border: 1px solid var(--line-2); background: repeating-conic-gradient(var(--line-2) 0 1deg, transparent 1deg 30deg); }
.knob::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--panel-2), var(--bg)); border: 1px solid var(--line-2); }
.knob i { position: absolute; left: calc(50% - 1px); top: 10px; width: 2px; height: 28px; background: var(--accent); transform-origin: 50% 36px; transform: rotate(var(--turn, 0deg)); z-index: 1; }
.knob b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: var(--muted); z-index: 1; }
.sucker-array { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 12px 0 2px; }
.sucker-array button { aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; }
.sucker-array button:hover { border-color: var(--accent); }
.sucker-array button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px var(--accent); }
.wave { width: 100%; height: 60px; margin: 8px 0; fill: none; stroke: var(--accent); stroke-width: 1.4; background: repeating-linear-gradient(0deg, transparent 0 11px, var(--line) 11px 12px), repeating-linear-gradient(90deg, transparent 0 11px, var(--line) 11px 12px); }
input[type="range"] { accent-color: var(--accent); }
#tide-range { width: 100%; margin: 0; }
.pressure { display: flex; align-items: flex-end; gap: 3px; height: 62px; padding-top: 10px; }
.pressure input { flex: 1; min-width: 0; width: 100%; height: 52px; margin: 0; writing-mode: vertical-lr; direction: rtl; appearance: none; -webkit-appearance: none; background: linear-gradient(to top, var(--accent) var(--level, 50%), transparent var(--level, 50%)); border: 1px solid var(--line-2); cursor: ns-resize; opacity: .85; }
.pressure input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: var(--text); border: 0; }
.pressure input::-moz-range-thumb { width: 100%; height: 3px; background: var(--text); border: 0; border-radius: 0; }
.jacks { width: 100%; height: 86px; margin-top: 8px; fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.jacks circle { fill: var(--panel); stroke: var(--muted); stroke-width: 2.5; cursor: pointer; }
.jacks circle:hover { stroke: var(--text); }
.jacks circle[aria-pressed="true"] { fill: var(--accent); stroke: var(--accent); }
.big-num { display: block; margin: 12px 0 10px; font: 700 44px/1 var(--display); letter-spacing: -2px; }
.sonar { position: relative; width: 110px; height: 110px; margin: 12px auto 4px; border-radius: 50%; border: 1px solid var(--line-2); background: repeating-radial-gradient(circle, transparent 0 15px, var(--line) 16px 17px); overflow: hidden; }
.sonar::before, .sonar::after { content: ''; position: absolute; background: var(--line); }
.sonar::before { width: 1px; height: 100%; left: 50%; } .sonar::after { height: 1px; width: 100%; top: 50%; }
.sonar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 300deg, color-mix(in srgb, var(--accent) 45%, transparent) 360deg); animation: sweep 4s linear infinite; }
.sonar i { position: absolute; left: 50%; top: 50%; width: 48%; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: rotate(calc(var(--turn, 0deg) - 90deg)); z-index: 1; }
.faders { display: flex; justify-content: space-between; gap: 4px; padding-top: 12px; }
.faders span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 8px; }
.faders input { writing-mode: vertical-lr; direction: rtl; width: 16px; height: 62px; margin: 0; cursor: ns-resize; }
.channels { display: grid; grid-template-columns: 26px 1fr; gap: 9px; margin-top: 12px; font-size: 11px; }
.channels span { color: var(--faint); }
.gauge { height: 10px; border: 1px solid var(--line-2); margin: 14px 0 8px; position: relative; overflow: hidden; }
.gauge i { position: absolute; inset: 0 auto 0 0; width: 40%; background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px); transition: width .4s; }
.gauge-read { font: 700 18px var(--mono); letter-spacing: .02em; }

.stage { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-2); background: var(--tank-2); color: #c6dde3; }
.stage-bar { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; font-size: 9px; letter-spacing: .08em; color: #7c98a3; }
.stage-bar:first-child { border-bottom: 1px solid #16262e; } .stage-bar:last-child { border-top: 1px solid #16262e; }
.tank { position: relative; flex: 1; min-height: 470px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, var(--tank-1) 0, var(--tank-2) 72%); }
.tank::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
#specimen { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#specimen.grabbing { cursor: grabbing; }
.corner { position: absolute; font-size: 16px; color: #3f5b66; pointer-events: none; }
.tl { top: 12px; left: 14px; } .tr { top: 12px; right: 14px; } .bl { bottom: 12px; left: 14px; } .br { bottom: 12px; right: 14px; }
.tank-caption { position: absolute; left: 26px; bottom: 34px; font-size: 11px; line-height: 1.6; letter-spacing: .14em; pointer-events: none; color: #a9c6cf; }
.tank-readout { position: absolute; right: 24px; top: 34px; font-size: 9px; line-height: 1.8; color: #6f8d98; white-space: pre; text-align: right; pointer-events: none; }

.console { margin-top: 6px; border: 1px solid var(--line-2); background: var(--panel); }
.console-head, .console-foot { display: flex; justify-content: space-between; gap: 12px; padding: 11px 17px; font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.console-head { border-bottom: 1px solid var(--line); } .console-foot { border-top: 1px solid var(--line); font-size: 9px; }
.console-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; padding: 30px; }
h1 { font: 500 44px/1.05 var(--display); letter-spacing: -1.6px; margin: 0 0 16px; }
.order p { color: var(--muted); max-width: 470px; margin: 0 0 20px; }
.prompt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); padding: 9px 12px; background: var(--bg); }
.prompt:focus-within { border-color: var(--accent); }
.prompt > span { color: var(--accent); font-size: 18px; }
.prompt textarea { flex: 1; min-height: 46px; resize: vertical; border: 0; background: none; color: var(--text); font: 13px/1.6 var(--mono); outline: none; }
.prompt textarea::placeholder { color: var(--faint); }
.prompt button { flex-shrink: 0; width: 44px; height: 40px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 22px; }
.prompt-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 9px; color: var(--faint); letter-spacing: .05em; }
.lifecycle { align-self: center; font-size: 12px; line-height: 1.8; }
.lifecycle-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 11px; margin-bottom: 14px; font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.lifecycle-head span { font-size: 9px; color: var(--faint); }
.lifecycle > div:not(.lifecycle-head):not(.cmd) { display: grid; grid-template-columns: 26px 96px 1fr; gap: 8px; margin: 9px 0; }
.lifecycle time { color: var(--faint); } .lifecycle b { font-weight: 500; color: var(--accent); } .lifecycle span { color: var(--muted); }
.cmd { margin-top: 22px; color: var(--text); }
.cursor { animation: blink 1s steps(2) infinite; }

/* sections */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin: 38px 0 30px; }
h2 { font: 500 clamp(28px, 3.3vw, 48px)/1.08 var(--display); letter-spacing: -1.5px; margin: 0; }
h2 span { color: var(--faint); }
.section-head p { max-width: 470px; margin: 0; color: var(--muted); }
.section-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 470px; }
.eyebrow { font-size: 11px; color: var(--muted); letter-spacing: .06em; }

.stage-rack { display: grid; grid-template-columns: 240px 1fr; gap: 6px; padding: 6px; border: 1px solid var(--line-2); background: var(--bg-2); }
.stage-tabs { display: flex; flex-direction: column; gap: 6px; }
.stage-tabs button { flex: 1; display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 24px 18px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
.stage-tabs button:hover { color: var(--text); border-color: var(--line-2); }
.stage-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.stage-screen { border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.screen-bar { display: flex; justify-content: space-between; gap: 10px; padding: 11px 16px; font-size: 10px; color: var(--faint); border-bottom: 1px solid var(--line); }
.screen-bar:last-child { border-bottom: 0; border-top: 1px solid var(--line); }
.stage-content { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 28px; padding: 30px; min-height: 320px; }
.stage-content pre { margin: 0; font: clamp(9px, .95vw, 13px)/1.4 var(--mono); color: var(--accent); white-space: pre; overflow-x: auto; }
.stage-copy h3 { font: 500 26px/1.2 var(--display); margin: 12px 0; }
.stage-copy p { color: var(--muted); min-height: 96px; }
.stage-cmd { border-top: 1px dashed var(--line-2); padding-top: 14px; font-size: 11px; color: var(--text); overflow-wrap: anywhere; }
.catch-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 22px; margin-top: 18px; font-size: 11px; color: var(--muted); }
.catch-row span:first-child { color: var(--faint); }

.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; align-items: center; }
.portrait-frame { position: relative; aspect-ratio: 1 / 1.12; border: 1px solid var(--line-2); background: #05090c; overflow: hidden; }
.frame-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 14px 16px; font-size: 10px; letter-spacing: .06em; background: var(--panel); border-bottom: 1px solid var(--line-2); color: var(--muted); }
.frame-foot { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid var(--line-2); }
.frame-foot:hover { color: var(--accent); }
#portrait-canvas { position: absolute; left: 0; right: 0; top: 45px; bottom: 45px; width: 100%; height: calc(100% - 90px); object-fit: contain; image-rendering: pixelated; }
#portrait-ascii { position: absolute; inset: 45px 0; margin: 0; display: grid; place-items: center; font: clamp(5px, .62vw, 9px)/1 var(--mono); color: var(--art-accent); background: #05090c; overflow: hidden; white-space: pre; }
#ascii-toggle { position: absolute; left: 16px; bottom: 60px; z-index: 3; border: 1px solid #2a4050; background: #0b151c; color: #cfe1e6; padding: 9px 11px; font-size: 11px; }
#ascii-toggle:hover { border-color: #5cf2d6; color: #5cf2d6; }
.portrait-id { position: absolute; right: 16px; top: 62px; z-index: 2; font-size: 11px; color: #e6f3f6; text-shadow: 0 1px 2px #000; }
.seat-copy h2 { margin: 22px 0; }
.seat-copy > p { color: var(--muted); }
.face-picks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 22px 0; }
.face-picks button { padding: 0; aspect-ratio: 1; border: 1px solid var(--line-2); background: #05090c; overflow: hidden; }
.face-picks button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.face-picks canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.readout { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; padding: 16px; border: 1px solid var(--line); background: var(--panel); font-size: 11px; }
.readout span:nth-child(odd) { color: var(--faint); }
.readout span:nth-child(even) { text-align: right; overflow-wrap: anywhere; }
.facts { display: flex; gap: 46px; margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.facts strong { display: block; font: 500 30px/1 var(--display); }
.facts span { display: block; margin-top: 7px; font-size: 10px; color: var(--muted); }
.fine { font-size: 11px; color: var(--faint); max-width: 440px; }

.token-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; margin-top: 34px; }
.flow-station { border: 1px solid var(--line-2); background: var(--panel); padding: 26px; min-width: 0; }
.flow-station h2 { font-size: 30px; }
.flow-station pre { margin: 0; padding: 22px 0; min-height: 190px; font: clamp(9px, 1vw, 13px)/1.45 var(--mono); color: var(--accent); white-space: pre; overflow-x: auto; }
.flow-tabs { display: flex; border: 1px solid var(--line-2); }
.flow-tabs button { flex: 1; padding: 13px 4px; border: 0; border-right: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 12px; }
.flow-tabs button:last-child { border-right: 0; }
.flow-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
#flow-caption { min-height: 44px; margin: 16px 0 0; font-size: 12px; color: var(--muted); }
.lede { font: 500 21px/1.6 var(--display); margin: 0 0 26px; color: var(--text); }
.token-row { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.token-row span { font-size: 11px; color: var(--faint); }
.token-row p { margin: 0; color: var(--muted); }

.roadmap { margin-top: 30px; }
.roadmap details { border-top: 1px solid var(--line); }
.roadmap details:last-child { border-bottom: 1px solid var(--line); }
.roadmap summary { display: grid; grid-template-columns: 66px 1fr 30px; align-items: center; gap: 14px; padding: 22px 15px; cursor: pointer; list-style: none; }
.roadmap summary::-webkit-details-marker { display: none; }
.roadmap summary:hover, .roadmap details[open] summary { background: var(--panel); }
.roadmap summary span { color: var(--faint); }
.roadmap summary h3 { margin: 0; font: 500 19px var(--display); text-transform: uppercase; letter-spacing: .02em; }
.roadmap .toggle { font-size: 20px; transition: transform .2s; }
.roadmap details[open] .toggle { transform: rotate(45deg); color: var(--accent); }
.roadmap-body { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 6px 25px 26px 95px; }
.roadmap-body pre { margin: 0; font-size: 11px; color: var(--accent); white-space: pre-wrap; }
.roadmap-body p { margin: 0; color: var(--muted); }

/* observatory */
.obs { border: 1px solid var(--line-2); background: var(--bg-2); padding: 6px; }
.obs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); font-size: 10px; color: var(--muted); letter-spacing: .06em; }
#obs-status.live { color: var(--accent); }
.obs-top button { border: 1px solid var(--line-2); background: transparent; padding: 7px 10px; font-size: 10px; }
.obs-top button:hover { border-color: var(--accent); color: var(--accent); }
.obs-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0; }
.obs-metrics div { border: 1px solid var(--line); background: var(--panel); padding: 14px; }
.obs-metrics span { display: block; font-size: 9px; color: var(--faint); letter-spacing: .06em; }
.obs-metrics strong { display: block; margin-top: 8px; font: 500 28px/1 var(--display); }
.obs-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.obs-tabs button { padding: 13px 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.obs-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.obs-filter { display: flex; align-items: center; gap: 12px; margin: 6px 0; padding: 10px 14px; border: 1px solid var(--line); background: var(--panel); font-size: 11px; color: var(--muted); }
.obs-filter input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 13px var(--mono); outline: none; }
#obs-data { min-height: 300px; border: 1px solid var(--line); background: var(--bg); }
.obs-empty { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 300px; padding: 30px; text-align: center; }
.obs-empty pre { margin: 0; color: var(--accent); }
.obs-empty strong { font-size: 12px; letter-spacing: .06em; }
.obs-empty p { max-width: 440px; margin: 0; color: var(--muted); font-size: 12px; }
.obs-scroll { overflow-x: auto; }
.obs table { width: 100%; border-collapse: collapse; font-size: 12px; }
.obs th { text-align: left; font-weight: 400; font-size: 10px; color: var(--faint); letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.obs td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; max-width: 420px; overflow-wrap: anywhere; }
.obs tbody tr { cursor: pointer; }
.obs tbody tr:hover td, .obs tbody tr:focus td { background: var(--panel); color: var(--text); }
.obs td a { color: var(--accent); }
.status { display: inline-block; padding: 1px 7px; border: 1px solid currentColor; font-size: 10px; letter-spacing: .05em; white-space: nowrap; }
.status.ok { color: var(--accent); } .status.bad { color: var(--coral); } .status.wait { color: var(--muted); }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 6px; }
.seat-card { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; padding: 7px; border: 1px solid var(--line); background: var(--panel); text-align: left; font-size: 11px; }
.seat-card:hover { border-color: var(--accent); }
.seat-card canvas { width: 48px; height: 48px; image-rendering: pixelated; }
.seat-card strong { display: block; font-weight: 500; }
.seat-card span { display: block; color: var(--faint); font-size: 10px; }
.seat-card .claimed { color: var(--accent); }
.obs-pages { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; padding: 8px 12px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.obs-pages button { border: 0; background: none; padding: 4px; }
.obs-pages button:not(:disabled):hover { color: var(--accent); }
.term { border: 1px solid var(--line-2); background: #03070a; color: #bcd3da; }
.term-head { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #16262e; font-size: 10px; color: #6f8d98; letter-spacing: .06em; }
#term-out { height: 260px; overflow-y: auto; padding: 12px 14px; font-size: 12px; }
#term-out pre { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
#term-out .t-cmd { color: #5cf2d6; } #term-out .t-err { color: #ff7a6b; } #term-out .t-dim { color: #5d7883; }
#term-form { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid #16262e; font-size: 12px; }
#term-form label { color: #5cf2d6; white-space: nowrap; }
#term-form input { flex: 1; min-width: 0; border: 0; background: none; color: #e4f1f4; font: 13px var(--mono); outline: none; }
#term-form button { border: 1px solid #2a4050; background: none; color: #bcd3da; padding: 4px 10px; }
.term-hint { padding: 8px 14px; border-top: 1px solid #16262e; font-size: 9px; color: #4d6874; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 34px 0; font-size: 10px; color: var(--muted); }

/* dialog */
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); }
dialog::backdrop { background: rgba(2, 6, 9, .72); backdrop-filter: blur(4px); }
.dialog-bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.dialog-bar button { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); }
.dialog-bar button:hover { color: var(--text); }
#dialog-body { padding: 26px; }
#dialog-body h2 { font-size: 32px; margin-bottom: 16px; }
#dialog-body p { color: var(--muted); }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.d-box { white-space: pre-wrap; border: 1px solid var(--line-2); background: var(--bg); padding: 14px; font-size: 12px; max-height: 220px; overflow: auto; overflow-wrap: anywhere; }
.d-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.d-grid span:nth-child(odd) { color: var(--faint); }
.d-grid span:nth-child(even) { text-align: right; overflow-wrap: anywhere; }
.d-status { min-height: 22px; font-size: 12px; color: var(--muted); }
.d-status.err { color: var(--coral); } .d-status.ok { color: var(--accent); }
.d-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.d-kinds button { border: 1px solid var(--line-2); background: transparent; padding: 8px 10px; font-size: 11px; color: var(--muted); }
.d-kinds button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.d-wallets { display: grid; gap: 8px; margin-top: 16px; }
.d-wallets button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); background: var(--bg); text-align: left; font-size: 13px; }
.d-wallets button:hover { border-color: var(--accent); }
.d-wallets img { width: 28px; height: 28px; }
.timeline { display: grid; gap: 8px; margin: 16px 0; font-size: 12px; }
.timeline div { display: grid; grid-template-columns: 18px 1fr; gap: 8px; color: var(--muted); }
.timeline div.done { color: var(--text); } .timeline div.done::before { content: '■'; color: var(--accent); }
.timeline div.now::before { content: '▶'; color: var(--accent); animation: blink 1s steps(2) infinite; }
.timeline div:not(.done):not(.now)::before { content: '□'; color: var(--faint); }
.log { max-height: 180px; overflow: auto; border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; font-size: 11px; color: var(--muted); }
.log div { margin-bottom: 3px; }
.mini-seats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mini-seats canvas { width: 64px; height: 64px; image-rendering: pixelated; border: 1px solid var(--line-2); }
.d-input { width: 100%; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 12px; font: 13px var(--mono); resize: vertical; }

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes blink { to { opacity: 0; } }

@media (max-width: 1100px) {
  .header-note { display: none; }
  .topbar nav { gap: 16px; }
  .rig-grid { grid-template-columns: 150px minmax(0, 1fr) 150px; }
  .knob { width: 76px; height: 76px; } .knob i { height: 22px; transform-origin: 50% 28px; }
  .sonar { width: 92px; height: 92px; }
  .console-body { gap: 28px; padding: 24px 20px; }
  .lifecycle > div:not(.lifecycle-head):not(.cmd) { grid-template-columns: 22px 84px 1fr; }
  .stage-rack { grid-template-columns: 190px 1fr; }
  .obs-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .topbar nav { display: none; }
  .topbar { gap: 12px; }
  #wallet-btn { margin-left: auto; }
}
@media (max-width: 720px) {
  .topbar { height: 72px; padding: 0 16px; }
  .brand { font-size: 30px; } .brand-mark { width: 28px; height: 28px; }
  .btn-outline { padding: 10px; font-size: 10px; gap: 8px; }
  main { padding: 0 16px; }
  .strapline { font-size: 9px; } .strapline span:last-child { text-align: right; max-width: 150px; }
  .rig-top { font-size: 8px; } .rig-top span:nth-child(2) { display: none; }
  .rig-grid { grid-template-columns: 1fr 1fr; }
  .stage { grid-column: 1 / -1; grid-row: 1; }
  .tank { min-height: 380px; }
  .tank-caption { font-size: 9px; left: 18px; } .tank-readout { right: 16px; font-size: 8px; }
  .stage-bar { font-size: 8px; padding: 10px; }
  .panel { padding: 9px; }
  .console-body { grid-template-columns: 1fr; padding: 22px 16px; }
  h1 { font-size: 34px; }
  .console-foot span:nth-child(2) { display: none; }
  .section { padding: 44px 0; }
  .section-head { display: block; margin: 28px 0; }
  .section-head p, .section-head > div { margin-top: 20px; }
  .stage-rack { grid-template-columns: 1fr; }
  .stage-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .stage-tabs button { padding: 15px 10px; font-size: 11px; }
  .stage-content { grid-template-columns: 1fr; padding: 22px 16px; gap: 18px; }
  .stage-content pre { font-size: 10px; }
  .stage-copy p { min-height: 0; }
  .seats { grid-template-columns: 1fr; gap: 34px; }
  .face-picks { grid-template-columns: repeat(3, 1fr); }
  .facts { gap: 26px; }
  .token-grid { grid-template-columns: 1fr; gap: 30px; }
  .token-row { grid-template-columns: 1fr; gap: 8px; }
  .roadmap summary { grid-template-columns: 44px 1fr 20px; padding: 18px 6px; }
  .roadmap summary h3 { font-size: 15px; }
  .roadmap-body { grid-template-columns: 1fr; padding: 4px 12px 20px; gap: 12px; }
  .obs-metrics { grid-template-columns: 1fr 1fr; }
  .obs-tabs { grid-template-columns: repeat(3, 1fr); }
  .footer { flex-wrap: wrap; } .footer span:nth-child(3) { display: none; }
  #dialog-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
