
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', Times, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


:root {
  --layout-max: 1180px;
  --prose-max: 720px;
  /* Height of sticky masthead bar. Used by other sticky UI (sidebars, etc.) */
  --masthead-sticky-offset: 3.75rem;
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #5c5c5c;
  --text-tertiary: #999;
  --border: #e5e3e0;
  --border-strong: #1a1a1a;
  --accent: #0c4a6e;
  --accent-hover: #075985;
  --accent-light: #e0f2fe;
  --pill-bg: #f0eeeb;
  --pill-active-bg: #1a1a1a;
  --pill-active-text: #fff;
  --card-hover-bg: #f5f4f2;
  --lang-badge-bg: #e0f2fe;
  --lang-badge-text: #0c4a6e;
  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
}

:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --surface: #1c1c1c;
  --text: #e5e5e5;
  --text-secondary: #a3a3a3;
  --text-tertiary: #666;
  --border: #2e2e2e;
  --border-strong: #e5e5e5;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-light: #0c4a6e;
  --pill-bg: #262626;
  --pill-active-bg: #e5e5e5;
  --pill-active-text: #0d0d0d;
  --card-hover-bg: #252525;
  --lang-badge-bg: #0c4a6e;
  --lang-badge-text: #bae6fd;
}


/* Sticky on inner pages so nav stays visible while scrolling (like homepage after scroll). */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--layout-max);
  margin: 0 auto;
  isolation: isolate;
  transition: transform 0.22s ease;
  will-change: transform;
}
.masthead.masthead--scroll-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .masthead {
    transition-duration: 0.01ms;
  }
}
/* Full-bleed bar: invisible at top (like home on hero), frosted surface + edge-to-edge rule on scroll */
.masthead::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.05s ease;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.masthead.masthead--scrolled::before {
  opacity: 1;
}
.masthead::after {
  display: none;
}

.masthead-inner {
  text-align: left;
  min-width: 0;
  flex: 0 1 auto;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
  max-width: 100%;
}
.site-brand:hover,
.site-brand:focus-visible {
  opacity: 0.9;
  color: var(--text);
  text-decoration: none;
}

