/* pred101 Reports Design System
   Light editorial theme for data-heavy report pages
   Design direction: Editorial Financial — clean, readable, trustworthy
*/

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* === CSS Variables === */
:root {
  /* Backgrounds */
  --bg-page:       #fafbfc;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f4f6f9;
  --bg-highlight:  #eef3ff;

  /* Borders */
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  /* Accents */
  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --accent-amber:  #d97706;
  --accent-cyan:   #0891b2;
  --accent-violet: #7c3aed;

  /* Semantic */
  --positive: #059669;
  --negative: #dc2626;
  --warning:  #d97706;
  --info:     #2563eb;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);

  /* Radius */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  /* Max width */
  --max: 1180px;
}

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

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Container === */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}
.logo .mark { color: var(--accent); }
nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.9rem;
  transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--text-primary); }

/* === Main === */
main { padding: 52px 0 80px; }

/* === Report Header === */
.report-header {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.report-header h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.report-header .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.report-header .timestamp {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.report-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-highlight);
  color: var(--accent);
  border: 1px solid rgba(37,99,235,0.15);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 10px;
}

/* === Stats Grid === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card .value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === Sections === */
.section { margin: 36px 0; }
.section-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}
.section-title .icon {
  font-size: 1.2rem;
}

/* === Market Table === */
.market-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.market-table th {
  background: var(--bg-elevated);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-strong);
}
.market-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.market-table tr:last-child td { border-bottom: none; }
.market-table tr:hover td { background: var(--bg-highlight); }
.market-table a { color: var(--accent); font-weight: 500; }

/* === Probability Badges === */
.probability {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
}
.prob-high { background: rgba(5,150,105,0.10); color: var(--positive); }
.prob-mid  { background: rgba(217,119,6,0.10);  color: var(--warning);  }
.prob-low  { background: rgba(220,38,38,0.10);  color: var(--negative); }

/* === Tweet Card === */
.tweet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tweet-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.tweet-card .author {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.tweet-card .author img { width: 24px; height: 24px; border-radius: 50%; }
.tweet-card .text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.55; }
.tweet-card .metrics { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 14px; font-family: 'JetBrains Mono', monospace; }
.tweet-card .timestamp { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; font-family: 'JetBrains Mono', monospace; }

/* === News Item === */
.news-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
}
.news-item .source { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; font-family: 'JetBrains Mono', monospace; }
.news-item h4 { font-size: 1rem; margin-bottom: 10px; font-weight: 600; }
.news-item h4 a { color: var(--text-primary); }
.news-item h4 a:hover { color: var(--accent); text-decoration: none; }
.news-item .summary { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* === Highlight / Warning Boxes === */
.highlight-box {
  background: var(--bg-highlight);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 0.92rem;
}
.warning-box {
  background: rgba(217,119,6,0.07);
  border-left: 4px solid var(--warning);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 0.92rem;
}
.positive-box {
  background: rgba(5,150,105,0.07);
  border-left: 4px solid var(--positive);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 0.92rem;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* === Animations === */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fade-up 0.5s ease-out both;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.40s; }

/* === Responsive === */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 16px; }
  main { padding: 32px 0 60px; }
}

/* === Strategy & Tutorial Content Styles === */
.strategy-section {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent);
  padding: 18px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.case-study {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}
.risk-alert, .warning-box {
  background: rgba(217,119,6,0.07);
  border-left: 4px solid var(--warning);
  padding: 16px;
  margin: 16px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.checklist li {
  padding: 8px 0 8px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--positive);
  font-weight: 700;
}
.code-block, pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.nav-links a {
  background: var(--accent);
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
}
.nav-links a:hover {
  background: var(--accent-hover);
  text-decoration: none;
}
