/* ============================================================
   AGIP — AgryTech Intelligence Platform
   Style Sheet v0.1.0
   Design: Dark Premium / Bloomberg meets Sci-Fi
   ============================================================ */

/* Design System «Терминал инвестора» — см. DESIGN.md */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* «Терминал инвестора» — плоско, один акцент (янтарь), спокойная семантика */
  --bg:          #0a0e14;
  --bg-deep:     #060910;
  --bg-card:     #131a24;   /* плоская панель (без блюра) */
  --bg-card-hover: #1a2330;
  --border:      rgba(255,255,255,0.08);
  --border-accent: rgba(255,176,32,0.30);

  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  /* Акцент = янтарь (бренд/эмфаза/«топ»); раньше «золото» */
  --gold:        #FFB020;
  --gold-dim:    rgba(255,176,32,0.14);
  --gold-glow:   rgba(255,176,32,0.0);
  --accent:      #FFB020;
  --accent-hi:   #FFC555;

  /* Семантика — только дельты/статусы (спокойнее неона) */
  --green:       #3FB950;
  --green-dim:   rgba(63,185,80,0.14);
  --green-glow:  rgba(63,185,80,0.0);

  --red:         #F85149;
  --red-dim:     rgba(248,81,73,0.14);
  --red-glow:    rgba(248,81,73,0.0);

  --blue:        #4d9fff;
  --blue-dim:    rgba(77,159,255,0.14);
  --blue-glow:   rgba(77,159,255,0.0);

  --orange:      #ff9500;
  --orange-dim:  rgba(255,149,0,0.15);

  --text-primary:   #e6edf3;
  --text-secondary: #9aa7b8;
  --text-muted:     #61708a;

  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   12px;
  --transition:  0.18s ease;
  --blur:        10px;

  --shadow-green: none;
  --shadow-red:   none;
  --shadow-card:  0 4px 20px rgba(0,0,0,0.28);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Заголовки/навигация — Geist, плотный трекинг */
h1, h2, h3, h4, .section-title, .section-accent, .nav-tab, .logo-text, .pld-name {
  font-family: var(--sans);
  letter-spacing: -0.02em;
}

/* Числа/метрики — Geist Mono (подпись терминала, выровнены) */
.stat-value, .pld-count, .num, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ── Background Canvas ─────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(255,176,32,0.32); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Selection ─────────────────────────────────────────────── */
::selection { background: var(--gold-dim); color: var(--accent); }

/* ── Glassmorphism Card ────────────────────────────────────── */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 6px 26px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.07);
}

.glass-accent {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-green);
}

/* ── Navigation ────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--green-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 24px var(--green-glow), 0 0 48px rgba(63,185,80,0.2); }
}

.nav-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 2px;
  font-feature-settings: 'ss01';
}

.nav-logo-sub {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  font-weight: 400;
  white-space: nowrap;
}

.nav-center {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}

.nav-link.active {
  color: var(--green);
  border-color: var(--border-accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#clock {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

#clock-label {
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(63,185,80,0.08);
  border: 1px solid rgba(63,185,80,0.2);
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.live-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 1px;
}

/* ── Main Layout ───────────────────────────────────────────── */
.main-content {
  width: 100%;
  margin: 0 auto;
  padding: 24px 0 48px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.section-accent {
  color: var(--green);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

.section-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dd-unmet-need {
  font-size: 12px;
  color: var(--orange);
  background: rgba(255, 149, 0, 0.05);
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 149, 0, 0.3);
}

/* ──────────────────────────────────────────────────────────────
   §21 · TOP IDEAS CARDS (QUARTERLY)
   ────────────────────────────────────────────────────────────── */

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.top-idea-card {
  background: rgba(16, 18, 27, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  animation: slideUpFade 0.6s ease backwards;
}

.top-idea-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.05);
}

