/* Shared country-article primitives. Page-specific files supply the geometry
   values that intentionally differ between the flagship and compact articles. */
.country-page {
  --country-ink: var(--theme-ink);
  --country-muted: var(--theme-muted);
  --country-accent: var(--theme-accent);
  --country-rule: var(--theme-rule);
  --country-rule-strong: var(--theme-rule-strong);
  --country-paper-light: var(--theme-paper-light);
  --country-shadow: var(--theme-shadow);
  --country-wrap-width: min(calc(100% - 3rem), 68rem);
  --country-wrap-padding: 3.5rem 0 5rem;
  --country-hero-columns: minmax(0, 1fr);
  --country-hero-gap: 2.5rem;
  --country-hero-padding-bottom: 3rem;
  --country-facts-columns: repeat(2, minmax(0, 1fr));
  --country-fact-min-height: 0;
  --country-fact-padding: 1rem 1.1rem;
  color: var(--country-ink);
  font-family: Georgia, "Times New Roman", serif;
}

.country-page,
.country-page *,
.country-page *::before,
.country-page *::after {
  box-sizing: border-box;
}

.country-page a {
  color: inherit;
  text-decoration-color: var(--country-accent);
  text-underline-offset: .18em;
}

.country-page a:hover {
  color: var(--country-accent);
}

.country-wrap {
  width: var(--country-wrap-width);
  margin: 0 auto;
  padding: var(--country-wrap-padding);
}

.country-hero {
  display: grid;
  grid-template-columns: var(--country-hero-columns);
  gap: var(--country-hero-gap);
  align-items: center;
  padding: 0 0 var(--country-hero-padding-bottom);
}

.country-map {
  display: grid;
  gap: var(--country-map-gap, .8rem);
  margin: 0;
}

.country-map > a {
  display: var(--country-map-link-display, grid);
  width: 100%;
  min-height: var(--country-map-min-height, 0);
  place-items: center;
  padding: var(--country-map-padding, 0);
  border: var(--country-map-frame-border, 0);
  background: var(--country-map-frame-background, transparent);
  box-shadow: var(--country-map-frame-shadow, none);
}

.country-map img {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--country-map-max-height, none);
  object-fit: var(--country-map-object-fit, fill);
  border: var(--country-map-image-border, 0);
  background: var(--country-map-image-background, transparent);
  box-shadow: var(--country-map-image-shadow, none);
}

.country-map figcaption {
  margin: var(--country-map-caption-margin, 0);
  color: var(--country-muted);
  font: var(--country-map-caption-font, 700 .66rem Arial, Helvetica, sans-serif);
  letter-spacing: var(--country-map-caption-letter-spacing, .08em);
  text-transform: uppercase;
}

.country-facts {
  display: grid;
  grid-template-columns: var(--country-facts-columns);
  margin: 0;
  border-top: 1px solid var(--country-rule-strong);
  border-left: 1px solid var(--country-rule-strong);
}

.country-facts > div {
  min-width: 0;
  min-height: var(--country-fact-min-height);
  padding: var(--country-fact-padding);
  border-right: 1px solid var(--country-rule-strong);
  border-bottom: 1px solid var(--country-rule-strong);
}

.country-facts dt {
  margin-bottom: var(--country-fact-term-margin-bottom, .52rem);
  color: var(--country-fact-label-color, var(--country-accent));
  font: var(--country-fact-label-font, 800 .64rem Arial, Helvetica, sans-serif);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.country-facts dd {
  margin: var(--country-fact-value-margin, 0);
  color: var(--country-ink);
  font-size: var(--country-fact-value-size, .98rem);
  line-height: 1.45;
}

/* Compact public records use the shared country vocabulary without requiring
   an individual stylesheet. More specialized country layouts remain local. */
.country-brief .country-kicker {
  margin: 0 0 .55rem;
  color: var(--country-accent);
  font: 800 .7rem Arial, Helvetica, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.country-brief h1,
.country-brief h2,
.country-brief h3 {
  color: var(--country-ink);
}

.country-brief h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.25rem);
  line-height: .95;
}

.country-brief .country-subtitle {
  max-width: 42rem;
  margin: .9rem 0 0;
  color: var(--country-accent);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-style: italic;
  line-height: 1.35;
}

.country-brief .country-introduction {
  max-width: 46rem;
  margin: 1.75rem 0 0;
  font-size: 1.08rem;
  line-height: 1.72;
}

.country-brief .country-introduction p {
  margin: 0 0 1rem;
}

.country-brief .country-section {
  padding: 2.4rem 0;
  border-top: 1px solid var(--country-rule-strong);
}

.country-brief .country-section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.country-brief .country-prose {
  max-width: 48rem;
  margin-top: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.country-brief .country-prose p {
  margin: 0 0 1rem;
}

.country-brief .country-name-list {
  margin: 1.15rem 0 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 3rem;
  line-height: 1.8;
}

.country-brief .country-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.15rem;
}

.country-brief .country-related-links a {
  display: inline-block;
  padding: .55rem .8rem;
  border: 1px solid var(--country-rule-strong);
  text-decoration: none;
}

@media (max-width: 640px) {
  .country-page {
    --country-wrap-width: min(calc(100% - 2rem), 68rem);
    --country-wrap-padding: 2.5rem 0 4rem;
    --country-hero-padding-bottom: 2.25rem;
    --country-facts-columns: 1fr;
  }

  .country-brief .country-name-list {
    columns: 1;
  }
}
