:root {
  color-scheme: dark;
  --bg: #060818;
  --bg-2: #0d1028;
  --panel: rgba(10, 18, 42, 0.72);
  --panel-strong: rgba(15, 24, 54, 0.9);
  --stroke: rgba(148, 163, 184, 0.22);
  --stroke-hot: rgba(56, 189, 248, 0.55);
  --text: #eef7ff;
  --muted: #93a4bd;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --orange: #fb923c;
  --btc: #f59e0b;
  --btc-soft: #fde68a;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.16), transparent 32%),
    radial-gradient(circle at 82% 16%, rgba(167, 139, 250, 0.2), transparent 35%),
    linear-gradient(135deg, #050714 0%, #090d22 45%, #0f172a 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 82%);
  z-index: -3;
}

#neural-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.78;
}

.orb {
  position: fixed;
  width: 38vmax;
  height: 38vmax;
  border-radius: 999px;
  filter: blur(62px);
  opacity: 0.20;
  pointer-events: none;
  z-index: -4;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a { background: var(--btc); top: -16vmax; left: -9vmax; }
.orb-b { background: var(--violet); right: -14vmax; bottom: -15vmax; animation-duration: 22s; }
.orb-c { background: var(--cyan); left: 40%; top: 30%; width: 28vmax; height: 28vmax; opacity: 0.12; animation-duration: 26s; }

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(to bottom, transparent, rgba(245, 158, 11, 0.045), transparent);
  height: 140px;
  animation: scan 9s linear infinite;
  opacity: 0.6;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(245, 158, 11, 0.03) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, rgba(245, 158, 11, 0.03) 0 1px, transparent 1px 80px);
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 70%);
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.glass,
.glass-lite {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(8, 14, 32, 0.64));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.glass::before,
.glass-lite::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(245,158,11,0.10), transparent 34%, rgba(167,139,250,0.10));
  opacity: 0.85;
}
.glass > *,
.glass-lite > * { position: relative; z-index: 1; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.topbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.back-link,
.source-pill,
.quality-chip,
.level-badge,
.trend-pill {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.back-link,
.source-pill,
.quality-chip,
.trend-pill,
.level-badge { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.back-link:hover { transform: translateX(-3px); border-color: var(--btc); box-shadow: 0 0 26px rgba(245, 158, 11, .25); }
.source-pill { color: var(--muted); }
.source-pill::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: radial-gradient(circle, rgba(245,158,11,0.4), transparent 60%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width .5s ease, height .5s ease, opacity .6s ease;
  pointer-events: none;
}
.source-pill:hover::after { width: 220px; height: 220px; opacity: 0.55; }
.alert-pill.active { color: #fde68a; border-color: rgba(245, 158, 11, 0.55); box-shadow: 0 0 18px rgba(245,158,11,0.2); }
.live-status.bull { color: var(--green); border-color: rgba(52,211,153,.38); }
.live-status.neutral { color: var(--btc-soft); border-color: rgba(245,158,11,.42); }
.live-status.bear { color: var(--red); border-color: rgba(251,113,133,.45); }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: clamp(24px, 5vw, 48px);
  min-height: 285px;
}
.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--btc-soft);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}
.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--btc);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.85);
  animation: pulse 1.7s infinite;
}
h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.45rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
  padding-bottom: 0.04em;
  background: linear-gradient(90deg, #fff, #fde68a 32%, #fcd34d 56%, #c4b5fd 84%, #fff);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 42px rgba(245, 158, 11, 0.18);
}
.hero-subtitle {
  margin: 0;
  max-width: 720px;
  color: #c7d2fe;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.signal-stream {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  height: 14px;
}
.signal-stream-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--btc-soft);
  box-shadow: 0 0 10px var(--btc);
  animation: streamDot 2.4s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0.2;
}
@keyframes streamDot {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.6); box-shadow: 0 0 18px var(--btc-soft); }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
}
.quality-chip.ok { color: var(--green); border-color: rgba(52, 211, 153, .4); }
.quality-chip.partial-stale { color: var(--amber); border-color: rgba(251, 191, 36, .46); }

