/*
 * Six Sides: The Column Atlas
 *
 * Dark basalt background, lava-orange accent, Unbounded for display type
 * over Space Grotesk for text.
 *
 * Sections, in page order:
 *   1. Fonts, palette and base
 *   2. Shared pieces (container, pill buttons)
 *   3. Header and hero
 *   4. Atlas: header and filters
 *   5. Atlas: map and its site dots
 *   6. Atlas: site card
 *   7. Atlas: site table
 *   8. "Why six?"
 *   9. Hexagon gallery
 *  10. About, site index, contribute, footer
 *
 * State classes all start with "is-" (is-selected, is-hidden, ...) and are
 * toggled from app.js.
 */

/* 1. Fonts, palette and base ----------------------------------------------- */

/*
 * Fonts, served from this site rather than Google Fonts so visitors' IP
 * addresses aren't sent to Google. Both are variable fonts (one file covers
 * every weight), split into Latin and Latin Extended so a browser only
 * downloads the second file for names that need it (ő, ł, ð...).
 * Licenses: fonts/OFL-*.txt (SIL Open Font License 1.1).
 */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/unbounded-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #0e0f10; /* page background, basalt */
  --bg-raised: #151718; /* atlas section background */
  --border: #26292a; /* hairlines between areas */
  --border-strong: #3a3e40; /* outlines of inputs and buttons */
  --text: #ede8df; /* main text */
  --text-soft: #d8d2c8; /* descriptions */
  --text-muted: #a8a39a; /* secondary text */
  --text-faint: #8f8a82; /* credits, small print */
  --accent: #ff5a1f; /* lava orange: links, dots, primary buttons */
  --accent-light: #ffb98f; /* man-made note */
  --link: #ff7a45;
  --link-hover: #ffa27a;
  --sand: #ede8df; /* light background of "Why six?" */
  --rust: #c23d0b; /* accent on the sand background */
}

* {
  box-sizing: border-box;
  min-width: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.5 "Space Grotesk",
    system-ui,
    sans-serif;
  overflow-x: clip;
}

a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 2. Shared pieces --------------------------------------------------------- */

/* Centred page column */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}
@media (max-width: 640px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Rounded button-like link */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.pill-solid {
  background: var(--accent);
  color: var(--bg);
}
.pill-solid:hover {
  background: var(--link);
  color: var(--bg);
}
.pill-outline {
  border: 2px solid var(--border-strong);
  color: var(--text);
  font-weight: 500;
}
.pill-outline:hover {
  border-color: var(--accent);
  color: var(--text);
}

/*
 * Site status icons, matching the map dots: solid dot for verified, hollow
 * ring for unverified, ⚒ for man-made. Used in the table and the site index.
 */
.status-icon {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  vertical-align: 0;
}
.status-verified {
  border-radius: 50%;
  background: var(--accent);
}
.status-unverified {
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.status-man-made {
  height: auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

/* 3. Header and hero ------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  color: var(--text);
}
.brand-name {
  display: block;
  font:
    900 22px/1 Unbounded,
    sans-serif;
  letter-spacing: 1px;
}
.brand-tagline {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 15px;
  align-items: center;
}
.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
}
.nav-link:hover {
  color: var(--accent);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 48px;
}
.hero-text {
  flex: 1 1 560px;
}
.hero h1 {
  margin: 0;
  font:
    900 clamp(40px, 6.4vw, 84px) / 0.98 Unbounded,
    sans-serif;
  letter-spacing: -0.02em;
  max-width: 14ch;
  text-wrap: balance;
}
.hero-lede {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.4;
  max-width: 600px;
}

/* The three big numbers next to the title */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}
.stat-number {
  display: block;
  font:
    800 52px/1 Unbounded,
    sans-serif;
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-muted);
}

/* 4. Atlas: header and filters --------------------------------------------- */

#atlas {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
}
.atlas-body {
  padding-top: 56px;
  padding-bottom: 72px;
}
.atlas-title {
  margin: 0;
  font:
    800 44px/1 Unbounded,
    sans-serif;
}
.atlas-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
}

/* Search box, country menu, the two toggles and "Clear" */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filters label {
  display: flex;
}
.filters input,
.filters select {
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font:
    16px "Space Grotesk",
    sans-serif;
}
.filters input {
  width: 240px;
}
.filters select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  /* Chevron drawn as an inline SVG */
  background: var(--bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23A8A39A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 18px center;
}

