/* ============================================
   WrongFacts by RefDat — Main Stylesheet
   Playful & Bold Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Primary palette */
  --wf-red: #FF3B5C;
  --wf-red-dark: #D42A47;
  --wf-green: #00C896;
  --wf-green-dark: #00A67B;
  --wf-yellow: #FFD23F;
  --wf-blue: #3B82F6;
  --wf-purple: #8B5CF6;
  --wf-orange: #FF8C42;

  /* Neutrals */
  --wf-dark: #1A1A2E;
  --wf-dark-mid: #16213E;
  --wf-charcoal: #2D2D44;
  --wf-grey-700: #4A4A5A;
  --wf-grey-500: #7A7A8A;
  --wf-grey-300: #B0B0BE;
  --wf-grey-100: #F0F0F5;
  --wf-white: #FFFFFF;

  /* Backgrounds */
  --wf-bg: #FAFAFE;
  --wf-bg-card: #FFFFFF;
  --wf-bg-hero: #1A1A2E;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-pop: 0 8px 30px rgba(255,59,92,0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-med: 300ms var(--ease-out);

  /* Layout */
  --max-width: 1200px;
  --content-width: 780px;
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--wf-dark);
  background: var(--wf-bg);
  line-height: 1.65;
}

a {
  color: var(--wf-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--wf-purple);
}

img {
  max-width: 100%;
  display: block;
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: var(--space-md);
  max-width: 65ch;
}


/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}


/* --- Header & Navigation --- */
.site-header {
  background: var(--wf-bg-hero);
  border-bottom: 3px solid var(--wf-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--wf-white);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.site-logo .wrong {
  color: var(--wf-red);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}
.site-logo .facts {
  color: var(--wf-green);
}

.main-nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}
.main-nav a {
  color: var(--wf-grey-300);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--wf-white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--wf-white);
  font-size: 1.5rem;
  cursor: pointer;
}


/* --- Hero Section --- */
.hero {
  background: var(--wf-bg-hero);
  color: var(--wf-white);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,59,92,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(0,200,150,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin-bottom: var(--space-md);
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--wf-grey-300);
  font-style: italic;
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}


/* --- Graduation Year Tool --- */
.year-tool {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  padding: var(--space-2xl);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.year-tool label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.year-input-group {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.year-input-group input {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  font-size: 1.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  color: var(--wf-white);
  outline: none;
  transition: border-color var(--transition-fast);
}
.year-input-group input:focus {
  border-color: var(--wf-yellow);
}
.year-input-group input::placeholder {
  color: var(--wf-grey-500);
}

.year-input-group button {
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--wf-red);
  color: var(--wf-white);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.year-input-group button:hover {
  background: var(--wf-red-dark);
  transform: translateY(-1px);
}

.decade-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
}

.decade-btn {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--wf-grey-300);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.decade-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--wf-white);
  border-color: var(--wf-yellow);
}


/* --- Report Card (Graduation Year Result) --- */
.report-card {
  display: none;
  max-width: 650px;
  margin: var(--space-2xl) auto 0;
  background: var(--wf-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-align: left;
  color: var(--wf-dark);
}

.report-card.visible {
  display: block;
  animation: slideUp 0.5s var(--ease-out);
}

.report-header {
  background: var(--wf-dark);
  color: var(--wf-white);
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-header h3 {
  font-size: 1.2rem;
}

.report-grade {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--wf-red);
}

.report-items {
  padding: var(--space-lg) var(--space-xl);
}

.report-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--wf-grey-100);
}
.report-item:last-child {
  border-bottom: none;
}

.report-item .wrong-claim {
  font-weight: 600;
  color: var(--wf-red);
  margin-bottom: var(--space-xs);
}

.report-item .correction {
  font-size: 0.9rem;
  color: var(--wf-grey-700);
}

