/* ── OmarchyNetwork — an Omarchy-style desktop: waybar on top, Hyprland tiles
   below (gaps 5/10, 2px borders, no rounding), btop boxes, fastfetch,
   alacritty and neovim chrome. Palette is set by theme.js (Tokyo Night by
   default); the values below are the no-JS fallback. ─────────────────── */

:root {
  --bg: #1a1b26; --bg2: #13141c; --bg3: #24283b; --sel: #292e42; --muted: #414868;
  --fg: #a9b1d6; --dim: #565f89; --bright: #c0caf5; --accent: #7aa2f7;
  --red: #f7768e; --yellow: #e0af68; --orange: #ff9e64; --green: #9ece6a;
  --cyan: #0db9d7; --blue: #7aa2f7; --magenta: #bb9af7;
  --bg-rgb: 26,27,38; --accent-rgb: 122,162,247; --magenta-rgb: 187,154,247; --muted-rgb: 65,72,104; --green-rgb: 158,206,106;
  --inactive: rgba(89,89,89,.67);
  --gap: 10px;
  --mono: "JetBrains Mono", "JetBrainsMono Nerd Font", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0; display: flex; flex-direction: column;
  font: 12px/1.55 var(--mono); color: var(--fg);
  background:
    radial-gradient(1100px 650px at 82% 8%, rgba(var(--magenta-rgb), .16), transparent 62%),
    radial-gradient(900px 620px at 8% 96%, rgba(var(--accent-rgb), .14), transparent 60%),
    var(--bg2);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sel); color: var(--bright); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--bright); }
button { font: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
* { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: var(--muted); }
::-webkit-scrollbar-track { background: transparent; }
.dim { color: var(--dim); }
em { font-style: normal; color: var(--accent); }

/* ── waybar ─────────────────────────────────────────────────────────── */
.waybar {
  flex: none; height: 30px; position: relative; z-index: 5;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 0 12px; background: var(--bg); color: var(--fg); font-size: 11px; white-space: nowrap;
}
.wb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wb-logo { display: flex; align-items: center; gap: 8px; color: var(--bright); font-weight: 800; letter-spacing: .02em; }
.wb-logo img { width: 16px; height: 16px; display: block; }
.wb-logo b { color: var(--accent); font-weight: 800; }
.workspaces { display: flex; }
.site-nav-link { display: flex; gap: 6px; padding: 0 8px; line-height: 30px; color: var(--dim); }
.site-nav-link b { font-weight: 700; }
.site-nav-link:hover { color: var(--fg); }
.site-nav-link.active { color: var(--bright); box-shadow: inset 0 -2px var(--accent); }
.site-nav-link.active b { color: var(--accent); }
.wb-center { color: var(--bright); font-weight: 500; }
.wb-right { display: flex; justify-content: flex-end; align-items: center; gap: 16px; min-width: 0; overflow: hidden; }
.wb-mod { color: var(--fg); }
a.wb-mod:hover, .wb-theme:hover { color: var(--accent); }
a#chip-voice.on { color: var(--green); }
.wb-theme { background: none; border: 0; padding: 0; cursor: pointer; }
.wb-theme span { color: var(--magenta); }
.wb-uptime { color: var(--green); }
.wb-counter { color: var(--dim); }

.live-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.live-dot.live { animation: pulse 2.2s infinite; }
.live-dot.off, .live-dot.paused { background: var(--red); animation: none; }
.live-status.live #bot-live-text { color: var(--green); }
.live-status.paused #bot-live-text { color: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── desktop + Hyprland windows ─────────────────────────────────────── */
.page-viewport { flex: 1; min-height: 0; position: relative; }
.page-viewport > [data-page-el] { height: 100%; }
.desk { padding: var(--gap); overflow-y: auto; }

.win {
  position: relative; min-width: 0; min-height: 0;
  background: var(--bg); border: 2px solid var(--inactive);
  transition: border-color .18s ease-out;
}
.win:hover, .win:focus-within { border-color: var(--accent); }
/* focus-follows-mouse; with nothing hovered the terminal keeps focus */
.tiles:not(:has(.win:hover)) .w-term { border-color: var(--accent); }

/* btop box: 1px coloured frame with labels set into the border */
.box {
  --box: var(--accent);
  position: relative; height: 100%; min-height: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--box); padding: 14px 10px 12px;
}
.win > .box { height: calc(100% - 16px); margin: 8px; }
.c-mag { --box: var(--magenta); } .c-grn { --box: var(--green); } .c-red { --box: var(--red); }
.c-acc { --box: var(--accent); } .c-yel { --box: var(--yellow); } .c-cyan { --box: var(--cyan); }
.box-t, .box-b {
  position: absolute; left: 6px; right: 6px; z-index: 2;
  display: flex; align-items: center; gap: 4px; font-size: 11px; line-height: 18px; pointer-events: none;
}
.box-t { top: -10px; } .box-b { bottom: -10px; }
.box-t > *, .box-b > * { pointer-events: auto; }
.lbl { background: var(--bg); color: var(--bright); white-space: nowrap; padding: 0; border: 0; overflow: hidden; text-overflow: ellipsis; }
.lbl::before { content: "┐"; color: var(--box); }
.lbl::after { content: "┌"; color: var(--box); }
.lbl-r { margin-left: auto; }
.lbl sup { color: var(--box); font-size: .75em; vertical-align: .45em; line-height: 0; }
.box-b .lbl { color: var(--fg); }
.box-b .lbl::before { content: "┘"; } .box-b .lbl::after { content: "└"; }
.lbl-btn { cursor: pointer; color: var(--fg); }
.lbl-btn:hover { color: var(--accent); }
.lbl-btn[aria-pressed="false"] { color: var(--dim); }

