/* Hunter Green Jobs — Data Dashboard
   Fonts: Bricolage Grotesque (display) + DM Sans (body)
   Aesthetic: Editorial data meets modern UI — textured, layered, distinctive
   Approach: Mobile-first, CSS-only visualizations */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..400&display=swap');

/* ─── Animatable custom property for donut ─── */
@property --gap-pct {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

/* ─── Design tokens ─── */
:root {
  --green-900: #0a1f12;
  --green-800: #122e1e;
  --green-700: #1a4d2e;
  --green-600: #2d7a4f;
  --green-500: #3a9961;
  --green-400: #5cb87a;
  --green-300: #8dd3a4;
  --green-200: #c1e8cf;
  --green-100: #e8f5ec;
  --green-50:  #f2faf5;

  --amber-700: #8f6311;
  --amber-600: #a87321;
  --amber-500: #c68b2c;
  --amber-400: #d9a641;
  --amber-300: #ebc56e;
  --amber-200: #f5dfa0;

  --neutral-900: #171a17;
  --neutral-800: #2a2d2a;
  --neutral-700: #3e433e;
  --neutral-600: #555b55;
  --neutral-500: #6e766e;
  --neutral-400: #919891;
  --neutral-300: #b5bab5;
  --neutral-200: #d3d7d3;
  --neutral-100: #e8ebe8;
  --neutral-50:  #f3f5f3;

  --bg: #f6f6f2;
  --bg-card: rgba(255,255,255,0.72);
  --text: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-muted: var(--neutral-500);

  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --shadow-xs: 0 1px 2px rgba(10,31,18,0.03);
  --shadow-sm: 0 1px 3px rgba(10,31,18,0.04), 0 1px 2px rgba(10,31,18,0.03);
  --shadow-md: 0 4px 16px rgba(10,31,18,0.06), 0 2px 4px rgba(10,31,18,0.03);
  --shadow-lg: 0 12px 40px rgba(10,31,18,0.09), 0 4px 8px rgba(10,31,18,0.03);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Subtle noise grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

::selection {
  background: var(--green-200);
  color: var(--green-900);
}

/* ─── Navigation ─── */
.nav {
  background: rgba(10,31,18,0.88);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-brand {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
}

.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ─── Container ─── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* ─── Page header ─── */
header {
  text-align: center;
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--neutral-200);
  animation: fadeUp 0.8s var(--ease-out) both;
}

h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--green-800);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
}

.subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
  max-width: 520px;
  margin: 0 auto;
}

/* ─── Week badge ─── */
.week-badge {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.8s 0.1s var(--ease-out) both;
}

.week-badge-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--green-800);
  color: rgba(255,255,255,0.8);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.week-badge-inner .week-num {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-display);
}

.week-badge-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* ─── Stats row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s 0.15s var(--ease-out) both;
  align-items: stretch;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
  padding: 1.15rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.5);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-600);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-value.amber {
  color: var(--amber-500);
}

.stat-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  font-weight: 400;
}

.stat-trend {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.stat-trend.up {
  color: var(--green-700);
  background: var(--green-100);
}

.stat-trend.down {
  color: var(--amber-700);
  background: var(--amber-200);
}

/* ─── Section headings ─── */
h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-800);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

section {
  margin-bottom: 2.5rem;
}

.section-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.section-note:empty {
  display: none;
}

/* ─── Bar chart ─── */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.bar-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.bar-value {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.bar-track {
  background: var(--neutral-100);
  border-radius: 8px;
  height: 10px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-700), var(--green-500), var(--green-400));
  border-radius: 8px;
  width: 0;
  transition: width 1s var(--ease-out);
  position: relative;
}

.bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 100%);
  border-radius: 8px;
}

/* ─── Green depth ─── */
.depth-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.depth-stat {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex: 1;
  text-align: center;
}

.depth-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green-600);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.depth-stat-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

.depth-explainer {
  margin-top: 0.75rem;
}