.report-footer {
  padding: var(--space-md) var(--space-xl);
  background: var(--wf-grey-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--wf-blue);
  color: var(--wf-white);
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.share-btn:hover {
  background: var(--wf-purple);
}


/* --- Content Type & Subject Badges --- */
.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-debunked_fact      { background: #FFE8EC; color: #C0293E; }
.badge-urban_legend       { background: #EDE9FE; color: #6D28D9; }
.badge-old_wives_tale     { background: #FEF3C7; color: #92400E; }
.badge-playground_myth    { background: #DBEAFE; color: #1D4ED8; }
.badge-mandela_effect     { background: #FCE7F3; color: #9D174D; }
.badge-celebrity_myth     { background: #FFF7ED; color: #C2410C; }
.badge-outdated_medical   { background: #D1FAE5; color: #065F46; }
.badge-revised_history    { background: #FEE2E2; color: #991B1B; }
.badge-obsolete_science   { background: #E0E7FF; color: #3730A3; }
.badge-conspiracy_debunked{ background: #F3F4F6; color: #374151; }

.badge-subject {
  background: var(--wf-grey-100);
  color: var(--wf-grey-700);
  font-weight: 600;
  font-size: 0.75rem;
}


/* --- Confidence Indicator --- */
.confidence {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.82rem;
  font-weight: 600;
}
.confidence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.confidence-fully_debunked .confidence-dot { background: var(--wf-green); }
.confidence-revised .confidence-dot        { background: var(--wf-yellow); }
.confidence-still_debated .confidence-dot  { background: var(--wf-orange); }


/* --- Fact Cards (Listing Pages) --- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.fact-card {
  background: var(--wf-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--wf-grey-100);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  display: flex;
  flex-direction: column;
}
.fact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.fact-card .card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.fact-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}
.fact-card h3 a {
  color: var(--wf-dark);
}
.fact-card h3 a:hover {
  color: var(--wf-red);
}

.fact-card .subtitle {
  color: var(--wf-grey-500);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: var(--space-md);
}

.fact-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--wf-grey-500);
  padding-top: var(--space-md);
  border-top: 1px solid var(--wf-grey-100);
}

.card-scores {
  display: flex;
  gap: var(--space-md);
}

.score {
  display: flex;
  align-items: center;
  gap: 3px;
}


/* --- Individual Fact Page --- */
.fact-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.fact-hero {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--wf-bg-hero);
  color: var(--wf-white);
  margin-bottom: var(--space-2xl);
}

.fact-hero .badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.fact-hero h1 {
  color: var(--wf-red);
  margin-bottom: var(--space-md);
}

.fact-hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--wf-green);
  font-weight: 600;
  max-width: 700px;
}

.fact-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.claim-block,
.reality-block {
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  position: relative;
}

.claim-block {
  background: #FFF5F5;
  border-left: 4px solid var(--wf-red);
}
.claim-block::before {
  content: 'WHAT PEOPLE BELIEVED';
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--wf-red);
  display: block;
  margin-bottom: var(--space-sm);
}

.reality-block {
  background: #F0FDF4;
  border-left: 4px solid var(--wf-green);
}
.reality-block::before {
  content: 'WHAT WE KNOW NOW';
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--wf-green-dark);
  display: block;
  margin-bottom: var(--space-sm);
}

.fact-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin: var(--space-2xl) 0;
  padding: var(--space-xl);
  background: var(--wf-grey-100);
  border-radius: var(--radius-md);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.meta-item .meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wf-grey-500);
}
.meta-item .meta-value {
  font-weight: 600;
  color: var(--wf-dark);
}


/* --- Score Bars --- */
.score-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.score-bar .label {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 120px;
  color: var(--wf-grey-700);
}

.bar-track {
  flex: 1;
  height: 8px;
  background: var(--wf-grey-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 200px;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
}

.bar-fill-popularity { background: var(--wf-blue); }
.bar-fill-surprise   { background: var(--wf-purple); }


/* --- Sources --- */
.sources-list {
  list-style: none;
  margin: var(--space-lg) 0;
}

.sources-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--wf-grey-100);
  font-size: 0.9rem;
}
.sources-list li:last-child {
  border-bottom: none;
}

.source-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--wf-grey-500);
  margin-left: var(--space-sm);
}


/* --- Related Facts --- */
.related-section {
  margin-top: var(--space-2xl);
}

.related-section h3 {
  margin-bottom: var(--space-lg);
}


/* --- Voting Widget --- */
.vote-widget {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--wf-grey-100);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.vote-widget .vote-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--wf-grey-300);
  border-radius: var(--radius-full);
  background: var(--wf-white);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vote-btn.upvote:hover {
  border-color: var(--wf-green);
  color: var(--wf-green);
  background: #F0FDF4;
}
.vote-btn.downvote:hover {
  border-color: var(--wf-red);
  color: var(--wf-red);
  background: #FFF5F5;
}

.vote-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  min-width: 40px;
  text-align: center;
}


/* --- Browse Page Headers --- */
.browse-header {
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  background: var(--wf-bg-hero);
  color: var(--wf-white);
  margin-bottom: var(--space-xl);
}

.browse-header h1 {
  margin-bottom: var(--space-sm);
}

.browse-header .count {
  color: var(--wf-grey-300);
  font-size: 1rem;
}

