/* ═══════════════════════════════════════════════
   Reddit SERP Finder — Dark Glassmorphism Theme
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Reset & Root ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08080d;
  --bg-raised: rgba(255,255,255,0.03);
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.08);
  --glass-hover: rgba(255,255,255,0.08);
  --white: #ffffff;
  --text: #e8e6e3;
  --text-dim: #8a8a8a;
  --text-muted: #555;
  --accent: #ff5722;
  --accent-soft: rgba(255,87,34,0.15);
  --accent-glow: rgba(255,87,34,0.3);
  --green: #22c55e;
  --green-soft: rgba(34,197,94,0.15);
  --border: rgba(255,255,255,0.06);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ── Light Theme ───────────────────────────── */
[data-theme="light"] {
  --bg: #f4f4f8;
  --bg-raised: rgba(0,0,0,0.02);
  --glass: rgba(255,255,255,0.75);
  --glass-border: rgba(0,0,0,0.08);
  --glass-hover: rgba(0,0,0,0.04);
  --white: #ffffff;
  --text: #1a1a2e;
  --text-dim: #555;
  --text-muted: #888;
  --accent: #e64a19;
  --accent-soft: rgba(230,74,25,0.1);
  --accent-glow: rgba(230,74,25,0.2);
  --green: #16a34a;
  --green-soft: rgba(22,163,74,0.1);
  --border: rgba(0,0,0,0.06);
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

[data-theme="light"] body::after {
  background: radial-gradient(ellipse, rgba(255,87,34,0.04) 0%, transparent 70%);
}

[data-theme="light"] thead tr {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] thead th {
  color: #555;
  border-bottom-color: rgba(0,0,0,0.1);
}

[data-theme="light"] thead th:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}

[data-theme="light"] tbody tr:hover {
  background: rgba(0,0,0,0.02);
}