/* On/off filter button: dashed when off, orange border and a tick when on */
.toggle {
  position: relative;
  min-height: 46px;
  padding: 0 18px 0 34px;
  border-radius: 999px;
  border: 2px dashed var(--border-strong);
  background: transparent;
  color: var(--text);
  font:
    500 16px "Space Grotesk",
    sans-serif;
  cursor: pointer;
}
.toggle::before {
  content: "✓";
  position: absolute;
  left: 14px;
  opacity: 0;
  color: var(--accent);
}
.toggle[aria-pressed="true"] {
  border-color: var(--accent);
}
.toggle[aria-pressed="true"]::before {
  opacity: 1;
}

.clear-filters {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font:
    500 16px "Space Grotesk",
    sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

/* 5. Atlas: map and its site dots ------------------------------------------ */

/* Map and site card side by side; they stack on narrow screens */
.map-and-card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  align-items: stretch;
}
@media (min-width: 1148px) {
  .map-and-card {
    height: 660px;
  }
}

.map-frame {
  position: relative;
  flex: 999 1 640px;
  height: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
@media (min-width: 1148px) {
  .map-frame {
    height: auto;
  }
}

#map {
  position: absolute;
  inset: 0;
}
#map.leaflet-container {
  background: var(--bg);
  font:
    500 13px "Space Grotesk",
    sans-serif;
}

/* World outline (drawn from Natural Earth data in app.js) */
#map .land {
  fill: #2a2e30;
  fill-opacity: 1;
  stroke: none;
}
#map .country-border {
  stroke: var(--bg);
  stroke-width: 0.7px;
  fill: none;
}

/*
 * Site dots. Each site is a Leaflet circle marker with the class "site-dot".
 * Their radius is set in app.js (DOT_RADIUS).
 */
#map .site-dot {
  fill: var(--accent);
  fill-opacity: 1;
  stroke: none;
}
/* Unverified site: hollow ring */
#map .site-dot.is-unverified {
  fill-opacity: 0;
  stroke: var(--accent);
  stroke-width: 2px;
}
/* Filtered out */
#map .site-dot.is-hidden {
  display: none;
}
/* The site shown in the card: solid white, same size as the others */
#map .site-dot.is-selected {
  fill: #fff;
  fill-opacity: 1;
  stroke: none;
}

/* Leaflet's own controls, restyled to match */
#map .leaflet-tooltip {
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  padding: 4px 10px;
  font:
    500 13px "Space Grotesk",
    sans-serif;
  box-shadow: none;
}
#map .leaflet-tooltip-top:before {
  border-top-color: var(--text);
}
#map .leaflet-bar {
  border: 1px solid var(--border-strong);
  box-shadow: none;
  border-radius: 10px;
  overflow: hidden;
}
#map .leaflet-bar a {
  width: 36px;
  height: 36px;
  background: var(--bg-raised);
  color: var(--text);
  border-bottom-color: var(--border-strong);
  font: 500 20px/36px "Space Grotesk";
}
#map .leaflet-control-attribution {
  background: rgba(14, 15, 16, 0.8);
  color: var(--text-muted);
  font-size: 11px;
}
#map .leaflet-control-attribution a {
  color: var(--link);
}

/* Bottom-left badge: "Showing 12 of 300 sites" and the zoom-out link */
.map-info {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 15, 16, 0.85);
  font-size: 13px;
  color: var(--text-soft);
}
#zoom-out {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font:
    500 13px "Space Grotesk",
    sans-serif;
  text-decoration: underline;
  cursor: pointer;
}
#zoom-out:hover {
  color: var(--link-hover);
}
#zoom-out[hidden] {
  display: none;
}

/* 6. Atlas: site card ------------------------------------------------------ */

.site-card {
  flex: 1 1 420px;
  height: 660px;
  background: var(--bg);
  border: 1px solid #2c2f30;
  border-radius: 20px;
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.card-photo {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  background: var(--border);
}
.card-no-photo {
  height: 230px;
  display: grid;
  place-items: center;
  background: var(--bg-raised);
}
.card-body {
  padding: 20px 24px 22px;
}
/* Country on the left, verified / unverified on the right */
.card-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.card-status .is-verified {
  color: var(--accent);
}
.site-card h3 {
  margin: 6px 0 0;
  font:
    800 28px/1.05 Unbounded,
    sans-serif;
  overflow-wrap: anywhere;
}
.card-description {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-soft);
}
.card-man-made-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--accent-light);
}

/* Popularity / Columns / Access, each shown as five dots */
.ratings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rating {
  font-size: 12px;
  color: var(--text-muted);
}
.rating-dots {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  white-space: nowrap;
}
/* Score dots, drawn here rather than as ● ◐ ○ characters, which come from
   different fallback fonts and don't line up */
