@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap');

/* HFF evidence map — static app styles
   Ink-and-paper editorial look: deep navy chrome, warm paper background,
   serif display headings (Newsreader) over Inter body text. */

:root {
  --hff-ink: #10243e;
  --hff-ink-soft: #33475f;
  --hff-paper: #faf9f6;
  --hff-line: #e7e3da;
  --hff-muted: #6b7280;
  --hff-accent: #1f5fa8;
  --hff-gold: #b08d3e;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--hff-paper);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--hff-ink);
}

h1, h2, h3, h4, h5,
.card-header, .value-box .value-box-title {
  font-family: 'Newsreader', Georgia, serif;
}

/* ---- chrome ---- */
.navbar {
  background: linear-gradient(95deg, #0d1f36 0%, #16324f 100%);
  box-shadow: 0 1px 10px rgba(13, 31, 54, .28);
  padding: .35rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar .navbar-brand {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0;
  color: #f4f1ea;
  text-decoration: none;
  margin-right: .5rem;
  white-space: nowrap;
}
.navbar .navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.navbar .nav-link {
  color: rgba(232, 236, 243, .82);
  background: none;
  border: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: .015em;
  border-radius: 8px;
  padding: .42rem .8rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  text-decoration: none;
}
.navbar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.navbar .nav-link.active {
  color: #fff;
  background: rgba(176, 141, 62, .28);
  box-shadow: inset 0 -2px 0 var(--hff-gold);
}
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: .45rem; }
.nav-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}
.nav-dropdown.open .nav-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  width: 270px;
  padding: .35rem 0;
  background: #fff;
  border: 1px solid var(--hff-line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(13, 31, 54, .2);
  overflow: hidden;
  z-index: 1100;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-theme-link {
  display: block;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  background: #fff;
  color: var(--hff-ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: .95rem;
  text-align: left;
  padding: .6rem 1rem;
  cursor: pointer;
}
.nav-theme-link:hover,
.nav-theme-link:focus-visible {
  background: #f6f4ee;
  border-left-color: var(--hff-gold);
  outline: none;
}
.navbar-text { color: rgba(232, 236, 243, .55); font-size: .8rem; margin-left: auto; }
.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  margin-left: auto;
  padding: 0 .65rem;
  gap: .3rem;
  border: 1px solid rgba(232, 236, 243, .32);
  border-radius: 6px;
  color: #f4f1ea;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}
.project-link:hover,
.project-link:focus-visible { background: rgba(255, 255, 255, .1); outline: 2px solid var(--hff-gold); }
.project-link + .navbar-text { margin-left: 0; }

@media (max-width: 760px) {
  .navbar { align-items: flex-start; gap: .5rem; }
  .navbar .navbar-brand { width: 100%; }
  .navbar .navbar-nav { align-items: flex-start; }
  .nav-dropdown-menu { position: fixed; top: auto; left: 1rem; right: 1rem; width: auto; }
  .navbar-text { display: none; }
}

main { padding: 1.4rem 1.5rem 2.5rem; max-width: 1500px; margin: 0 auto; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- cards ---- */
.card {
  background: #fff;
  border: 1px solid var(--hff-line);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16, 36, 62, .05);
  margin-bottom: 1.2rem;
  overflow: hidden;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--hff-line);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: .01em;
  color: var(--hff-ink);
  padding: .8rem 1.1rem;
}
.card-body { padding: 1rem 1.1rem; }
.card-body.p-0 { padding: 0; }

/* ---- layout grids ---- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-2 > .card { margin-bottom: .2rem; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } }

/* ---- overview ---- */
.hero-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--hff-ink);
  margin: 0 0 .6rem;
  line-height: 1.25;
}
.hero-text {
  max-width: 85ch;
  color: var(--hff-ink-soft);
  font-size: .98rem;
  line-height: 1.65;
  margin: 0 0 .5rem;
}
.hero-img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  border-radius: 13px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hero-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 36, 62, .14);
}
.glance-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--hff-ink);
  margin: 1.5rem 0 .8rem;
}
.overview-trend-card,
.overview-analysis-card { border-radius: 8px; }
.overview-trend-card { margin-bottom: 1rem; }
.overview-trend-plot { height: 260px; }
.overview-trend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header-link {
  padding: .2rem 0;
  border: 0;
  background: transparent;
  color: var(--hff-accent);
  cursor: pointer;
  font: 600 .78rem/1.3 'Inter', system-ui, sans-serif;
}
.card-header-link:hover { text-decoration: underline; }
.card-header-link:focus-visible { outline: 2px solid var(--hff-accent); outline-offset: 3px; }
.overview-trend-note {
  margin: -.35rem .2rem .1rem;
  color: var(--hff-muted);
  font-size: .76rem;
}
.overview-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.overview-analysis-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.overview-analysis-card-wide { grid-column: 1 / -1; }
.overview-analysis-body-wide { height: min(52vw, 680px); }
.overview-analysis-body {
  height: 360px;
  min-height: 0;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: .75rem;
  overflow: hidden;
}
.overview-figure-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}
.overview-figure-button:focus-visible {
  outline: 3px solid var(--hff-accent);
  outline-offset: 3px;
}
.overview-analysis-figure {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 1050px) {
  .overview-analysis-grid { grid-template-columns: 1fr; }
  .overview-analysis-body { height: min(68vw, 520px); }
  .overview-analysis-body-wide { height: min(68vw, 620px); }
}

