/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue-900: #0c1929;
  --blue-800: #111d35;
  --blue-700: #162544;
  --blue-600: #1e3a5f;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-200: #93c5fd;
  --blue-100: #dbeafe;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --orange-500: #f97316;
  --orange-400: #fb923c;
  --orange-300: #fdba74;
  --yellow-400: #facc15;
  --yellow-300: #fde047;
  --red-500: #ef4444;
  --red-400: #f87171;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --sans: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --display: 'Playfair Display', Georgia, serif;
}

html { font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--white);
  background: var(--blue-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 320px; height: 100vh;
  background: var(--blue-800);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
}
.sidebar-close {
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-close:hover { background: rgba(255,255,255,0.05); color: var(--white); }

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.sidebar-empty {
  font-size: 0.8rem;
  color: var(--gray-500);
  text-align: center;
  padding: 2rem 1rem;
  font-style: italic;
}
.sidebar-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-item:hover { background: rgba(255,255,255,0.05); }
.sidebar-thumb {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.sidebar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sidebar-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-200);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sidebar-date {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}
.sidebar-toggle {
  position: fixed;
  top: 16px; left: 16px;
  z-index: 999;
  width: 40px; height: 40px;
  background: var(--blue-700);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--gray-300);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.15s;
}
.sidebar-toggle:hover { border-color: var(--blue-400); color: var(--white); background: var(--blue-600); }

/* ===== LANDING ===== */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 50% 30%, var(--blue-700) 0%, var(--blue-900) 70%);
}
.landing-content {
  text-align: center;
  max-width: 560px;
}

.brand { margin-bottom: 2rem; }
.brand-icon { margin-bottom: 0.75rem; }
.brand h1 {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-300), var(--purple-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  margin-top: 0.25rem;
}
.tagline {
  font-size: 1.15rem;
  color: var(--gray-300);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* ===== DROPZONE ===== */
.dropzone {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 3rem 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.02);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--blue-400);
  background: rgba(59,130,246,0.06);
}
.dropzone.dragover { transform: scale(1.01); }
.dropzone-icon { color: var(--gray-400); margin-bottom: 0.75rem; }
.dropzone-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-200);
  margin-bottom: 0.25rem;
}
.dropzone-subtext {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ===== PREVIEW ===== */
.preview-area { margin-top: 2rem; }
.preview-area img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  margin-bottom: 1.25rem;
}
.preview-controls { display: flex; gap: 0.75rem; justify-content: center; }

.btn-primary {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.4); }

.btn-secondary {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--gray-400);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--gray-400); color: var(--white); }

.disclaimer {
  font-size: 0.65rem;
  color: var(--gray-600);
  margin-top: 3rem;
  letter-spacing: 0.04em;
}

/* ===== LOADING ===== */
.loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--blue-900);
}
.loading-content { max-width: 360px; }

.radar-spinner {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  position: relative;
  margin: 0 auto 1.5rem;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
}
.radar-sweep {
  position: absolute;
  top: 50%; left: 50%;
  width: 50%; height: 2px;
  background: linear-gradient(90deg, var(--blue-400), transparent);
  transform-origin: left center;
  animation: radar-spin 2s linear infinite;
}
.radar-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--blue-400);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--blue-400);
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

.loading h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-100);
}
.loading-status {
  font-size: 0.82rem;
  color: var(--gray-400);
  font-style: italic;
}

/* ===== OUTPUT ===== */
.output {
  min-height: 100vh;
  background: var(--blue-900);
  padding: 1.5rem;
}
.output-toolbar {
  max-width: 860px;
  margin: 0 auto 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-back {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--gray-300);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}
.btn-back:hover { border-color: var(--gray-400); color: var(--white); }
.btn-print {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--blue-700);
  color: var(--gray-200);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-print:hover { background: var(--blue-600); color: var(--white); }

/* ===== REPORT CARDS ===== */
.report-card {
  max-width: 860px;
  margin: 0 auto 1.25rem;
  background: var(--blue-800);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  padding: 2.5rem 3rem;
  overflow: hidden;
}
.family-tree-wrapper:empty, .forecast-wrapper:empty { display: none; }

/* ===== DOSSIER STYLES ===== */
.dossier .dossier-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}
.dossier .station-id {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--blue-300);
  margin-bottom: 0.75rem;
}
.dossier .report-title {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.dossier .report-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.dossier .report-meta span {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--gray-400);
}
.dossier .confidence {
  background: rgba(34,197,94,0.12);
  color: var(--green-400) !important;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* Dossier sections */
.dossier .section {
  margin-bottom: 2rem;
}
.dossier .section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-300);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dossier .section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-200);
  margin: 1rem 0 0.4rem;
}
.dossier .section p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray-300);
  margin-bottom: 0.6rem;
}
.dossier .section strong { color: var(--gray-100); }

.dossier .analysis-cultural {
  background: rgba(139,92,246,0.06);
  border-left: 3px solid var(--purple-500);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 0.75rem 0;
}
.dossier .analysis-neuro {
  background: rgba(59,130,246,0.06);
  border-left: 3px solid var(--blue-400);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 0.75rem 0;
}

/* Vitals panel */
.dossier .vitals-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.dossier .vitals-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}
.dossier .vitals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}
.dossier .vital {
  background: var(--blue-700);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}
.dossier .vital-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 0.3rem;
}
.dossier .vital-value {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-300);
}