.depth-explainer summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}

.depth-explainer summary::-webkit-details-marker {
  display: none;
}

.depth-explainer summary::before {
  content: '+ ';
}

.depth-explainer[open] summary::before {
  content: '- ';
}

.depth-explainer p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.depth-explainer p + p {
  margin-top: 0.4rem;
}

.depth-explainer a {
  color: var(--green-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── CTA bridge ─── */
.cta-bridge {
  background: var(--green-900);
  color: white;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.8s 0.25s var(--ease-out) both;
  box-shadow: 0 8px 32px rgba(10,31,18,0.2), 0 2px 8px rgba(10,31,18,0.1);
}

.cta-bridge::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(93,184,122,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(198,139,44,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.cta-bridge p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  position: relative;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-bridge a {
  display: inline-block;
  background: var(--amber-500);
  color: white;
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(198,139,44,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.cta-bridge a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(198,139,44,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ─── AI Hero ─── */
.ai-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  text-align: center;
  animation: fadeUp 0.8s 0.15s var(--ease-out) both;
}

.ai-hero-text h2 {
  margin-bottom: 0.6rem;
}

.ai-hero-text p {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.92rem;
}

.ai-hero-text p + p {
  margin-top: 0.65rem;
}

/* ─── CSS Donut (animated via @property) ─── */
.donut-wrap {
  flex-shrink: 0;
  position: relative;
  filter: drop-shadow(0 6px 20px rgba(198,139,44,0.18));
}

.donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  --gap-pct: 0%;
  background: conic-gradient(
    var(--amber-500) 0%,
    var(--amber-400) var(--gap-pct),
    var(--green-500) var(--gap-pct),
    var(--green-600) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: --gap-pct 1.4s var(--ease-out);
}

.donut-hole {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
}

.donut-pct {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber-600);
  line-height: 1;
  letter-spacing: -0.03em;
}

.donut-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.donut-annotation {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* ─── Observation cards ─── */
.observations {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.obs-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.obs-cat {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-700);
  background: var(--green-100);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
}

.obs-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.5);
  border-left: 3px solid var(--amber-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  box-shadow: var(--shadow-xs);
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: border-left-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.obs-card:hover {
  border-left-color: var(--amber-500);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.obs-listed {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 0.35rem;
}

.obs-listed strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.obs-missing {
  font-size: 0.82rem;
  color: var(--amber-600);
  line-height: 1.55;
  margin-top: 0.25rem;
}

.obs-missing strong {
  color: var(--amber-700);
  font-weight: 600;
}

.obs-card .obs-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amber-500);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-body);
  margin-right: 0.5rem;
  flex-shrink: 0;
  vertical-align: text-top;
}

/* ─── Pattern cards ─── */
.pattern-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.pattern-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.pattern-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.4);
}

.pattern-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.pattern-count {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber-600);
  margin-bottom: 0.2rem;
}

.pattern-why {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.3rem;
}

.pattern-audience {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--neutral-100);
  display: grid;
  gap: 0.4rem;
}

.pattern-audience p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pattern-hire strong {
  color: var(--green-700);
  font-weight: 600;
}

.pattern-learn strong {
  color: var(--amber-600);
  font-weight: 600;
}

/* ─── Context card ─── */
.context-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.context-card h2 {
  margin-bottom: 0.6rem;
}

.context-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.92rem;
}

.context-card p + p {
  margin-top: 0.6rem;
}

.context-card strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Stat delta (week 4+) ─── */
.stat-delta {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.stat-delta.positive {
  color: var(--green-600);
}

.stat-delta.negative {
  color: var(--amber-600);
}

/* ─── CTA trend line (week 4+) ─── */
.cta-trend {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 1rem;
  font-style: italic;
}

/* ─── Trend note on AI hero (week 4+) ─── */
.trend-note {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber-500) !important;
  margin-top: 0.75rem !important;
  letter-spacing: 0.02em;
}

