/*
 * Forfait Country Intelligence Platform
 * Editorial × terminal aesthetic. Navy / Cream / Gold.
 * Distinctive serif display (Fraunces) + IBM Plex Sans body + IBM Plex Mono numbers.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Forfait palette */
  --navy-900: #0A1628;
  --navy-800: #0E1B2C;
  --navy-700: #1A2940;
  --navy-600: #2A3A52;
  --navy-500: #3D4A5C;
  --slate-400: #5C6878;
  --slate-300: #8593A3;
  --slate-200: #B5BFCC;
  --slate-100: #D8DEE6;
  --cream-100: #F7F4ED;
  --cream-200: #EFEADF;
  --cream-300: #E3DCC9;
  --paper: #FAF7F0;

  --gold-700: #8B6914;
  --gold-600: #B58A2F;
  --gold-500: #C9A961;
  --gold-400: #D9BD7E;
  --gold-100: #F0E5C8;

  --signal-red: #B23A48;
  --signal-red-soft: #E8C5C9;
  --olive: #5A6E4A;
  --olive-soft: #D4D9C7;
  --sky: #4A7C9C;
  --sky-soft: #C6DBE6;
  --emerald: #2D6A4F;
  --emerald-soft: #B7D8C5;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  /* Layout */
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 0 rgba(10, 22, 40, 0.08);
  --shadow-md: 0 1px 3px rgba(10, 22, 40, 0.08), 0 2px 8px rgba(10, 22, 40, 0.04);
  --hairline: 1px solid var(--cream-300);
  --hairline-strong: 1px solid var(--slate-200);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 140ms var(--ease);
  --t-med: 240ms var(--ease);
  --t-slow: 420ms var(--ease);
}

/* ------------------------ Reset & base ------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--navy-900);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-700); }

::selection { background: var(--gold-400); color: var(--navy-900); }

/* Scrollbars */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--slate-300); }

/* ------------------------ Top masthead ------------------------ */
.masthead {
  background: var(--navy-900);
  color: var(--cream-100);
  border-bottom: 3px solid var(--gold-500);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--cream-100);
}

.brand-mark .accent { color: var(--gold-500); }

.brand-tag {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-200);
  border-left: 1px solid var(--navy-600);
  padding-left: 12px;
}

.masthead-nav { display: flex; gap: 4px; margin-left: auto; }

.masthead-nav a {
  color: var(--slate-200);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all var(--t-fast);
}
.masthead-nav a:hover {
  color: var(--gold-500);
  background: var(--navy-700);
}
.masthead-nav a.active {
  color: var(--navy-900);
  background: var(--gold-500);
}

.masthead-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-300);
  display: flex;
  gap: 16px;
  margin-left: 16px;
}

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; vertical-align: middle; }
.dot-live { background: var(--emerald); box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2); animation: pulse 2.5s var(--ease) infinite; }
.dot-mock { background: var(--gold-500); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.18); } 50% { box-shadow: 0 0 0 6px rgba(45, 106, 79, 0.06); } }

/* ------------------------ Filter bar ------------------------ */
.filter-bar {
  background: var(--cream-100);
  border-bottom: var(--hairline-strong);
  padding: 16px 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
  font-weight: 500;
}

/* Custom select-style buttons */
.combo {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 0;
  min-width: 220px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.combo:focus-within {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}
.combo input,
.combo select {
  appearance: none;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 8px 28px 8px 10px;
  font-size: 13px;
  width: 100%;
  color: var(--navy-900);
}
.combo select { cursor: pointer; }
.combo::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--slate-400);
  border-bottom: 1.5px solid var(--slate-400);
  transform: rotate(45deg);
  top: 13px;
  pointer-events: none;
}

.year-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.year-range input[type="range"] {
  width: 120px;
  accent-color: var(--navy-700);
}

