/* ===========================================================================
   wrf-nest-picker-radar-da — site styles
   =========================================================================== */

:root {
  --accent: #1f6feb;
  --accent-dark: #0a3d91;
  --accent-soft: #e7f0ff;
  --warm: #d9822b;
  --good: #1a7f37;
  --bad: #cf222e;
  --fg: #0d1117;
  --fg-mute: #57606a;
  --fg-soft: #8b949e;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-soft2: #eef1f5;
  --bg-warm: #fff8c5;
  --border: #d0d7de;
  --border-strong: #afb8c1;
  --shadow-sm: 0 1px 2px rgba(31,35,40,0.06);
  --shadow-md: 0 4px 12px rgba(31,35,40,0.08);
  --shadow-lg: 0 12px 32px rgba(31,35,40,0.12);
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Helvetica, Arial, sans-serif;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 28px 96px;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ----- typography ----- */

h1 {
  font-size: 2.4em;
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 .sub {
  display: block;
  font-size: 0.46em;
  color: var(--fg-mute);
  font-weight: 400;
  margin-top: 12px;
  letter-spacing: 0;
}

h2 {
  margin-top: 56px;
  margin-bottom: 16px;
  font-size: 1.55em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 14px;
}

h3 {
  margin-top: 32px;
  margin-bottom: 10px;
  font-size: 1.2em;
  color: var(--fg);
  font-weight: 600;
}

p { margin: 12px 0; }

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

code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.86em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

ul { padding-left: 24px; }
ul li { margin: 6px 0; }

/* ----- top nav ----- */

.nav-top {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.86em;
  padding: 0 0 22px;
  margin-bottom: 8px;
}

.nav-top a {
  color: var(--fg-mute);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}

.nav-top a:hover {
  background: var(--bg-soft);
  text-decoration: none;
  color: var(--fg);
}

.nav-top a.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.nav-top .sep { color: var(--fg-soft); padding: 6px 0; }

/* ----- meta line under title ----- */

.meta {
  color: var(--fg-mute);
  font-size: 0.92em;
  margin: 0 0 28px;
}

.meta .dot { color: var(--fg-soft); margin: 0 8px; }

/* ----- hero block ----- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, #f6f8fa 0%, #eef4ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin: 24px 0 32px;
  box-shadow: var(--shadow-sm);
}

.hero .hero-text { font-size: 1.04em; }
.hero .hero-text p { margin: 8px 0; }
.hero .hero-text p:first-child { margin-top: 0; }
.hero .hero-text strong { color: var(--accent-dark); }

.hero figure {
  margin: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero figure img {
  width: 100%;
  display: block;
}

.hero figcaption {
  font-size: 0.78em;
  color: var(--fg-mute);
  padding: 8px 12px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 24px; }
}

/* ----- key numbers strip ----- */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.kpi .label {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi .value {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.1;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}

.kpi .unit {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--fg-mute);
}

.kpi .note {
  font-size: 0.82em;
  color: var(--fg-mute);
  margin: 0;
}

/* ----- lead paragraph ----- */

.lead {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 24px;
  margin: 24px 0 32px;
  font-size: 1.0em;
  box-shadow: var(--shadow-sm);
}

.lead p { margin: 8px 0; }
.lead p:first-child { margin-top: 0; }
.lead p:last-child { margin-bottom: 0; }

/* ----- callouts ----- */

.callout {
  background: var(--bg-warm);
  border: 1px solid #d4a72c;
  border-left: 4px solid #d4a72c;
  border-radius: var(--radius);
  padding: 16px 22px;
  margin: 24px 0;
  font-size: 0.94em;
  box-shadow: var(--shadow-sm);
}

.callout strong { color: #6e5500; }

/* ----- buttons / CTAs ----- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--accent);
  color: white !important;
  font-weight: 600;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid var(--accent-dark);
  box-shadow: var(--shadow-md);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  text-decoration: none !important;
  letter-spacing: 0.005em;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn .arrow { font-size: 1.2em; line-height: 1; }
.btn .meta-inline {
  font-weight: 400;
  font-size: 0.82em;
  opacity: 0.85;
  margin-left: 6px;
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin: 22px 0 8px;
}

.btn-row .meta-side {
  font-size: 0.86em;
  color: var(--fg-mute);
}

/* big CTA panel — used to launch a report from a section page */

.cta-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 30px;
  margin: 28px 0;
  background: linear-gradient(135deg, #1f6feb 0%, #0a3d91 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: white;
}

.cta-panel h3 {
  margin: 0 0 6px;
  color: white;
  font-size: 1.25em;
}

.cta-panel p {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: 0.95em;
}

.cta-panel .btn {
  background: white;
  color: var(--accent-dark) !important;
  border-color: white;
  padding: 16px 28px;
}

.cta-panel .btn:hover {
  background: var(--bg-soft);
  color: var(--accent-dark) !important;
}

@media (max-width: 700px) {
  .cta-panel { grid-template-columns: 1fr; text-align: center; }
}

/* ----- card grid ----- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 22px;
  margin: 28px 0 32px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  text-decoration: none;
}

.card .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .thumb img { transform: scale(1.04); }

.card .body {
  padding: 18px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card .num {
  color: var(--accent);
  font-size: 0.74em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card h3 {
  margin: 6px 0 10px;
  color: var(--fg);
  font-size: 1.18em;
}

.card p {
  margin: 0 0 14px;
  color: var(--fg-mute);
  font-size: 0.92em;
  flex: 1;
}

.card .more {
  font-size: 0.86em;
  font-weight: 600;
  color: var(--accent);
}

.card .more::after {
  content: " →";
  transition: margin-left 0.18s;
}

.card:hover .more::after { margin-left: 4px; }

/* ----- metrics tables ----- */

table.metric {
  border-collapse: collapse;
  font-size: 0.9em;
  margin: 18px 0;
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

table.metric th, table.metric td {
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  text-align: right;
}

table.metric tr:last-child td { border-bottom: 0; }

table.metric th {
  background: var(--bg-soft);
  text-align: center;
  font-weight: 600;
  color: var(--fg);
}

table.metric td.l { text-align: left; }

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78em;
  font-weight: 600;
}
.tag.good { background: #d1f4d9; color: var(--good); }
.tag.bad  { background: #ffd6d3; color: var(--bad); }

/* ----- side-by-side figures ----- */

.fig-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}
.fig-pair figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.fig-pair img { width: 100%; display: block; }
.fig-pair figcaption {
  text-align: center;
  font-size: 0.84em;
  color: var(--fg-mute);
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

@media (max-width: 700px) {
  .fig-pair { grid-template-columns: 1fr; }
}

/* ----- footer ----- */

footer.page-foot {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.86em;
  color: var(--fg-mute);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

footer.page-foot .sep { color: var(--fg-soft); }

@media (max-width: 800px) {
  body { padding: 20px 16px 60px; font-size: 15px; }
  h1 { font-size: 1.9em; }
  h2 { font-size: 1.3em; margin-top: 40px; }
  .hero { padding: 22px; }
  .cta-panel { padding: 20px; }
}