/* ---- value boxes ---- */
.value-box {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 1px 3px rgba(16, 36, 62, .08);
  color: #fff;
  padding: .9rem 1.1rem;
  min-height: 92px;
}
.value-box .value-box-title {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: .85;
  margin-bottom: .35rem;
}
.value-box .value-box-value { font-size: 1.55rem; font-weight: 600; line-height: 1.15; }
.value-box .value-box-sub { font-size: .78rem; opacity: .8; margin-top: .25rem; }
.value-box.bg-secondary { background: linear-gradient(120deg, #46586e, #33475f); }
.value-box.bg-primary   { background: linear-gradient(120deg, #2468b2, #1a4e8a); }
.value-box.bg-info      { background: linear-gradient(120deg, #2a8fc4, #1f6f9c); }
.value-box.bg-success   { background: linear-gradient(120deg, #1baf7a, #148c62); }

/* ---- overview summary ---- */
.overview-intro {
  padding: 1.7rem 1rem 1.2rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--hff-line);
}
.overview-intro .hero-title {
  max-width: 1800px;
  margin: 0 auto;
  color: var(--hff-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
.overview-kicker {
  margin-bottom: .45rem;
  color: var(--hff-gold);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.overview-update {
  margin-top: .55rem;
  color: var(--hff-muted);
  font-size: .76rem;
  font-weight: 600;
  text-align: center;
}
.overview-intro .hero-text {
  max-width: 1800px;
  margin: 1rem auto 0;
  color: var(--hff-ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}
.overview-intro .hero-actions-copy {
  max-width: 1800px;
  margin: .65rem auto 0;
  color: var(--hff-muted);
  font-size: .9rem;
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;
}
.overview-intro .hero-actions-copy strong {
  color: var(--hff-ink-soft);
  font-weight: 600;
}
.overview-intro .glance-title {
  margin: 2rem 0 1rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
#ov-tiles {
  display: grid;
  grid-template-columns: repeat(48, minmax(0, 1fr));
  gap: .85rem;
  margin: 0;
}
#ov-tiles .value-box {
  --tile-accent: #2b6cae;
  --tile-bg: #f1f6fb;
  position: relative;
  grid-column: span 11;
  min-width: 0;
  min-height: 106px;
  padding: 1rem 1rem .9rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tile-accent) 22%, white);
  border-radius: 8px;
  background: var(--tile-bg);
  box-shadow: 0 4px 14px rgba(16, 36, 62, .06);
  color: var(--hff-ink);
}
#ov-tiles .value-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--tile-accent);
}
#ov-tiles .value-box:nth-child(1) { --tile-accent: #2769a8; --tile-bg: #f0f6fc; }
#ov-tiles .value-box:nth-child(2) { --tile-accent: #a77b25; --tile-bg: #fbf7ed; }
#ov-tiles .value-box:nth-child(3) { --tile-accent: #b05b47; --tile-bg: #fbf2ef; }
#ov-tiles .value-box:nth-child(4) { --tile-accent: #7b668c; --tile-bg: #f7f3f8; }
#ov-tiles .value-box:nth-child(5) { --tile-accent: #16869a; --tile-bg: #eef8f8; }
#ov-tiles .value-box:nth-child(6) { --tile-accent: #53687d; --tile-bg: #f2f5f7; }
#ov-tiles .value-box:nth-child(7) { --tile-accent: #25835f; --tile-bg: #eff8f3; }
#ov-tiles .value-box:nth-child(8) { --tile-accent: #287f91; --tile-bg: #eff8fa; }
#ov-tiles .value-box:nth-child(9) { --tile-accent: #7b668c; --tile-bg: #f7f3f8; }
#ov-tiles .value-box:nth-child(4) { grid-column: span 15; }
#ov-tiles .value-box:nth-child(n+5) { grid-column: span 16; }
#ov-tiles .value-box,
#ov-tiles .value-box:nth-child(4),
#ov-tiles .value-box:nth-child(n+5) { grid-column: span 16; }
#ov-tiles .value-box .value-box-title {
  margin: 0 0 .55rem;
  color: var(--tile-accent);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: 1;
}
.value-box-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}
.value-box-title-row .value-box-title { flex: 1; }
.coverage-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
}
.coverage-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}
.coverage-metric-title {
  display: flex;
  min-height: 3.2em;
  align-items: flex-start;
  gap: .4rem;
}
.coverage-metric-title .value-box-title { flex: 1; }
.coverage-metric + .coverage-metric {
  margin-left: .8rem;
  padding-left: .8rem;
  border-left: 1px solid color-mix(in srgb, var(--tile-accent) 28%, white);
}
.metric-help-button {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--tile-accent);
  font: 700 .72rem/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
}
.metric-help-button:hover { background: color-mix(in srgb, var(--tile-accent) 10%, white); }
.metric-help-button:focus-visible { outline: 2px solid var(--tile-accent); outline-offset: 2px; }
.overview-nav-card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.overview-nav-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 36, 62, .11); }
.overview-nav-card:focus-visible { outline: 2px solid var(--tile-accent); outline-offset: 3px; }
#ov-tiles .value-box .value-box-value {
  color: var(--hff-ink);
  font-size: 1.75rem;
  font-weight: 600;
}
#ov-tiles .value-box .value-box-sub {
  color: var(--hff-muted);
  font-size: .76rem;
  opacity: 1;
}
#ov-tiles .value-box.analysis-approach-card {
  grid-column: span 16;
  min-height: 0;
  --tile-accent: #25835f;
  --tile-bg: #eff8f3;
}
#ov-tiles .value-box:nth-child(5),
#ov-tiles .value-box:nth-child(6),
#ov-tiles .value-box:nth-child(7) { grid-column: span 16; }
.analysis-approach-bar {
  display: flex;
  width: 100%;
  height: 18px;
  margin: .65rem 0 .75rem;
  overflow: hidden;
  border-radius: 4px;
  background: #dfe7e4;
}
.analysis-approach-segment + .analysis-approach-segment { border-left: 2px solid #fff; }
.analysis-quantitative { background: linear-gradient(90deg, #356fa8, #1f5fa8); }
.analysis-qualitative { background: linear-gradient(90deg, #79bda6, #2f8b73); }
.analysis-mixed { background: linear-gradient(90deg, #b79bcb, #7b668c); }
.analysis-approach-metrics {
  display: flex;
  width: 100%;
  gap: 0;
}
.analysis-approach-metric {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: .04rem;
  padding-top: .32rem;
  border-top: 3px solid transparent;
  color: var(--hff-ink-soft);
  font-size: .8rem;
  text-align: center;
}
.analysis-metric-quantitative { border-color: #1f5fa8; }
.analysis-metric-qualitative { border-color: #2f8b73; }
.analysis-metric-mixed {
  align-items: flex-end;
  border-color: #7b668c;
  text-align: right;
}
.analysis-approach-metric span {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.1;
}
.analysis-approach-metric strong {
  color: var(--hff-ink);
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}
.analysis-approach-note {
  margin-top: .65rem;
  color: var(--hff-muted);
  font-size: .7rem;
}
.geo-scope-card { --tile-accent: #53687d; --tile-bg: #f2f5f7; }
.geo-scope-bar {
  display: flex;
  width: 100%;
  height: 30px;
  margin: .7rem 0 .75rem;
  overflow: hidden;
  border-radius: 5px;
  background: #d9e1e7;
}
.geo-scope-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.geo-scope-single { background: linear-gradient(90deg, #356fa8, #1f5fa8); }
.geo-scope-other { background: linear-gradient(90deg, #79bda6, #2f8b73); }
.geo-scope-labels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  color: var(--hff-ink-soft);
  font-size: .74rem;
  line-height: 1.3;
}
.geo-scope-labels strong,
.geo-scope-labels span { display: block; }
.geo-scope-labels strong { margin-bottom: .15rem; color: var(--hff-ink); }
.coverage-metric-insight {
  margin-top: .35rem;
  color: var(--hff-muted);
  font-size: .68rem;
  line-height: 1.3;
}
.publication-access-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.publication-access-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.publication-access-metric + .publication-access-metric {
  padding-left: .8rem;
  border-left: 1px solid color-mix(in srgb, var(--tile-accent) 28%, white);
}
.publication-access-metric span {
  min-height: 2.2em;
  color: var(--hff-ink-soft);
  font-size: .7rem;
  font-weight: 650;
}
.publication-access-metric strong {
  color: var(--hff-ink);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
}
.publication-access-metric small {
  margin-top: .15rem;
  color: var(--hff-muted);
  font-size: .64rem;
}
#ov-tiles .value-box.funding-overview-card,
#ov-tiles .value-box.analysis-approach-card {
  grid-column: span 24;
  min-height: 148px;
}
.funding-overview-chart { display: grid; gap: .32rem; }
.funding-overview-row {
  display: grid;
  grid-template-columns: minmax(9.2rem, 1.25fr) minmax(5rem, 2fr) 3.2rem;
  align-items: center;
  gap: .55rem;
  font-size: .68rem;
}
.funding-overview-label {
  overflow: hidden;
  color: var(--hff-ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.funding-overview-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e4dfea;
}
.funding-overview-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a590b5, #705a84);
}
.funding-overview-row strong {
  color: var(--hff-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.funding-overview-note {
  margin-top: .45rem;
  color: var(--hff-muted);
  font-size: .64rem;
}
@media (max-width: 700px) {
  .analysis-approach-metric { font-size: .72rem; }
  .geo-scope-labels { grid-template-columns: 1fr; }
  .funding-overview-row { grid-template-columns: minmax(7rem, 1.3fr) minmax(3rem, 1fr) 3rem; }
}
.overview-data-note {
  width: 100%;
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--hff-line);
  color: var(--hff-muted);
  text-align: left;
}
.overview-data-note-title {
  color: var(--hff-ink-soft);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.overview-data-note p {
  margin: .4rem 0 0;
  font-size: .8rem;
  line-height: 1.55;
}
.overview-data-note strong { color: var(--hff-ink-soft); font-weight: 600; }
@media (max-width: 980px) {
  .overview-intro .hero-actions-copy { white-space: normal; }
  #ov-tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  #ov-tiles .value-box,
  #ov-tiles .value-box:nth-child(4),
  #ov-tiles .value-box:nth-child(n+5) { grid-column: span 6; }
  #ov-tiles .value-box:last-child { grid-column: 4 / span 6; }
  #ov-tiles .value-box.analysis-approach-card,
  #ov-tiles .value-box.funding-overview-card { grid-column: span 6; }
}
@media (max-width: 620px) {
  .overview-intro { padding: 1.1rem 0 .8rem; }
  .overview-intro .hero-title { font-size: 1.65rem; text-align: left; }
  .overview-intro .hero-text { text-align: left; }
  .overview-intro .hero-actions-copy { text-align: left; }
  .overview-intro .glance-title { text-align: left; }
  #ov-tiles .value-box,
  #ov-tiles .value-box:nth-child(4),
  #ov-tiles .value-box:nth-child(n+5),
  #ov-tiles .value-box:last-child { grid-column: 1 / -1; }
  #ov-tiles .value-box.analysis-approach-card,
  #ov-tiles .value-box.funding-overview-card { grid-column: 1 / -1; }
}

/* ---- thematic analysis ---- */
.thematic-wrap { max-width: 1400px; margin: 0 auto; padding: .5rem .25rem 2rem; }
.thematic-hero {
  position: relative;
  min-height: 245px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 1.4rem .8rem 1.8rem;
}
.thematic-hero-copy { position: relative; z-index: 1; max-width: 720px; }
.thematic-eyebrow {
  color: var(--hff-gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .7rem;
}
.thematic-hero h1 {
  max-width: 19ch;
  margin: 0;
  color: var(--hff-ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 2.45rem;
  font-weight: 600;
  line-height: 1.06;
}
.thematic-hero p {
  max-width: 62ch;
  margin: .8rem 0 0;
  color: var(--hff-ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.thematic-hero-map {
  position: absolute;
  right: -2%;
  top: 50%;
  width: min(58%, 780px);
  height: 118%;
  object-fit: contain;
  object-position: right center;
  opacity: .11;
  transform: translateY(-50%);
  pointer-events: none;
}
.thematic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}
.thematic-card {
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: .7rem;
  border: 1px solid var(--hff-line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.thematic-card:hover,
.thematic-card:focus-visible {
  transform: translateY(-3px);
  border-color: #d6c9aa;
  box-shadow: 0 12px 26px rgba(16, 36, 62, .12);
  outline: none;
}
.thematic-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  background: #f8f7f3;
  border-radius: 6px;
}
.thematic-card-body { display: flex; flex: 1; flex-direction: column; padding: .9rem .25rem .15rem; }
.thematic-card-title {
  margin: 0;
  color: var(--hff-ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.15;
}
.thematic-card-count {
  margin-top: .35rem;
  color: var(--hff-gold);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.thematic-card-description {
  margin: .75rem 0 1rem;
  color: var(--hff-muted);
  font-size: .84rem;
  line-height: 1.5;
}
.thematic-card-arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  align-self: flex-end;
  margin-top: auto;
  border-radius: 50%;
  background: var(--hff-gold);
  color: #fff;
  font-size: 1.1rem;
}
@media (max-width: 1180px) { .thematic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .thematic-hero { min-height: 0; padding: 1rem .25rem 1.5rem; }
  .thematic-hero h1 { font-size: 2rem; }
  .thematic-hero-map { width: 85%; opacity: .06; }
  .thematic-grid { grid-template-columns: 1fr; }
  .thematic-card { min-height: 0; }
}

/* ---- gallery ---- */
.theme-wrap { max-width: 1400px; margin: 0 auto; padding: .5rem .25rem 2rem; }
.theme-blurb {
  max-width: 78ch;
  color: var(--hff-ink-soft);
  font-size: .95rem;
  line-height: 1.65;
  margin: .25rem 0 1.5rem;
  padding-left: .9rem;
  border-left: 3px solid var(--hff-gold);
}
.fig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.4rem;
}
.fig-card {
  background: #fff;
  border: 1px solid var(--hff-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 36, 62, .05);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.fig-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 36, 62, .14);
}
.fig-card img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  background: #fff;
  border-bottom: 1px solid var(--hff-line);
}
.fig-body { padding: .85rem 1.05rem 1rem; }
.fig-title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--hff-ink);
}
.fig-caption {
  color: var(--hff-muted);
  font-size: .82rem;
  line-height: 1.5;
  margin-top: .3rem;
}
.fig-footnote {
  color: var(--hff-muted);
  font-size: .74rem;
  line-height: 1.4;
  margin-top: .45rem;
  font-style: italic;
}
.section-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.section-card {
  background: #fff;
  border: 1px solid var(--hff-line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  text-align: left;
  font: inherit;
  color: inherit;
}
.section-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 36, 62, .14);
}
.section-card .sec-title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--hff-ink);
}
.section-card .sec-count { font-size: .78rem; color: var(--hff-gold); text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }
.back-link {
  background: none;
  border: none;
  color: var(--hff-accent);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: .8rem;
}
.back-link:hover { text-decoration: underline; }

/* ---- figure modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 31, 54, .55);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 3vh 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-dialog { width: min(1480px, 97vw); }
.modal-content {
  border-radius: 16px;
  border: 1px solid var(--hff-line);
  background: #fff;
  box-shadow: 0 24px 64px rgba(13, 31, 54, .35);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.3rem;
  border-bottom: 1px solid var(--hff-line);
}
.modal-title { font-family: 'Newsreader', Georgia, serif; font-weight: 600; font-size: 1.2rem; color: var(--hff-ink); margin: 0; }
.modal-close {
  background: none;
  border: 1px solid var(--hff-line);
  border-radius: 8px;
  font: inherit;
  font-size: .85rem;
  color: var(--hff-ink-soft);
  padding: .3rem .8rem;
  cursor: pointer;
}
.modal-close:hover { background: #f1eee7; }
.modal-body { padding: 1.1rem 1.3rem 1.3rem; }
.figure-modal-actions,
.figure-zoom-controls {
  display: flex;
  align-items: center;
}
.figure-modal-actions { gap: .75rem; }
.figure-zoom-controls {
  gap: .2rem;
  padding: .18rem;
  border: 1px solid var(--hff-line);
  border-radius: 7px;
  background: #f8f7f3;
}
.figure-zoom-button,
.figure-zoom-level {
  height: 1.9rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--hff-ink);
  cursor: pointer;
}
.figure-zoom-button {
  width: 1.9rem;
  font-size: 1.2rem;
  line-height: 1;
}
.figure-zoom-level {
  min-width: 3.25rem;
  padding: 0 .35rem;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.figure-zoom-button:hover,
.figure-zoom-level:hover { background: #e9eef1; }
.figure-zoom-button:disabled {
  opacity: .35;
  cursor: default;
  background: transparent;
}
.figure-zoom-button:focus-visible,
.figure-zoom-level:focus-visible { outline: 2px solid var(--hff-accent); outline-offset: 1px; }
.figure-zoom-viewport {
  max-height: 74vh;
  overflow: auto;
  border: 1px solid var(--hff-line);
  background: var(--hff-paper);
}
.info-modal-dialog { width: min(720px, 96vw); }
.info-modal-body { color: var(--hff-ink-soft); line-height: 1.65; }
.info-modal-body p { margin: 0 0 1rem; }
.info-modal-link { color: var(--hff-accent); font-weight: 600; }
.modal-fig { width: 100%; max-width: none; display: block; margin: 0 auto; }
@media (max-width: 620px) {
  .modal-header { align-items: flex-start; gap: .6rem; }
  .figure-modal-actions { gap: .35rem; }
  .figure-zoom-level { min-width: 2.8rem; }
}
.study-list { max-height: 65vh; overflow-y: auto; }
.study-entry { padding: .9rem 0; border-bottom: 1px solid var(--hff-line); }
.study-entry:first-child { padding-top: 0; }
.study-entry:last-child { border-bottom: none; padding-bottom: 0; }
.study-entry-title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--hff-ink);
  margin: 0 0 .35rem;
}
.study-entry-abstract { color: var(--hff-ink-soft); line-height: 1.6; white-space: pre-line; margin: 0; }
.study-abstract { color: var(--hff-ink-soft); line-height: 1.6; white-space: pre-line; }

/* ---- explorer ---- */
.explorer-layout { display: flex; gap: 1.3rem; align-items: flex-start; }
.sidebar {
  background: #f6f4ee;
  border: 1px solid var(--hff-line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  width: 300px;
  flex: 0 0 300px;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.sidebar-title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--hff-ink);
  margin: 0 0 .9rem;
}
.explorer-main { flex: 1 1 auto; min-width: 0; }
@media (max-width: 980px) {
  .explorer-layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; position: static; max-height: none; }
}
.sidebar .control-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--hff-ink-soft);
  margin: 0 0 .35rem;
}
.sidebar .control-group { margin-bottom: .9rem; }
.sidebar hr { border: none; border-top: 1px solid var(--hff-line); margin: 1rem 0; }
.sidebar .text-muted { color: var(--hff-muted); font-size: .78rem; line-height: 1.5; }

.form-select {
  width: 100%;
  border-radius: 9px;
  border: 1px solid var(--hff-line);
  background: #fff;
  font: inherit;
  font-size: .88rem;
  color: var(--hff-ink);
  padding: .38rem .6rem;
}
.form-select:focus {
  border-color: var(--hff-accent);
  box-shadow: 0 0 0 .18rem rgba(31, 95, 168, .14);
  outline: none;
}

.radio-inline { display: flex; gap: .8rem; flex-wrap: wrap; }
.radio-inline label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  color: var(--hff-ink-soft);
  cursor: pointer;
}
.radio-inline input { accent-color: var(--hff-accent); }

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--hff-muted);
  color: var(--hff-ink-soft);
  border-radius: 8px;
  font: inherit;
  font-size: .82rem;
  padding: .35rem .8rem;
  cursor: pointer;
  margin-top: .5rem;
}
.btn-outline-secondary:hover { background: #ece8df; }

.chart-toolbar { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; align-items: flex-end; }
.chart-toolbar .tb-field { display: flex; flex-direction: column; gap: .25rem; }
.chart-toolbar .tb-field.wide { flex: 1 1 180px; }
.chart-toolbar label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hff-muted);
}
.chart-toolbar .form-select { width: auto; min-width: 160px; }

.plot { width: 100%; }

/* tom-select theming */
.ts-wrapper .ts-control {
  border-radius: 9px;
  border-color: var(--hff-line);
  font-size: .88rem;
  background: #fff;
}
.ts-wrapper.focus .ts-control {
  border-color: var(--hff-accent);
  box-shadow: 0 0 0 .18rem rgba(31, 95, 168, .14);
}
.ts-wrapper .ts-control > .item {
  background: #e8eef6;
  color: var(--hff-ink);
  border-radius: 6px;
  font-size: .8rem;
}
.ts-dropdown {
  border-radius: 10px;
  border-color: var(--hff-line);
  font-size: .88rem;
}
.ts-dropdown .active { background: #eef2f7; }

/* noUiSlider theming */
.noUi-target { background: #ece8df; border: none; box-shadow: none; height: 6px; }
.noUi-connect { background: var(--hff-accent); }
.noUi-handle {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--hff-accent);
  box-shadow: 0 1px 4px rgba(16, 36, 62, .25);
  cursor: grab;
  top: -7px;
}
.noUi-handle:before, .noUi-handle:after { display: none; }
.slider-wrap { padding: .6rem .5rem .2rem; }
.slider-readout { font-size: .82rem; color: var(--hff-ink-soft); font-weight: 600; margin-top: .5rem; text-align: center; }

/* ---- tables ---- */
.table-wrap { max-height: 420px; overflow-y: auto; }
table.dataTable { width: 100%; border-collapse: collapse; }
table.dataTable thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hff-ink-soft);
  border-bottom: 2px solid var(--hff-line);
  text-align: left;
  padding: .5rem .6rem;
  position: sticky;
  top: 0;
  background: #fff;
}
table.dataTable tbody td {
  font-size: .88rem;
  color: var(--hff-ink-soft);
  border-bottom: 1px solid var(--hff-line);
  padding: .42rem .6rem;
}
table.dataTable tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dataTable thead th.num { text-align: right; }

/* ---- country views ---- */
.country-view-tabs {
  display: flex;
  gap: .35rem;
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--hff-line);
}
.country-view-tab {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--hff-muted);
  cursor: pointer;
  font: 600 .9rem/1.2 'Inter', system-ui, sans-serif;
  padding: .62rem .9rem;
}
.country-view-tab:hover { background: #f2f5f7; color: var(--hff-ink); }
.country-view-tab.active { background: var(--hff-ink); color: #fff; }

/* ---- plotly ---- */
.js-plotly-plot .plotly .main-svg { font-family: 'Inter', sans-serif !important; }

/* ---- country fact list (sidebar definition list) ---- */
.fact-list { margin-bottom: 0; }
.fact-list dt {
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--hff-muted);
  margin-top: .7rem;
}
.fact-list dd {
  font-size: .95rem;
  color: var(--hff-ink);
  font-weight: 500;
  margin: 0;
}

/* ---- methods tab ---- */
.methods-wrap { max-width: 1200px; margin: 0 auto; padding: .5rem .25rem 2rem; }
.methods-tabs {
  display: flex;
  gap: .35rem;
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--hff-line);
  overflow-x: auto;
}
.methods-tab {
  flex: 0 0 auto;
  padding: .5rem .75rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--hff-muted);
  font: 600 .84rem/1.2 'Inter', system-ui, sans-serif;
  cursor: pointer;
}
.methods-tab:hover { color: var(--hff-ink); background: #f3f5f7; }
.methods-tab.active {
  border-color: color-mix(in srgb, var(--hff-accent) 30%, white);
  background: #eef5fb;
  color: var(--hff-accent);
}
.methods-panel { display: none; }
.methods-panel.active { display: block; }
.methods-wrap .card { margin-bottom: 1.2rem; }
.methods-wrap p {
  color: var(--hff-ink-soft);
  font-size: .94rem;
  line-height: 1.6;
}
.methods-table { width: 100%; border-collapse: collapse; margin: .4rem 0 .6rem; }
.methods-table th {
  text-transform: uppercase;
  font-size: .74rem;
  letter-spacing: .05em;
  color: var(--hff-muted);
  font-weight: 600;
  text-align: left;
  padding: .45rem .6rem;
  border-bottom: 1px solid var(--hff-line);
}
.methods-table td {
  padding: .45rem .6rem;
  font-size: .92rem;
  color: var(--hff-ink-soft);
  border-bottom: 1px solid var(--hff-line);
  text-align: left;
}
.methods-table td:first-child { text-align: left; }
.methods-note { font-size: .8rem; color: var(--hff-muted); margin-top: .5rem; }
.criteria-table th:first-child,
.criteria-table td:first-child { width: 20%; }
.outcome-definitions-table th:first-child,
.outcome-definitions-table td:first-child { width: 30%; }
.methods-classification-note {
  margin: .85rem 0 1rem;
  padding: .75rem .9rem;
  border-left: 3px solid var(--hff-gold);
  background: #fbf8f0;
}
.methods-classification-note p { margin: .2rem 0; font-size: .86rem; }
.methods-accordion { border-top: 1px solid var(--hff-line); }
.methods-accordion details { border-bottom: 1px solid var(--hff-line); }
.methods-accordion summary {
  padding: .85rem .35rem;
  color: var(--hff-ink);
  font-weight: 600;
  cursor: pointer;
}
.methods-accordion details > div { padding: 0 .35rem .8rem 1.25rem; }
.methods-accordion details > div p { margin: .35rem 0; }
.methods-accordion details > div ul {
  margin: .45rem 0 .65rem;
  padding-left: 1.25rem;
}
.methods-accordion details > div li { margin: .3rem 0; }
.methods-sources {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid #178f9f;
  background: #f3f8f8;
}
.methods-sources h3 {
  margin: 0 0 .55rem;
  font-size: 1rem;
}
.methods-sources p { margin: .35rem 0; }
.methods-sources a {
  color: #125f70;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.methods-jump-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hff-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 620px) {
  .methods-table { display: block; overflow-x: auto; }
  .criteria-table { min-width: 620px; }
  .outcome-definitions-table { min-width: 760px; }
}

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--hff-line);
  color: var(--hff-muted);
  font-size: .8rem;
  text-align: left;
  padding: 1.1rem 1rem 1.6rem;
}

/* ---- loading splash ---- */
.loading-wrap { padding: 4rem 1rem; text-align: center; color: var(--hff-muted); font-size: .95rem; }