.btn {
  background: var(--navy-900);
  color: var(--cream-100);
  border: 1px solid var(--navy-900);
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-ghost {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--slate-200);
}
.btn-ghost:hover { background: var(--cream-200); border-color: var(--slate-300); }
.btn-gold {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
  font-weight: 500;
}
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); color: var(--cream-100); }

/* ------------------------ Hero / country chrome ------------------------ */
.hero {
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream-100) 100%);
  padding: 36px 32px 24px;
  border-bottom: var(--hairline);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.hero-flag {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(10, 22, 40, 0.12));
}

.hero-titles { min-width: 0; }
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 4px;
  font-weight: 500;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--navy-900);
}
.hero-sub {
  font-size: 13px;
  color: var(--slate-400);
  margin-top: 8px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-sub span { display: inline-flex; align-items: center; gap: 6px; }
.hero-sub strong { color: var(--navy-700); font-weight: 500; }

.hero-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-400);
}
.hero-meta div { margin-bottom: 4px; }
.hero-meta b { color: var(--navy-900); font-weight: 500; }

/* ------------------------ Pillar tabs ------------------------ */
.pillar-tabs {
  background: var(--paper);
  border-bottom: var(--hairline-strong);
  padding: 0 32px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  position: sticky;
  top: 56px;
  z-index: 40;
}

.pillar-tab {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-400);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.04em;
  transition: all var(--t-fast);
  font-family: inherit;
}
.pillar-tab:hover { color: var(--navy-900); }
.pillar-tab.active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
}
.pillar-tab .count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--slate-300);
  margin-left: 6px;
}

/* ------------------------ Main content ------------------------ */
.main {
  padding: 24px 32px 48px;
  max-width: 1440px;
  margin: 0 auto;
}

/* KPI strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  position: relative;
  transition: all var(--t-fast);
}
.kpi:hover {
  border-color: var(--navy-700);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.kpi-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
  font-weight: 500;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.kpi-unit {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--slate-400);
  font-weight: 400;
  margin-left: 4px;
}
.kpi-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--slate-400);
}
.kpi-change {
  font-weight: 500;
}
.kpi-change.up { color: var(--emerald); }
.kpi-change.down { color: var(--signal-red); }
.kpi-change.neutral { color: var(--slate-400); }
.kpi-sparkline {
  margin-top: 8px;
  height: 28px;
  width: 100%;
}

/* Section heading */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-300);
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}
.section-title .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold-600);
  font-weight: 400;
  margin-right: 10px;
  letter-spacing: 0;
}
.section-sub {
  font-size: 12px;
  color: var(--slate-400);
}

/* Chart grid */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.chart-grid .chart-card.full { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}

.chart-card {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 16px 18px 8px;
  transition: border-color var(--t-fast);
}
.chart-card:hover { border-color: var(--slate-200); }

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.chart-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--navy-900);
  letter-spacing: -0.005em;
}
.chart-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--slate-400);
  letter-spacing: 0.04em;
}
.chart-canvas { height: 320px; width: 100%; margin-top: 6px; }
.chart-foot {
  margin-top: 4px;
  font-size: 11px;
  color: var(--slate-400);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
}