.idea-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.idea-name {
  margin: 0 0 8px 0;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.idea-oneliner {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.idea-score-circle {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 16px;
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.idea-finances {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.fin-stat {
  text-align: center;
}

.fin-val {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.fin-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.idea-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.block-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.evidence-chain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evidence-node {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--text-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.evidence-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.evidence-layer {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
}

.evidence-source {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.evidence-link {
  font-size: 11px;
  color: var(--blue);
  text-decoration: none;
  opacity: 0.7;
}

.evidence-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.evidence-excerpt {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-style: italic;
}

.idea-risks {
  background: rgba(248, 81, 73, 0.05);
  border: 1px solid rgba(248, 81, 73, 0.1);
  padding: 12px;
  border-radius: var(--radius-sm);
}

/* ── Stats Row ─────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color, var(--green)), transparent);
  opacity: 0.7;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend {
  font-weight: 600;
  font-size: 12px;
}

.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--text-secondary); }

.stat-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 28px;
  opacity: 0.15;
}

/* ── Signal Pyramid ────────────────────────────────────────── */
.pyramid-section {
  padding: 28px;
}

.pyramid-container {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.pyramid-left {
  flex: 0 0 auto;
}

#pyramid-svg {
  display: block;
  overflow: visible;
}

.pyramid-caption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}
.pyramid-caption b { color: var(--text-light); font-weight: 700; }

.pyramid-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.pyramid-level-detail {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pyramid-level-detail:hover, .pyramid-level-detail.active {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.pyramid-level-detail.active {
  box-shadow: 0 0 20px rgba(63,185,80,0.1);
}

.pld-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pld-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pld-count {
  font-size: 20px;
  font-weight: 800;
}

.pld-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.distortion-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.distortion-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}

.distortion-bar-bg {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.distortion-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.distortion-pct {
  font-size: 10px;
  font-weight: 700;
  width: 32px;
  text-align: right;
}

/* Pyramid SVG styles */
.pyramid-layer {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.pyramid-layer:hover { opacity: 0.85; }
.pyramid-label { font-family: 'Inter', sans-serif; }
.pyramid-tooltip {
  position: absolute;
  background: rgba(10,14,26,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  pointer-events: none;
  z-index: 999;
  min-width: 180px;
  backdrop-filter: blur(10px);
  display: none;
}
.pyramid-tooltip.visible { display: block; }

/* ── Two-column layout ─────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 20px;
  align-items: start;
}

.left-col, .right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Contradiction Monitor ─────────────────────────────────── */
.contradiction-section {
  padding: 24px;
}

.alert-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red-dim);
  border: 1px solid var(--red-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  animation: alert-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,81,73,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(248,81,73,0); }
}

.contradiction-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(248,81,73,0.04);
  border: 1px solid rgba(248,81,73,0.15);
  margin-bottom: 12px;
  transition: all var(--transition);
  cursor: pointer;
}

.contradiction-card:last-child { margin-bottom: 0; }

.contradiction-card:hover {
  background: rgba(248,81,73,0.08);
  border-color: rgba(248,81,73,0.3);
  transform: translateX(2px);
}

.contra-claims {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.claim-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.claim-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  text-transform: uppercase;
}

.badge-official {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(77,159,255,0.3);
}

.badge-raw {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248,81,73,0.3);
}

.claim-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.contra-strength {
  margin-bottom: 10px;
}

.strength-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.strength-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.strength-value {
  font-size: 12px;
  font-weight: 800;
}

.strength-bar-bg {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.contra-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contra-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.contra-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}

/* ── Knowledge Graph ───────────────────────────────────────── */
.graph-section {
  padding: 24px;
  min-height: 500px;
}

#knowledge-graph {
  width: 100%;
  height: 800px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  cursor: grab;
}

#knowledge-graph:active { cursor: grabbing; }

#graph-svg {
  width: 100%;
  height: 100%;
}

.graph-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-star {
  width: 12px; height: 12px;
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Node info panel */
#node-info {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 220px;
  padding: 14px;
  background: rgba(10,14,26,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  font-size: 12px;
  display: none;
  z-index: 10;
  animation: fadeInUp 0.2s ease;
}

#node-info.visible { display: block; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.node-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.node-info-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-info-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.3;
}

.node-info-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.node-info-desc {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.node-info-signals {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.node-info-signals span {
  font-weight: 700;
  color: var(--text-secondary);
}

#node-info-close {
  position: absolute;
  top: 8px; right: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  transition: color var(--transition);
  background: none;
  border: none;
  padding: 4px;
}
#node-info-close:hover { color: var(--text-primary); }

/* D3 graph elements */
.graph-node { cursor: pointer; transition: opacity 0.2s; }
.graph-node:hover { opacity: 0.85; }
.graph-link { stroke: rgba(255,255,255,0.08); stroke-width: 1px; fill: none; }
.graph-link.highlighted { stroke: rgba(63,185,80,0.4); stroke-width: 2px; }
.node-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  fill: rgba(232,237,245,0.75);
  pointer-events: none;
  font-weight: 500;
}

/* ── Ideas Scoreboard ──────────────────────────────────────── */
.ideas-section {
  padding: 24px;
}

.ideas-filters {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.filter-btn {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--green-dim);
  border-color: var(--border-accent);
  color: var(--green);
}

.idea-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all var(--transition);
  cursor: pointer;
}

.idea-card:last-child { margin-bottom: 0; }

.idea-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  transform: translateX(-2px);
}

.idea-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}

.idea-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
}