.score-module {
  min-width: 260px;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px;
}
.btc-emblem {
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0.92;
  animation: emblemFloat 6s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.35));
}
@keyframes emblemFloat {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-6px) rotate(2deg); }
}
.score-ring {
  --score: 50;
  --ring-color: var(--btc);
  width: 168px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(6,8,24,0.98) 0 56%, transparent 58%),
    conic-gradient(var(--ring-color) calc((var(--score) + 100) * .5%), rgba(148,163,184,0.14) 0);
  box-shadow: 0 0 42px rgba(245, 158, 11, 0.22), inset 0 0 40px rgba(0,0,0,.35);
  animation: ringPulse 3.4s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 42px rgba(245, 158, 11, 0.22), inset 0 0 40px rgba(0,0,0,.35); }
  50% { box-shadow: 0 0 64px rgba(245, 158, 11, 0.42), inset 0 0 40px rgba(0,0,0,.35); }
}
.score-ring span { font-size: 3.5rem; font-weight: 900; letter-spacing: -0.08em; display: block; text-align: center; }
.score-ring small { color: var(--muted); font-weight: 700; }
.score-caption { text-align: center; display: grid; gap: 10px; max-width: 280px; }
.level-badge { width: fit-content; justify-self: center; font-weight: 900; }
.level-badge.bull { color: var(--green); border-color: rgba(52,211,153,.38); }
.level-badge.neutral { color: var(--btc-soft); border-color: rgba(245,158,11,.42); }
.level-badge.bear { color: var(--red); border-color: rgba(251,113,133,.45); }
.confidence-line { color: #a7b7d0; }
.confidence-line strong { color: #fff; }

.analysis-grid {
  display: grid;
  grid-template-columns: 1.45fr .85fr;
  gap: 18px;
  margin-top: 18px;
}
.lower-grid { align-items: start; }
.lower-grid.triple-grid { grid-template-columns: 1fr 1.12fr .96fr; }
.analysis-card,
.pulse-card,
.chart-card,
.depth-card,
.derivatives-card,
.matrix {
  padding: 24px;
}
.analysis-card h2,
.chart-card h2,
.depth-card h2,
.derivatives-card h2,
.matrix h2 {
  margin: 10px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}
.analysis-card p { color: #cbd5e1; font-size: 1.05rem; line-height: 1.65; }
.signal-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.signal-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 16px;
  padding: 12px 14px;
  /* Keine CSS-Animation: renderSignalNarrative läuft via scheduleLiveRefresh bei
     jedem Live-Tick, ein innerHTML-Reset würde die Animation jedes Mal neu starten
     und die Liste flackern lassen. Initiales Fade-in wird in JS per transition
     einmalig gesetzt (siehe app.js). */
}
.signal-list li::before { content: "◆"; color: var(--btc-soft); font-size: 0.8rem; margin-top: 3px; text-shadow: 0 0 8px var(--btc); }

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.pulse-grid div {
  min-height: 96px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, .45);
  border: 1px solid rgba(148,163,184,.16);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.pulse-grid div:hover { border-color: rgba(245,158,11,.42); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(245,158,11,0.12); }
.pulse-grid span {
  display: block;
  color: #a7b7d0;
  font-size: .78rem;
  line-height: 1.22;
  margin-bottom: 10px;
}
.pulse-grid strong { font-size: 1.28rem; line-height: 1.25; }
.mover-strip {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #dbeafe;
}
.mover-strip span {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(245, 158, 11, .07);
  border: 1px solid rgba(245, 158, 11, .13);
  font-size: .9rem;
}
.signed-value {
  font-weight: 700;
  color: #eef7ff;
}
.signed-value.bull { color: var(--green); }
.signed-value.neutral { color: #eef7ff; }
.signed-value.bear { color: var(--red); }

.insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.insight {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, .18);
  background: linear-gradient(155deg, rgba(15, 23, 42, .82), rgba(2, 6, 23, .62));
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  min-height: 144px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.insight:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(245,158,11,0.18); }
.insight.hot { border-color: rgba(251, 113, 133, .44); box-shadow: 0 0 42px rgba(251,113,133,.1); }
.insight.watch { border-color: rgba(245, 158, 11, .4); }
.insight.ok { border-color: rgba(52, 211, 153, .34); box-shadow: 0 0 42px rgba(52,211,153,.08); }
.insight-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.insight .emoji {
  font-size: 1.65rem;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .52);
  border: 1px solid rgba(148, 163, 184, .18);
}
.insight h3 { margin: 0 0 8px; }
.insight-kpi {
  display: block;
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #f8fbff;
}
.insight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.insight-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: .82rem;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(2, 6, 23, .48);
  color: #dbeafe;
}
.insight-pill.bull { color: var(--green); border-color: rgba(52,211,153,.3); }
.insight-pill.bear { color: var(--red); border-color: rgba(251,113,133,.3); }
.insight-pill.neutral { color: var(--btc-soft); border-color: rgba(245,158,11,.3); }
.insight-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.insight-stat {
  padding: 12px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .42);
  border: 1px solid rgba(148, 163, 184, .14);
}
.insight-stat span {
  display: block;
  color: #93a4bd;
  font-size: .78rem;
  margin-bottom: 6px;
}
.insight-stat strong {
  color: #eef7ff;
  line-height: 1.35;
  font-size: .94rem;
}
.insight p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.trend-pill.bull { color: var(--green); border-color: rgba(52,211,153,.38); }
.trend-pill.neutral { color: var(--btc-soft); border-color: rgba(245,158,11,.42); }
.trend-pill.bear { color: var(--red); border-color: rgba(251,113,133,.45); }
.chart-svg {
  width: 100%;
  margin-top: 18px;
  min-height: 140px;
}
.chart-svg .line {
  fill: none;
  stroke-width: 3;
  filter: drop-shadow(0 0 10px currentColor);
}
.chart-svg .area {
  opacity: .32;
}
.chart-svg .last-point {
  filter: drop-shadow(0 0 8px currentColor);
  animation: lastPointPulse 2s ease-in-out infinite;
}
@keyframes lastPointPulse {
  0%, 100% { r: 4.2; opacity: 1; }
  50% { r: 6; opacity: 0.7; }
}
.chart-svg.candles .wick {
  stroke-width: 1.3;
  opacity: .95;
  filter: drop-shadow(0 0 4px currentColor);
}
.chart-svg.candles .body {
  opacity: .92;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.04));
}
.chart-grid line {
  stroke: rgba(148,163,184,.16);
  stroke-dasharray: 4 6;
}
.price-line {
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
  opacity: .8;
}
.chart-label {
  fill: #8ea3bc;
  font-size: 10px;
  letter-spacing: .02em;
}
.chart-label.right,
.chart-label.top {
  text-anchor: end;
}
.chart-label.top {
  fill: #fde68a;
}
.chart-caption {
  margin: 10px 0 0;
  font-size: .9rem;
  color: var(--muted);
}