/* Source pills */
.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--cream-200);
  color: var(--navy-700);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--cream-300);
}
.source-pill.worldbank { background: #E8EEF7; border-color: #C5D2E5; color: #1A3A5F; }
.source-pill.imf       { background: #F0E8DC; border-color: #DCC9A8; color: #6B4A1A; }
.source-pill.oecd      { background: #E5EFE8; border-color: #BDD4C3; color: #2D5639; }
.source-pill.who       { background: #EBE3F0; border-color: #C8B5D2; color: #4A2A5C; }
.source-pill.comtrade  { background: #F0E2DD; border-color: #D5B5A8; color: #6B2D1A; }
.source-pill.frankfurter { background: #DDEAF0; border-color: #B0CCD8; color: #1F4A5C; }
.source-pill.eurostat  { background: #DDE7F0; border-color: #B5C8DC; color: #1F3A5C; }
.source-pill.fred      { background: #E8E0DC; border-color: #C8B5A8; color: #5C3F2A; }
.source-pill.missing   { background: #F5E5E7; border-color: #DDB5BA; color: #80222B; }
.source-pill .dot { width: 5px; height: 5px; }

/* Help icon — appears next to chart titles and KPI labels.
   Hover shows the indicator description in a tooltip. */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--slate-200);
  background: var(--paper);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--slate-400);
  cursor: help;
  margin-left: 6px;
  vertical-align: middle;
  transition: all var(--t-fast);
  position: relative;
  font-weight: 500;
  line-height: 1;
}
.help-icon:hover {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}
.help-icon:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-900);
  color: var(--cream-100);
  border-left: 3px solid var(--gold-500);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.55;
  width: 320px;
  max-width: 90vw;
  text-align: left;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.25);
  white-space: normal;
  pointer-events: none;
}
.help-icon:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--navy-900);
  z-index: 100;
}

/* Key-points footer that appears beneath each chart, summarizing peak, trough, trend. */
.key-points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 8px 0 4px;
  border-top: 1px dashed var(--cream-300);
  margin-top: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--slate-400);
}
.key-points b {
  color: var(--navy-700);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 9px;
  margin-right: 4px;
}

/* Coverage badge in section header */
.coverage-badges {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}

/* ------------------------ AI insight panel ------------------------ */
.insight-panel {
  background: var(--navy-900);
  color: var(--cream-100);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 24px 0;
  position: relative;
  border-left: 4px solid var(--gold-500);
}
.insight-eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insight-answer {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--cream-100);
  margin-bottom: 20px;
}
.insight-body { font-size: 13px; line-height: 1.65; color: var(--slate-200); }
.insight-body p { margin: 0 0 12px; }
.insight-body strong { color: var(--gold-500); font-weight: 500; }
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 16px;
}
.insight-cell h4 {
  color: var(--gold-500);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 6px;
}
.insight-cell p { color: var(--slate-100); font-size: 12.5px; line-height: 1.6; }

.insight-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--navy-600);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--slate-300);
}

/* ------------------------ Loading & empty states ------------------------ */
.skeleton {
  background: linear-gradient(90deg, var(--cream-200) 0%, var(--cream-100) 50%, var(--cream-200) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s var(--ease) infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--slate-400);
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy-700);
  margin-bottom: 4px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--navy-900);
  color: var(--cream-100);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  border-left: 3px solid var(--gold-500);
  z-index: 100;
  animation: toast-in 240ms var(--ease);
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------ Footer ------------------------ */
.foot {
  background: var(--navy-900);
  color: var(--slate-300);
  padding: 28px 32px;
  font-size: 11px;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.foot a { color: var(--gold-500); }
.foot strong { color: var(--cream-100); font-weight: 500; }

/* Tooltip overrides for Plotly */
.js-plotly-plot .plotly .modebar { right: 8px !important; top: 4px !important; }
.js-plotly-plot .plotly .modebar-btn path { fill: var(--slate-400) !important; }
.js-plotly-plot .plotly .modebar-btn:hover path { fill: var(--navy-900) !important; }

/* Combo search dropdown */
.search-wrap {
  position: relative;
  min-width: 260px;
}
.search-input {
  width: 100%;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 13px;
  color: var(--navy-900);
}
.search-input:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}
.search-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  max-height: 320px;
  overflow-y: auto;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.12);
  display: none;
}
.search-list.open { display: block; }
.search-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--cream-200);
  transition: background var(--t-fast);
}
.search-item:hover, .search-item.highlighted {
  background: var(--cream-200);
}
.search-item:last-child { border-bottom: 0; }
.search-item .flag { font-size: 18px; line-height: 1; }
.search-item .country-name { color: var(--navy-900); font-weight: 500; flex: 1; }
.search-item .iso { font-family: var(--font-mono); font-size: 10px; color: var(--slate-400); }