.idea-score-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.idea-score {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-high { color: var(--green); }
.score-mid  { color: var(--gold); }
.score-low  { color: var(--red); }

.idea-trend {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.idea-criteria {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}

.criterion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.criterion-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-align: center;
}

.criterion-bar-bg {
  width: 100%;
  height: 28px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.criterion-bar-fill {
  width: 100%;
  border-radius: 3px;
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  bottom: 0;
  left: 0;
}

.criterion-val {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
}

.idea-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* ── Pain Heatmap ──────────────────────────────────────────── */
.heatmap-section {
  padding: 24px;
}

.heatmap-container {
  overflow-x: auto;
}

#heatmap-svg {
  display: block;
  margin: 0 auto;
}

.heatmap-tooltip {
  position: absolute;
  background: rgba(10,14,26,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  pointer-events: none;
  z-index: 999;
  backdrop-filter: blur(10px);
  display: none;
  min-width: 160px;
}

.heatmap-tooltip.visible { display: block; }

/* ── Daily Timeline ────────────────────────────────────────── */
.timeline-section {
  padding: 24px;
}

.timeline-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.timeline-card:last-child { margin-bottom: 0; }

.timeline-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--green);
  opacity: 0.5;
  transition: opacity var(--transition);
}

.timeline-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.timeline-card:hover::before { opacity: 1; }

.timeline-card.today::before { background: var(--green); opacity: 1; }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-dim);
  padding: 2px 8px;
  border-radius: 10px;
}

.timeline-summary {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.timeline-bar-bg {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}

.timeline-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.8s ease;
}

.timeline-details {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.timeline-details.open { display: block; }

.timeline-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.timeline-detail-row:last-child { margin-bottom: 0; }

.timeline-detail-label { color: var(--text-muted); }

/* ── Footer ────────────────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.footer-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.footer-brand span {
  color: var(--green);
}

.footer-info {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.countdown-val {
  font-weight: 700;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

/* ── Tooltip Generic ───────────────────────────────────────── */
.tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(10,14,26,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  max-width: 240px;
  backdrop-filter: blur(12px);
  display: none;
  line-height: 1.5;
}

/* ── Skeleton Loading ──────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* ── Animate In ────────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fade-in { animation: fadeIn 0.6s ease forwards; }
.anim-slide-left { animation: slideInLeft 0.5s ease forwards; }
.anim-scale { animation: scaleIn 0.5s ease forwards; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; opacity: 0; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; opacity: 0; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; opacity: 0; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; opacity: 0; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; opacity: 0; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; opacity: 0; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; opacity: 0; }

/* ── Number counter animation ──────────────────────────────── */
.count-up {
  display: inline-block;
  transition: transform 0.1s ease;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .two-col { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .pyramid-container { flex-direction: column; align-items: center; }
  .nav-center { display: none; }
}

@media (max-width: 768px) {
  .stats-row { grid-template-columns: 1fr; }
  .main-content { padding: 16px; gap: 16px; }
  #navbar { padding: 0 16px; }
  .nav-logo-sub { display: none; }
}

/* ── Glow effects ──────────────────────────────────────────── */
.glow-green { text-shadow: 0 0 20px var(--green-glow); }
.glow-red   { text-shadow: 0 0 20px var(--red-glow); }
.glow-blue  { text-shadow: 0 0 20px var(--blue-glow); }
.glow-gold  { text-shadow: 0 0 20px var(--gold-glow); }

/* ── Misc ──────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.flex-center {
  display: flex; align-items: center; justify-content: center;
}

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mb-8   { margin-bottom: 8px; }

/* Progress ring (circular score) */
.score-ring-wrap {
  position: relative;
  width: 56px; height: 56px;
}

.score-ring {
  transform: rotate(-90deg);
}

.score-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}

.score-ring-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1);
}