.depth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.depth-grid h3 {
  margin: 0 0 10px;
  color: #dbeafe;
}
.depth-list {
  display: grid;
  gap: 10px;
}
.depth-row {
  display: grid;
  gap: 6px;
}
.depth-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: .85rem;
  color: #cbd5e1;
}
.depth-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  overflow: hidden;
}
.depth-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.depth-fill.bid { background: linear-gradient(90deg, rgba(52,211,153,.35), rgba(52,211,153,.92)); }
.depth-fill.ask { background: linear-gradient(90deg, rgba(251,113,133,.35), rgba(251,113,133,.92)); }

.derivatives-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin-top: 18px;
}
.metric-tile {
  display: flex;
  flex-direction: column;
  min-height: 136px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, .45);
  border: 1px solid rgba(148,163,184,.16);
  transition: border-color .3s ease, transform .3s ease;
}
.metric-tile:hover { border-color: rgba(245,158,11,.42); transform: translateY(-2px); }
.metric-tile span {
  display: block;
  color: #a7b7d0;
  font-size: .79rem;
  line-height: 1.18;
  margin-bottom: 10px;
}
.metric-tile strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.18;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metric-note {
  display: block;
  margin-top: auto;
  color: var(--muted);
  line-height: 1.38;
  font-size: .87rem;
  overflow-wrap: anywhere;
}
.metric-note.bull { color: var(--green); }
.metric-note.neutral { color: var(--btc-soft); }
.metric-note.bear { color: var(--red); }