/* Compare chip */
.compare-chips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream-200);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  color: var(--navy-900);
}
.chip-remove {
  background: transparent;
  border: 0;
  color: var(--slate-400);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.chip-remove:hover { color: var(--signal-red); }
.chip-add {
  background: transparent;
  border: 1px dashed var(--slate-300);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--slate-400);
  cursor: pointer;
}
.chip-add:hover { color: var(--navy-700); border-color: var(--navy-700); }

/* Framework switcher visual */
.framework-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-100);
  border: 1px solid var(--gold-400);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--gold-700);
  letter-spacing: 0.04em;
  font-weight: 500;
}

@media (max-width: 720px) {
  .masthead, .filter-bar, .hero, .pillar-tabs, .main, .foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero { grid-template-columns: auto 1fr; }
  .hero-meta { display: none; }
  .hero-title { font-size: 28px; }
  .masthead-meta { display: none; }
}

/* ============================================================
 *  STRATEGIC OUTLOOK section
 * ============================================================ */
.strategic-outlook { margin-top: 0; }

.initiatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.initiative-card {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  border-left: 3px solid var(--gold-500);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--t-fast);
}
.initiative-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ini-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ini-icon {
  font-size: 22px;
  color: var(--gold-500);
  line-height: 1;
  margin-top: 2px;
  width: 28px;
  flex-shrink: 0;
}
.ini-title-block { flex: 1; min-width: 0; }
.ini-category {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-700);
  font-weight: 500;
  margin-bottom: 3px;
}
.regional-tag {
  display: inline-block;
  background: var(--cream-200);
  color: var(--slate-400);
  padding: 1px 6px;
  margin-left: 8px;
  border-radius: 3px;
  font-size: 8px;
  letter-spacing: 0.1em;
}
.ini-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--navy-900);
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.ini-summary {
  font-size: 12.5px;
  color: var(--slate-500);
  line-height: 1.55;
}

.ini-impacts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.impacts-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-300);
  font-weight: 500;
  margin-right: 4px;
}
.indicator-impact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-100);
  border: 1px solid var(--cream-300);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--slate-400);
  letter-spacing: 0.02em;
}
.indicator-impact.impact-up   { color: var(--emerald); border-color: rgba(45,106,79,0.3); background: rgba(45,106,79,0.07); }
.indicator-impact.impact-down { color: var(--signal-red); border-color: rgba(178,58,72,0.3); background: rgba(178,58,72,0.07); }

.ini-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--cream-300);
  font-family: var(--font-mono);
  font-size: 10px;
}
.ini-timeline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-400);
}
.ini-year {
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--cream-200);
  font-weight: 500;
}
.ini-year.ini-target { background: var(--navy-900); color: var(--gold-500); }
.ini-arrow { color: var(--slate-300); }
.ini-years-left {
  font-size: 9px;
  color: var(--slate-300);
  letter-spacing: 0.04em;
  margin-left: 4px;
}
.ini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ini-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ini-source-link, .ini-scenario-link {
  color: var(--gold-600);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.ini-source-link:hover, .ini-scenario-link:hover { color: var(--gold-500); }

/* News list */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.news-item {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 11px 14px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all var(--t-fast);
  border-left: 3px solid transparent;
}
.news-item:hover {
  border-left-color: var(--gold-500);
  background: var(--cream-100);
}
.news-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--slate-300);
  letter-spacing: 0.04em;
}
.news-domain { color: var(--gold-700); }
.news-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.4;
}

