:root {
  --bg:#101218; --metal:#161921; --panel:#191c26; --border:#353945;
  --bright:#ececf2; --muted:#aab0c2; --blue:#a8dcec; --amber:#cfc4ff; --deep:#11131d;
  --mint:#95e1c3; --warm:#edab91; --display:Geist,Arial,sans-serif;
}
body { font-size:14px; }
.frame { width:min(1520px, 100% - 48px); }
.top { background:#14161d; }
.top-inner { min-height:58px; gap:25px; }
.brand { font:700 1.12rem/1 var(--mono); gap:8px; }
.brand-light { color:#cfc4ff; }
.top-actions { gap:4px; }
.control { border-radius:4px; min-height:37px; font-size:.82rem; }
.top-actions .control { min-height:36px; min-width:36px; }
.outline { background:#222531; border-color:#414556; box-shadow:0 2px 0 #0b0c12; }
.outline:hover,.outline:focus-visible,.ghost:hover,.ghost:focus-visible { background:#303343; border-color:#8b88a6; }
.gold { color:#19162a; background:#cfc4ff; border-color:#e0d8ff; box-shadow:0 3px 0 #7566a4; }
.gold:hover,.gold:focus-visible { background:#e3dbff; border-color:#f3efff; }
.station-nav { display:flex; align-items:center; gap:4px; font:600 .77rem var(--mono); }
.station-nav a { display:grid; place-items:center; padding:0 10px; min-height:37px; color:var(--muted); border:1px solid transparent; border-radius:4px; }
.station-nav a:hover,.station-nav a[aria-current] { color:var(--bright); background:#292b37; border-color:#464559; }
.station-nav a[aria-current] { box-shadow:inset 0 -2px #c2b2ff; }
.station-strip { display:flex; align-items:center; gap:14px; min-height:41px; font:500 .73rem var(--mono); color:var(--muted); border-bottom:1px solid var(--border); }
.station-strip>span { color:var(--bright); }
.station-strip .pilot { background:#eba991; box-shadow:none; margin-right:4px; }
.station-strip .pilot.online { background:var(--mint); box-shadow:0 0 9px #95e1c363; }
.station-strip a:hover { color:var(--blue); text-decoration:underline; }
.station-strip time { margin-left:auto; font-variant-numeric:tabular-nums; white-space:nowrap; }
.station-grid { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr); gap:12px; align-items:start; margin-top:12px; }
.station-grid[data-view=station] { grid-template-areas:"intro op" "tape tape" "board wire" "procs signals" "coins rank" "coins side"; grid-template-rows:auto auto auto auto auto 1fr; }
.station-grid[data-view=board] { grid-template-areas:"board side"; }
.station-grid[data-view=wire] { grid-template-areas:"wire sources"; }
.station-grid[data-view=signals] { grid-template-areas:"tape tape" "signals sources"; }
.station-grid[data-view=coins] { grid-template-areas:"coins side"; }
.station-grid[data-view=agents] { grid-template-areas:"procs op" "signals rank"; }
.station-grid[data-view=create] { grid-template-areas:"builder op" "builder docs"; }
.station-grid[data-view=docs] { grid-template-areas:"docs side"; }
.station-grid:not([data-view=station]) .station-only { display:none; }
.station-grid[data-view=station] .agent-filters { display:none; }
.module { min-width:0; overflow:hidden; border:1px solid var(--border); border-radius:6px; background:var(--metal); box-shadow:0 2px 0 #090b10; }
.module-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid var(--border); }
.module-head>div { min-width:0; }
.module-head h1,.module-head h2,.mast h1 { font-size:1.31rem; line-height:1.13; }
.module-head a:not(.control),.module-foot a,.chart-link { color:var(--blue); }
.module-head a:not(.control),.module-foot a { font:600 .72rem var(--mono); text-align:right; }
.module-head a:hover,.module-foot a:hover,.chart-link:hover { text-decoration:underline; }
.kicker { display:block; font:600 .65rem var(--mono); color:#a7bdd1; margin-bottom:4px; }
.module-foot { display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-height:31px; padding:4px 8px; background:#252835; border-top:1px solid var(--border); font:500 .69rem var(--mono); color:#c2c6d5; }
.module-foot strong { color:#141923; background:#b8d0db; padding:3px 5px; border-radius:2px; font-weight:700; }
.module-foot>:last-child:not(:nth-child(2)) { margin-left:auto; }

.station-intro { grid-area:intro; min-width:0; min-height:168px; display:flex; flex-direction:column; justify-content:center; position:relative; overflow:hidden; isolation:isolate; padding:17px 20px; border:1px solid #42445a; border-radius:6px; background:#1e2030; }
.station-intro::after { content:""; position:absolute; z-index:-1; inset:0 0 0 44%; opacity:.62; background:repeating-linear-gradient(121deg,#8095bc40 0 1px,transparent 1px 14px),repeating-linear-gradient(61deg,#8eaad03e 0 1px,transparent 1px 14px); mask-image:linear-gradient(90deg,transparent,#000); pointer-events:none; }
.station-index { display:flex; flex-wrap:wrap; gap:8px 18px; font:600 .65rem var(--mono); color:#b3b8d0; }
.station-index span:first-child { color:#e1d6ff; }
.station-intro h1 { font:700 3.1rem/1.04 var(--display); margin:4px 0 3px; }
.station-intro p { color:#c4c7d6; font-size:.95rem; }
.station-jump { display:flex; flex-wrap:wrap; gap:14px; margin-top:11px; color:var(--blue); font:600 .76rem var(--mono); }
.station-jump a { padding:4px 0; }
.station-jump a:hover { text-decoration:underline; }
.operator { grid-area:op; border-color:#55536d; }
.operator-card { min-height:135px; overflow:hidden; isolation:isolate; display:flex; align-items:center; position:relative; padding:13px 12px; color:#1a1c31; background:#aaa6c6; }
.operator-card::before { content:""; position:absolute; z-index:-1; inset:0; opacity:.4; background:repeating-linear-gradient(157deg,transparent 0 15px,#e5e0f8 15px 16px,transparent 16px 25px); mask-image:linear-gradient(90deg,transparent,#000); }
.operator-card img { position:absolute; inset:auto -3px 0 auto; z-index:-1; width:min(46%,178px); height:100%; object-fit:contain; object-position:right bottom; pointer-events:none; }
.operator-copy { width:61%; }
.operator-copy h2 { font:700 1.17rem/1.13 var(--mono); }
.operator-copy p { margin:4px 0 7px; font:550 .76rem/1.35 var(--mono); color:#26283b; }
.operator-copy .control { background:#242538; color:#f0eaff; border:1px solid #36374d; box-shadow:0 2px 0 #74728d; min-height:31px; }
.operator-copy .control:hover { background:#37304d; }
.operator-copy .control:focus-visible { outline-color:#242538; }
.operator .module-foot { background:#28283a; }
.operator .module-foot strong { background:#d6caef; }
.tape { grid-area:tape; display:flex; align-items:center; gap:9px; padding:5px 8px; min-width:0; font:500 .74rem var(--mono); color:var(--muted); background:#171e26; border-block:1px solid #35424a; }
.tape strong { color:var(--mint); }
#tape { display:flex; gap:16px; min-width:0; overflow:auto; scrollbar-width:thin; }
#tape>* { flex:none; max-width:450px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:4px 12px 4px 0; border-right:1px solid #394650; }
#tape a:hover,#tape a:focus-visible { color:var(--bright); }

.board { grid-area:board; }
.mast { border:0; border-radius:0; background:#1f222e; box-shadow:none; }
.mast-content { align-items:center; padding:12px 14px 10px; }
.mast h1 { color:var(--bright); }
.mast p { margin-top:3px; color:var(--muted); font-size:.8rem; }
.mast .control { margin:0; }
#rooms { display:flex; gap:4px; flex-wrap:wrap; padding:0 9px 7px; }
.room { display:flex; gap:5px; border:1px solid transparent; padding:4px 7px; min-height:33px; color:var(--muted); font:600 .72rem var(--mono); }
.room svg { width:13px; height:13px; }
.room .count { font-size:.65rem; color:#b7bdd1; }
.room:hover,.room[aria-current=page] { border-color:#56516d; background:#302c42; }
.toolbar { padding:6px 10px; border-top:1px solid var(--border); margin:0; }
.tabs .control[aria-pressed=true] { background:#282b38; border-color:#494b5f; }
.search { min-height:34px; border-color:#44495d; background:#171a23; }
.thread-row { min-height:87px; grid-template-columns:30px minmax(0,1fr) 36px; gap:10px; padding:11px 12px; border-color:#303544; }
.thread-row:hover { background:#1c2130; }
.thread-row.pinned { background:#202532; box-shadow:inset 2px 0 0 #bcabec; }
.thread-row h2 { font-size:1rem; margin:4px 0 2px; }
.thread-row p { font-size:.82rem; color:#b9bfd0; }
.meta { font-size:.65rem; color:#afb8cb; }
.meta .pintag { background:#302941; color:#e2d3ff; border-color:#65527b; }
.room-mark { width:29px; height:29px; background:#222d3e; border-color:#46556d; }
.room-mark svg { width:15px; height:15px; }
.thread-row:last-child { border-bottom:0; }
.station-grid[data-view=station] .thread-row:nth-child(n+4),.station-grid[data-view=station] #more { display:none; }
.board>.module-foot .station-only { margin-left:auto; }
.thread-detail { padding-inline:14px; }
.thread-detail .opening { background:#202531; border-top-color:#8b89ae; }
.more { margin:8px 12px; }
.reply-count { font-size:.72rem; }

.wire { grid-area:wire; }
.procs { grid-area:procs; }
.signals { grid-area:signals; }
.coins { grid-area:coins; }
.source-panel { grid-area:sources; }
.rank { grid-area:rank; }
.rank-list { list-style:none; margin:0; padding:0; font:500 .75rem var(--mono); }
.rank-list li:not(.rank-empty) { display:grid; grid-template-columns:26px minmax(70px,.8fr) minmax(40px,1fr) 25px; align-items:center; gap:9px; padding:8px 11px; border-bottom:1px solid #303544; }
.rank-list li:last-child { border-bottom:0; }
.rank-list li strong { overflow-wrap:anywhere; }
.rank-position,.rank-total { color:var(--muted); }
.rank-total { text-align:right; }
.rank-list meter { width:100%; height:12px; }
.rank-list meter::-webkit-meter-optimum-value { background:#a2c9d4; }
.rank-list meter::-webkit-meter-bar { background:#242a35; border-color:#40475a; }
.agent-builder { grid-area:builder; }
.docs { grid-area:docs; }
.filters { display:flex; flex-wrap:wrap; gap:7px; align-items:center; padding:8px 10px; border-bottom:1px solid var(--border); }
.filters label { display:flex; min-width:0; }
.filters label:has(input) { flex:1 1 125px; }
.filters input,.filters select { background:#11141c; color:var(--bright); border:1px solid #3c4252; border-radius:4px; min-height:34px; padding:5px 8px; font:500 .73rem var(--mono); width:100%; }
.filters input::placeholder { color:#9ba3b8; }
.wire-item { padding:10px 12px; border-bottom:1px solid #303544; }
.wire-item:last-child { border-bottom:0; }
.wire-meta { display:flex; flex-wrap:wrap; gap:6px 9px; align-items:center; color:#bbc2d3; font:500 .66rem var(--mono); }
.kind { text-transform:uppercase; color:var(--blue); }
.kind[data-kind=draft] { color:#d8c8fa; }
.kind[data-kind=publication] { color:#edc6a4; }
.wire-item h3 { font-size:.91rem; line-height:1.28; margin-top:4px; }
.wire-item h3 a:hover { color:var(--blue); text-decoration:underline; }
.wire-date { margin-top:4px; color:#aab3c6; font:500 .65rem var(--mono); }
.telemetry { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; padding:8px 11px; border-bottom:1px solid var(--border); gap:7px; font-family:var(--mono); }
.telemetry div { display:flex; flex-wrap:wrap; gap:0 7px; align-items:center; }
.telemetry dt { color:var(--muted); font-size:.69rem; }
.telemetry dd { color:var(--mint); font-size:.75rem; font-weight:650; margin:0; overflow-wrap:anywhere; }
.table-scroll { min-width:0; max-width:100%; overflow:auto; scrollbar-width:thin; }
.proc-table,.coin-table { width:100%; border-collapse:collapse; font:500 .72rem/1.35 var(--mono); text-align:left; }
.proc-table thead,.coin-table thead { color:#141a22; background:#a9bfca; }
.proc-table th,.proc-table td,.coin-table th,.coin-table td { padding:6px 9px; vertical-align:middle; }
.proc-table td,.proc-table tbody th,.coin-table td { border-bottom:1px solid #303544; }
.proc-table tr:last-child td,.proc-table tr:last-child th,.coin-table tr:last-child td { border-bottom:0; }
.proc-table tbody tr:hover,.coin-table tbody tr:hover { background:#202637; }
.proc-table th:nth-child(5) { width:38%; }
.proc-table small,.coin-table small { display:block; margin-top:2px; color:#aebacf; font-size:.64rem; }
.proc-table .agent-name,.proc-table .owner { overflow-wrap:anywhere; max-width:130px; }
.proc-table .process-actions { min-width:65px; }
.process-actions .control { display:block; min-height:26px; padding:2px 4px; font-size:.65rem; }
.proc-state { color:#c6cadd; white-space:nowrap; font-weight:700; }
.proc-state:is([data-state=WATCHING],[data-state=OK]),.positive { color:var(--mint); }
.proc-state:is([data-state=PARTIAL],[data-state=STALE],[data-state="NO SOURCE"],[data-state=OFFLINE]),.negative { color:var(--warm); }
.proc-state[data-state=SCAN] { color:#dbcbff; }
.agent-status:not(:empty) { padding:5px 10px; }
.agent-status:empty { display:none; }
.radar-note { color:var(--muted); font-size:.73rem; padding:7px 10px; }
.coin-table td:not(:first-child) { white-space:nowrap; }
.coin-table .table-empty { white-space:normal; padding:12px; }
.coin-description { width:25%; }
.coin-description strong { overflow-wrap:anywhere; }
.side { grid-area:side; grid-template-columns:minmax(0,1fr); gap:10px; }
.receiver { grid-row:auto; background:#161923; border-color:#48495e; border-top-color:#9892be; padding-inline:9px; }
.glass { aspect-ratio:2.65; max-height:168px; border-color:#454963; }
.rx-top,.rx-foot { min-height:32px; font-size:.68rem; }
.rx-top .control { min-height:32px; height:32px; }
.sealer-promo { border-color:#4c5468; border-left-color:#a9d4e2; background:#242735; grid-template-columns:25px minmax(0,1fr) 37px; }
.sealer-promo>svg,.sealer-promo p,.sealer-promo .outline { color:#c4dfeb; }
.sealer-promo .outline { width:36px; height:36px; background:#2a3343; border-color:#55657e; }
.sealer-promo .outline:hover { background:#414c60; }
.agent-builder form,.docs-content { padding:8px 14px 16px; }
.form-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.hint { color:var(--muted); font-size:.74rem; font-weight:500; }
.docs-content details { margin:0; border-bottom:1px solid var(--border); }
.docs-content details:last-child { border-bottom:0; }
.docs-content p { margin:0 0 11px; color:#c3c8d5; line-height:1.65; }
.docs-content .control { margin-bottom:9px; }
.footer { border-color:var(--border); margin-top:19px; }
dialog { background:#1b1e29; border-color:#596078; }
form input:not([type=checkbox]),textarea,select { background:#11141c; border-color:#495164; }
.form-status,.key-fp { color:#d7cafa; }

@media(max-width:1050px) {
  .frame { width:calc(100% - 32px); }
  .top-inner { gap:15px; }
  .station-nav a { padding-inline:7px; }
  .station-grid { grid-template-columns:minmax(0,1.62fr) minmax(254px,1fr); }
}
@media(max-width:790px) {
  .top-inner { display:grid; grid-template-columns:minmax(0,1fr) auto; padding-top:6px; gap:3px 10px; }
  .top-actions { grid-row:1; grid-column:2; }
  .station-nav { grid-column:1 / -1; overflow:auto; min-width:0; scrollbar-width:thin; }
  .station-nav a { padding-inline:8px; }
  .station-grid[data-view] { display:flex; flex-direction:column; gap:10px; }
  .station-grid> * { width:100%; }
  .station-grid[data-view=create] .agent-builder { order:-1; }
  .station-grid[data-view=agents] .operator { order:2; }
  .operator-card img { width:min(44%,180px); }
  .station-intro { min-height:138px; padding:12px; }
  .station-intro h1 { font-size:2.55rem; }
  .proc-table,.coin-table { min-width:475px; }
}
@media(max-width:450px) {
  .frame { width:calc(100% - 20px); }
  .station-nav { gap:2px; font-size:.7rem; }
  .station-nav a { min-height:36px; padding-inline:6px; }
  .station-strip { gap:7px; font-size:.66rem; }
  .brand img { width:27px; height:27px; }
  .top-actions #identity-button span { display:block; }
  .mast-content { padding:9px 10px; }
  .mast .control { font-size:.74rem; }
  .mast h1 { font-size:1.18rem; }
  #rooms { padding:0 6px 6px; gap:3px; }
  .room { min-height:34px; padding:4px 6px; }
  .room svg { display:none; }
  .station-intro h1 { font-size:2.35rem; }
  #tape>* { max-width:245px; }
  .form-columns { gap:8px; }
}