.dots {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.dot {
  display: inline-block;
  flex: none; /* empty boxes: Safari would otherwise shrink them away */
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.dot-full {
  background: currentColor;
}
.dot-half {
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.rating-dots.not-rated {
  color: var(--text-faint);
  letter-spacing: 0;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  font-size: 14px;
}

.coordinates {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.copy-coordinates {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font:
    12px "Space Grotesk",
    sans-serif;
  text-decoration: underline;
  cursor: pointer;
}
.copy-coordinates:hover {
  color: var(--text);
}

.photo-credit {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}
.photo-credit a {
  color: var(--text-muted);
}
.suggest-fix {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* 7. Atlas: site table ----------------------------------------------------- */

.site-table {
  margin-top: 24px;
  height: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: auto;
}
.site-rows {
  min-width: 760px;
}

/* Shared grid for the header row and every site row:
   name, country, popularity, access, columns */
.table-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 130px 130px 130px;
  gap: 12px;
  align-items: center;
  padding: 0 22px;
}
.table-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 4px;
  padding-bottom: 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* Column heading; click to sort */
.sort-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font:
    600 13px "Space Grotesk",
    sans-serif;
  text-align: left;
  cursor: pointer;
}
.sort-button.is-sorted {
  color: var(--text);
}

.site-row {
  width: 100%;
  min-height: 48px;
  padding-top: 12px;
  padding-bottom: 12px;
  border: 0;
  border-bottom: 1px solid #1c1e1f;
  background: transparent;
  color: var(--text);
  font:
    15px "Space Grotesk",
    sans-serif;
  text-align: left;
  cursor: pointer;
}
.site-row:hover {
  background: #1a1c1d;
}
.site-row.is-selected {
  background: #2a1a12;
}
.cell-name {
  font-weight: 500;
}
.cell-country {
  color: var(--text-muted);
}
.cell-rating {
  color: var(--accent);
  letter-spacing: 1px;
  white-space: nowrap;
}

.empty-message {
  padding: 24px 22px;
  color: var(--text-muted);
}

/* Phones: show only the name and the columns rating */
@media (max-width: 640px) {
  .site-rows {
    min-width: 0;
  }
  .table-row {
    grid-template-columns: minmax(0, 1fr) 92px;
  }
  .table-row > :nth-child(2),
  .table-row > :nth-child(3),
  .table-row > :nth-child(4) {
    display: none;
  }
  .filters input {
    width: 100%;
  }
  .filters,
  .filters label {
    flex: 1 1 100%;
  }
}

/* 8. "Why six?" ------------------------------------------------------------ */

#why {
  background: var(--sand);
  color: var(--bg);
}
.why-body {
  padding-top: 72px;
  padding-bottom: 72px;
}
#why h2 {
  margin: 0;
  font:
    800 56px/0.95 Unbounded,
    sans-serif;
}

/* Three steps: temperature, title, explanation */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
  margin-top: 36px;
}
.step-temperature {
  display: block;
  font:
    900 64px/1 Unbounded,
    sans-serif;
  color: var(--rust);
}
.steps h3 {
  margin: 12px 0 0;
  font-size: 20px;
}
.steps p {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.55;
}

/* "Seen from above": text plus the row of 4- to 8-sided polygons */
.seen-from-above {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #cfc8bc;
}
.seen-from-above-text {
  flex: 1 1 360px;
}
.seen-from-above h3 {
  margin: 0;
  font-size: 20px;
}
.seen-from-above p {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.55;
  max-width: 460px;
}
.seen-from-above strong {
  color: var(--rust);
}
.polygons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
}
.polygon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #5a5650;
}
.polygon.is-six {
  color: var(--rust);
  font-weight: 700;
}

/* 9. Hexagon gallery ------------------------------------------------------- */

/*
 * Three rows of hexagonal photo tiles. Rows overlap vertically and every
 * other row shifts half a tile right, so they nest like a honeycomb.
 */
#gallery {
  padding: 56px 0 40px;
  overflow: hidden;
}
.hex-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.hex-row + .hex-row {
  margin-top: -42px;
}
.hex-row.is-offset {
  transform: translateX(87px);
}

