/* RENON AI — monochrome wireframe terminal UI */

/* ------------------------------------------------- self-hosted type */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../asset/fonts/plex-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../asset/fonts/plex-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../asset/fonts/plex-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../asset/fonts/plex-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../asset/fonts/plex-mono-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../asset/fonts/plex-mono-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --void: #000;
  --panel: #030303;
  --panel-2: #070707;
  --line: #303030;
  --line-soft: #272727;
  --bone: #fff;
  --fog: #a7a7a7;
  --fog-dim: #656565;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  background:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    var(--void);
  background-size: 48px 48px;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.04em; }
code, pre { font-family: var(--mono); }
a { color: #fff; }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 1px solid #fff; outline-offset: 2px; }

/* ------------------------------------------------------------- chrome */

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 76px;
  padding: .8rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, .94);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: .65rem; min-width: 190px; }
.brand-lockup { width: 38px; height: 38px; }
.wiremark-svg { display: block; color: #fff; overflow: visible; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .18)); }
.brand-word { font-size: 1rem; font-weight: 600; letter-spacing: -.04em; text-transform: lowercase; }
.brand-word em { font-style: normal; color: var(--fog-dim); }
.brand-ticker {
  padding: .18rem .42rem; border: 1px solid var(--line);
  font-size: .58rem; letter-spacing: .14em; color: var(--fog);
}
.header-right { display: flex; align-items: center; gap: 1rem; }
.site-nav { display: flex; gap: .35rem; }
.nav-button {
  padding: .45rem .75rem;
  border: 1px solid transparent; background: transparent; color: var(--fog);
  font: 400 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.nav-button:hover { color: #fff; border-color: #fff; }
.nav-button.active { background: #fff; color: #000; border-color: #fff; }
.nav-x { text-transform: none; text-decoration: none; border-color: var(--line); }

.status { display: flex; align-items: center; gap: .5rem; font-size: .68rem; color: var(--fog); letter-spacing: .08em; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fog-dim); flex-shrink: 0; }
.status-dot.online { background: #fff; box-shadow: 0 0 9px rgba(255, 255, 255, .85); animation: blink 2.4s ease-in-out infinite; }
.status-dot.offline { background: #4a4a4a; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.telemetry-strip {
  position: sticky; top: 76px; z-index: 9;
  height: 30px; overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .94);
  color: #777; font: 400 .58rem/30px var(--mono); letter-spacing: .08em;
}
.telemetry-track { display: inline-block; min-width: 200%; animation: telemetryScroll 28s linear infinite; }
.telemetry-track span { color: #fff; margin: 0 .65rem; }
@keyframes telemetryScroll { to { transform: translateX(-50%); } }

main { max-width: 1260px; margin: 0 auto; padding: 3.5rem clamp(1rem, 3vw, 1.5rem) 4rem; }
main[hidden] { display: none; }

/* --------------------------------------------------------------- hero */

.hero, .panel, .scorer { position: relative; }

.hero {
  overflow: hidden;
  min-height: 470px;
  padding: 4rem 0 2.75rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  grid-template-areas: "copy mark" "chain chain" "stats stats";
  align-items: center;
  column-gap: 4rem;
}
.hero::before {
  content: "RENON AI / LIVE SYSTEM";
  position: absolute; top: 0; left: 0;
  color: #666; font-size: .62rem; letter-spacing: .18em;
}
.section-index {
  position: absolute; right: 12px; top: 9px;
  color: #555; font: 400 .5rem var(--mono); letter-spacing: .12em;
}
.hero-copy { grid-area: copy; max-width: 680px; z-index: 1; }
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 4.5rem); line-height: 1.04; letter-spacing: -.055em; }
.hero-copy .accent { color: transparent; -webkit-text-stroke: 1px #fff; }
.hero-copy p { margin-top: 1.15rem; max-width: 58ch; color: #aaa; font-size: .9rem; }
.hero-ca {
  display: block; margin-top: .85rem; color: #fff;
  font: 500 .68rem/1.5 var(--mono); overflow-wrap: anywhere;
}
.hero-ca::before { content: "CA  "; color: #707070; font-size: .53rem; letter-spacing: .14em; }

.hero-mark-wrap {
  grid-area: mark; position: relative;
  display: flex; align-items: center; justify-content: center; min-height: 250px;
}
.hero-mark-wrap::before, .hero-mark-wrap::after {
  content: ""; position: absolute; width: 250px; height: 250px;
  border: 1px solid #202020; border-radius: 50%;
}
.hero-mark-wrap::after { width: 190px; height: 190px; border-style: dashed; animation: markSpin 24s linear infinite; }
.hero-wiremark {
  position: relative; z-index: 1; width: min(300px, 76%); height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .15));
  animation: markDrift 6s ease-in-out infinite;
}
@keyframes markSpin { to { transform: rotate(360deg); } }
@keyframes markDrift { 50% { transform: translateY(-9px) rotate(2deg); } }

.node-map { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .7; }
.node-map i {
  position: absolute; width: 4px; height: 4px; border: 1px solid #fff; border-radius: 50%;
  box-shadow: 0 0 8px #fff; animation: nodePulse 2.8s ease-in-out infinite;
}
.node-map i::after { content: ""; position: absolute; top: 1px; left: 6px; width: 80px; border-top: 1px dotted #444; }
.node-map i:nth-child(1) { left: 8%; top: 23%; }
.node-map i:nth-child(2) { right: 15%; top: 42%; animation-delay: .8s; }
.node-map i:nth-child(3) { left: 45%; bottom: 18%; animation-delay: 1.6s; }
@keyframes nodePulse { 50% { opacity: .25; transform: scale(.65); } }

.chain-wrap { grid-area: chain; position: relative; display: flex; align-items: center; min-height: 105px; margin-top: 2rem; opacity: .92; }
#chainViz { width: 100%; height: 110px; display: block; }
.chain-empty { color: var(--fog-dim); font-size: .78rem; }
.chain-node { transition: opacity .4s ease; }
.chain-node.newest { animation: nodeGlow 2.4s ease-in-out infinite; }
@keyframes nodeGlow {
  0%, 100% { filter: drop-shadow(0 0 4px #fff); }
  50% { filter: drop-shadow(0 0 12px #fff); }
}

.stat-row {
  grid-area: stats; margin-top: 1.75rem;
  display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line);
}
.stat { padding: 1rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.stat:last-child { border-right: 0; }
.stat-value { font-size: 1.5rem; font-weight: 500; }
.stat-label { margin-top: .2rem; color: #747474; font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; }

/* ------------------------------------------------------------- panels */

.grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }

.panel, .scorer {
  display: flex; flex-direction: column; min-height: 0;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: rgba(3, 3, 3, .96);
}
.panel::before, .scorer::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 16px; height: 16px;
  border-left: 1px solid #fff; border-top: 1px solid #fff;
}
.panel h2, .scorer h2 { font-size: 1rem; text-transform: lowercase; }
.panel-sub { margin: .4rem 0 .9rem; max-width: 52ch; color: #818181; font-size: .74rem; }
.panel-body { margin-top: .5rem; max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.panel-body .empty { padding: .5rem 0; color: var(--fog-dim); font-size: .78rem; }

#feedPanel .panel-body {
  max-height: min(520px, 62vh);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem;
}
#feedPanel .panel-body .empty { grid-column: 1 / -1; }

.feed-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center;
  padding: .65rem .7rem; border: 1px solid var(--line-soft); background: var(--panel-2);
}
.feed-row:hover { border-color: #666; }
.score-chip {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.15rem; height: 2.15rem;
  border: 1px solid #fff; color: #fff;
  font-size: .82rem; font-weight: 500;
}
.score-chip.high { background: #fff; color: #000; }
.score-chip.mid { border-color: #9a9a9a; color: #ddd; }
.score-chip.low { border-color: #4a4a4a; color: #7d7d7d; }
.token-visual { display: flex; align-items: center; gap: .6rem; }
.token-image {
  width: 3.15rem; height: 3.15rem; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line); background: #000; filter: grayscale(1) contrast(1.1);
}
.token-image.large { width: 3.6rem; height: 3.6rem; }
.feed-main { min-width: 0; }
.feed-symbol { font-size: .9rem; font-weight: 600; letter-spacing: -.03em; }
.feed-address { display: block; margin-top: .1rem; color: var(--fog); font-size: .66rem; }
.dex-link { display: inline-block; margin-top: .22rem; font-size: .62rem; color: #fff; text-decoration: none; letter-spacing: .06em; }
.dex-link:hover { text-decoration: underline; }
.feed-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.tag { padding: .1rem .4rem; border: 1px solid var(--line); background: #000; color: var(--fog); font-size: .55rem; letter-spacing: .06em; white-space: nowrap; }
.feed-meta { text-align: right; color: var(--fog); font-size: .62rem; white-space: nowrap; }
.feed-meta .liq { display: block; color: #fff; font-size: .74rem; }
.feed-meta .delta.up { color: #fff; }
.feed-meta .delta.down { color: #7d7d7d; }

.feed-row.new-discovery { animation: newPair 2.4s ease-out; }
@keyframes newPair {
  0% { border-color: rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 26px rgba(255, 255, 255, .18); transform: translateY(-2px); }
  100% { border-color: var(--line-soft); box-shadow: none; transform: translateY(0); }
}

/* ------------------------------------------------------------ console */

.console-panel { padding: 0; overflow: hidden; background: #000; }
.console-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .75rem .9rem; border-bottom: 1px solid var(--line); background: #000;
}
.console-title { font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.console-state { display: flex; align-items: center; gap: .45rem; color: #fff; font-size: .62rem; letter-spacing: .08em; }
.console-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.console-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.console-stat { padding: .65rem .45rem; text-align: center; border-right: 1px solid var(--line); }
.console-stat:last-child { border-right: 0; }
.console-stat strong { display: block; font-size: .85rem; font-weight: 500; }
.console-stat span { display: block; margin-top: .15rem; color: var(--fog-dim); font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; }
.console-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.35fr); grid-template-rows: 360px; }
.console-log {
  padding: .65rem .8rem; overflow-y: auto; border-right: 1px solid var(--line);
  font-size: .64rem; line-height: 1.65;
}
.console-line { display: grid; grid-template-columns: 4.8rem .75rem 1fr; gap: .35rem; color: #91a0ab; }
.console-time { color: #52616d; }
.console-mark { color: #aaa; }
.console-line.learning .console-mark, .console-line.learning .console-message,
.console-line.score_change .console-mark { color: #fff; }
.console-line.error .console-message { color: #8b8b8b; }
.code-window { display: flex; flex-direction: column; min-height: 0; }
.code-tabs { display: flex; border-bottom: 1px solid var(--line); background: #000; }
.code-tab {
  padding: .5rem .75rem; border: 0; border-right: 1px solid var(--line);
  background: transparent; color: var(--fog); font: 400 .62rem var(--mono); cursor: pointer;
}
.code-tab.active { background: #fff; color: #000; }
.code-view {
  flex: 1; margin: 0; padding: .75rem .85rem; overflow: auto;
  color: #aab7c1; font-size: .62rem; line-height: 1.55; white-space: pre; tab-size: 2;
}
.code-cursor { display: inline-block; width: .48rem; height: .8rem; background: #fff; vertical-align: -.1rem; animation: cursorBlink .9s steps(1) infinite; }
@keyframes cursorBlink { 50% { opacity: 0; } }
.runtime-trace {
  flex: 0 0 112px; height: 112px; overflow-y: auto;
  padding: .55rem .8rem; border-top: 1px solid var(--line); background: #020202;
  color: #8e989f; font-size: .6rem; line-height: 1.55;
}
.trace-head { margin-bottom: .3rem; color: #fff; font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; }
.trace-line { display: grid; grid-template-columns: 4.6rem 1fr; gap: .45rem; }
.trace-time { color: #555; }
.trace-line.live { color: #fff; }

/* -------------------------------------------------------- calibration */

.weights-wide { margin-top: 1.25rem; }
.weight-live { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-bottom: 1rem; }
.weight-cell { padding: .55rem .65rem; border: 1px solid var(--line-soft); background: var(--panel-2); }
.weight-cell b { display: block; font-size: .58rem; font-weight: 400; letter-spacing: .1em; color: #bbb; }
.weight-cell span { font-size: .8rem; }
.weight-cell .bar { height: 3px; margin-top: .4rem; background: #1c1c1c; overflow: hidden; }
.weight-cell .bar i { display: block; height: 100%; background: #d6d6d6; box-shadow: 0 0 7px #777; }
.weight-row { padding: .6rem .7rem; border: 1px solid var(--line-soft); background: var(--panel-2); }
.weight-row:hover { border-color: #666; }
.weight-name { font-size: .78rem; }
.weight-name em { font-style: normal; color: var(--fog-dim); font-size: .58rem; letter-spacing: .1em; margin-right: .4rem; }
.weight-diff { margin-top: .15rem; font-size: .72rem; color: var(--fog); }
.weight-diff .up { color: #fff; }
.weight-diff .down { color: #7d7d7d; }
.weight-reason { margin-top: .2rem; color: var(--fog-dim); font-size: .66rem; }

/* ------------------------------------------------------------- scorer */

.scorer { margin-top: 1.6rem; }
.score-form { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.score-form input {
  flex: 1; min-width: 220px; padding: .65rem .85rem;
  border: 1px solid #444; background: #000; color: #fff; font: 400 .8rem var(--mono);
}
.score-form input::placeholder { color: var(--fog-dim); }
.score-form button, .comment-form-row button {
  padding: .65rem 1.3rem; border: 1px solid #fff; background: #fff; color: #000;
  font: 600 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.score-form button:hover, .comment-form-row button:hover { background: #000; color: #fff; }
.score-form button:disabled, .comment-form-row button:disabled { opacity: .5; cursor: default; }
.score-result { margin-top: 1.1rem; padding: 1rem; border: 1px solid var(--line-soft); background: var(--panel-2); }
.score-result.error { color: var(--fog); font-size: .8rem; }
.score-head { display: flex; align-items: center; gap: .9rem; }
.score-head .score-chip { width: 2.8rem; height: 2.8rem; font-size: 1.05rem; }
.score-head .sym { font-size: 1.05rem; font-weight: 600; }
.score-head .addr { display: block; color: var(--fog); font-size: .66rem; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .55rem; margin-top: 1rem; }
.score-metric { padding: .5rem .6rem; border: 1px solid var(--line-soft); }
.score-metric b { display: block; color: var(--fog-dim); font-size: .55rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.score-metric span { font-size: .82rem; }
.breakdown { margin-top: 1rem; display: grid; grid-template-columns: 8.5rem 1fr 3.4rem; gap: .45rem .7rem; align-items: center; font-size: .6rem; color: #888; }
.breakdown strong { color: #bbb; font-weight: 400; }
.breakdown .bar { height: 3px; background: #1c1c1c; overflow: hidden; }
.breakdown .bar i { display: block; height: 100%; background: #d6d6d6; box-shadow: 0 0 7px #777; }

/* ---------------------------------------------------------- community */

.community-hero { position: relative; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.community-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); text-transform: lowercase; }
.community-hero p { margin: .6rem 0 0; max-width: 62ch; color: var(--fog); font-size: .85rem; }
.discussed-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; }
.discussed-chip {
  padding: .35rem .7rem; border: 1px solid var(--line-soft); background: var(--panel-2);
  color: var(--fog); font: 400 .68rem var(--mono); cursor: pointer;
}
.discussed-chip:hover { border-color: #fff; color: #fff; }
.forum-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.forum-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.forum-head h3 { font-size: .92rem; text-transform: lowercase; }
.forum-avg { color: var(--fog); font-size: .74rem; }
.comment-row { margin-bottom: .6rem; padding: .7rem .85rem; border: 1px solid var(--line-soft); background: var(--panel-2); }
.comment-row:hover { border-color: #666; }
.comment-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.comment-row .score-chip { width: 1.7rem; height: 1.7rem; font-size: .68rem; }
.comment-author { font-size: .78rem; }
.comment-time { margin-left: auto; color: var(--fog-dim); font-size: .65rem; }
.comment-text { color: #ddd; font-size: .8rem; word-break: break-word; }
.comment-form { margin-top: 1rem; }
.rating-picker { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.rating-chip {
  display: flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem;
  border: 1px solid var(--line); background: #000; color: var(--fog);
  font: 400 .72rem var(--mono); cursor: pointer;
}
.rating-chip:hover { border-color: #fff; color: #fff; }
.rating-chip.active { background: #fff; color: #000; border-color: #fff; }
.comment-form textarea {
  width: 100%; min-height: 70px; padding: .65rem .85rem; resize: vertical;
  border: 1px solid #444; background: #000; color: #fff; font: 400 .8rem var(--mono);
}
.comment-form-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.comment-form-row input {
  flex: 1; min-width: 160px; padding: .6rem .8rem;
  border: 1px solid #444; background: #000; color: #fff; font: 400 .78rem var(--mono);
}
.comment-note { margin-top: .5rem; min-height: 1em; color: var(--fog-dim); font-size: .7rem; }

/* ------------------------------------------------------- track record */

.record-panel { margin-top: 1.25rem; }
.record-headline {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: .3rem 0 1.25rem; border: 1px solid var(--line);
}
.record-stat { padding: .85rem .9rem; border-right: 1px solid var(--line); }
.record-stat:last-child { border-right: 0; }
.record-stat b { display: block; color: #747474; font-size: .55rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.record-stat span { display: block; margin-top: .25rem; font-size: 1.35rem; }
.record-stat small { display: block; color: var(--fog-dim); font-size: .55rem; letter-spacing: .06em; }

.record-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin-top: 1px; border: 1px solid var(--line); background: var(--line);
}
.record-module { padding: 1rem; background: #000; min-height: 190px; }

.band-table { margin-top: .85rem; display: flex; flex-direction: column; gap: .5rem; }
.band-row { display: grid; grid-template-columns: 4.6rem 1fr 2.6rem; gap: .5rem; align-items: center; font-size: .58rem; color: #777; }
.band-row strong { color: #ddd; font-weight: 400; font-size: .62rem; }
.band-row .bar { height: 6px; background: #141414; border: 1px solid #222; overflow: hidden; }
.band-row .bar i { display: block; height: 100%; background: #d6d6d6; box-shadow: 0 0 7px #777; }
.band-row .bar i.empty { background: repeating-linear-gradient(90deg, #2a2a2a 0 3px, transparent 3px 6px); box-shadow: none; }
.band-row .count { text-align: right; color: var(--fog-dim); }
.band-meta { grid-column: 1 / -1; margin-top: -.25rem; color: var(--fog-dim); font-size: .52rem; letter-spacing: .06em; }

.calibration-plot { margin-top: .85rem; }
#calibrationPlot { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; }
#calibrationPlot .grid-line { stroke: #1c1c1c; stroke-width: 1; }
#calibrationPlot .ideal { stroke: #4a4a4a; stroke-width: 1; stroke-dasharray: 4 4; }
#calibrationPlot .measured { fill: none; stroke: #fff; stroke-width: 1.6; }
#calibrationPlot circle { fill: #000; stroke: #fff; stroke-width: 1.2; }
#calibrationPlot text { fill: #555; font: 400 7px var(--mono); }
.plot-note { margin: .55rem 0 0; color: var(--fog-dim); font-size: .55rem; letter-spacing: .06em; }

.signal-matrix.reliability { grid-template-columns: 7.5rem 1fr 3.6rem; }
.signal-matrix.reliability i { animation: none; }
.signal-matrix.reliability .muted { color: #4d4d4d; }

.generation-list { margin-top: .85rem; display: flex; flex-direction: column; gap: .45rem; }
.generation-row { display: grid; grid-template-columns: 4rem 1fr 3.4rem; gap: .5rem; align-items: center; font-size: .58rem; color: #777; }
.generation-row strong { color: #ddd; font-weight: 400; }
.generation-row .bar { height: 3px; background: #1c1c1c; overflow: hidden; }
.generation-row .bar i { display: block; height: 100%; background: #bdbdbd; box-shadow: 0 0 7px #777; }

.call-list { margin-top: .85rem; display: flex; flex-direction: column; gap: .4rem; }
.call-row {
  display: grid; grid-template-columns: 2rem 1fr auto; gap: .55rem; align-items: center;
  padding: .45rem .55rem; border: 1px solid var(--line-soft); background: var(--panel-2); font-size: .6rem;
}
.call-row .score-chip { width: 1.9rem; height: 1.9rem; font-size: .68rem; }
.call-row b { display: block; color: #fff; font-weight: 500; font-size: .68rem; }
.call-row code { display: block; color: var(--fog-dim); font-size: .52rem; }
.call-row .delta { text-align: right; white-space: nowrap; }
.call-row .delta.up { color: #fff; }
.call-row .delta.down { color: #8a8a8a; }
.call-row .outcome { display: block; color: var(--fog-dim); font-size: .5rem; letter-spacing: .08em; text-transform: uppercase; }
.record-empty { margin-top: .85rem; color: var(--fog-dim); font-size: .62rem; line-height: 1.7; }

/* ------------------------------------------------------------- alerts */

.alert-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: .3rem 0 1rem; border: 1px solid var(--line);
}
.alert-stat { padding: .6rem .7rem; border-right: 1px solid var(--line); }
.alert-stat:last-child { border-right: 0; }
.alert-stat b { display: block; color: #747474; font-size: .52rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.alert-stat span { font-size: .95rem; }

.alert-form { margin-top: .2rem; }
.alert-form input[type="url"] {
  width: 100%; padding: .65rem .85rem;
  border: 1px solid #444; background: #000; color: #fff; font: 400 .78rem var(--mono);
}
.alert-form input[type="url"]::placeholder { color: var(--fog-dim); }
.alert-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .9rem; margin-top: .7rem; }
.alert-score { display: flex; align-items: center; gap: .45rem; color: var(--fog); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.alert-score input {
  width: 4.2rem; padding: .35rem .45rem;
  border: 1px solid #444; background: #000; color: #fff; font: 400 .78rem var(--mono);
}
.alert-check { display: flex; align-items: center; gap: .4rem; color: var(--fog); font-size: .62rem; cursor: pointer; }
.alert-check input { accent-color: #fff; }
.alert-controls button { margin-left: auto; }
.alert-manage { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .8rem; }
.alert-manage code {
  flex: 1; min-width: 200px; padding: .45rem .6rem;
  border: 1px solid var(--line-soft); background: var(--panel-2); color: #ddd; font-size: .66rem; overflow-wrap: anywhere;
}
.alert-manage button {
  padding: .45rem .8rem; border: 1px solid var(--line); background: #000; color: var(--fog);
  font: 400 .62rem var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.alert-manage button:hover { border-color: #fff; color: #fff; }
.alerts-note { margin: .9rem 0 0; max-width: 76ch; color: var(--fog-dim); font-size: .6rem; line-height: 1.7; }

/* --------------------------------------------------------- pair page */

.pair-hero { margin-top: 1rem; }
.pair-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.pair-score { width: 3.6rem; height: 3.6rem; font-size: 1.4rem; }
.pair-head h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.pair-name { margin: .2rem 0 0; color: var(--fog); font-size: .74rem; }
.pair-address { display: block; margin-top: .25rem; color: var(--fog-dim); font-size: .66rem; overflow-wrap: anywhere; }
.pair-context { margin-top: .9rem; color: #bbb; }
.pair-meta { margin: 1rem 0 0; color: var(--fog-dim); font-size: .64rem; }
.pair-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: .6rem; }
.pair-community { margin-top: 1.25rem; }
.pair-hero .feed-tags { margin-top: .9rem; }
a.brand { color: inherit; }
a.nav-button { text-decoration: none; display: inline-block; }

/* --------------------------------------------------------- lower deck */

.lower-deck {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 1px;
  margin-top: 1.6rem; border: 1px solid var(--line); background: var(--line);
}
.lower-module { position: relative; min-height: 245px; padding: 1rem; background: #000; overflow: hidden; }
.module-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .65rem; border-bottom: 1px solid var(--line);
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
}
.module-head small { color: #666; font-size: .52rem; }
.signal-matrix {
  display: grid; grid-template-columns: 8.5rem 1fr 2.5rem; gap: .55rem .7rem; align-items: center;
  margin-top: .9rem; font-size: .58rem; color: #777;
}
.signal-matrix strong { color: #bbb; font-weight: 400; }
.signal-bar { height: 3px; background: #1c1c1c; overflow: hidden; }
.signal-bar i {
  display: block; height: 100%; background: #bdbdbd; box-shadow: 0 0 7px #777;
  transform-origin: left; animation: signalBreathe 3.2s ease-in-out infinite alternate;
}
@keyframes signalBreathe { from { opacity: .45; transform: scaleX(.86); } to { opacity: 1; transform: scaleX(1); } }
.decision-graph { position: relative; height: 176px; margin-top: .8rem; }
.decision-graph::before, .decision-graph::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(#181818 1px, transparent 1px), linear-gradient(90deg, #181818 1px, transparent 1px);
  background-size: 28px 28px;
}
.decision-graph::after { inset: 12px 10px 20px 25px; background: none; border-left: 1px solid #555; border-bottom: 1px solid #555; }
.graph-line { position: absolute; z-index: 1; left: 25px; right: 10px; top: 18px; height: 135px; width: calc(100% - 35px); overflow: visible; }
.graph-line polyline { fill: none; stroke: #fff; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.graph-line circle { fill: #000; stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 0 4px #fff); }
.graph-caption {
  position: absolute; z-index: 2; left: 29px; right: 8px; bottom: 0;
  display: flex; justify-content: space-between; color: #555; font-size: .48rem;
}

.packet-stream {
  position: relative; margin-top: 1px; overflow: hidden; white-space: nowrap;
  border: 1px solid var(--line); background: #000;
  color: #626262; font-size: .55rem; line-height: 34px;
}
.packet-stream::before {
  content: "PACKET STREAM"; display: inline-block; padding: 0 .85rem; margin-right: 1rem;
  border-right: 1px solid var(--line); color: #fff; letter-spacing: .13em;
}
.packet-flow { display: inline-block; animation: packetFlow 24s linear infinite; }
.packet-flow b { color: #d6d6d6; font-weight: 400; }
@keyframes packetFlow { to { transform: translateX(-45%); } }

.system-footer {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 1px; border: 1px solid var(--line); background: var(--line);
}
.footer-cell {
  min-height: 72px; padding: .75rem .85rem; background: #000;
  color: #666; font-size: .53rem; line-height: 1.55; letter-spacing: .08em; text-transform: uppercase;
}
.footer-cell b { display: block; margin-bottom: .25rem; color: #eee; font-size: .62rem; font-weight: 500; }
.footer-cell .live-dot { display: inline-block; width: 5px; height: 5px; margin-right: .4rem; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; }

/* ------------------------------------------------------------ ambient */

.concept-badge {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  padding: .42rem .62rem; border: 1px solid #414141; background: #000;
  color: #8e8e8e; font-size: .55rem; letter-spacing: .14em; text-transform: uppercase;
}
.ambient-code {
  position: fixed; inset: 90px 0 0; z-index: -1; overflow: hidden; pointer-events: none;
  opacity: .2; color: #777; font-size: .58rem; line-height: 1.9;
}
.ambient-column { position: absolute; width: 260px; white-space: pre; animation: codeDrift 26s linear infinite; }
.ambient-column.left { left: 18px; top: 4%; }
.ambient-column.right { right: 12px; top: -20%; animation-duration: 34s; animation-direction: reverse; }
@keyframes codeDrift { from { transform: translateY(-12%); } to { transform: translateY(22%); } }
.edge-rail {
  position: fixed; top: 132px; bottom: 28px; width: 116px; z-index: 2; pointer-events: none;
  color: #666; font-size: .53rem; line-height: 1.65; letter-spacing: .08em; text-transform: uppercase;
}
.edge-rail.left { left: 14px; }
.edge-rail.right { right: 14px; text-align: right; }
.edge-block { margin-bottom: 2rem; padding-top: .55rem; border-top: 1px solid #333; }
.edge-block b { display: block; margin-bottom: .3rem; color: #d8d8d8; font-weight: 500; }
.edge-meter { height: 2px; margin: .35rem 0; background: #222; overflow: hidden; }
.edge-meter::after {
  content: ""; display: block; height: 100%; width: 42%; background: #fff;
  box-shadow: 0 0 8px #fff; animation: meterScan 4.2s ease-in-out infinite alternate;
}
@keyframes meterScan { to { width: 88%; } }

.discovery-wave { position: fixed; inset: 0; z-index: 40; opacity: 0; overflow: hidden; pointer-events: none; }
.discovery-wave::before {
  content: ""; position: absolute; left: -12vw; right: -12vw; top: -32vh; height: 26vh;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .17) 50%, rgba(255, 255, 255, .06) 70%, transparent 100%);
  filter: blur(10px); box-shadow: 0 0 35px rgba(255, 255, 255, .16);
}
.discovery-wave.fire { opacity: 1; }
.discovery-wave.fire::before { animation: discoverySweep 1.65s cubic-bezier(.22, .72, .2, 1) forwards; }
@keyframes discoverySweep {
  0% { transform: translateY(0) skewY(-1.5deg); opacity: 0; }
  12% { opacity: 1; }
  86% { opacity: .95; }
  100% { transform: translateY(145vh) skewY(1deg); opacity: 0; }
}

/* ---------------------------------------------------------- skeletons */

.sk {
  display: block; min-height: .55rem;
  background: linear-gradient(90deg, #0c0c0c 25%, #1e1e1e 50%, #0c0c0c 75%);
  background-size: 200% 100%;
  animation: skShimmer 1.4s linear infinite;
}
@keyframes skShimmer { to { background-position: -200% 0; } }
.sk-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center;
  padding: .65rem .7rem; border: 1px solid var(--line-soft); background: var(--panel-2);
}
.sk-card > span:only-child { grid-column: 1 / -1; }
.sk-square { width: 2.15rem; height: 2.15rem; }
.sk-line { margin: .3rem 0; }
.sk-line.tall { min-height: 1.1rem; }
.sk-line.w30 { width: 30%; } .sk-line.w40 { width: 40%; } .sk-line.w50 { width: 50%; }
.sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; } .sk-line.w80 { width: 80%; }
.sk-card .sk-line { min-width: 3rem; }
.record-headline .sk-line, .alert-stat .sk-line { min-width: 2rem; }

/* --------------------------------------------------------- sparklines */

.sparkline { display: block; width: 72px; height: 20px; margin: .3rem 0 0 auto; overflow: visible; }
.sparkline polyline { fill: none; stroke: #9a9a9a; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.sparkline circle { fill: #fff; }
.sparkline.up polyline { stroke: #e6e6e6; }
.sparkline.up circle { filter: drop-shadow(0 0 3px #fff); }
.sparkline.down polyline { stroke: #5d5d5d; }
.sparkline.down circle { fill: #8a8a8a; }

/* ------------------------------------------------------ live entrance */

.console-line.fresh { animation: lineIn .6s ease-out; }
@keyframes lineIn {
  0% { opacity: 0; transform: translateX(-8px); background: rgba(255, 255, 255, .14); }
  60% { background: rgba(255, 255, 255, .07); }
  100% { opacity: 1; transform: translateX(0); background: transparent; }
}

/* -------------------------------------------------------- score gauge */

.score-gauge { width: 110px; height: 66px; flex-shrink: 0; overflow: visible; }
.gauge-track { fill: none; stroke: #1c1c1c; stroke-width: 6; stroke-linecap: butt; }
.gauge-value { fill: none; stroke-width: 6; stroke-linecap: butt; animation: gaugeFill .9s cubic-bezier(.25, .7, .3, 1); }
.score-gauge.high .gauge-value { stroke: #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .45)); }
.score-gauge.mid .gauge-value { stroke: #b3b3b3; }
.score-gauge.low .gauge-value { stroke: #5a5a5a; }
@keyframes gaugeFill { from { stroke-dasharray: 0 400; } }
.gauge-num { fill: #fff; font: 600 1.15rem var(--mono); letter-spacing: -.04em; }
.gauge-cap { fill: #666; font: 400 .42rem var(--mono); letter-spacing: .14em; }

/* --------------------------------------------------------- responsive */

@media (max-width: 1450px) { .edge-rail { display: none; } }
@media (max-width: 1000px) {
  .console-layout { grid-template-columns: 1fr; grid-template-rows: 190px 360px; }
  .console-log { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "mark" "chain" "stats"; gap: 1.25rem; }
  .hero-mark-wrap { min-height: 210px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .lower-deck { grid-template-columns: 1fr; }
  .system-footer { grid-template-columns: repeat(2, 1fr); }
  .weight-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-grid { grid-template-columns: 1fr; }
  .record-headline { grid-template-columns: repeat(2, 1fr); }
  .record-stat:nth-child(2n) { border-right: 0; }
  .record-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .alert-stats { grid-template-columns: repeat(2, 1fr); }
  .alert-stat:nth-child(2n) { border-right: 0; }
  .alert-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .alert-controls button { margin-left: 0; width: 100%; }
  #feedPanel .panel-body { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .ambient-code { display: none; }
  .score-head { flex-wrap: wrap; }
}
@media (max-width: 700px) { .concept-badge { right: 8px; bottom: 8px; } }
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; }
  .header-right { flex-direction: column-reverse; align-items: flex-end; gap: .45rem; }
  .telemetry-strip { top: 118px; }
  .hero { padding-top: 3rem; }
  .hero-copy h1 { font-size: 2.1rem; }
  .console-stats { grid-template-columns: repeat(2, 1fr); }
  .console-stat:nth-child(2) { border-right: 0; }
  .console-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .console-layout { grid-template-rows: 170px 320px; }
  .score-form button, .comment-form-row button, #alertSubmit { width: 100%; }
  .alert-manage button { flex: 1; }
  .panel, .scorer { padding: 1rem .85rem; }
  .stat-value { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot.online, .hero-wiremark, .hero-mark-wrap::after, .node-map i,
  .telemetry-track, .packet-flow, .ambient-column, .signal-bar i, .edge-meter::after,
  .chain-node.newest, .sk, .console-line.fresh, .gauge-value { animation: none; }
  .discovery-wave { display: none; }
  .feed-row.new-discovery { animation: none; outline: 1px solid #fff; }
}
