:root {
  --ink: #080a0d;
  --panel: #0d1116;
  --panel-2: #111720;
  --line: #26303a;
  --line-soft: #171e25;
  --paper: #eef3f7;
  --muted: #85919d;
  --acid: #c8ff00;
  --cyan: #4bd6ff;
  --red: #ff5b6e;
  --amber: #ffcc4d;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; color: var(--paper); background: var(--ink); font-family: var(--sans); line-height: 1.5; }
button, input, select { font: inherit; }
a { color: inherit; }
.shell { width: min(1480px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 10px 14px; background: var(--acid); color: #050700; font-weight: 800; }
.skip-link:focus { top: 12px; }

.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(8,10,13,.95); backdrop-filter: blur(16px); }
.topbar::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 18%; height: 2px; background: var(--acid); }
.topbar-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { min-width: max-content; display: flex; align-items: center; text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; font: 900 30px/.9 var(--mono); letter-spacing: -.06em; }
.brand-copy b:last-child { color: var(--acid); }
.brand-mode { margin-left: 11px; padding-left: 11px; border-left: 1px solid var(--line); color: var(--muted); font: 700 11px/1 var(--mono); letter-spacing: .14em; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { position: relative; padding: 10px 14px; color: #aab4be; text-decoration: none; font: 700 12px/1 var(--mono); letter-spacing: .06em; }
.nav a:hover, .nav a:focus-visible, .nav a.active { color: var(--paper); }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav a:hover::after, .nav a:focus-visible::after, .nav a.active::after { transform: scaleX(1); }
.menu-button { display: none; width: 44px; height: 40px; padding: 11px; border: 1px solid var(--line); background: transparent; }
.menu-button span { display: block; height: 2px; margin: 5px 0; background: var(--paper); }

.terminal-shell { min-height: calc(100vh - 76px); padding: 28px 0 84px; background-image: linear-gradient(rgba(75,214,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(75,214,255,.035) 1px, transparent 1px); background-size: 44px 44px; }
.command-line { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); background: #06080b; color: #a8b3bc; font: 700 11px/1 var(--mono); overflow: hidden; }
.command-line .prompt { color: var(--acid); }
.command-line i { width: 7px; height: 14px; background: var(--acid); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.terminal-heading { min-height: 260px; display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: end; padding: 46px 0 38px; }
.eyebrow { margin: 0 0 18px; color: var(--acid); font: 800 11px/1.2 var(--mono); letter-spacing: .12em; }
.status-dot, .mini-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; background: var(--acid); box-shadow: 0 0 0 5px rgba(200,255,0,.08); }
h1 { margin: 0; font-size: clamp(42px, 5.7vw, 86px); line-height: .86; letter-spacing: -.07em; text-transform: uppercase; }
h1 span { color: transparent; -webkit-text-stroke: 1px #8b96a0; }
.terminal-heading > div:first-child > p:last-child { max-width: 720px; margin: 24px 0 0; color: #a6b0ba; font-size: 17px; }
.system-clock { min-width: 210px; padding: 18px 20px; border-left: 2px solid var(--acid); background: rgba(8,11,14,.78); display: flex; flex-direction: column; align-items: flex-end; }
.system-clock span { color: var(--muted); font: 700 10px/1 var(--mono); letter-spacing: .1em; }
.system-clock strong { margin-top: 10px; font: 800 31px/1 var(--mono); letter-spacing: -.05em; }
.system-clock small { margin-top: 8px; color: var(--cyan); font: 700 11px/1 var(--mono); }

.desk-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.side-rail { display: grid; gap: 14px; position: sticky; top: 96px; }
.rail-panel { border: 1px solid var(--line); background: rgba(11,15,19,.96); }
.panel-label { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--acid); background: #0b0f13; font: 800 10px/1 var(--mono); letter-spacing: .1em; }
.rail-panel dl { margin: 0; }
.rail-panel dl div { min-height: 52px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.rail-panel dl div:last-child { border-bottom: 0; }
.rail-panel dt { color: var(--muted); font: 700 10px/1 var(--mono); }
.rail-panel dd { margin: 0; color: var(--paper); text-align: right; font: 800 11px/1.2 var(--mono); }
.rail-panel dd.online { color: var(--acid); }
.mini-dot { width: 5px; height: 5px; margin-right: 6px; box-shadow: none; }
.protocol p { margin: 0; padding: 15px 14px 18px; color: #9ca7b0; font: 600 12px/1.65 var(--mono); }
.x-link { min-height: 54px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--acid); color: var(--acid); text-decoration: none; font: 800 11px/1 var(--mono); letter-spacing: .06em; transition: .18s ease; }
.x-link:hover { background: var(--acid); color: #050700; }

.feed-panel { min-width: 0; border: 1px solid var(--line); background: rgba(9,12,16,.97); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.feed-bar { min-height: 70px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.feed-bar > div:first-child { display: flex; align-items: center; gap: 13px; }
.terminal-code { padding: 10px 9px; background: var(--acid); color: #080a0d; font: 900 11px/1 var(--mono); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.feed-bar b { font: 800 12px/1 var(--mono); letter-spacing: .05em; }
.feed-actions { display: flex; gap: 8px; }
.feed-actions select, .feed-actions button { height: 38px; border: 1px solid var(--line); background: #090c10; color: var(--paper); font: 700 11px var(--mono); }
.feed-actions select { padding: 0 32px 0 12px; }
.feed-actions button { width: 38px; color: var(--acid); border-color: var(--acid); cursor: pointer; font-size: 18px; }
.feed-actions button.loading { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.feed-entries { min-height: 360px; }
.transmission { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.transmission::before { content: ""; position: absolute; top: 0; bottom: 0; left: 111px; width: 1px; background: var(--line-soft); }
.tx-meta { padding: 22px 14px; color: #71808c; font: 700 10px/1.5 var(--mono); }
.tx-meta time, .tx-meta span { display: block; }
.tx-meta .category { margin-top: 12px; color: var(--cyan); }
.tx-body { min-width: 0; padding: 22px 24px 26px; }
.tx-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 12px; }
.verdict, .asset-tag { padding: 5px 7px; border: 1px solid #38444f; color: #a8b3bc; font: 800 9px/1 var(--mono); letter-spacing: .06em; }
.verdict.bullish { border-color: #4c6415; color: var(--acid); }
.verdict.risk { border-color: #74333d; color: #ff8997; }
.verdict.neutral, .verdict.update { border-color: #31576a; color: var(--cyan); }
.asset-tag { color: var(--paper); }
.pair-arrow { color: #65717c; font: 700 11px var(--mono); }
.tx-body h2 { margin: 0; color: var(--paper); font-size: clamp(22px, 2.2vw, 32px); line-height: 1.07; letter-spacing: -.035em; }
.tx-body > p { max-width: 900px; margin: 13px 0 0; color: #aab4bd; font-size: 15px; line-height: 1.7; }
.metrics { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric { min-width: 118px; flex: 1; padding: 11px 12px; background: #0c1116; }
.metric span { display: block; color: #6f7c87; font: 700 9px/1 var(--mono); letter-spacing: .06em; }
.metric b { display: block; margin-top: 7px; color: var(--paper); font: 800 12px/1 var(--mono); }
.metric b.positive { color: var(--acid); }
.metric b.negative { color: var(--red); }
.evidence-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.evidence { padding: 12px 14px; border: 1px solid var(--line-soft); background: #0b0f13; }
.evidence strong { color: var(--muted); font: 800 9px/1 var(--mono); letter-spacing: .08em; }
.evidence ul { margin: 10px 0 0; padding-left: 17px; color: #a7b1ba; font-size: 13px; }
.evidence li + li { margin-top: 5px; }
.evidence.risks strong { color: #ff8b98; }
.tx-links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tx-links a, .copy-ca { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--line); background: transparent; color: #9ca8b2; text-decoration: none; cursor: pointer; font: 700 10px/1 var(--mono); }
.tx-links a:hover, .copy-ca:hover { border-color: var(--acid); color: var(--acid); }
.feed-foot { min-height: 42px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #65717c; background: var(--panel); font: 700 9px/1 var(--mono); letter-spacing: .08em; }
.loading-state, .empty-state, .error-state { min-height: 360px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 15px; color: #7c8994; text-align: center; font: 700 11px/1.6 var(--mono); letter-spacing: .06em; }
.loading-state span { width: 10px; height: 10px; background: var(--acid); animation: load 1.2s steps(2) infinite; }
@keyframes load { 50% { transform: translateX(12px); opacity: .3; } }
.error-state { color: #ff8997; }

footer { border-top: 1px solid var(--line); background: #06080a; }
footer .shell { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
footer b { color: var(--acid); font: 900 16px/1 var(--mono); }
footer span { color: #616d77; font: 700 10px/1 var(--mono); letter-spacing: .08em; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; padding: 12px 16px; border-left: 3px solid var(--acid); background: #172018; color: var(--paper); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; font: 700 12px/1.35 var(--mono); }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .shell { width: min(100% - 28px, 1480px); }
  .menu-button { display: block; }
  .nav { position: absolute; top: 76px; left: 0; right: 0; display: none; padding: 12px 14px 18px; flex-direction: column; align-items: stretch; background: #080a0d; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 14px; border-bottom: 1px solid var(--line-soft); }
  .terminal-heading { grid-template-columns: 1fr; }
  .system-clock { display: none; }
  .desk-grid { grid-template-columns: 1fr; }
  .side-rail { position: static; grid-template-columns: 1fr 1fr; }
  .x-link { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .topbar-inner { min-height: 68px; }
  .nav { top: 68px; }
  .brand-mode { display: none; }
  .terminal-shell { padding-top: 16px; }
  .command-line { font-size: 9px; }
  .command-line .prompt { display: none; }
  .terminal-heading { min-height: 230px; padding: 34px 0; }
  h1 { font-size: clamp(38px, 13vw, 58px); }
  .terminal-heading > div:first-child > p:last-child { font-size: 15px; }
  .side-rail { grid-template-columns: 1fr; }
  .x-link { grid-column: 1; }
  .feed-bar { align-items: stretch; flex-direction: column; }
  .feed-actions select { width: 100%; }
  .transmission { grid-template-columns: 1fr; }
  .transmission::before { display: none; }
  .tx-meta { padding: 15px 18px 0; display: flex; gap: 12px; }
  .tx-meta .category { margin: 0; }
  .tx-body { padding: 17px 18px 24px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .feed-foot { align-items: flex-start; flex-direction: column; justify-content: center; }
  footer .shell { padding: 28px 0; align-items: flex-start; flex-direction: column; }
}

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