.browse-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.filter-chip {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  border: 1px solid var(--wf-grey-300);
  background: var(--wf-white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wf-grey-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-chip:hover,
.filter-chip.active {
  background: var(--wf-dark);
  color: var(--wf-white);
  border-color: var(--wf-dark);
}


/* --- Subject Cards (Homepage) --- */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.subject-card {
  padding: var(--space-lg);
  background: var(--wf-bg-card);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--wf-grey-100);
  transition: all var(--transition-med);
}
.subject-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--wf-blue);
}

.subject-card .subject-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.subject-card .subject-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--wf-dark);
}

.subject-card .subject-count {
  font-size: 0.8rem;
  color: var(--wf-grey-500);
  margin-top: var(--space-xs);
}


/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  color: var(--wf-grey-500);
  max-width: var(--max-width);
  margin: 0 auto;
}

.breadcrumbs a {
  color: var(--wf-grey-500);
}
.breadcrumbs a:hover {
  color: var(--wf-blue);
}

.breadcrumbs .separator {
  margin: 0 var(--space-sm);
  color: var(--wf-grey-300);
}


/* --- Footer --- */
.site-footer {
  background: var(--wf-dark);
  color: var(--wf-grey-300);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-brand .site-logo {
  margin-bottom: var(--space-md);
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wf-grey-500);
  margin-bottom: var(--space-md);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--wf-grey-300);
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--wf-white);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--wf-charcoal);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--wf-grey-500);
}


/* --- Ad Slots --- */
.ad-slot {
  background: var(--wf-grey-100);
  border: 1px dashed var(--wf-grey-300);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  text-align: center;
  font-size: 0.75rem;
  color: var(--wf-grey-500);
  margin: var(--space-xl) 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot-leaderboard {
  min-height: 90px;
}

.ad-slot-sidebar {
  min-height: 250px;
}

.ad-slot-in-content {
  min-height: 250px;
  margin: var(--space-2xl) 0;
}


/* --- Submit Form --- */
.submit-form {
  max-width: 600px;
  margin: var(--space-2xl) auto;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--wf-grey-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--wf-blue);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  padding: var(--space-md) var(--space-2xl);
  background: var(--wf-green);
  color: var(--wf-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.btn-submit:hover {
  background: var(--wf-green-dark);
  transform: translateY(-1px);
}


/* --- Animations --- */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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


/* --- Site Search Overlay --- */
.search-toggle {
  background: none;
  border: none;
  color: var(--wf-grey-300);
  font-size: 1.1rem;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}
.search-toggle:hover {
  color: var(--wf-white);
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  padding: var(--space-3xl) var(--space-lg);
  animation: fadeIn 0.2s var(--ease-out);
}
.search-overlay.open {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-overlay .search-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-xl);
  background: none;
  border: none;
  color: var(--wf-grey-300);
  font-size: 1.8rem;
  cursor: pointer;
}
.search-overlay .search-close:hover {
  color: var(--wf-white);
}

.search-box {
  width: 100%;
  max-width: 600px;
  margin-top: var(--space-3xl);
}

.search-box input {
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  font-size: 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.08);
  color: var(--wf-white);
  outline: none;
  transition: border-color var(--transition-fast);
}
.search-box input:focus {
  border-color: var(--wf-yellow);
}
.search-box input::placeholder {
  color: var(--wf-grey-500);
}

.search-results {
  width: 100%;
  max-width: 600px;
  margin-top: var(--space-lg);
  max-height: 60vh;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  color: var(--wf-white);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.search-result-item:hover {
  background: rgba(255,255,255,0.1);
  color: var(--wf-white);
}

.search-result-item .result-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.search-result-item .result-subtitle {
  font-size: 0.85rem;
  color: var(--wf-grey-300);
}

.search-result-item .result-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wf-green);
  margin-bottom: var(--space-xs);
  display: block;
}

.search-hint {
  color: var(--wf-grey-500);
  font-size: 0.9rem;
  text-align: center;
  margin-top: var(--space-lg);
}

.search-no-results {
  color: var(--wf-grey-300);
  text-align: center;
  padding: var(--space-xl);
  font-size: 1rem;
}


/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner {
    padding: var(--space-sm) var(--space-md);
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--wf-dark-mid);
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 3px solid var(--wf-red);
  }
  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: var(--space-2xl) var(--space-md);
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .fact-meta {
    grid-template-columns: 1fr 1fr;
  }

  .report-footer {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

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

  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-meta {
    grid-template-columns: 1fr;
  }

  .year-input-group {
    flex-direction: column;
  }
}