.score-ring-val {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Heat cell */
.heat-cell {
  cursor: pointer;
  rx: 3; ry: 3;
  transition: opacity 0.2s;
}
.heat-cell:hover { opacity: 0.8; stroke: rgba(255,255,255,0.3); stroke-width: 1; }

/* Contradiction severity dot */
.severity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Graph hint overlay */
.graph-hint {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 10px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* No data state */
.no-data {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Loading spinner */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(63,185,80,0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-small {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1.5px solid rgba(63,185,80,0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Strength color classes */
.strength-critical { color: var(--red); }
.strength-high     { color: var(--orange); }
.strength-medium   { color: var(--gold); }
.strength-low      { color: var(--green); }


/* ============================================================
   §13 · STARTUP SIMULATOR & DATE SELECTOR STYLES
   ============================================================ */

/* Date Selector */
.date-selector-container {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.glass-select {
  background: rgba(26, 31, 46, 0.7);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
}

.glass-select:hover {
  border-color: var(--border-accent);
  background: rgba(26, 31, 46, 0.9);
}

.glass-select option {
  background: #0a0e1a;
  color: var(--text-primary);
}

/* Simulator Section Layout */
.simulator-section {
  grid-column: 1 / -1;
  padding: 24px;
  margin-top: 24px;
}

.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 18px;
}

@media (max-width: 1024px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}

.sim-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.sim-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-input-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}

.range-val {
  color: var(--blue);
  font-weight: 700;
}

.glass-input, .glass-textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}

.glass-textarea {
  min-height: 60px;
  resize: vertical;
}

.glass-input:focus, .glass-textarea:focus {
  border-color: var(--border-accent);
  background: rgba(255, 255, 255, 0.05);
}

.sim-calc-info {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sim-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

/* Custom sliders */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  border: none;
}

input[type=range]::-webkit-slider-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -5px;
  box-shadow: 0 0 10px rgba(77, 159, 255, 0.5);
  transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Partner Info Panel */
.sim-partner-info {
  background: rgba(77, 159, 255, 0.05);
  border: 1px solid rgba(77, 159, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.sim-partner-title {
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
}

.sim-partner-bonus {
  margin-top: 6px;
  color: var(--green);
  font-weight: 600;
}

/* Metrics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.sim-metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-color);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  transition: transform var(--transition);
}

.sim-metric-card:hover {
  transform: translateY(-2px);
}

.metric-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.metric-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Break Even & Chart */
.break-even-container {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 8px;
}

.break-even-container h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

#sim-chart-container {
  width: 100%;
  height: 200px;
  position: relative;
}

/* Simulator Table */
.sim-table-container {
  margin-top: 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
}

.sim-table-container h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 14px 16px 8px;
}

.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.sim-table th, .sim-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.sim-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.sim-table tr:last-child td {
  border-bottom: none;
}

.sim-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.sim-row-accent {
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
}

.sim-row-accent td {
  border-top: 1px solid var(--border);
}

/* ── Modal Overlay & Windows ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

.idea-modal-content {
  max-width: 1000px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--transition);
  z-index: 10;
}

.modal-close:hover {
  color: var(--red);
}

.graph-hint span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.temporal-slider-container {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  z-index: 10;
}

.temporal-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.glass-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.glass-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
  cursor: pointer;
  transition: 0.2s ease;
}

.glass-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.temporal-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 24px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 24px;
}

.modal-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-top: 24px;
  margin-bottom: 14px;
  border-left: 3px solid var(--accent-color, var(--blue));
  padding-left: 8px;
}

.pain-summary-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Signals List within Modal ─────────────────────────────── */
.signals-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.modal-signal-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: background var(--transition);
}

.modal-signal-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sig-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sig-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.sig-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sig-badge-hh { background: rgba(63, 185, 80, 0.1); color: var(--green); }
.sig-badge-reddit { background: rgba(248, 81, 73, 0.1); color: var(--red); }
.sig-badge-vk { background: rgba(77, 159, 255, 0.1); color: var(--blue); }
.sig-badge-forum { background: rgba(255, 149, 0, 0.1); color: var(--orange); }

.sig-card-content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.sig-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.sig-card-author {
  font-weight: 500;
}

.sig-card-link {
  color: var(--blue);
  text-decoration: none;
}

.sig-card-link:hover {
  text-decoration: underline;
}

/* ── Financial Badge ────────────────────────────────────────── */
.sig-company-financials {
  margin-top: 10px;
  background: rgba(77, 159, 255, 0.04);
  border: 1px solid rgba(77, 159, 255, 0.15);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sig-company-title {
  font-weight: 700;
  color: var(--blue);
}

.sig-company-metrics {
  display: flex;
  gap: 16px;
}

.sig-company-metric span {
  color: var(--text-muted);
}

.sig-company-metric b {
  color: var(--text-secondary);
}

/* ── Startup Idea Modal Layout ──────────────────────────────── */
.idea-modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .idea-modal-grid {
    grid-template-columns: 1fr;
  }
}

.detail-block {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.detail-block:last-child {
  margin-bottom: 0;
}

.detail-block-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.detail-block p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.detail-block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.financials-details {
  border-left: 3px solid var(--gold);
}

.fin-breakdown-row {
  margin-bottom: 12px;
}

.fin-breakdown-row:last-child {
  margin-bottom: 0;
}

.fin-breakdown-item {
  display: flex;
  flex-direction: column;
}

.fin-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.fin-value-with-comment {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.fin-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--gold);
  white-space: nowrap;
}

.fin-comment {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.risks-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.risks-list li {
  margin-bottom: 6px;
}

.risks-list li::marker {
  color: var(--red);
}

.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checklist-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--green);
  cursor: pointer;
}

.idea-supporting-signals-section {
  margin-top: 24px;
}

.idea-modal-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.simulator-load-btn {
  background: var(--blue-dim);
  border: 1px solid rgba(77, 159, 255, 0.3);
  color: var(--blue);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.simulator-load-btn:hover {
  background: var(--blue);
  color: #0a0e1a;
  box-shadow: 0 0 20px rgba(77, 159, 255, 0.4);
}

/* ── Segmented Source Bars inside Level Cards ────────────────── */
.sources-segment-bar {
  display: flex;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 4px;
}

.source-segment {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.source-segment:hover {
  filter: brightness(1.2);
}

.sources-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.source-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text-muted);
}

.source-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ── Pyramid Level Modal & Details ───────────────────────────── */
.pyramid-modal-info-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

.pyramid-modal-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pyramid-modal-info-row:last-child {
  margin-bottom: 0;
}

.pyramid-modal-info-row span {
  color: var(--text-muted);
}

.pyramid-modal-info-row strong {
  color: var(--gold);
  font-weight: 700;
}

.pyramid-modal-filter-row {
  display: flex;
  justify-content: center;
}

.pyramid-filter-toggle-btn {
  background: var(--blue-dim);
  border: 1px solid rgba(77, 159, 255, 0.3);
  color: var(--blue);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pyramid-filter-toggle-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #0a0e1a;
  box-shadow: 0 0 15px rgba(63, 185, 80, 0.3);
}

.pyramid-filter-toggle-btn:hover {
  filter: brightness(1.1);
}

.pyramid-modal-sources-distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.pyramid-modal-sources-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.pyramid-modal-source-segment {
  height: 100%;
  transition: width 0.8s ease;
}

.pyramid-modal-sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.pyramid-modal-source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
}

.pyramid-modal-source-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pyramid-modal-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pyramid-modal-source-val {
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Global Filtering Indicator inside Dashboard ────────────── */
.pyramid-level-detail.filtered-active {
  background: rgba(63, 185, 80, 0.04);
  border-color: var(--green) !important;
  box-shadow: 0 0 15px rgba(63, 185, 80, 0.15);
  position: relative;
}

.pyramid-level-detail.filtered-active::after {
  content: '⚡ ФИЛЬТР АКТИВЕН';
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 8px;
  font-weight: 950;
  color: var(--green);
  background: var(--green-dim);
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
/* ── Top Navigation Tabs ─────────────────────────────────────────────── */
.top-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 32px;
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 2px;
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-tab.active {
  background: rgba(63, 185, 80, 0.1);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(63, 185, 80, 0.2);
}

/* ── Slide-Over Event Feed ─────────────────────────────────────────── */
.slide-over-panel {
  position: fixed;
  top: 0;
  right: -400px; /* Hidden by default */
  width: 400px;
  height: 100vh;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  z-index: 1000;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.slide-over-panel.open {
  right: 0;
}

.slide-over-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slide-over-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.slide-over-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Hide two-col layout elements if any remain */
.two-col {
  display: block; /* Override previous grid/flex */
}
.left-col, .right-col {
  width: 100%;
}

/* ── Reality Check Split-View Grid ────────────────────────────────── */
.reality-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .reality-check-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Drill-Down Table (Data Interpretation Layer) ─────────────────── */
.drilldown-section {
  padding: 24px;
}

.drilldown-table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 60vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.drilldown-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.drilldown-table th {
  padding: 14px 16px;
  background: var(--bg); /* Opaque background for sticky header */
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.drilldown-row {
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.drilldown-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.drilldown-row td {
  padding: 16px;
  vertical-align: middle;
}

.drilldown-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drilldown-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.severity-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.severity-bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* Expanded details row */
.drilldown-details-row {
  display: none;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.drilldown-details-row.open {
  display: table-row;
}

.drilldown-details-content {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dd-detail-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.dd-detail-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dd-evidence-item {
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.dd-evidence-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dd-startup-card {
  background: rgba(63, 185, 80, 0.05);
  border: 1px solid rgba(63, 185, 80, 0.15);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.dd-startup-name {
  font-weight: 700;
  color: var(--green);
  font-size: 13px;
  margin-bottom: 4px;
}

.dd-startup-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.dd-unmet-need {
  background: rgba(255, 149, 0, 0.05);
  border: 1px dashed rgba(255, 149, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