/* ── workspace 1 tiling ─────────────────────────────────────────────── */
/* All eight windows live in one grid; wm.js switches data-layout between the
   presets below, or to free "floating" windows positioned in percent. */
.hud .tiles {
  position: relative; display: grid; gap: var(--gap); height: 100%; min-height: 640px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) 350px;
  grid-template-areas: "created created created" "fetch term trend" "pump term syn" "accounts learn learn";
}
.hud [data-win="created"] { grid-area: created; } .hud [data-win="fetch"] { grid-area: fetch; } .hud [data-win="pump"] { grid-area: pump; }
.hud [data-win="term"] { grid-area: term; } .hud [data-win="trend"] { grid-area: trend; } .hud [data-win="syn"] { grid-area: syn; }
.hud [data-win="accounts"] { grid-area: accounts; } .hud [data-win="learn"] { grid-area: learn; }
@media (min-width: 1181px) {
  .hud .tiles[data-layout="tiles"] { height: calc(100% + 360px); }
  .hud .tiles[data-layout="feed"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr); grid-template-rows: auto repeat(3, minmax(0, 1fr));
    grid-template-areas: "created created created" "fetch term trend" "pump term syn" "accounts term learn";
  }
  .hud .tiles[data-layout="network"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.7fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr);
    grid-template-areas: "created created created" "fetch term syn" "trend term syn" "pump accounts learn";
  }
  .hud .tiles[data-layout="market"] {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr);
    grid-template-areas: "created created created" "pump term trend" "pump syn trend" "fetch accounts learn";
  }
  .hud .tiles[data-layout="grid"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "created created created created" "fetch term trend syn" "pump accounts learn syn";
  }
  /* floating: every window absolutely positioned (inline %, set by wm.js) */
  .hud .tiles.floating { display: block; height: 100%; }
  .hud .tiles.floating > .win { position: absolute; }
  .win-tools { position: absolute; top: 3px; right: 8px; z-index: 9; display: flex; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .12s; }
  .win:hover > .win-tools, .win-max > .win-tools { opacity: 1; pointer-events: auto; }
  .win-tools button { font: inherit; font-size: 11px; line-height: 16px; min-width: 20px; padding: 0 4px; border: 1px solid var(--sel); background: var(--bg2); color: var(--fg); cursor: pointer; }
  .win-tools button:hover { border-color: var(--accent); color: var(--accent); }
  .win-tools .wm-move { cursor: move; }
  .win-tools .wm-title { color: var(--dim); font-size: 10px; line-height: 18px; padding: 0 6px; background: var(--bg2); border: 1px solid var(--sel); pointer-events: none; }
  .win-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; z-index: 9; cursor: nwse-resize; opacity: 0; background: linear-gradient(135deg, transparent 55%, var(--accent) 55%, var(--accent) 65%, transparent 65%, transparent 75%, var(--accent) 75%, var(--accent) 85%, transparent 85%); }
  .win:hover > .win-resize { opacity: .9; }
  .win.win-max { position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100vh - 30px - 2 * var(--gap)) !important; z-index: 60 !important; border-color: var(--accent); }
  .win.wm-active { border-color: var(--accent); }
  body.wm-dragging { user-select: none; cursor: grabbing; }
  body.wm-dragging canvas, body.wm-dragging iframe { pointer-events: none; }
}
.wb-layout { background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg); }
.wb-layout:hover { color: var(--accent); }
.wb-layout span { color: var(--cyan); }
.wm-menu { position: fixed; z-index: 100; min-width: 230px; background: var(--bg); border: 2px solid var(--accent); padding: 4px 0; font-size: 11px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.wm-menu button { display: flex; justify-content: space-between; gap: 16px; width: 100%; text-align: left; font: inherit; background: none; border: 0; color: var(--fg); padding: 4px 12px; cursor: pointer; }
.wm-menu button:hover, .wm-menu button[aria-checked="true"] { background: var(--sel); color: var(--bright); }
.wm-menu button[aria-checked="true"]::before { content: "● "; color: var(--accent); }
.wm-menu kbd { font: inherit; color: var(--dim); }
.wm-menu hr { border: 0; border-top: 1px dashed var(--muted); margin: 4px 0; }

.prompt { white-space: nowrap; color: var(--fg); }
.prompt b { color: var(--accent); }
.prompt i { color: var(--green); font-style: normal; }
.prompt .git { color: var(--magenta); }

/* created coins strip */
.w-created { padding: 5px 12px; }
.created-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cr-count { color: var(--dim); }
.cr-count:not(:empty)::before { content: "["; } .cr-count:not(:empty)::after { content: "]"; }
.mint-readout { color: var(--green); font-weight: 700; white-space: nowrap; }
.mint-readout:empty { display: none; }
.glitching { color: var(--magenta); }
.creations { flex: 1; min-width: 0; overflow: hidden; }
.creations:has(.coin-ticker-track) { mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.creations .cr-empty { padding: 0; white-space: nowrap; }
.coin-ticker-track { display: flex; width: max-content; animation: coin-loop var(--coin-loop-duration, 30s) linear infinite; }
.creations:hover .coin-ticker-track { animation-play-state: paused; }
.coin-ticker-set { display: flex; gap: 8px; padding-right: 8px; }
.coin-chip { display: inline-flex; gap: 7px; padding: 0 8px; border: 1px solid var(--sel); color: var(--fg); white-space: nowrap; }
.coin-chip b { color: var(--yellow); }
.coin-chip:hover { border-color: var(--accent); color: var(--bright); }
@keyframes coin-loop { to { transform: translateX(-50%); } }

/* fastfetch */
.ff { display: flex; gap: 20px; height: 100%; padding: 14px 16px; overflow: auto; }
.ff-logo { flex: 0 0 clamp(72px, 24%, 150px); }
.ff-logo img { width: 100%; display: block; }
.ff-info { min-width: 0; flex: 1; }
.ff-host { margin: 0; font-size: 12px; font-weight: 700; color: var(--fg); }
.ff-host b { color: var(--accent); }
.ff-host i { font-style: normal; color: var(--fg); }
.ff-rule { color: var(--dim); overflow: hidden; white-space: nowrap; line-height: 1.2; margin-bottom: 2px; }
.ff-l { display: grid; grid-template-columns: 11.5ch minmax(0, 1fr); gap: 0 1ch; line-height: 1.6; }
.ff-l > span { color: var(--accent); font-weight: 700; }
.ff-l > span::after { content: ":"; color: var(--fg); }
.ff-l > b { font-weight: 400; color: var(--fg); overflow-wrap: anywhere; }
.ff-l > b em { color: var(--yellow); }
#neural-state { color: var(--bright); font-weight: 700; }
#neural-detail { color: var(--fg); }
.neural-score { color: var(--green) !important; font-weight: 700 !important; }
.decision-track i { color: var(--dim); font-style: normal; }
.execution-mode { color: var(--yellow) !important; }
.meter { position: relative; display: inline-block; width: 14ch; height: .75em; vertical-align: -.02em; background: repeating-linear-gradient(90deg, var(--sel) 0 .5ch, transparent .5ch .6ch); }
.echo-therm-fill {
  position: absolute; inset: 0 auto 0 0; width: 0; transition: width .6s ease;
  background: linear-gradient(90deg, var(--green), var(--yellow) 60%, var(--red)) 0 0 / 14ch 100% no-repeat;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 .5ch, transparent .5ch .6ch);
  mask: repeating-linear-gradient(90deg, #000 0 .5ch, transparent .5ch .6ch);
}
#echo-sentiment-val { color: var(--bright); }
.ff-palette { display: flex; margin-top: 12px; padding: 0; border: 0; background: none; cursor: pointer; }
.ff-palette i { width: 24px; height: 14px; }
.ff-palette i:nth-child(1) { background: var(--bg3); } .ff-palette i:nth-child(2) { background: var(--red); }
.ff-palette i:nth-child(3) { background: var(--green); } .ff-palette i:nth-child(4) { background: var(--yellow); }
.ff-palette i:nth-child(5) { background: var(--accent); } .ff-palette i:nth-child(6) { background: var(--magenta); }
.ff-palette i:nth-child(7) { background: var(--cyan); } .ff-palette i:nth-child(8) { background: var(--bright); }


/* alacritty terminal */
.w-term { display: flex; flex-direction: column; }
.term-head { flex: none; padding: 10px 14px 6px; }
.stream-h { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.stream-h .prompt { overflow: hidden; text-overflow: ellipsis; }
.sh-r { color: var(--dim); white-space: nowrap; }
.feed-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 11px; background: var(--bg2); }
#feed-live { border: 0; background: var(--green); color: var(--bg); font-weight: 800; padding: 0 10px; cursor: pointer; }
#feed-live:hover { background: var(--accent); }
#feed-pages { display: flex; align-items: center; gap: 2px; }
#feed-pages button { border: 0; background: none; color: var(--dim); padding: 0 5px; cursor: pointer; }
#feed-pages button:hover:not(:disabled) { color: var(--bright); }
#feed-pages button[aria-current="page"] { background: var(--sel); color: var(--bright); }
#feed-pages button:disabled { opacity: .35; cursor: default; }
#feed-pages span { color: var(--dim); }
#feed-status { margin-left: auto; padding-right: 8px; color: var(--dim); }
.term-out { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 14px 18px; font-size: 11.5px; overscroll-behavior: contain; }
.ln { white-space: pre-wrap; overflow-wrap: anywhere; animation: fadein .25s ease both; }
.ln + .ln { margin-top: 1px; }
.ln.gap { margin-top: 10px; }
.term-out > .ln:first-child::after { content: "▌"; color: var(--bright); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.ln.verdict { margin: 4px 0 2px; padding-left: 10px; border-left: 2px solid var(--sel); }
.ln a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.t { color: var(--dim); }
.ac, .ac a { color: var(--green); }
.gold { color: var(--yellow); font-weight: 700; }
.says { color: var(--fg); }
.says .tag { color: var(--magenta); font-weight: 700; }
.obs { color: var(--cyan); font-weight: 700; }
.banner { color: var(--accent); font-weight: 800; }
.msg-score { color: var(--dim); font-weight: 700; }
.msg-score.hit { color: var(--green); }
.flow { color: var(--dim); font-size: 10.5px; }
.flow.fired { color: var(--yellow); font-weight: 700; }
.obs-avatar { width: 14px; height: 14px; object-fit: cover; vertical-align: -2px; margin-right: 4px; background: var(--bg3); }
.err { color: var(--red); }

/* synapses */
.w-syn .box { padding-top: 16px; }
.syn-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.synapse-caption { margin: 0; font-size: 10.5px; color: var(--dim); line-height: 1.6; }
.cycle-meter { display: grid; gap: 4px; font-size: 11px; }
.cycle-meter b { color: var(--bright); font-weight: 700; }
.cycle-meter span { color: var(--dim); font-size: 10.5px; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; background: var(--sel); }
progress::-webkit-progress-bar { background: var(--sel); }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }
.synapse-map { position: relative; flex: 1 0 220px; min-height: 220px; background: radial-gradient(ellipse at center, rgba(var(--green-rgb), .06), transparent 70%); }
.synapse-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.cycle-controls, .synapse-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 11px; }
.synapse-legend span { color: var(--dim); }
.syn-types { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.syn-type { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--sel); background: var(--bg2); color: var(--fg); padding: 0 6px; cursor: pointer; font-size: 10.5px; }
.syn-type i { width: 8px; height: 8px; display: inline-block; }
.syn-type b { color: var(--dim); font-weight: 400; }
.syn-type:hover, .syn-type[aria-pressed="true"] { border-color: var(--accent); color: var(--bright); }
.syn-type.off { opacity: .45; }
.cycle-controls button, #synapse-follow, #about-synapse-follow, .rm-actions button {
  border: 1px solid var(--sel); background: var(--bg2); color: var(--fg); padding: 1px 8px; cursor: pointer;
}
.cycle-controls button:hover:not(:disabled), #synapse-follow:hover, #about-synapse-follow:hover, .rm-actions button:hover { border-color: var(--accent); color: var(--accent); }
.cycle-controls button:disabled { opacity: .35; cursor: default; }
#synapse-follow, #about-synapse-follow { margin-left: auto; }
#synapse-follow[aria-pressed="true"], #about-synapse-follow[aria-pressed="true"] { color: var(--green); }
.neuron-picker { margin-left: auto; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.neuron-picker input { width: 8ch; font: inherit; background: var(--bg2); color: var(--bright); border: 1px solid var(--sel); padding: 0 4px; }
.synapse-detail { border-left: 2px solid var(--green); padding: 6px 10px; background: var(--bg2); font-size: 11px; }
.synapse-detail b { color: var(--bright); overflow-wrap: anywhere; }
.synapse-detail span { color: var(--green); font-weight: 700; margin-left: 8px; }
.synapse-detail p { margin: 4px 0; color: var(--fg); overflow-wrap: anywhere; }

/* pump.fun (btop proc box) */
.pump-live .box, .account-db .box, .w-learn .box { padding: 14px 8px 12px; }
.proc-head, .pump-token { display: grid; grid-template-columns: 11ch minmax(0, 1fr) 14ch; gap: 1ch; padding: 0 4px; }
.proc-head { color: var(--bright); font-weight: 700; flex: none; }
.pump-feed-rows { flex: 1; min-height: 0; overflow-y: auto; font-size: 11.5px; }
.pump-feed-rows p { margin: 6px 4px; color: var(--dim); }
.pump-token { color: var(--fg); line-height: 1.7; }
.pump-token > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pump-token b { color: var(--accent); font-weight: 500; }
.pump-token small { font-size: inherit; color: var(--dim); text-align: right; }
.pump-token:hover { background: var(--sel); color: var(--bright); }
.pump-token:first-child { background: var(--sel); }

/* trending */
.trend-row, .trend-token { display: grid; grid-template-columns: 3ch minmax(0, 1fr) 9ch 8ch; gap: 1ch; padding: 0 4px; }
.trend-token { color: var(--fg); line-height: 1.7; }
.trend-token > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-token .rk { color: var(--dim); }
.trend-token b { color: var(--magenta); font-weight: 500; }
.trend-token b small { color: var(--dim); font-size: inherit; margin-left: 1ch; }
.trend-token .mc { text-align: right; color: var(--fg); }
.trend-token .chg { text-align: right; color: var(--dim); }
.trend-token .chg.up { color: var(--green); } .trend-token .chg.down { color: var(--red); }
.trend-token:hover { background: var(--sel); color: var(--bright); }
.trend-token:first-child .rk { color: var(--yellow); }

/* accounts */
.account-db-stream { flex: 1; min-height: 0; overflow: hidden; position: relative; font-size: 11.5px; mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent); }
.account-db-track { animation: account-db-flow var(--flow-duration, 28s) linear infinite; will-change: transform; }
.account-db-stream:hover .account-db-track, .account-db-stream:focus-within .account-db-track { animation-play-state: paused; }
.account-db-set { display: flex; flex-direction: column; }
.account-db-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 4px; line-height: 1.75; color: var(--fg); }
.account-db-row:hover { background: var(--sel); color: var(--bright); }
.account-db-row.is-hot { background: var(--sel); color: var(--yellow); }
.account-db-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-db-count { color: var(--yellow); }
.account-db-empty { padding: 8px 4px; color: var(--dim); }
.box-t #account-db-total { color: var(--yellow); }
@keyframes account-db-flow { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* learning */
.deep-out { flex: 1; min-height: 0; overflow-y: auto; font-size: 11px; padding: 0 2px; }
.dp-row { padding: 6px 0; border-top: 1px dashed rgba(var(--muted-rgb), .7); }
.dp-row:first-child { border-top: 0; }
.dp-head { display: flex; justify-content: space-between; gap: 8px; }
.dp-metric { color: var(--red); font-weight: 700; text-transform: lowercase; }
.dp-who { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-verdict { color: var(--fg); margin-top: 2px; }
.cr-empty { color: var(--dim); padding: 6px 2px; }

/* ── document windows (neovim) ─────────────────────────────────────── */
.page-doc, .coin-gallery, .roadmap { display: flex; }
.win-doc { flex: 1; height: 100%; display: flex; flex-direction: column; }
.tabline { flex: none; display: flex; background: var(--bg2); font-size: 11px; overflow: hidden; white-space: nowrap; }
.tab { padding: 3px 14px; color: var(--dim); }
.tab.on { background: var(--bg); color: var(--bright); box-shadow: inset 0 2px var(--accent); }
.statusline { flex: none; display: flex; background: var(--bg2); font-size: 11px; white-space: nowrap; overflow: hidden; }
.statusline > span { padding: 1px 10px; }
.statusline .mode { background: var(--accent); color: var(--bg); font-weight: 800; }
.statusline .sl-r { margin-left: auto; color: var(--dim); }

.md, .roadmap-body { flex: 1; min-height: 0; overflow-y: auto; padding: 26px max(18px, calc((100% - 880px) / 2)) 40px; }
.md h1, .roadmap-body h1 { font-size: clamp(23px, 3.2vw, 39px); line-height: 1.15; margin: 8px 0 14px; color: var(--bright); letter-spacing: -.02em; }
.md h1 em, .roadmap-body h1 em { color: var(--accent); }
.md h2 { font-size: 15px; line-height: 1.4; color: var(--bright); margin: 10px 0 12px; }
.md h2::before { content: "## "; color: var(--accent); }
.md h3 { font-size: 12px; color: var(--accent); margin: 0 0 6px; }
.md p { margin: 0 0 14px; line-height: 1.75; }
.md strong { color: var(--bright); }
.md a, .roadmap-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.sec-k { display: block; margin: 34px 0 4px; font-size: 10.5px; color: var(--dim); text-transform: lowercase; }
.sec-k::before { content: "<!-- "; } .sec-k::after { content: " -->"; }
.md > .sec-k:first-child, .about-heading .sec-k { margin-top: 0; }
.learning-loop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0; font-size: 11px; }
.learning-loop span { border: 1px solid var(--green); color: var(--green); padding: 1px 10px; }
.learning-loop b { color: var(--dim); }
.research-figure { margin: 24px 0; border: 1px solid var(--sel); background: var(--bg2); }
.research-figure header { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; padding: 6px 12px; border-bottom: 1px solid var(--sel); font-size: 11px; }
.research-figure header span { color: var(--magenta); }
.research-figure header b { color: var(--bright); }
.research-drawing { overflow-x: auto; }
.research-drawing img { display: block; width: 100%; min-width: 640px; height: auto; }
.research-figure figcaption { padding: 8px 12px; font-size: 11px; color: var(--dim); line-height: 1.6; }
.research-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.research-notes article { border: 1px solid var(--sel); padding: 12px 14px; background: var(--bg2); }
.research-notes p { font-size: 11.5px; margin: 0; }
.research-protocol { display: flex; align-items: stretch; gap: 8px; margin: 18px 0; font-size: 11px; }
.research-protocol div { flex: 1; border: 1px solid var(--sel); padding: 8px 10px; display: grid; gap: 2px; }
.research-protocol b { color: var(--yellow); }
.research-protocol strong { align-self: center; color: var(--dim); }
.kicker { margin-top: 26px !important; padding-top: 16px; border-top: 1px dashed var(--muted); color: var(--dim); }
.foot { margin-top: 26px; font-size: 11px; color: var(--fg); display: grid; gap: 2px; }
.about-heading p { color: var(--dim); }
.about-status { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; border: 1px solid var(--sel); padding: 12px 14px; margin: 20px 0; background: var(--bg2); }
.about-status b { color: var(--green); }
.about-status b:nth-of-type(2) { color: var(--yellow); }
.about-status p { margin: 0; font-size: 11.5px; }

/* coins workspace */
.gallery-body h2 { margin-top: 6px; }
.created-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); margin-top: 18px; }
.cr { display: flex; gap: 10px; padding: 10px; border: 2px solid var(--inactive); background: var(--bg2); color: var(--fg); min-width: 0; transition: border-color .18s; }
.cr:hover { border-color: var(--accent); color: var(--fg); }
.cr img { width: 48px; height: 48px; object-fit: cover; flex: none; background: var(--bg3); }
.cr-b { min-width: 0; flex: 1; }
.cr-t { color: var(--yellow); font-weight: 700; }
.cr-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-m { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--dim); }
.cr-m .pnl-win { color: var(--green); } .cr-m .pnl-loss { color: var(--red); }