/* The outer hexagon; it shows as an orange frame when selected */
.hex {
  position: relative;
  flex: none;
  width: 168px;
  height: 194px;
  padding: 0;
  border: 0;
  background: var(--bg);
  cursor: pointer;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hex.is-selected {
  background: var(--accent);
}
/* The inner hexagon holding the photo; inset when selected to reveal the frame */
.hex-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1d2021;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hex.is-selected .hex-fill {
  inset: 5px;
}
.hex img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.hex:hover img {
  transform: scale(1.06);
}
/* Dark gradient so the caption stays readable */
.hex-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background: linear-gradient(transparent, rgba(10, 11, 12, 0.92));
}
.hex-title {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 46px;
  text-align: center;
  font:
    700 14px/1.15 "Space Grotesk",
    sans-serif;
  color: #fff;
}
.hex-country {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 30px;
  text-align: center;
  font:
    500 12px "Space Grotesk",
    sans-serif;
  color: var(--text-soft);
}
@media (max-width: 640px) {
  .hex {
    width: 120px;
    height: 139px;
  }
  .hex-row + .hex-row {
    margin-top: -30px;
  }
  .hex-row.is-offset {
    transform: translateX(63px);
  }
  .hex-title {
    font-size: 12px;
    bottom: 34px;
    left: 12px;
    right: 12px;
  }
  .hex-country {
    font-size: 11px;
    bottom: 20px;
  }
}

/* 10. About, site index, contribute, footer -------------------------------- */

#about {
  padding-top: 72px;
  padding-bottom: 24px;
}
#about h2 {
  margin: 0;
  font:
    800 36px/1 Unbounded,
    sans-serif;
}
#about > p {
  margin: 14px 0 0;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-soft);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 28px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}
.about-grid h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text);
}

/* "Every site, by country": a collapsed list, countries in newspaper-style columns */
/* Sits right under the gallery, which has its own bottom padding */
#all-sites {
  position: relative; /* anchors the legend */
  padding-top: 8px;
}
/* Collapsed by default: the heading is the button that opens it */
#all-sites summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  cursor: pointer;
  list-style: none;
}
#all-sites summary::-webkit-details-marker {
  display: none;
}
/* Solid triangle: points right when closed, down when open */
#all-sites summary::before {
  content: "";
  flex: none;
  width: 12px;
  height: 14px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: transform 0.2s;
}
#all-sites details[open] summary::before {
  transform: rotate(90deg);
}
#all-sites h2 {
  margin: 0;
  font:
    800 20px/1.2 Unbounded,
    sans-serif;
}
#all-sites-count {
  color: var(--text-muted);
  font-weight: 500;
}
.site-index {
  columns: 220px;
  column-gap: 28px;
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.5;
}
.site-index-country {
  break-inside: avoid;
  margin-bottom: 16px;
}
.site-index h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.site-index ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-index li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
/*
 * Key to the status icons. It sits inside <details>, so it only shows when the
 * list is open, and is lifted onto the heading's line, at the right.
 */
.site-index-legend {
  position: absolute;
  top: 10px;
  right: 52px; /* the container's 32px side padding, plus 20px */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.site-index-legend .status-icon {
  margin-right: 3px;
}
/* Narrow screens: no room beside the heading, so it goes under it */
@media (max-width: 760px) {
  .site-index-legend {
    position: static;
    margin-top: 16px;
  }
}
.site-index a {
  color: var(--text-soft);
  text-decoration: none;
}
.site-index a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Orange "Know a column we missed?" banner */
.contribute-section {
  padding-top: 48px;
  padding-bottom: 80px;
}
.contribute {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background: var(--accent);
  color: var(--bg);
}
.contribute-text {
  flex: 1 1 480px;
}
.contribute h2 {
  margin: 0;
  font:
    900 clamp(32px, 4vw, 48px) / 0.95 Unbounded,
    sans-serif;
}
.contribute p {
  margin: 14px 0 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.5;
}
/* Two buttons side by side, the GeoJSON download below them at the right; all keep their own width */
.contribute-actions {
  display: grid;
  grid-template-columns: auto auto;
  justify-items: start;
  gap: 10px;
}
#download-geojson {
  grid-column: 1 / -1;
  justify-self: end;
}
@media (max-width: 640px) {
  .contribute-actions {
    grid-template-columns: 1fr;
  }
}
.contribute .pill {
  min-height: 52px;
  padding: 0 26px;
}
.contribute :focus-visible {
  outline-color: var(--bg);
}
/* Dark pill on the orange banner */
.pill-dark {
  background: var(--bg);
  color: var(--text);
}
.pill-dark:hover {
  color: var(--accent);
}
/* Outlined pill on the orange banner */
.pill-on-accent {
  border: 2px solid var(--bg);
  background: transparent;
  color: var(--bg);
  font:
    700 16px "Space Grotesk",
    sans-serif;
}
.pill-on-accent:hover {
  background: rgba(14, 15, 16, 0.1);
  color: var(--bg);
}

footer {
  border-top: 1px solid var(--border);
}
.footer-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