/* Meme specimen display (inside dossier) */
.dossier .meme-specimen {
  text-align: center;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.dossier .meme-specimen img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== FAMILY TREE ===== */
.family-tree-section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-300);
  margin-bottom: 0.25rem;
}
.tree-subtitle {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.tree-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}
.tree-connector {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, var(--gray-600), var(--gray-700));
}

.tree-branch-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  position: relative;
  padding: 0 1rem;
}
.tree-branch-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 120px);
  height: 2px;
  background: var(--gray-600);
}

.tree-node {
  min-width: 155px;
  max-width: 210px;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: var(--blue-700);
  text-align: center;
  position: relative;
}
.tree-node.subject {
  border: 2px solid var(--blue-400);
  background: rgba(59,130,246,0.12);
  min-width: 180px;
  box-shadow: 0 0 20px rgba(59,130,246,0.15);
}
.tree-node.ancestor { border-color: var(--gray-500); }
.tree-node.sibling { border-color: rgba(255,255,255,0.1); }
.tree-node.descendant { border-color: var(--orange-400); border-style: dashed; }
.tree-node.forecast-node { border-color: var(--red-400); border-style: dashed; }

.tree-node-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-100);
  margin-bottom: 0.15rem;
}
.tree-node-year {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--gray-500);
  margin-bottom: 0.3rem;
}
.tree-node-desc {
  font-size: 0.68rem;
  color: var(--gray-400);
  line-height: 1.35;
  font-style: italic;
}

.tree-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  margin-top: 0.4rem;
}
.tree-badge.confirmed { background: rgba(34,197,94,0.15); color: var(--green-400); }
.tree-badge.theorized { background: rgba(249,115,22,0.15); color: var(--orange-400); }
.tree-badge.emerging { background: rgba(250,204,21,0.15); color: var(--yellow-400); }
.tree-badge.forecast { background: rgba(239,68,68,0.15); color: var(--red-400); }

.tree-loading, .tree-unclassified {
  text-align: center;
  padding: 2rem 1.5rem;
}
.tree-loading p, .tree-unclassified p {
  font-size: 0.82rem;
  color: var(--gray-500);
  font-style: italic;
}

/* ===== FORECAST SECTION ===== */
.forecast-section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-300);
  margin-bottom: 0.25rem;
}
.forecast-subtitle {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.forecast-trajectory {
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.forecast-trajectory h3 {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-400);
  margin-bottom: 0.5rem;
}
.forecast-trajectory p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--gray-300);
}

.forecast-meta-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.forecast-meta-chip {
  background: var(--blue-700);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  flex: 1;
  text-align: center;
}
.forecast-meta-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 0.2rem;
}
.forecast-meta-value {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-300);
}

.forecast-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.forecast-card {
  background: var(--blue-700);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.forecast-card-image {
  position: relative;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.forecast-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.forecast-card-image .no-image {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-style: italic;
  padding: 1rem;
  text-align: center;
}
.forecast-card-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--green-400);
}
.forecast-card-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.forecast-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.forecast-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-100);
}
.forecast-card-date {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.forecast-card-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--gray-400);
}
.forecast-card-explanation {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--gray-500);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 0.6rem;
}

/* Likelihood gauge */
.likelihood-gauge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.likelihood-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.likelihood-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.likelihood-fill.high { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.likelihood-fill.medium { background: linear-gradient(90deg, var(--yellow-400), var(--orange-400)); }
.likelihood-fill.low { background: linear-gradient(90deg, var(--orange-500), var(--red-400)); }
.likelihood-value {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}
.likelihood-value.high { color: var(--green-400); }
.likelihood-value.medium { color: var(--orange-400); }
.likelihood-value.low { color: var(--red-400); }

.forecast-card-platforms {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.platform-tag {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(59,130,246,0.1);
  color: var(--blue-300);
}

.forecast-loading {
  text-align: center;
  padding: 2rem;
}
.forecast-loading p {
  font-size: 0.82rem;
  color: var(--gray-500);
  font-style: italic;
}

/* Small spinner */
.spinner-sm {
  width: 24px; height: 24px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--blue-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 2rem;
}
.lightbox.active { opacity: 1; }
.lightbox-inner {
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  cursor: default;
}
.lightbox img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-info {
  text-align: center;
  max-width: 640px;
}
.lightbox-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.35rem;
}
.lightbox-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.6rem;
}
.lightbox-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gray-400);
}
.lightbox-likelihood {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}
.lightbox-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--gray-300);
  margin-bottom: 0.5rem;
}
.lightbox-explanation {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--gray-500);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.6rem;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem; right: 1.5rem;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.forecast-card-image { cursor: zoom-in; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== PRINT ===== */
@media print {
  body { background: white; color: black; }
  .output { padding: 0; }
  .output-toolbar, .sidebar, .sidebar-toggle { display: none; }
  .report-card {
    border: 1px solid #ddd;
    box-shadow: none;
    background: white;
    break-inside: avoid;
  }
  .dossier .section p, .dossier .section h2, .dossier .report-title { color: black; }
  .dossier .station-id, .dossier .section h2 { color: #2563eb; }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .sidebar { width: 100%; }
  .report-card { padding: 1.5rem 1.25rem; }
  .tree-branch-row { flex-wrap: wrap; }
  .tree-node { min-width: 130px; max-width: 170px; }
  .forecast-card { grid-template-columns: 1fr; }
  .forecast-card-image { min-height: 180px; }
  .brand h1 { font-size: 2.2rem; }
  .forecast-meta-row { flex-direction: column; }
}