/* Channels grid */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.channel-card {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all var(--t-fast);
}
.channel-card:hover {
  border-color: var(--gold-500);
  transform: translateY(-1px);
}
.channel-icon { font-size: 20px; }
.channel-block { flex: 1; min-width: 0; }
.channel-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
  font-weight: 500;
}
.channel-name {
  font-size: 12.5px;
  color: var(--navy-800);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-arrow {
  color: var(--gold-500);
  font-size: 16px;
}

/* ============================================================
 *  EMBED MODE — minimal chrome for iframe integration into
 *  external portals (e.g. the Forfait Resumption Pack portal).
 *  Activated by adding ?embed=1 to any page URL.
 * ============================================================ */
body.embed .masthead,
body.embed .foot {
  display: none !important;
}
body.embed .hero {
  padding-top: 16px;
  padding-bottom: 14px;
}
body.embed .main {
  padding-top: 12px;
}

/* ============================================================
 *  CROSS-SOURCE comparison badge — appears under critical
 *  charts (GDP, inflation, debt, etc.) showing whether multiple
 *  sources agree, with deviation note + per-source values.
 * ============================================================ */
.cross-source {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  border-radius: 4px;
  border-left: 3px solid;
}
.cross-source.cs-good {
  background: rgba(45,106,79,0.07);
  border-color: var(--emerald);
  color: var(--emerald);
}
.cross-source.cs-warn {
  background: rgba(201,169,97,0.10);
  border-color: var(--gold-500);
  color: var(--gold-700);
}
.cross-source.cs-bad {
  background: rgba(178,58,72,0.07);
  border-color: var(--signal-red);
  color: var(--signal-red);
}
.cross-source .cs-icon {
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.cross-source .cs-note {
  font-weight: 500;
  letter-spacing: 0.02em;
}
.cross-source .cs-details {
  color: var(--slate-400);
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .cross-source { grid-template-columns: auto 1fr; }
  .cross-source .cs-details { grid-column: 1 / -1; padding-top: 4px; }
}

/* Initiative progress badge — appears on each initiative card with
   actual changes since the announcement year on its target indicators. */
.ini-progress {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--cream-100);
  border-left: 3px solid var(--gold-500);
  border-radius: 3px;
  font-size: 11px;
}
.ini-progress-head {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--gold-700);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.ini-progress-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.ini-progress-bar .dot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.ini-progress-bar .dot.on { background: var(--emerald); }
.ini-progress-bar .dot.off { background: var(--cream-300); }

.ini-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 3px 0;
  font-family: var(--font-mono);
}
.ini-progress-row .lbl { color: var(--slate-500); font-size: 10.5px; }
.ini-progress-row .change { font-weight: 500; font-size: 11px; }
.ini-progress-row .change.up { color: var(--emerald); }
.ini-progress-row .change.down { color: var(--signal-red); }
.ini-progress-row .change.neutral { color: var(--slate-400); }

/* ============================================================
 *  CRAWLER VISIBILITY indicator — proves to the user that the
 *  GDELT crawler IS embedded and active, regardless of whether
 *  it returned articles for this country / time window.
 * ============================================================ */
.crawler-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  border-left: 3px solid;
}
.crawler-indicator.crawler-ok {
  background: rgba(45,106,79,0.07);
  border-color: var(--emerald);
  color: var(--emerald);
}
.crawler-indicator.crawler-empty {
  background: rgba(201,169,97,0.10);
  border-color: var(--gold-500);
  color: var(--gold-700);
}
.crawler-indicator .crawler-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: crawler-pulse 2s ease-in-out infinite;
}
@keyframes crawler-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px transparent; }
}
.crawler-indicator .crawler-label { font-weight: 500; }
.crawler-indicator .crawler-query {
  margin-left: auto;
  color: var(--slate-400);
  font-size: 9.5px;
  font-style: italic;
}
@media (max-width: 700px) {
  .crawler-indicator { flex-wrap: wrap; }
  .crawler-indicator .crawler-query { margin-left: 0; flex-basis: 100%; }
}

/* PDF export: hide chrome while html2pdf is rendering */
body.pdf-export .masthead,
body.pdf-export .filter-bar,
body.pdf-export .foot,
body.pdf-export .pillar-tabs { display: none !important; }