[data-theme="light"] .dot.done {
  background: linear-gradient(135deg, #e64a19, #d84315);
}

[data-theme="light"] #searchBtn {
  background: linear-gradient(135deg, #e64a19, #d84315);
  box-shadow: 0 4px 15px rgba(230,74,25,0.25);
}

[data-theme="light"] header h1 {
  background: linear-gradient(135deg, #e64a19, #ff9800);
  -webkit-background-clip: text;
  background-clip: text;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  padding: 40px 20px 100px;
  position: relative;
  overflow-x: hidden;
}

/* Subtle grid bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Radial glow behind header */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(255,87,34,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ────────────────────────────────── */
header {
  max-width: 1200px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 18px;
  position: relative;
  z-index: 1;
}

/* ── Theme Toggle ──────────────────────────── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.theme-toggle:active { transform: scale(0.95); }

header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ff5722, #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Search ────────────────────────────────── */
.search-box {
  max-width: 1200px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.search-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.search-label b { color: var(--accent); }

.search-row { display: flex; gap: 10px; }

input[type="text"] {
  flex: 1;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px var(--accent-glow);
}

input[type="text"]::placeholder { color: var(--text-muted); }

#searchBtn {
  background: linear-gradient(135deg, #ff5722, #e64a19);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 30px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, opacity 0.15s;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(255,87,34,0.3);
}

#searchBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(255,87,34,0.4);
}

#searchBtn:active { transform: translateY(0); }
#searchBtn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.limit-select {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.limit-select:hover { border-color: var(--accent); }

.limit-select option {
  background: #1a1a2e;
  color: var(--text);
}

[data-theme="light"] .limit-select option {
  background: #fff;
  color: #1a1a2e;
}

/* ── Glass Card ────────────────────────────── */
.glass-card {
  max-width: 1200px;
  margin: 0 auto 16px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  position: relative;
  z-index: 1;
}

/* ── Formula Card ──────────────────────────── */
.formula-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.formula-signals {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.signal-block {
  flex: 1;
  min-width: 160px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.signal-block:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.signal-name {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.signal-formula {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
}

.signal-note {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
}

.signal-weight {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  float: right;
}

.formula-eq {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.formula-eq b { color: var(--accent); }

/* ── Tier Legend ────────────────────────────── */
.legend {
  max-width: 1200px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.legend-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
}

.tier-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
  transition: transform 0.15s;
}

.tier-pill:hover { transform: scale(1.05); }

.tier-viral  { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.tier-hot    { background: rgba(249,115,22,0.15); color: #f97316; border: 1px solid rgba(249,115,22,0.3); }
.tier-active { background: rgba(234,179,8,0.15);  color: #eab308; border: 1px solid rgba(234,179,8,0.3); }
.tier-mild   { background: rgba(148,163,184,0.1); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.tier-dead   { background: rgba(255,255,255,0.03); color: #4b5563; border: 1px solid rgba(255,255,255,0.06); }

/* ── Proxy Banner ──────────────────────────── */
.proxy-banner {
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 10px 16px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.proxy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px rgba(34,197,94,0.5); }
  50%      { box-shadow: 0 0 16px rgba(34,197,94,0.8); }
}

.proxy-banner span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.proxy-banner strong { color: var(--text); }

/* ── Phase Badges ──────────────────────────── */
.phase-row {
  max-width: 1200px;
  margin: 0 auto 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.badge.active {
  border-color: rgba(255,87,34,0.4);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 15px rgba(255,87,34,0.1);
}

.badge.done {
  border-color: rgba(34,197,94,0.4);
  color: var(--green);
  background: var(--green-soft);
}

.badge .bdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge.active .bdot { animation: blink 1s infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.phase-arrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Progress Area ─────────────────────────── */
#progressArea {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: none;
  position: relative;
  z-index: 1;
}

.prog-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.prog-label span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.prog-label strong { color: var(--text); }

.prog-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.prog-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s ease;
}

.prog-fill.p1 {
  background: linear-gradient(90deg, #ff5722, #ff9800);
}

.prog-fill.p2 {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.page-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dot {
  width: 30px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.dot.active {
  border-color: rgba(255,87,34,0.5);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 10px rgba(255,87,34,0.15);
}

.dot.done {
  background: linear-gradient(135deg, #ff5722, #e64a19);
  border-color: transparent;
  color: #fff;
}

.dot.error {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}

/* ── Stats Row ─────────────────────────────── */
#statsRow {
  max-width: 1200px;
  margin: 0 auto 12px;
  display: none;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

#statsRow span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

#statsRow strong { color: var(--text); }

/* ── Phase 2 Bar ───────────────────────────── */
#phase2Bar {
  max-width: 1200px;
  margin: 0 auto 16px;
  display: none;
  position: relative;
  z-index: 1;
}

.p2-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.p2-label strong { color: var(--green); }

/* ── Phase 3 Bar ───────────────────────────── */
#phase3Bar {
  max-width: 1200px;
  margin: 0 auto 16px;
  display: none;
  position: relative;
  z-index: 1;
}

.p3-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.p3-label strong { color: #a78bfa; }

.prog-fill.p3 {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* ── Source Tag (for related posts) ────────── */
.source-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  color: #a78bfa;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Sort & Filter Bars ────────────────────── */
#sortBar {
  max-width: 1200px;
  margin: 0 auto 10px;
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

#filterBar {
  max-width: 1200px;
  margin: 0 auto 14px;
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.bar-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
  min-width: 42px;
}

.sort-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: var(--glass);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sort-btn:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
  background: var(--glass-hover);
}

.sort-btn.active-asc,
.sort-btn.active-desc {
  background: var(--accent-soft);
  border-color: rgba(255,87,34,0.4);
  color: var(--accent);
}

.filter-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.filter-btn.fall {
  border-color: var(--glass-border);
  background: var(--glass);
  color: var(--text-muted);
}

.filter-btn.fall.on,
.filter-btn.fall:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

.filter-btn.fviral  { background: rgba(239,68,68,0.12);  color: #ef4444; border-color: rgba(239,68,68,0.25); }
.filter-btn.fhot    { background: rgba(249,115,22,0.12); color: #f97316; border-color: rgba(249,115,22,0.25); }
.filter-btn.factive { background: rgba(234,179,8,0.12);  color: #eab308; border-color: rgba(234,179,8,0.25); }
.filter-btn.fmild   { background: rgba(148,163,184,0.08); color: #94a3b8; border-color: rgba(148,163,184,0.15); }
.filter-btn.fdead   { background: rgba(255,255,255,0.03); color: #4b5563; border-color: rgba(255,255,255,0.06); }

.filter-btn.on {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.filter-btn.fall.on { outline: none; }

/* ── Table ─────────────────────────────────── */
#tableWrap {
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  display: none;
  overflow: auto;
  max-height: 75vh;
  position: relative;
  z-index: 1;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

thead tr {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] thead tr {
  background: rgba(240,240,245,0.95);
}

thead th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  color: var(--text-dim);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.15s, color 0.15s;
}

thead th:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

thead th .th-inner {
  display: flex;
  align-items: center;
  gap: 5px;
}

thead th .th-arrow {
  opacity: 0.3;
  font-size: 10px;
}

thead th.sorted-asc .th-arrow,
thead th.sorted-desc .th-arrow {
  opacity: 1;
  color: var(--accent);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

tbody tr.hidden-row { display: none; }

td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 13px;
  color: var(--text);
}

td.num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 36px;
  padding-right: 0;
}

td.scrape-col {
  white-space: nowrap;
  min-width: 90px;
}

/* ── Post Cell ─────────────────────────────── */
.post-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
  max-width: 380px;
}

.post-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-title:hover { color: var(--accent); }

.post-url {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.post-sub {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255,87,34,0.25);
  border-radius: 4px;
  padding: 2px 8px;
  margin-top: 2px;
  width: fit-content;
}

.post-sub-loading {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  animation: blink 1s infinite;
}

/* ── Age ───────────────────────────────────── */
.age-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.age-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.age-pill.fresh   { background: rgba(34,197,94,0.15);  color: #22c55e; }
.age-pill.recent  { background: rgba(234,179,8,0.15);  color: #eab308; }
.age-pill.old     { background: rgba(239,68,68,0.15);  color: #ef4444; }
.age-pill.ancient { background: rgba(148,163,184,0.08); color: #64748b; }

.age-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Engagement Cell ───────────────────────── */
.eng-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.eng-breakdown {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.6;
}

.eng-breakdown b { color: var(--text); }

/* ── Scrape State Styles ───────────────────── */
.scrape-pending { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.scrape-loading { font-family: var(--mono); font-size: 11px; color: var(--accent);     animation: blink 1s infinite; }
.scrape-val     { font-family: var(--mono); font-size: 12px; color: var(--text); }
.scrape-err     { font-family: var(--mono); font-size: 10px; color: #ef4444; }
.score-val      { font-family: var(--mono); font-size: 12px; color: var(--green); font-weight: 700; }
.comment-val    { font-family: var(--mono); font-size: 12px; color: var(--text);  font-weight: 700; }

/* ── Message Box ───────────────────────────── */
#msgBox {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--glass);
  position: relative;
  z-index: 1;
}

#msgBox.hidden { display: none; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  body { padding: 20px 12px 60px; }
  header { flex-direction: column; gap: 6px; }
  header h1 { font-size: 20px; }
  .formula-signals { flex-direction: column; }
  .signal-block { min-width: auto; }
  .legend { gap: 6px; }
  .post-cell { min-width: 180px; max-width: 260px; }
  .post-url { max-width: 220px; }
  td { padding: 10px 12px; font-size: 12px; }
}