/* roadmap workspace */
.rm-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.rm-heading p { color: var(--dim); margin: 0; max-width: 60ch; }
.rm-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 10px; color: var(--dim); white-space: nowrap; }
.rm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 24px 0 18px; }
.rm-node {
  display: flex; flex-direction: column; gap: 3px; min-height: 104px; padding: 12px; text-align: left; cursor: pointer;
  background: var(--bg2); border: 2px solid var(--inactive); color: var(--fg); transition: border-color .18s, background .18s;
}
.rm-node small { color: var(--dim); font-size: 10px; }
.rm-node b { color: var(--bright); }
.rm-node span { color: var(--dim); font-size: 11px; }
.rm-node:hover { border-color: var(--muted); }
.rm-node[aria-pressed="true"] { border-color: var(--accent); background: var(--bg); }
.rm-node[aria-pressed="true"] small { color: var(--accent); }
.rm-detail { border: 1px solid var(--magenta); padding: 14px 16px; display: grid; gap: 6px; }
.rm-detail .sec-k { margin: 0; }
.rm-detail h2 { margin: 0; font-size: 17px; color: var(--bright); }
.rm-detail p { margin: 0; line-height: 1.75; }
.rm-status { color: var(--green); font-size: 11px; }
.fee-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 12px; font-size: 11px; }
.fee-path > span, .fee-path strong { border: 1px solid var(--sel); padding: 1px 10px; color: var(--fg); font-weight: 400; }
.fee-path > b { color: var(--dim); }
.fee-path > div { display: flex; flex-direction: column; gap: 4px; }
.fee-path strong { border-color: var(--green); color: var(--green); }
.rm-note { color: var(--dim); font-size: 11px; line-height: 1.7; }
.rm-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--muted); color: var(--fg); font-size: 11px; }
.rm-footer span { color: var(--dim); }