/* ─── Sparkline section (week 8+) ─── */
.trend-section {
  margin-bottom: 2.5rem;
}

.sparkline-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 56px;
  flex: 1;
}

.spark-bar {
  flex: 1;
  min-width: 3px;
  background: var(--amber-300);
  border-radius: 3px 3px 0 0;
  transition: height 0.9s var(--ease-out);
  cursor: default;
}

.spark-bar.current {
  background: var(--amber-500);
}

.spark-bar:hover {
  background: var(--amber-500);
}

.sparkline-latest {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--amber-500);
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sparkline-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ─── Callout (week 8+/13+) ─── */
.callout {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}

.callout-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.callout-value {
  font-weight: 600;
  color: var(--green-700);
}

/* ─── FAQ accordion ─── */
.faq-section h2 {
  margin-bottom: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: box-shadow 0.25s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-q {
  padding: 0.9rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  line-height: 1.4;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}

.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-a {
  padding: 0 1.15rem 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Methodology ─── */
.methodology {
  border-top: 1px solid var(--neutral-200);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

.methodology h2 {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.methodology p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Citation ─── */
.cite-detail {
  margin-top: 0.75rem;
}

.cite-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
}

.cite-summary::-webkit-details-marker {
  display: none;
}

.cite-summary::before {
  content: '+ ';
}

.cite-detail[open] .cite-summary::before {
  content: '- ';
}

.cite-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--neutral-50);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-top: 0.35rem;
  font-family: var(--font-body);
  user-select: all;
  -webkit-user-select: all;
}

/* ─── Footer ─── */
footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--neutral-200);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.footer-update {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* ─── Source link ─── */
.source-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

.source-link a {
  color: var(--green-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Back link ─── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--green-600);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
  padding: 0.4rem 0;
  transition: color 0.2s ease, gap 0.2s var(--ease-out);
}

.back-link:hover {
  color: var(--green-700);
  gap: 0.5rem;
}

/* ─── Lists ─── */
ul { list-style: none; }

ul li {
  padding: 0.4rem 0 0.4rem 1.25rem;
  position: relative;
  font-size: 0.92rem;
}

ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 5px;
  height: 5px;
  background: var(--green-400);
  border-radius: 50%;
}

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

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

/* Stagger animation for sections rendered by JS */
section {
  animation: fadeUp 0.7s var(--ease-out) both;
}

section:nth-of-type(1) { animation-delay: 0.3s; }
section:nth-of-type(2) { animation-delay: 0.4s; }
section:nth-of-type(3) { animation-delay: 0.5s; }
section:nth-of-type(4) { animation-delay: 0.6s; }
section:nth-of-type(5) { animation-delay: 0.7s; }
section:nth-of-type(6) { animation-delay: 0.8s; }
section:nth-of-type(7) { animation-delay: 0.9s; }
section:nth-of-type(8) { animation-delay: 1.0s; }

/* ─── Tablet (640px+) ─── */
@media (min-width: 640px) {
  .container {
    max-width: 780px;
    padding: 3rem 2rem 3.5rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat-value {
    font-size: 2.15rem;
  }

  .bar-track {
    height: 12px;
  }

  .ai-hero {
    flex-direction: row;
    text-align: left;
    gap: 2.5rem;
  }

  .donut {
    width: 190px;
    height: 190px;
  }

  .donut-hole {
    width: 122px;
    height: 122px;
  }

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

/* ─── Desktop (1024px+) ─── */
@media (min-width: 1024px) {
  .container {
    max-width: 860px;
    padding: 3.5rem 2.5rem 4rem;
  }

  h1 {
    font-size: 2.6rem;
  }

  .stat-value {
    font-size: 2.4rem;
  }

  .bar-label {
    font-size: 0.88rem;
  }

  .donut {
    width: 200px;
    height: 200px;
  }

  .donut-hole {
    width: 130px;
    height: 130px;
  }

  .donut-pct {
    font-size: 2.15rem;
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  body::before {
    display: none;
  }
}
