/* Layout for the static country pages (country/<name>/). Colours, the header,
   the fact card and the footer come from style.css. */
.app-header .site-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.country-page {
  align-items: stretch;
  max-width: 820px;
  gap: 1.5rem;
}

.country-page .fact-card {
  max-width: none;
  margin-top: 0;
}

.country-page .fact-card h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
}

.country-page .fact-card .intro {
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

.country-page .stat-heading {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.country-page .no-borders {
  margin: 0;
  color: var(--text-muted);
}

.country-page a.border-chip,
.country-page span.border-chip {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
}

/* The "More in <subregion>" card sits outside .fact-card, so give its chips the same look. */
.page-card .borders-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-card .border-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.3rem 0.75rem;
  margin: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
}

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

.crumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.crumbs a {
  color: var(--accent);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px var(--shadow);
  padding: 1.5rem 1.75rem;
}

.page-card h2 {
  margin: 0 0 0.9rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.country-map {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}

.country-map .map-sea {
  fill: var(--map-ocean);
}

.country-map .map-land {
  fill: var(--map-fill);
  stroke: var(--map-stroke);
  stroke-width: 1;
  stroke-linejoin: round;
}

.country-map .map-country {
  fill: var(--map-highlight);
  stroke: var(--map-stroke);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* A dot of at least a set size for each island too small to read as one. */
.country-map .map-dots circle {
  fill: var(--map-highlight);
  stroke: var(--map-stroke);
  stroke-width: 1;
}

/* The ring round a country too small to see at the close-up's scale. */
.country-map .map-ring-halo {
  fill: none;
  stroke: var(--map-fill);
  stroke-width: 7;
}

.country-map .map-ring {
  fill: none;
  stroke: var(--map-highlight);
  stroke-width: 3.5;
}

.country-map .inset-land {
  fill: var(--map-fill);
  stroke: var(--map-stroke);
  stroke-width: 0.4;
}

.country-map .inset-country {
  fill: var(--map-highlight);
  stroke: var(--map-stroke);
  stroke-width: 0.6px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.country-map .inset-ring {
  fill: none;
  stroke: var(--map-highlight);
  stroke-width: 1.3px;
  vector-effect: non-scaling-stroke;
}

.country-map .map-inset-frame {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  rx: 3;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-links a {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.index-title {
  margin: 0;
  font-size: 1.6rem;
}

.region-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.region-jumps a {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.region-jumps a span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.region-jumps a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-card[id] {
  scroll-margin-top: 1rem;
}

/* Columns, so names run alphabetically down each one. */
.country-list {
  margin: 0;
  padding: 0;
  list-style: none;
  column-width: 12rem;
  column-gap: 1.5rem;
}

.country-list li {
  break-inside: avoid;
  padding: 0.2rem 0;
}

.country-list a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent);
  text-decoration: none;
}

.country-list a:hover {
  text-decoration: underline;
}

.list-flag {
  flex: none;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--border);
}

@media (max-width: 700px) {
  .country-list {
    column-width: 9rem;
    column-gap: 1rem;
  }

  .country-page {
    padding: 1.25rem 1rem 3rem;
  }

  .page-card {
    padding: 1.25rem;
  }

  .cta-links a {
    flex: 1 1 100%;
  }
}