/* about workspace */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--gap); height: 100%; width: 100%; }
.about-grid > .win { min-height: 0; }

/* ── responsive tiling ─────────────────────────────────────────────── */
@media (max-width: 1320px) { .wb-counter { display: none; } }
@media (max-width: 1180px) {
  .site-nav-link span { display: none; }
  .wb-logo span { display: none; }
  .hud .tiles {
    height: auto; min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto 340px 380px 560px 340px;
    grid-template-areas: "created created" "fetch term" "pump term" "trend syn" "accounts learn";
  }
  .wb-layout { display: none; }
  .research-notes { grid-template-columns: 1fr; }
  .rm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; height: auto; }
  .about-grid > .win-doc { height: calc(100vh - 50px); height: calc(100dvh - 50px); }
  .about-grid > .w-syn { height: 720px; }
}
@media (max-width: 760px) {
  :root { --gap: 8px; }
  .waybar { grid-template-columns: minmax(0, 1fr) auto; padding: 0 8px; }
  .wb-center, .wb-uptime { display: none; }
  .site-nav-link { padding: 0 7px; }
  .wb-right { gap: 10px; }
  .wb-theme span { display: none; }
  .hud .tiles { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; }
  .hud .tiles > .win { grid-area: auto; }
  .w-fetch { height: auto; }
  .w-term { height: 560px; } .hud .w-syn { height: 680px; }
  .hud .pump-live { height: 380px; } .pump-trending { height: 420px; } .account-db { height: 320px; } .w-learn { height: 360px; }
  .ff { flex-direction: column; gap: 12px; }
  .ff-logo { flex: none; width: 72px; }
  .created-row { flex-wrap: wrap; gap: 6px 12px; }
  .creations { flex-basis: 100%; }
  .proc-head, .pump-token { grid-template-columns: 9ch minmax(0, 1fr) 11ch; }
  .rm-heading { flex-direction: column; align-items: flex-start; }
  .rm-actions { align-items: flex-start; }
  .rm-grid { grid-template-columns: minmax(0, 1fr); }
  .rm-node { min-height: 0; }
  .research-protocol { flex-direction: column; }
  .research-protocol strong { transform: rotate(90deg); align-self: flex-start; margin-left: 12px; }
  .md, .roadmap-body { padding: 18px 14px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