.site-brand-mark {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.masthead .site-logo {
  height: 2rem;
  min-height: 2rem;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  display: block;
}

:root[data-theme="light"] .site-logo--light { display: none; }
:root[data-theme="dark"] .site-logo--dark { display: none; }

.site-brand-text {
  display: flex;
  align-items: center;
  min-width: 0;
}

.site-name {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.masthead-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.masthead-nav::-webkit-scrollbar {
  display: none;
}
.masthead-nav-link {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.masthead-nav-link:hover {
  color: var(--text);
  text-decoration: none;
}
.masthead-nav-link[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

.masthead-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.masthead-menu-toggle:hover {
  background: var(--pill-bg);
  color: var(--text);
}
.masthead-menu-icon {
  display: block;
}

.masthead-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: menuFadeIn 0.2s ease;
}
@keyframes menuFadeIn { from { opacity: 0; } to { opacity: 1; } }

.masthead-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  width: min(20rem, 85vw);
  max-width: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: menuSlideIn 0.25s ease;
}
@keyframes menuSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.masthead-menu-drawer-inner {
  padding: 1.1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 100%;
  box-sizing: border-box;
}

.masthead-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.masthead-menu-title {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.masthead-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.masthead-menu-close:hover {
  background: var(--pill-bg);
  color: var(--text);
}

.masthead-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.25rem 0;
}

.masthead-menu-link {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.7rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.masthead-menu-link:hover {
  background: var(--pill-bg);
  color: var(--text);
  text-decoration: none;
}
.masthead-menu-link[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  background: var(--pill-bg);
}

.masthead-menu-link--icon svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.masthead-menu-link--btn {
  font: inherit;
  line-height: inherit;
}

.masthead-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.masthead-menu-extras {
  display: flex;
  flex-direction: column;
  gap: 0;
}

:root[data-theme="light"] .drawer-theme-icon--dark,
:root[data-theme="light"] .drawer-theme-label-dark { display: none; }
:root[data-theme="dark"] .drawer-theme-icon--light,
:root[data-theme="dark"] .drawer-theme-label-light { display: none; }

/* Homepage and country page: masthead sits on hero image */
body.page-home .masthead--on-hero,
body.page-country .masthead--on-hero {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 100%;
  max-width: var(--layout-max);
  margin: 0;
  box-sizing: border-box;
  isolation: isolate;
  background: transparent;
  border-bottom: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.22s ease;
}
body.page-home .masthead--on-hero.masthead--scroll-hidden,
body.page-country .masthead--on-hero.masthead--scroll-hidden {
  transform: translate(-50%, -100%);
  pointer-events: none;
}
body.page-home .masthead--on-hero .site-brand,
body.page-home .masthead--on-hero .site-name,
body.page-home .masthead--on-hero .masthead-nav-link,
body.page-country .masthead--on-hero .site-brand,
body.page-country .masthead--on-hero .site-name,
body.page-country .masthead--on-hero .masthead-nav-link {
  transition: color 0.85s ease;
}
body.page-home .masthead--on-hero .masthead-search,
body.page-home .masthead--on-hero .masthead-menu-toggle,
body.page-home .masthead--on-hero .theme-toggle,
body.page-country .masthead--on-hero .masthead-search,
body.page-country .masthead--on-hero .masthead-menu-toggle,
body.page-country .masthead--on-hero .theme-toggle {
  transition: color 0.85s ease, background 0.85s ease;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-logo,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-logo {
  height: 2rem;
  min-height: 2rem;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-name,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-name {
  font-size: 1.25rem;
}
body.page-home .masthead--on-hero.masthead--scrolled .site-logo,
body.page-country .masthead--on-hero.masthead--scrolled .site-logo {
  height: 2rem;
  min-height: 2rem;
}
body.page-home .masthead--on-hero.masthead--scrolled .site-name,
body.page-country .masthead--on-hero.masthead--scrolled .site-name {
  font-size: 1.25rem;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-brand,
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-brand:hover,
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-brand:focus-visible,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-brand,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-brand:hover,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-brand:focus-visible {
  color: #fff;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-name,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-name {
  color: #fff;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-logo--dark,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-logo--dark {
  display: none !important;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-logo--light,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-logo--light {
  display: block !important;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-nav-link,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-nav-link {
  color: rgba(255, 255, 255, 0.88);
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-nav-link:hover,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-nav-link:hover {
  color: #fff;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-nav-link[aria-current="page"],
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-nav-link[aria-current="page"] {
  color: #fff;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-search,
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-menu-toggle,
body.page-home .masthead--on-hero:not(.masthead--scrolled) .theme-toggle,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-search,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-menu-toggle,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .theme-toggle {
  color: rgba(255, 255, 255, 0.92);
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-search:hover,
body.page-home .masthead--on-hero:not(.masthead--scrolled) .masthead-menu-toggle:hover,
body.page-home .masthead--on-hero:not(.masthead--scrolled) .theme-toggle:hover,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-search:hover,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .masthead-menu-toggle:hover,
body.page-country .masthead--on-hero:not(.masthead--scrolled) .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
body.page-home .masthead--on-hero:not(.masthead--scrolled) :focus-visible,
body.page-country .masthead--on-hero:not(.masthead--scrolled) :focus-visible {
  outline-color: #fff;
}

/* Scrolled: fixed; bar visibility = ::before opacity (see above) */
body.page-home .masthead--on-hero.masthead--scrolled,
body.page-country .masthead--on-hero.masthead--scrolled {
  position: fixed;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}
.masthead-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.masthead-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.masthead-search:hover {
  background: var(--pill-bg);
  color: var(--text);
  text-decoration: none;
}

.theme-toggle {
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: center;
  width: 2.25rem;
  height: 2.25rem;
  justify-content: center;
}
.theme-toggle:hover { background: var(--pill-bg); }

:root[data-theme="light"] .theme-icon-dark { display: none; }

:root[data-theme="dark"] .theme-icon-light { display: none; }

@media (min-width: 721px) {
  .masthead-actions .theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.2rem;
  }
  .masthead-actions .theme-icon-light {
    font-size: 1.35rem;
    line-height: 1;
  }
  .masthead-actions .theme-icon-dark {
    font-size: 1.1rem;
    line-height: 1;
  }
}

.h-scroll-wrap {
  position: relative;
  display: block;
}

.h-scroll-viewport {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.h-scroll-viewport::-webkit-scrollbar {
  height: 6px;
}
.h-scroll-viewport::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.h-scroll-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.h-scroll-btn::before {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 500;
  pointer-events: none;
}
.h-scroll-btn--prev::before {
  content: '‹';
}
.h-scroll-btn--next::before {
  content: '›';
}
.h-scroll-btn--prev {
  left: 0;
  transform: translate(-50%, -50%);
}
.h-scroll-btn--next {
  right: 0;
  transform: translate(50%, -50%);
}
.h-scroll-btn[hidden] {
  display: none;
}
.h-scroll-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--pill-bg) 92%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.region-nav-wrap .h-scroll-btn {
  width: 2.1rem;
  height: 2.1rem;
}
.region-nav-wrap .h-scroll-btn::before {
  font-size: 1.35rem;
}

.region-nav-wrap.h-scroll-wrap {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
}

.region-nav {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.region-pill {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  background: var(--pill-bg);
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.region-pill:hover:not(.active) {
  background: var(--border);
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}
.region-pill.active {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}
.region-pill.active:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: var(--accent-hover);
  color: var(--text);
}

.pill-count {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-left: 0.15rem;
}

.breadcrumb {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; color: var(--text); }
.breadcrumb-sep { color: var(--border); margin: 0 0.15rem; }
.breadcrumb-current { color: var(--text-tertiary); }

.page-content {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  box-sizing: border-box;
}

.page-title {
  font-size: clamp(1.85rem, 5vw, 3rem);
  font-weight: 700;
  margin: 1.5rem 0 0.25rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.section-label {
  display: block;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  text-decoration: none;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
a.section-label:hover { color: var(--text); text-decoration: none; }



/* Homepage hero */

.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4.5rem 1.5rem 4rem;
  box-sizing: border-box;
  min-height: max(380px, 60vh);
}

@media (min-width: 960px) {
  .home-hero {
    min-height: max(520px, 75vh);
  }
}

/* Extra top inset on homepage so centered copy clears the overlay masthead */
.page-home .home-hero {
  padding-top: 5.25rem;
  padding-bottom: 4rem;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.home-hero-bg-img--active {
  opacity: 1;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.52) 0%,
    rgba(0, 0, 0, 0.62) 50%,
    rgba(0, 0, 0, 0.72) 100%
  );
  backdrop-filter: blur(1px);
}

.home-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  flex-shrink: 0;
}

.home-hero-name {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.hero-typewriter {
  display: block;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-top: 0.15em;
  min-height: 1.2em;
}

.hero-typewriter-flag {
  font-style: normal;
  margin-right: 0.15em;
}

.hero-typewriter-text {
  /* nothing extra needed */
}

.hero-typewriter-cursor {
  display: inline-block;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  animation: hero-blink 0.85s step-end infinite;
  margin-left: 1px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

@keyframes hero-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* One intro block: tagline + detail (avoids repeating “headlines” and awkward wraps) */
.home-hero-intro {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0.85rem auto 1.5rem;
  max-width: 32rem;
  text-wrap: balance;
}

.home-hero-search {
  position: relative;
  max-width: 480px;
  margin: 0 auto 1.25rem;
}

.home-hero-search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
}

.home-hero-search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 2.9rem;
  border: none;
  border-radius: 100px;
  background: #fff;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  color: var(--text, #1a1a1a);
  outline: none;
  transition: box-shadow 0.2s;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.home-hero-search-input::placeholder {
  color: #999;
}
.home-hero-search-input:focus {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.home-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}
.home-hero-stats-sep {
  color: rgba(255, 255, 255, 0.4);
}

/* Country tag marquee */

.home-country-marquee-outer {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.home-country-marquee {
  overflow: hidden;
  padding: 0.65rem 0;
  cursor: grab;
  touch-action: pan-y;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.home-country-marquee-track {
  display: flex;
  width: max-content;
  animation: home-country-marquee-scroll 200s linear infinite;
  will-change: transform;
}

.home-country-marquee--dragging {
  cursor: grabbing;
}

@keyframes home-country-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-country-marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
  padding: 0 0.75rem;
}

.home-country-marquee .home-country-tag {
  -webkit-user-drag: none;
  user-select: none;
  touch-action: pan-y;
}

.home-country-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.38rem 0.75rem 0.38rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-country-tag:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--text);
}

.home-country-tag-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.home-country-tag-name {
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .home-country-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
  .home-country-marquee-track {
    animation: none !important;
    transform: none !important;
    flex-wrap: wrap;
    justify-content: center;
    width: 100% !important;
    max-width: 100%;
    row-gap: 0.45rem;
    padding: 0.5rem 1rem 0.65rem;
    box-sizing: border-box;
  }
  .home-country-marquee-group--dup {
    display: none !important;
  }
}

/* Space before Top Stories (inner pages use .page-title margin; home starts with a section) */
.page-home .page-content {
  padding-top: 2rem;
}

/* Featured grid */

.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.35rem 0 1.75rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feat-card--lg {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .featured-grid {
    grid-template-columns: 3fr 2fr;
    grid-template-rows: auto auto;
  }
  .feat-card--lg {
    grid-column: 1;
    grid-row: 1 / 3;
  }
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.feat-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}

.feat-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.feat-card-img {
  overflow: hidden;
  flex-shrink: 0;
}
.feat-card-img img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.feat-card--lg .feat-card-img img {
  aspect-ratio: 16 / 9;
}
.feat-card:not(.feat-card--lg) .feat-card-img img {
  aspect-ratio: 16 / 9;
  max-height: 180px;
}

.feat-card-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.feat-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.feat-card-meta .flag {
  font-size: 0.95rem;
  line-height: 1;
}
.feat-card-country {
  font-weight: 700;
  color: var(--text);
}
.feat-card-time {
  color: var(--text-tertiary);
}

.feat-card-title {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}
.feat-card--lg .feat-card-title {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.25;
}

.feat-card-summary {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* Card placeholder images */
.feat-card-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(0.7);
}
.feat-card--lg .feat-card-placeholder img {
  aspect-ratio: 16 / 9;
}
.feat-card:not(.feat-card--lg) .feat-card-placeholder img {
  aspect-ratio: 16 / 9;
  max-height: 180px;
}

/* Story carousel cards */

.story-row {
  display: inline-flex;
  gap: 1rem;
  padding: 0.5rem 0.15rem 2rem;
}

.story-row-card {
  flex: 0 0 280px;
  min-width: 0;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.story-row-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}

.story-row-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.story-row-card-img {
  overflow: hidden;
  flex-shrink: 0;
}
.story-row-card-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.story-row-card:hover .story-row-card-img img {
  transform: scale(1.04);
}

/* Carousel card placeholder */
.story-row-card-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.7);
}

.story-row-card-body {
  padding: 0.75rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.story-row-card-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-row-card-title {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.country-section {
  margin-bottom: 2rem;
}

.country-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border-strong);
  margin-bottom: 0.25rem;
}

.country-section-flag {
  font-size: 1.75rem;
  line-height: 1;
}

.country-section-name {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: block;
}
.country-section-name:hover { text-decoration: underline; }

.country-section-count {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.home-section {
  margin-bottom: 2.5rem;
}

.home-stories-hero-intro {
  margin-bottom: 0.5rem;
}

.cross-border-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.cross-border-story-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100%;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.cross-border-story-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.cross-border-story-card .cluster-header {
  margin-bottom: 0.5rem;
}

.cluster-header--story {
  align-items: flex-start;
  gap: 0.65rem;
}

.cluster-story-titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cluster-story-label {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
}
.cluster-story-label:hover {
  text-decoration: underline;
}

.cluster-story-theme {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.cluster-summary {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0.25rem 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.cross-border-story-card .cluster-see-all {
  margin-top: auto;
  padding-top: 0.35rem;
  font-weight: 600;
  color: var(--accent);
}
.cross-border-story-card .cluster-see-all:hover {
  text-decoration: underline;
}

.latest-with-sidebar {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 960px) {
  .latest-with-sidebar {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    column-gap: 1.75rem;
  }
}

.latest-feed {
  min-width: 0;
  width: 100%;
}

.home-sidebar {
  min-width: 0;
}

/* Unified sidebar card */
.sidebar-unified {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-section-title {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  margin: 0 0 0.65rem;
  padding: 0.85rem 0 0.45rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.25;
}
.sidebar-section-title--no-top {
  border-top: none;
  padding-top: 0.65rem;
}

.sidebar-section-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.5rem 0.45rem 0.45rem;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-filter-btn:hover:not(.active) {
  background: var(--pill-bg);
}
.sidebar-filter-btn.active {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-left-color: var(--accent);
}
.sidebar-filter-btn.active:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}
.sidebar-filter-btn.active .sidebar-filter-label {
  font-weight: 700;
}
.sidebar-filter-btn:focus-visible {
  outline: none;
  background: var(--pill-bg);
}
.sidebar-filter-btn.active:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.sidebar-filter-start {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}
.sidebar-filter-start .sidebar-filter-label {
  flex: 1;
  min-width: 0;
}

.sidebar-filter-label {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-filter-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}
.sidebar-filter-flags {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.sidebar-filter-count {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--pill-bg);
  padding: 0.08rem 0.4rem;
  border-radius: 100px;
  min-width: 1.3em;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-trending-more {
  margin-top: 0;
}
.sidebar-trending-more[hidden] {
  display: none;
}
.sidebar-trending-expand {
  display: block;
  width: 100%;
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-trending-expand:hover {
  background: var(--pill-bg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.sidebar-trending-expand:focus-visible {
  outline: none;
  background: var(--pill-bg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

/* Mobile bottom-sheet */
.mobile-filter-fab {
  display: none;
}
.mobile-sheet-backdrop {
  display: none;
}
.mobile-sheet-header {
  display: none;
}

@media (max-width: 959px) {
  .home-sidebar {
    display: none;
  }

  /* Room so fixed filter control does not cover footer or last cards */
  .page-content:has(#mobile-filter-fab) {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  /* Headlines page: fixed bottom filter control */
  .mobile-filter-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    left: 50%;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 120;
    width: max-content;
    max-width: calc(100vw - 2rem);
    padding: 0.65rem 1.15rem;
    border: none;
    border-radius: 9999px;
    background: var(--accent);
    color: #fff;
    box-shadow:
      0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent),
      0 1px 3px rgba(0, 0, 0, 0.12);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  }
  :root[data-theme="dark"] .mobile-filter-fab {
    color: #0d0d0d;
    box-shadow:
      0 4px 18px color-mix(in srgb, var(--accent) 55%, transparent),
      0 1px 3px rgba(0, 0, 0, 0.35);
  }
  .mobile-filter-fab:hover {
    background: var(--accent-hover);
  }
  .mobile-filter-fab:active {
    transform: translateX(-50%) scale(0.98);
  }
  .mobile-filter-fab:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
  }
  .mobile-filter-fab .fab-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-filter-fab .fab-icon svg {
    display: block;
  }
  .mobile-filter-fab .fab-label-active {
    display: none;
    max-width: min(200px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: inherit;
    opacity: 0.95;
  }
  .mobile-filter-fab.has-filter .fab-label-active {
    display: inline;
  }
  .mobile-filter-fab.has-filter .fab-label-default {
    display: none;
  }

  /* Backdrop */
  .mobile-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .mobile-sheet-backdrop.is-visible {
    display: block;
    opacity: 1;
  }

  /* Bottom sheet (the sidebar re-shown) */
  .home-sidebar.sheet-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: min(78vh, 100dvh - 2.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -10px 44px rgba(0, 0, 0, 0.16);
    padding: 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: sheet-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes sheet-slide-up {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  /* One flat surface: no nested card inside the sheet */
  .home-sidebar.sheet-open .sidebar-block.sidebar-unified {
    margin: 0;
    padding: 0.75rem 1.125rem 0.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .home-sidebar.sheet-open .sidebar-unified {
    padding: 0;
  }

  /* Sheet drag handle + header */
  .mobile-sheet-header {
    display: none;
  }
  .home-sidebar.sheet-open .mobile-sheet-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.3rem 1rem 0.5rem;
    position: sticky;
    top: 0;
    background: var(--surface);
    border-radius: 1.25rem 1.25rem 0 0;
    z-index: 1;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
  }
  .sheet-handle-bar {
    display: flex;
    justify-content: center;
    padding: 0.05rem 0;
  }
  .sheet-handle {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 100px;
    background: var(--border);
  }
  .sheet-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 0;
  }
  .sheet-title {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    flex: 1;
    min-width: 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .sheet-close {
    border: none;
    background: var(--pill-bg);
    color: var(--text);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
  }
  .sheet-close:hover {
    background: var(--card-hover-bg);
  }
  .sheet-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  /* Within the sheet, show full sidebar styling */
  .home-sidebar.sheet-open .sidebar-section-title {
    display: block;
    margin-top: 0.25rem;
    padding: 0.6rem 0 0.4rem;
    font-size: 0.68rem;
  }
  .home-sidebar.sheet-open .sidebar-section-items {
    flex-direction: column;
    gap: 0.15rem;
  }
  .home-sidebar.sheet-open .sidebar-filter-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    border-left: 3px solid transparent;
    text-align: left;
    white-space: normal;
    padding: 0.55rem 0.65rem;
  }
  .home-sidebar.sheet-open .sidebar-filter-btn.active {
    border-left-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  }
  .home-sidebar.sheet-open .sidebar-filter-meta,
  .home-sidebar.sheet-open .sidebar-filter-count,
  .home-sidebar.sheet-open .sidebar-filter-flags {
    display: inline;
  }
  .home-sidebar.sheet-open .keyword-tags-wrap {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.15rem 0 0.35rem;
  }
  .home-sidebar.sheet-open .keyword-tag {
    padding: 0.35rem 0.65rem;
    font-size: 0.74rem;
  }
  .home-sidebar.sheet-open .sidebar-trending-expand {
    margin-top: 0.25rem;
  }
  .home-sidebar.sheet-open .home-feed-noscript {
    margin: 0.75rem 0 0;
  }
}

.home-feed-panels {
  min-width: 0;
}

.home-feed-panel[hidden] {
  display: none !important;
}

.feed-panel-summary {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
.feed-panel-summary p { margin: 0; }
.home-feed-empty {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  padding: 1rem 0;
}

.home-feed-noscript {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0.5rem 0 0;
}

.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.sidebar-block:last-child {
  margin-bottom: 0;
}

.sidebar-block-title {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-category-list,
.sidebar-country-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-category-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-category-list li:last-child {
  border-bottom: none;
}

.sidebar-category-list a {
  display: block;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}
.sidebar-category-list a:hover {
  text-decoration: underline;
}

.sidebar-meta {
  display: block;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.2rem;
}

.sidebar-block-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
}


.keyword-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding-top: 0.25rem;
}

.keyword-tag {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--pill-bg);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.keyword-tag:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.keyword-tag.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.keyword-tag:focus-visible {
  outline: none;
  background: var(--accent-light);
  color: var(--accent);
}

.sidebar-country-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-country-item:last-child {
  border-bottom: none;
}

.sidebar-country-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.sidebar-country-top .flag {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-country-name {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.sidebar-country-name:hover {
  text-decoration: underline;
}

.sidebar-country-head {
  display: block;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  padding-left: calc(1em + 0.4rem);
}
.sidebar-country-head:hover {
  text-decoration: underline;
}

.home-section-header {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.85rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.1;
}

.home-section-header-link {
  color: inherit;
  text-decoration: none;
}
.home-section-header-link:hover {
  color: var(--accent);
}
.home-section-header-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Hoist title + byline into parent grid so the link can align with the h2 row */
.home-section-header-block {
  display: contents;
}

.home-section-byline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0.2rem 0 0;
  max-width: 100%;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  line-height: 1.2;
}

.home-section-byline-flags {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.06rem;
  line-height: 1;
}

.home-section-byline-flag-item {
  font-size: 0.88rem;
  line-height: 1;
  display: inline-block;
}

.home-section-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.2rem;
  align-items: start;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
/* Descendant selectors: h2/byline stay inside .home-section-header-block in the DOM even with display:contents */
.home-section-header-row .home-section-header {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 0;
  border: none;
}
.home-section-header-row .home-section-byline {
  grid-column: 1;
  grid-row: 2;
}
.home-section-header-row > .home-section-link {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: end;
}

.home-section-link {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.home-section-link:hover {
  text-decoration: underline;
}

.topic-clusters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.topic-cluster {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.topic-cluster:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cluster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cluster-topic-name {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.cluster-topic-name:hover { text-decoration: underline; }

.cluster-country-badge {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}

.cluster-articles {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cluster-article {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  line-height: 1.4;
}
.cluster-article:last-child { border-bottom: none; }

.cluster-article .flag {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cluster-headline {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.cluster-headline:hover { text-decoration: underline; }

.cluster-see-all {
  display: block;
  margin-top: 0.75rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
}

.country-carousel {
  display: inline-flex;
  gap: 1.1rem;
  padding: 0.5rem 0.15rem 2rem;
}

.country-card {
  flex: 0 0 320px;
  min-width: 0;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.country-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.country-card-visual {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.country-card-visual:hover { text-decoration: none; }

.country-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}
.country-card:hover .country-card-img {
  transform: scale(1.06);
}

.country-card-visual-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 0.85rem 0.75rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.28) 48%,
    transparent 100%
  );
}
.country-card-visual-overlay .country-card-flag {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.country-card-visual-overlay .country-card-name {
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 12px rgba(0, 0, 0, 0.55);
}

.country-card-flag {
  font-size: 1.85rem;
  line-height: 1;
  flex-shrink: 0;
}

.country-card-name {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.country-card-lead {
  padding: 0.9rem 1rem 0.65rem;
}

.country-card-lead-link {
  display: block;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  text-decoration: none;
}
.country-card-lead-link:hover { text-decoration: underline; }

.country-card-more {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
  flex: 1;
}
.country-card-more li {
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 0.25rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}
.country-card-more li:first-child {
  padding-top: 0.45rem;
}
.country-card-more a {
  color: var(--text-secondary);
  text-decoration: none;
}
.country-card-more a:hover { text-decoration: underline; color: var(--text); }

.country-card-all {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding: 0.5rem 1rem 0.9rem;
  text-decoration: none;
}
.country-card-all:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.category-index-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.category-index-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
}

.category-index-name {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-decoration: none;
  color: var(--text);
}
.category-index-name:hover {
  text-decoration: underline;
}

.category-index-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
}

.category-index-flags {
  font-size: 1rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.65rem;
}

.category-index-headlines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  flex: 1;
}
.category-index-headlines li {
  padding: 0.3rem 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
}
.category-index-headlines li:last-child {
  border-bottom: none;
}
.category-index-headlines a {
  color: var(--text-secondary);
  text-decoration: none;
}
.category-index-headlines a:hover {
  color: var(--text);
  text-decoration: underline;
}

.category-index-viewall {
  display: block;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.5rem;
}
.category-index-viewall:hover {
  text-decoration: underline;
}

/* Topics page (/topics) */
.topics-section {
  margin-bottom: 2.5rem;
}

.topics-section-title {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.topics-section-desc {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.topic-card:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.topic-card-header {
  margin-bottom: 0.75rem;
}

.topic-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.topic-card-label {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.topic-scope-badge {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  white-space: nowrap;
}
.topic-scope-global {
  background: var(--accent-light);
  color: var(--accent);
}
.topic-scope-local {
  background: var(--pill-bg);
  color: var(--text-secondary);
}

.topic-card-flags {
  font-size: 1rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.2rem;
}

.topic-card-category {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topic-card-summary {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section-viewall {
  display: inline-block;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  float: right;
  margin-top: 0.05rem;
}
.sidebar-section-viewall:hover {
  text-decoration: underline;
}

/* Break out of .page-content side padding so carousels span the viewport on small screens */
@media (max-width: 720px) {
  .page-content .home-section .h-scroll-wrap {
    width: calc(100% + 3rem);
    max-width: none;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }
  .page-content .home-section .h-scroll-viewport {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
  }
}
@media (max-width: 600px) {
  .page-content .home-section .h-scroll-wrap {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }
  .page-content .home-section .h-scroll-viewport {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


.articles-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.article-card {
  position: relative;
  padding: 1.15rem 0.6rem;
  margin: 0 -0.6rem;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.18s ease;
}
.article-card:first-child { padding-top: 0; }
.article-card:last-child { border-bottom: none; }
.article-card:hover {
  background: var(--card-hover-bg);
}

.article-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.article-card-hit:focus {
  outline: none;
}

.article-card .card-meta *:not(a),
.article-card .card-title *:not(a),
.article-card .card-summary,
.article-card .card-footer *:not(a) {
  pointer-events: none;
}
.article-card a:not(.article-card-hit) {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.card-meta .flag { font-size: 1rem; line-height: 1; }
.card-meta .card-country { font-weight: 700; color: var(--text); text-decoration: none; }
.card-meta .card-country:hover { text-decoration: underline; }
.card-meta .sep { color: var(--border); }

.lang-sep { color: var(--text-tertiary); margin: 0 0.1rem; }
.lang-label { color: var(--text-tertiary); }
.meta-spacer { width: 0.6rem; }

.card-title {
  font-size: 1.1rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { text-decoration: none; }

.card-summary {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.article-card--hero .card-title {
  font-size: 1.35rem;
  line-height: 1.3;
}

.article-card--hero .card-summary {
  font-size: 0.95rem;
}

.article-card-hero-img {
  width: calc(100% + 1.2rem);
  margin: -0.15rem -0.6rem 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}
.article-card-hero-img:empty {
  display: none;
}

.article-card-hero-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.article-card--hero.article-card--with-thumb .article-card-thumb {
  display: none;
}

.article-card-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.article-card-thumb {
  flex-shrink: 0;
  width: min(34vw, 140px);
  max-width: 140px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
}
.article-card-thumb:empty {
  display: none;
}

.article-card-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article-card-main {
  min-width: 0;
  flex: 1;
}

@media (max-width: 380px) {
  .article-card-thumb {
    width: 100px;
    max-width: 100px;
  }
}

.new-badge {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--danger);
  color: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  line-height: 1;
}

.category-tag {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
}
.category-tag:hover { text-decoration: underline; }



.article-detail {
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}
.article-detail-prose {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: 2rem 1rem 0;
  box-sizing: border-box;
}
.article-detail-wide {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 1rem 2rem;
  box-sizing: border-box;
}

.detail-media {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}

.detail-media--banner {
  margin: 0 0 1.25rem;
  border-radius: 8px;
  aspect-ratio: 2.2 / 1;
  max-height: min(42vw, 20rem);
  min-height: 7rem;
}

.detail-media--banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.detail-media-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.7);
}

.detail-body {
  min-width: 0;
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}
.detail-kicker .flag { font-size: 1.1rem; line-height: 1; }
.detail-kicker-country {
  color: var(--accent);
  text-decoration: none;
}
.detail-kicker-country:hover { text-decoration: underline; }
.detail-kicker-sep {
  color: var(--text-tertiary);
  font-weight: 400;
}
.detail-kicker-topic {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}
.detail-kicker-topic:hover { text-decoration: underline; color: var(--accent); }

.detail-headline {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.85rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.detail-attribution {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.detail-attribution-main {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.detail-attribution-source {
  color: var(--text-secondary);
}
.detail-attribution-source a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.detail-attribution-source a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.detail-attribution-sep {
  color: var(--border-strong, var(--text-tertiary));
}
.detail-attribution-date {
  font-weight: 600;
  color: var(--text);
}
.detail-attribution-ago {
  color: var(--text-tertiary);
}
.detail-attribution-credit {
  color: var(--text-tertiary);
  margin: 0;
}
.detail-attribution-credit a {
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
}
.detail-attribution-credit a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.detail-summary {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-left: 3px solid var(--text-tertiary);
  border-radius: 0 6px 6px 0;
}
.detail-summary-title {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin: 0 0 0.4rem;
}
.detail-summary p {
  margin: 0;
}
.tldr-list {
  margin: 0;
  padding: 0 0 0 1.5rem;
}
.tldr-list li {
  margin-bottom: 0.3rem;
}
.tldr-list li:last-child {
  margin-bottom: 0;
}

.perspective-section {
  margin: 0 0 2rem;
}
.perspective-header {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
}
.perspective-flag {
  font-size: 1.1rem;
  line-height: 1;
}
.perspective-source {
  font-weight: 700;
  color: var(--text);
}
.perspective-divider {
  color: var(--text-tertiary);
}
.perspective-country {
  color: var(--text-secondary);
}
.perspective-body {
  font-size: 1.05rem;
  line-height: 1.8;
}
.perspective-body p {
  margin: 0 0 1.1rem;
}
.perspective-body p:last-child {
  margin-bottom: 0;
}
.perspective-body .article-quote {
  margin: 1.75rem 0;
  padding-left: 0.25rem;
}
.perspective-body p + .article-quote {
  margin-top: 0.5rem;
}
.perspective-body .article-quote + p {
  margin-top: 1.25rem;
}

.detail-description {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.detail-description p {
  margin: 0 0 1.1rem;
}
.detail-description p:last-child {
  margin-bottom: 0;
}

.article-quote {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  display: flex;
  gap: 0;
  align-items: flex-start;
}
.article-quote--lead {
  margin: 0 0 1.5rem;
}
.detail-description .article-quote {
  margin: 1.5rem 0;
}
.detail-description p + .article-quote {
  margin-top: 0.25rem;
}
.article-quote + p {
  margin-top: 1.25rem;
}
.quote-mark {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 4.5rem;
  line-height: 0.8;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  user-select: none;
  margin-right: 0.15rem;
  margin-top: -0.05em;
  opacity: 0.7;
}
.quote-content {
  min-width: 0;
  padding-top: 0.35rem;
}
.article-quote p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.article-quote footer {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.quote-speaker {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}
.quote-context {
  color: var(--text-tertiary);
  font-style: normal;
}

.key-facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.key-facts-title {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.key-facts-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
}
.key-facts-list li {
  margin-bottom: 0.4rem;
}
.key-facts-list li:last-child {
  margin-bottom: 0;
}

.section-summary {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
}

.methodology-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 2rem 0 0;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
.methodology-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--border);
  overflow: hidden;
  margin-top: 0.1rem;
}
.methodology-logo-img {
  width: 26px;
  height: auto;
  object-fit: contain;
}
:root[data-theme="light"] .methodology-logo--light { display: none; }
:root[data-theme="dark"] .methodology-logo--dark { display: none; }
.methodology-text {
  min-width: 0;
}
.methodology-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.2rem;
}
.methodology-name:hover {
  color: var(--accent);
  text-decoration: underline;
}
.methodology-note {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.methodology-note strong {
  font-weight: 600;
  color: var(--text);
}
.methodology-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.methodology-note a:hover {
  text-decoration: underline;
}

.info-card {
  margin: 0.75rem 0 0;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  display: flex;
  gap: 0;
}
.info-card-section {
  flex: 1 1 0;
  min-width: 0;
}
.info-card-divider {
  width: 1px;
  background: var(--border);
  margin: 0 1.25rem;
  flex-shrink: 0;
}
.info-card-section-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.info-card-flag {
  font-size: 1.15rem;
  line-height: 1;
}
.info-card-section-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
}
a.info-card-section-title:hover {
  text-decoration: underline;
  color: var(--accent);
}
.info-card-source-logo {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: contain;
}
.info-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}
.info-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.info-pill--press-free { background: #d1fae5; color: #065f46; }
.info-pill--press-partly { background: #fef3c7; color: #78350f; }
.info-pill--press-not-free { background: #fee2e2; color: #991b1b; }
.info-pill--cred-high { background: #d1fae5; color: #065f46; }
.info-pill--cred-med { background: #fef3c7; color: #78350f; }
.info-pill--cred-low { background: #fee2e2; color: #991b1b; }
:root[data-theme="dark"] .info-pill--press-free { background: #064e3b; color: #6ee7b7; }
:root[data-theme="dark"] .info-pill--press-partly { background: #5f3510; color: #fcd34d; }
:root[data-theme="dark"] .info-pill--press-not-free { background: #5f1a1a; color: #fca5a5; }
:root[data-theme="dark"] .info-pill--cred-high { background: #064e3b; color: #6ee7b7; }
:root[data-theme="dark"] .info-pill--cred-med { background: #5f3510; color: #fcd34d; }
:root[data-theme="dark"] .info-pill--cred-low { background: #5f1a1a; color: #fca5a5; }
.info-card-context {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}
.info-card-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.info-card-link:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .info-card {
    flex-direction: column;
  }
  .info-card-divider {
    width: 100%;
    height: 1px;
    margin: 0.75rem 0;
  }
}

.related-stories {
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related-stories + .related-stories {
  margin-top: 1rem;
  padding-top: 1rem;
}
.related-stories-title {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin: 0 0 1rem;
}



.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}
.empty-state h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.empty-state p {
  font-size: 0.9rem;
}

.site-footer {
  border-top: 3px double var(--border);
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 1.5rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-nav {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.footer-nav-col--site,
.footer-nav-col--categories {
  min-width: 130px;
}

.footer-nav-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}
.footer-nav-heading a {
  color: inherit;
  text-decoration: none;
}
.footer-nav-heading a:hover {
  text-decoration: underline;
  color: var(--text-secondary);
}

.footer-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
}
.footer-nav-links--col {
  flex-direction: column;
}
.footer-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.6;
}
.footer-nav-links a:hover { text-decoration: underline; color: var(--text); }

.footer-regions-grid {
  columns: 4;
  column-gap: 1.5rem;
}

.footer-region-block {
  break-inside: avoid;
  margin-bottom: 0.65rem;
}

.footer-region-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}
.footer-region-name a {
  color: inherit;
  text-decoration: none;
}
.footer-region-name a:hover {
  text-decoration: underline;
  color: var(--text);
}

.footer-bottom {
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0.5rem 0;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; color: var(--text); }

.footer-credit {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 0.5rem;
}

.static-page {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.static-page h1 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.static-page h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}

.static-page p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.static-page ul, .static-page ol {
  margin: 0 0 1rem 1.5rem;
  line-height: 1.7;
}

.static-page li { margin-bottom: 0.4rem; }

.about-founder {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--card-bg, #f8f8f8);
  border: 1px solid var(--border, #e5e5e5);
}
[data-theme="dark"] .about-founder {
  background: var(--card-bg, #1a1a1a);
  border-color: var(--border, #333);
}
.about-founder-text h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.about-founder-role {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.15rem;
}
.about-founder-text p {
  margin: 0 0 0.75rem;
  line-height: 1.7;
}
.about-founder-text p:last-child {
  margin-bottom: 0;
}
@media (max-width: 540px) {
  .about-founder {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.health-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
}

.health-card.healthy { border-left: 3px solid var(--success); }
.health-card.degraded { border-left: 3px solid var(--warning); }
.health-card.dead { border-left: 3px solid var(--danger); }

.health-name { font-weight: 600; margin-bottom: 0.25rem; }
.health-detail { color: var(--text-secondary); font-size: 0.75rem; }

.search-box {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus {
  border-color: var(--accent);
}

.search-prompt {
  text-align: center;
  padding: 3rem 1rem;
}
.search-prompt-text {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.search-prompt-hint {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.search-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.search-result {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }

.search-result-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}
.search-result-title a {
  color: var(--text);
}
.search-result-title a:hover {
  text-decoration: underline;
}

.search-result-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .masthead-nav--desktop {
    display: none !important;
  }
  .masthead-menu-toggle {
    display: flex;
  }
  .masthead-actions {
    margin-left: auto;
  }
  .masthead-actions .theme-toggle {
    display: none;
  }
  /* Carousels scroll with touch; arrow controls overlap content on narrow viewports */
  .h-scroll-btn {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .masthead { padding: 0.6rem 1rem; }
  .masthead .site-logo {
    height: 1.65rem;
    min-height: 1.65rem;
  }
  .site-name { font-size: 1.1rem; }
  .site-brand { gap: 0.4rem; }
  body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-logo,
  body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-logo {
    height: 1.65rem;
    min-height: 1.65rem;
  }
  body.page-home .masthead--on-hero:not(.masthead--scrolled) .site-name,
  body.page-country .masthead--on-hero:not(.masthead--scrolled) .site-name {
    font-size: 1.1rem;
  }
  body.page-home .masthead--on-hero.masthead--scrolled .site-logo,
  body.page-country .masthead--on-hero.masthead--scrolled .site-logo {
    height: 1.65rem;
    min-height: 1.65rem;
  }
  body.page-home .masthead--on-hero.masthead--scrolled .site-name,
  body.page-country .masthead--on-hero.masthead--scrolled .site-name {
    font-size: 1.1rem;
  }
  .home-hero {
    min-height: max(360px, 60vh);
    padding: 4rem 1rem 3.25rem;
  }
  .page-home .home-hero {
    padding-top: 4.75rem;
    padding-bottom: 3.25rem;
  }
  .page-content { padding: 0 1rem 1.5rem; }
  .region-nav-wrap.h-scroll-wrap { padding: 0.75rem 0.85rem; }
  .detail-headline { font-size: 1.4rem; }
  .article-detail { padding: 1.5rem 1rem; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-nav-col--countries { grid-column: 1 / -1; }
  .footer-regions-grid { columns: 2; }
  .country-section-flag { font-size: 1.4rem; }
  .topic-clusters-grid { grid-template-columns: 1fr; }
  .country-card { flex: 0 0 288px; }
  .categories-grid { grid-template-columns: 1fr; }
}

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.12);
  padding: 1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: var(--text);
}
.cookie-consent-inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-consent-inner p {
  flex: 1 1 300px;
  margin: 0;
  line-height: 1.5;
}
.cookie-consent-inner a {
  color: var(--accent);
  text-decoration: underline;
}
.cookie-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cookie-consent-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.cookie-consent-btn--accept {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cookie-consent-btn:hover {
  opacity: 0.85;
}

/* ---- Country page: hero overlap + articles ---- */
.page-content--country {
  padding-top: 0;
  display: flow-root;
}
.page-content--country .breadcrumb {
  padding-top: 1.35rem;
  margin-top: 0;
}

.country-hero-stack {
  position: relative;
}

/* ---- Country data card (pulled up to overlap bottom of hero) ---- */
.country-data-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.25rem 1.15rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
  margin-top: -6.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.country-data-card > :first-child,
.card-collapsible-content > :first-child {
  margin-top: 0;
}

@media (min-width: 768px) {
  .country-data-card {
    margin-top: -8.25rem;
    margin-bottom: 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  .country-data-card {
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.35),
      0 12px 28px rgba(0, 0, 0, 0.45);
  }
}

/* ---- Collapsible country data card ---- */
.card-expand-toggle { display: none; }
.country-data-card--collapsible .card-collapsible-content {
  max-height: 22rem;
  overflow: hidden;
  position: relative;
  transition: max-height 0.35s ease;
}
.country-data-card--collapsible .card-collapsible-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.card-expand-toggle:checked ~ .card-collapsible-content {
  max-height: 300rem;
}
.card-expand-toggle:checked ~ .card-collapsible-content::after {
  opacity: 0;
}
.card-expand-btn {
  display: block;
  text-align: center;
  padding: 0.5rem 0 0.15rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
.card-expand-btn:hover { text-decoration: underline; }
.card-expand-less { display: none; }
.card-expand-toggle:checked ~ .card-expand-btn .card-expand-more { display: none; }
.card-expand-toggle:checked ~ .card-expand-btn .card-expand-less { display: inline; }

/* ---- Country page hero banner ---- */
.country-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(300px, 48vh, 520px);
  height: auto;
}
.country-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.country-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.25) 38%,
    rgba(0,0,0,0.55) 70%,
    rgba(0,0,0,0.78) 100%
  );
}
.country-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(300px, 48vh, 520px);
  padding: 0.75rem 1.5rem 9.5rem;
  box-sizing: border-box;
  max-width: var(--layout-max);
  margin: 0 auto;
  width: 100%;
}

.country-hero-text {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.country-hero-heading {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.05rem;
}

.country-hero-flag {
  flex-shrink: 0;
  font-size: 2.6rem;
  line-height: 1;
  margin-top: 0.08em;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.45));
}
.country-hero-name {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  line-height: 1.12;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.5),
    0 3px 18px rgba(0,0,0,0.55),
    0 0 40px rgba(0,0,0,0.35);
}
.country-hero-stats {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255,255,255,0.88);
  margin: 0;
  padding: 0;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.5),
    0 2px 12px rgba(0,0,0,0.4);
}
/* ---- Country data card: top row (weather + fact pills) ---- */
.country-data-card .card-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.45rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.weather-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  min-width: 0;
}
.weather-icon {
  font-size: 2rem;
  line-height: 1;
}
.weather-temp {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.weather-detail {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.weather-capital {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.weather-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}
.weather-hilo {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

/* ---- Shared pill base (solid fills + dark text in light mode for contrast on white cards) ---- */
.pill {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.72rem;
  border-radius: 100px;
  white-space: nowrap;
  line-height: 1.25;
  border: 1px solid transparent;
}

/* Gov pills */
.pill--gov-democracy {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #93c5fd;
}
.pill--gov-monarchy {
  color: #5b21b6;
  background: #ede9fe;
  border-color: #c4b5fd;
}
.pill--gov-hybrid-regime {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}
.pill--gov-authoritarian,
.pill--gov-one-party-state,
.pill--gov-military-rule,
.pill--gov-theocracy {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Press pills */
.pill--press-free {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}
.pill--press-partly-free {
  color: #78350f;
  background: #fef3c7;
  border-color: #fcd34d;
}
.pill--press-not-free {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Sentiment / tone (article cards + detail): tighter than country/gov pills */
.pill--tone-positive,
.pill--tone-negative,
.pill--tone-mixed {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.16rem 0.42rem;
  border-radius: 4px;
  line-height: 1.2;
}
.pill--tone-positive {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}
.pill--tone-negative {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}
.pill--tone-mixed {
  color: #78350f;
  background: #fef3c7;
  border-color: #fcd34d;
}

/* ---- Country outlook ---- */
.country-outlook {
  margin-top: 0;
  margin-bottom: 1.1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
.country-outlook-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--text);
}
.country-outlook p {
  margin: 0 0 0.65rem;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
}
.country-outlook p:last-child { margin-bottom: 0; }

/* ---- Country facts pills (population, languages, currency, timezone) ---- */
.country-facts-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.country-facts-pills .pill--fact {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 8%, var(--surface));
  border: 1px solid var(--border);
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
}
:root[data-theme="dark"] .country-facts-pills .pill--fact {
  background: color-mix(in srgb, var(--text-muted) 12%, var(--surface));
}

/* ---- Country overview (plain text) ---- */
.country-overview {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
.country-overview-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.country-overview p {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Media landscape (standalone section) ---- */
.country-media-landscape {
  margin-bottom: 1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
.country-media-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--text);
}

/* ---- Travel card ---- */
.travel-card {
  background: color-mix(in srgb, var(--text) 3%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
:root[data-theme="dark"] .travel-card {
  background: color-mix(in srgb, var(--text) 5%, var(--surface));
}
.travel-card-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.travel-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.travel-row-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
.travel-row-text {
  flex: 1;
}
.travel-sites {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin: 0.5rem 0;
}
@media (min-width: 480px) {
  .travel-sites { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .travel-sites { grid-template-columns: 1fr 1fr 1fr; }
}
.travel-site {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.travel-site-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.travel-site-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.travel-site-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}
.travel-site-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.ml-summary {
  margin: 0 0 0.65rem;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.ml-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.ml-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.88rem;
}
.ml-row--outlets {
  align-items: flex-start;
}
.ml-label {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 7.5rem;
}
.ml-value {
  color: var(--text);
}
.ml-outlets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.ml-outlet {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  color: var(--accent);
}
:root[data-theme="dark"] .ml-outlet {
  color: #7dd3fc;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.ml-state {
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-size: 0.78rem;
}
.state--minimal { color: #16a34a; background: #dcfce7; }
.state--moderate { color: #ca8a04; background: #fef9c3; }
.state--significant { color: #ea580c; background: #ffedd5; }
.state--extensive { color: #dc2626; background: #fee2e2; }
:root[data-theme="dark"] .state--minimal { color: #4ade80; background: color-mix(in srgb, #16a34a 25%, var(--surface)); }
:root[data-theme="dark"] .state--moderate { color: #facc15; background: color-mix(in srgb, #ca8a04 25%, var(--surface)); }
:root[data-theme="dark"] .state--significant { color: #fb923c; background: color-mix(in srgb, #ea580c 25%, var(--surface)); }
:root[data-theme="dark"] .state--extensive { color: #f87171; background: color-mix(in srgb, #dc2626 25%, var(--surface)); }
.ml-tip {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- Theme tags (briefing key themes: must read on white country card) ---- */
.country-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.country-themes .theme-tag {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}
:root[data-theme="dark"] .country-themes .theme-tag {
  color: #7dd3fc;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

/* ---- Press context note ---- */
.press-context {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.6;
  border-left: 4px solid var(--warning);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.25rem;
  background: var(--bg-secondary, rgba(0,0,0,0.025));
  border-radius: 0 6px 6px 0;
}
.press-context strong {
  color: var(--text);
}

/* Also used on source pages */
.reading-context-block {
  margin: 1rem 0 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0 6px 6px 0;
  border: none;
  border-left: 4px solid var(--warning);
  background: var(--bg-secondary, rgba(0,0,0,0.025));
}
.reading-context-block--source {
  margin: 0 0 1.25rem;
}
.reading-context-heading {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.reading-context-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---- Source cards (country data card) ---- */
.country-sources-block {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  margin-bottom: 0.25rem;
}
.country-sources-heading {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  color: var(--text);
  line-height: 1.3;
}
.country-sources-count {
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}
.source-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.5rem;
}
.source-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}
.source-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.source-card-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}
.source-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.source-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.src-tag {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.16rem 0.42rem;
  border-radius: 100px;
  line-height: 1.2;
  white-space: nowrap;
}

/* Lean tags: very pale tint, dark text, no border fighting for attention */
.src-tag--left,
.src-tag--center-left  { color: #1e3a8a; background: #eff6ff; }
.src-tag--center       { color: #1e293b; background: #f1f5f9; }
.src-tag--center-right,
.src-tag--right        { color: #7c2d12; background: #fff7ed; }
.src-tag--state        { color: #7f1d1d; background: #fef2f2; }

/* Credibility tags */
.src-tag--cred-high { color: #14532d; background: #f0fdf4; }
.src-tag--cred-med  { color: #713f12; background: #fefce8; }
.src-tag--cred-low  { color: #7f1d1d; background: #fef2f2; }

@media (prefers-color-scheme: dark) {
  .source-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  }
  .source-card-logo {
    background: rgba(255,255,255,0.9);
  }
}

@media (max-width: 600px) {
  .country-hero {
    min-height: clamp(280px, 46vh, 480px);
  }
  .country-hero-inner {
    min-height: clamp(280px, 46vh, 480px);
    padding: 0.5rem 1rem 7rem;
  }
  .country-hero-flag { font-size: 1.95rem; }
  .country-hero-name { font-size: clamp(1.65rem, 7vw, 2rem); }
  .country-hero-stats { font-size: 0.85rem; }
  .country-data-card {
    padding: 0.75rem 1rem 1rem;
    border-radius: 10px;
    margin-top: -5.5rem;
  }
  .country-data-card .card-top-row {
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.45rem;
  }
  .weather-icon { font-size: 1.6rem; }
  .weather-temp { font-size: 1.5rem; }
  .card-pills { gap: 0.3rem; }
  .pill { font-size: 0.72rem; padding: 0.26rem 0.6rem; }
}

/* Source bias profile (source page) */
.source-bias-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
.bias-heading {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.bias-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.bias-type,
.bias-lean,
.bias-cred {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
  border-radius: 100px;
  white-space: nowrap;
  line-height: 1.2;
  border: 1px solid transparent;
}
.bias-type {
  color: #334155;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.bias-lean {
  color: #1e293b;
  background: #e2e8f0;
  border-color: #94a3b8;
}
.bias-cred {
  color: #334155;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.bias-cred-high {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}
.bias-cred-medium {
  color: #78350f;
  background: #fef3c7;
  border-color: #fcd34d;
}
.bias-cred-low {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.bias-ownership {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 0.4rem;
}
.bias-notes {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 0.4rem;
}
.bias-ai-note {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0;
}

/* ---- Blog ---- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.blog-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}
.blog-card:hover .blog-card-img img {
  transform: scale(1.04);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.blog-card-body {
  padding: 1.1rem 1.3rem 1.15rem;
}

.blog-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 10px;
}
.blog-card-hit:focus { outline: none; }

.blog-card-category {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}
.blog-cat--global-perspective { color: #1e3a8a; background: #dbeafe; }
.blog-cat--expat-life { color: #065f46; background: #d1fae5; }
.blog-cat--press-freedom { color: #991b1b; background: #fee2e2; }
.blog-cat--travel { color: #78350f; background: #fef3c7; }
.blog-cat--media-literacy { color: #5b21b6; background: #ede9fe; }
.blog-cat--digital-nomad { color: #0e7490; background: #cffafe; }
:root[data-theme="dark"] .blog-cat--global-perspective { color: #93c5fd; background: #1e3a5f; }
:root[data-theme="dark"] .blog-cat--expat-life { color: #6ee7b7; background: #064e3b; }
:root[data-theme="dark"] .blog-cat--press-freedom { color: #fca5a5; background: #5f1a1a; }
:root[data-theme="dark"] .blog-cat--travel { color: #fcd34d; background: #5f3510; }
:root[data-theme="dark"] .blog-cat--media-literacy { color: #c4b5fd; background: #3b1f8a; }
:root[data-theme="dark"] .blog-cat--digital-nomad { color: #67e8f9; background: #0e4a5c; }

.blog-card-title {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}
.blog-card-title a {
  color: var(--text);
  text-decoration: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.blog-card-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
  pointer-events: none;
}

.blog-card-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}
.blog-card-meta .sep { color: var(--border); }

.blog-post-category {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.blog-post-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.blog-post-meta .sep { color: var(--border); }

.blog-post-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.blog-post-nav a {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.blog-post-nav a:hover { text-decoration: underline; }

/* Blog hero image */
.blog-hero {
  margin: 0 0 2rem;
  border-radius: 10px;
  overflow: hidden;
}
.blog-hero img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1200 / 520;
  object-fit: cover;
}
.blog-hero figcaption {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding: 0.5rem 0 0;
  text-align: right;
}

/* Inline images within blog body */
.detail-description figure {
  margin: 1.75rem 0;
  border-radius: 8px;
  overflow: hidden;
}
.detail-description figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.detail-description figure figcaption {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding: 0.45rem 0 0;
  text-align: center;
  font-style: italic;
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .blog-card-body {
    padding: 0.9rem 1rem 1rem;
  }
}

/* ---- Blog promo cards (homepage grid + inline category pill) ---- */
.blog-promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.blog-promo-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.blog-promo-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.blog-promo-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-promo-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary, #f0f0f0);
}
.blog-promo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.blog-promo-card:hover .blog-promo-card-img img {
  transform: scale(1.03);
}

.blog-promo-card-body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.blog-promo-card-cat {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.5rem;
  border-radius: 100px;
  display: inline-block;
  align-self: flex-start;
  line-height: 1.3;
}

.blog-promo-card-title {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}

.blog-promo-card-desc {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
}

.blog-promo-card-meta {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 0.25rem;
}

.blog-promo-inline-cat {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 100px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .blog-promo-grid {
    grid-template-columns: 1fr;
  }
  .blog-promo-card-link {
    flex-direction: row;
  }
  .blog-promo-card-img {
    width: 120px;
    min-width: 120px;
    aspect-ratio: auto;
  }
  .blog-promo-card-body {
    padding: 0.65rem 0.85rem;
  }
  .blog-promo-card-desc {
    display: none;
  }
  .blog-promo-card-title {
    font-size: 0.92rem;
  }
}