.liquidation-feed {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.liquidation-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, .15);
  animation: liqSlide 0.5s ease both;
}
@keyframes liqSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.liquidation-row.bull { border-color: rgba(52,211,153,.25); }
.liquidation-row.bear { border-color: rgba(251,113,133,.28); }
.liquidation-head,
.liquidation-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.liq-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, .2);
}
.liq-badge.bull { color: var(--green); border-color: rgba(52,211,153,.35); }
.liq-badge.bear { color: var(--red); border-color: rgba(251,113,133,.35); }
.liquidation-meta {
  color: #cbd5e1;
  font-size: .86rem;
}
.liquidation-empty {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(148, 163, 184, .18);
  color: var(--muted);
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #a7b7d0;
  font-size: .86rem;
  margin-top: 16px;
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 12px currentColor; }
.dot.buy { color: var(--green); background: var(--green); }
.dot.sell { color: var(--red); background: var(--red); }
.dot.neutral { color: var(--muted); background: var(--muted); }
#signal-matrix {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.matrix-row {
  display: grid;
  gap: 10px;
}
/* Keine dauerhafte Animation auf .matrix-row mehr — sonst flackert die ganze Matrix
   bei jedem Live-Tick, weil renderMatrix() per innerHTML neu aufbaut und die
   CSS-Animation dadurch neu getriggert wird. Initiales Fade-in macht jetzt JS
   (ensureMatrixBuilt) einmalig per transition. */
.matrix-row header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  font-size: .95rem;
}
.metric-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  overflow: hidden;
}
.metric-track .zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.18);
}
.metric-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.metric-bar.buy { right: 50%; transform: translateX(100%); background: linear-gradient(90deg, rgba(52,211,153,.4), rgba(52,211,153,.95)); }
.metric-bar.sell { left: 50%; transform: translateX(-100%); background: linear-gradient(90deg, rgba(251,113,133,.95), rgba(251,113,133,.4)); }
.metric-bar.neutral { left: calc(50% - 4px); width: 8px !important; background: rgba(148,163,184,.65); }

.error-card {
  margin-top: 18px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(48, 12, 24, .7);
  border: 1px solid rgba(251, 113, 133, .35);
}
.error-card h2 { margin-top: 0; }
.error-card p { color: #fecdd3; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.78); }
  70% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3vmax, -2vmax, 0) scale(1.06); }
}
@keyframes scan {
  from { transform: translateY(-140px); }
  to { transform: translateY(100vh); }
}

@media (max-width: 1180px) {
  .pulse-grid,
  .derivatives-metrics,
  .insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lower-grid.triple-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lower-grid.triple-grid .matrix {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .hero,
  .analysis-grid,
  .charts-grid,
  .insights,
  .depth-grid,
  .derivatives-metrics,
  .lower-grid.triple-grid {
    grid-template-columns: 1fr;
  }
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-right { justify-content: flex-start; }
  .lower-grid.triple-grid .matrix { grid-column: auto; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 1180px); }
  .pulse-grid { grid-template-columns: 1fr; }
  .score-module { min-width: 0; }
  .chart-card,
  .analysis-card,
  .pulse-card,
  .depth-card,
  .derivatives-card,
  .matrix { padding: 18px; }
  .source-pill,
  .quality-chip,
  .level-badge,
  .trend-pill,
  .back-link { width: 100%; text-align: center; }
  .insight-stats { grid-template-columns: 1fr; }
  .metric-tile,
  .pulse-grid div,
  .insight { min-height: unset; }
}
