/* Smart Infographics: bold and colourful. Tokens first; dark mode redefines them. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #FFFBF4;
  --card: #FFFFFF;
  --ink: #16141F;
  --ink-2: #4A4556;
  --muted: #5A5566;
  --line: #ECE5D8;
  --track: #F2EEE6;
  --neutral: #8A8496;
  --map-land: #E2DED6;
  --map-edge: #FFFFFF;
  /* the coastline (3.6:1 against the sea, 4.5:1 against the card) and "no data" as a hatch (its lines 3:1 against
     their ground, soft so the borders show: those of a country without data are in the coast's grey, 3.7:1): so no data
     never looks like few, and land never melts into the sea (WCAG 1.4.11) */
  --map-coast: #7D7768; --map-nodata: #EEEBE5; --map-hatch: #ABA595;
  --globe-sea: #DCE9F7;
  --map-lake: var(--card);   /* the lakes as the sea: the background of the map */
  --globe-grid: rgba(22, 20, 31, .07);
  --dark: #16141F;
  --dark-2: #26232F;
  --on-dark: #FFFBF4;
  --sun: #FFC233;
  --blue: #2B5BD7;
  --accent: #2B5BD7;
  --accent-d: #7D9BFF;
  --link: #2B5BD7;
  --radius: 28px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12111A;
    --card: #1C1A26;
    --ink: #F4F1EA;
    --ink-2: #CFC9DA;
    --muted: #ADA7B8;
    --line: #2E2B3A;
    --track: #2A2735;
    --neutral: #77718A;
    --map-land: #3A3747;
    --map-edge: #1C1A26;
    --map-coast: #A9A4BA; --map-nodata: #2B2935; --map-hatch: #5F5A72;
    --globe-sea: #142033;
    --globe-grid: rgba(255, 255, 255, .06);
    --dark: #26232F;
    --dark-2: #33303D;
    --link: #8FA8FF;
  }
  :root:not([data-theme="light"]) body { --mark: var(--accent-d); --mark-soft: color-mix(in srgb, var(--accent-d) 40%, #1C1A26); }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12111A; --card: #1C1A26; --ink: #F4F1EA; --ink-2: #CFC9DA; --muted: #ADA7B8;
  --line: #2E2B3A; --track: #2A2735; --neutral: #77718A; --map-land: #3A3747; --map-edge: #1C1A26;
  --map-coast: #A9A4BA; --map-nodata: #2B2935; --map-hatch: #5F5A72;
  --globe-sea: #142033; --globe-grid: rgba(255, 255, 255, .06);
  --dark: #26232F; --dark-2: #33303D; --link: #8FA8FF;
}
/* The entity's colour is set on <body>, so the marks that use it are defined there too. */
body { --mark: var(--accent); --mark-soft: color-mix(in srgb, var(--accent) 38%, #FFFFFF); }
:root[data-theme="dark"] body { --mark: var(--accent-d); --mark-soft: color-mix(in srgb, var(--accent-d) 40%, #1C1A26); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap { padding-left: 24px; padding-right: 24px; } }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.kicker { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }

/* type */
.display { margin: 0; font-size: clamp(44px, 7vw, 78px); line-height: .98; font-weight: 800; letter-spacing: -.035em; }
.display-sm { margin: 0; font-size: clamp(40px, 6vw, 72px); line-height: .95; font-weight: 800; letter-spacing: -.035em; }
.display .hl { background: var(--sun); color: #16141F; padding: 0 10px; border-radius: 14px; }
.display .blue { color: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .display .blue { color: #8FA8FF; } }
.h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.h3 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; }
.lead { margin: 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 640px; }
.lead-sm { margin: 0; font-size: 18px; }
.label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.label-inline { font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* header and footer */
.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.nav a { padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { background: var(--track); }
.nav a[aria-current="page"] { background: var(--sun); color: #16141F; font-weight: 700; }
.pill-dark { padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill-white { padding: 8px 14px; border-radius: 999px; background: #fff; color: #2B5BD7; font-weight: 800; font-size: 14px; white-space: nowrap; }
.foot { border-top: 1px solid var(--line); margin-top: 48px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--muted); }
.crumbs { padding-top: 20px; font-size: 15px; }
.crumbs nav { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.crumbs [aria-current] { font-weight: 700; color: var(--ink); }

/* buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 2px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 18px; border-radius: 16px; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-white { background: #fff; color: #16141F; }
.btn-line { background: transparent; border-color: #fff; color: #fff; }
.btn-line-ink { background: var(--card); border-color: var(--ink); color: var(--ink); }
.btn-icon { width: 48px; padding: 0; font-size: 20px; }
.btn:hover { filter: brightness(1.08); }
.input, .select { min-height: 50px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); font-size: 17px; width: 100%; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-btn, .sort-btn, .tabs button, .tabs a { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
.sort-btn { border-radius: 10px; min-height: 36px; font-size: 14px; border-color: transparent; background: var(--track); }
.chip-btn[aria-pressed="true"], .tabs [aria-selected="true"], .tabs [aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sort-btn[aria-pressed="true"] { background: var(--sun); color: #16141F; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs-wrap { margin-bottom: 16px; }

/* home */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 48px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-cards { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 580px; }
.search input { flex: 1 1 260px; min-width: 0; min-height: 56px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); font-size: 18px; }
.try { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ink-2); font-size: 15px; }
.try a { font-weight: 600; }
.feature { display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: var(--radius); color: #fff; text-decoration: none; transform: rotate(-2deg); box-shadow: 0 18px 0 -6px var(--ink); }
.feature-head { display: flex; align-items: center; gap: 16px; }
.feature-head > span { display: flex; flex-direction: column; }
.feature-name { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.feature-sub { font-size: 15px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-tile { padding: 14px 16px; border-radius: 18px; display: flex; flex-direction: column; gap: 2px; }
.mini-label { font-size: 13px; font-weight: 700; }
.mini-value { font-size: 24px; font-weight: 800; line-height: 1.1; }
.mini-sub { font-size: 13px; }
.bubble { align-self: flex-end; max-width: 340px; padding: 18px 20px; border-radius: 22px; background: #6A4BE3; color: #fff; font-size: 17px; line-height: 1.4; transform: rotate(1.5deg); }
.section { padding-top: 32px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 22px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.theme-card { min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: var(--radius); background: #2B5BD7; color: #fff; text-decoration: none; }
@media (max-width: 600px) { .theme-card { grid-column: auto; } }
.theme-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.theme-card-head > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.theme-card-name { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.theme-card-sub { font-size: 16px; }
.theme-card-map { display: block; border-radius: 18px; background: #fff; padding: 10px; min-height: 120px; }
.theme-next { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--radius); background: var(--card); border: 2px dashed var(--line); }
.band { background: var(--dark); color: var(--on-dark); margin: 24px 0; }
.band .section { padding-top: 48px; padding-bottom: 48px; }
.band-note { margin: 0; color: #CFC9DA; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fact-tile { padding: 22px; border-radius: 22px; font-size: 19px; line-height: 1.35; font-weight: 600; text-decoration: none; }
.fact-tile strong { font-weight: 800; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.how-step { display: flex; flex-direction: column; gap: 10px; }
.how-step p { margin: 0; }
.how-num { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; font-weight: 800; }

/* flags */
.flag { display: block; width: 64px; height: 48px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(22, 20, 31, .12); object-fit: cover; background: var(--track); }
.flag-sm { width: 32px; height: 24px; border-radius: 4px; }
.flag-lg { width: 112px; height: 84px; border-radius: 10px; }
.flag-xl { width: 168px; height: 126px; border-radius: 14px; box-shadow: 0 0 0 5px #fff; position: relative; }
.flag-ring { box-shadow: 0 0 0 4px #fff; }
.flag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 720px) { .card { padding: 28px; } }
.card-dark { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend-ramp i { width: 40px; height: 12px; border-radius: 3px; }
.legend-ramp span { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
.split-2 { display: flex; flex-wrap: wrap; gap: 24px; }
.split-main { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-side { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card.split-2 { flex-direction: row; }
.table-box, .table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--track); text-align: left; vertical-align: top; }
.table thead th { color: var(--muted); font-size: 13px; border-bottom: 2px solid var(--line); }
.table tbody th { font-weight: 600; }
.table .num { text-align: right; }

/* infographic */
.infographic { display: flex; flex-direction: column; gap: 24px; padding-top: 20px; padding-bottom: 24px; background: var(--bg); }
.ig-head { position: relative; overflow: hidden; border-radius: 32px; background: var(--accent); color: #fff; padding: 32px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
@media (min-width: 720px) { .ig-head { padding: 40px; } }
.ig-deco { position: absolute; border-radius: 50%; opacity: .9; }
.ig-deco1 { right: -60px; top: -60px; width: 240px; height: 240px; }
.ig-deco2 { right: 140px; bottom: -100px; width: 180px; height: 180px; }
.ig-title { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.ig-name { margin: 0; font-size: clamp(48px, 9vw, 96px); line-height: .92; font-weight: 800; letter-spacing: -.04em; overflow-wrap: anywhere; }
.ig-official { margin: 0; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; background: #fff; color: #16141F; font-weight: 700; font-size: 15px; text-decoration: none; }
.ig-actions { display: flex; flex-direction: column; gap: 10px; position: relative; }
@media (max-width: 720px) { .ig-actions { flex-direction: row; flex-wrap: wrap; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.stat { padding: 22px; border-radius: 24px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat a { color: inherit; }
.stat-label { font-size: 15px; font-weight: 700; }
.stat-value { font-size: clamp(32px, 4vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; overflow-wrap: anywhere; }
.stat-sub { font-size: 14px; }
.stat-text { font-size: 20px; font-weight: 800; line-height: 1.25; }
.stat-sm { padding: 20px; }
.stat-bar { height: 8px; border-radius: 4px; background: rgba(22, 20, 31, .18); overflow: hidden; margin-top: 4px; }
.stat-bar span { display: block; height: 8px; background: currentColor; border-radius: 4px; }
.smart { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.smart li { padding: 18px 20px; border-radius: 20px; background: var(--dark-2); display: flex; gap: 14px; align-items: flex-start; font-size: 18px; line-height: 1.4; }
.smart strong { color: var(--sun); }
.smart-dot { flex: none; width: 34px; height: 34px; border-radius: 11px; }
.map { margin: 0; position: relative; }
.map svg { display: block; width: 100%; height: auto; }
.map path, .map circle.dot { stroke: var(--map-edge); stroke-width: .4; stroke-linejoin: round; }
.map .hit:hover { filter: brightness(.85); cursor: pointer; }
.tz-map svg > g > path.hit { pointer-events: none; }
.tz-labels { pointer-events: none; }
.tz-labels text { text-anchor: middle; dominant-baseline: middle; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-linejoin: round; fill: #16141F; }
.tz-hour { font-size: 9px; stroke-width: 2.5px; }
.tz-name { font-size: 7.5px; stroke-width: 2.2px; }
.map path.lake { fill: var(--map-lake); stroke: var(--map-coast); stroke-width: .6; pointer-events: none; }
/* the coastline: every country drawn once more underneath with a thick dark edge; the fills on top cover it
   between neighbours, so only the coast stays (drawMap(), mapDecor()) */
.map svg g.coast path { fill: none; stroke: var(--map-coast); stroke-width: 2.4; stroke-linejoin: round; pointer-events: none; }
/* "no data" in a legend: the same hatch as on the map */
.legend i.no-data, i.no-data { background: repeating-linear-gradient(45deg, var(--map-hatch) 0 1px, var(--map-nodata) 1px 5px); }
/* a country without data: its borders in the coast's grey, so each one still shows inside the hatch */
.map path.no-data { stroke: var(--map-coast); }
.map .inset { position: absolute; left: 8px; bottom: 8px; width: 34%; border-radius: 16px; border: 3px solid var(--mark); background: var(--card); overflow: hidden; box-shadow: 0 8px 24px rgba(22, 20, 31, .18); }
.map-lg { min-height: 160px; }
.map-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.shape { margin: 0; align-self: center; width: 100%; max-width: 360px; }
.shape svg { display: block; width: 100%; height: auto; }
.shape-text { margin: 0; font-size: 17px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.share { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.share > div { flex: 1 1 180px; display: flex; flex-direction: column; gap: 4px; }
.share-label { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.share-text { margin: 0; font-size: 18px; line-height: 1.4; }
.chart { margin: 0; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-note { margin: 0; font-size: 16px; }
.axis text { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.grid line { stroke: var(--line); }
.baseline { stroke: var(--neutral); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) minmax(90px, auto); gap: 12px; align-items: center; }
.bar-name { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; color: var(--ink); text-decoration: none; }
.bar-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row.self .bar-name { font-weight: 800; }
.bar-track { height: 22px; background: var(--track); border-radius: 4px; position: relative; }
.bar-fill { height: 22px; background: var(--neutral); border-radius: 0 4px 4px 0; min-width: 3px; }
.bar-row.self .bar-fill { background: var(--mark); }
.bar-world { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }
.bar-row.self .bar-val { font-weight: 800; }
.bars-note { font-size: 14px; color: var(--muted); margin: 0; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
.people { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 6px 4px; max-width: 520px; }
.people span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.people i { width: 9px; height: 9px; border-radius: 50%; background: var(--track); }
.people b { width: 14px; height: 14px; border-radius: 7px 7px 3px 3px; background: var(--track); }
.people .on i, .people .on b { background: var(--mark); }
.segbar { display: flex; gap: 2px; height: 32px; border-radius: 6px; overflow: hidden; }
.segbar span { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; min-width: 2px; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: baseline; }
.meter-label { font-weight: 700; }
.meter-value { font-weight: 800; font-size: 20px; }
.meter-track { grid-column: 1 / -1; position: relative; height: 14px; border-radius: 7px; background: var(--track); }
.meter-fill { display: block; height: 14px; border-radius: 7px; background: var(--mark); }
.meter-tick { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.meter-world { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.info { padding: 18px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.info-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.info-value { font-size: 20px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }

/* theme index */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 40px; padding-bottom: 24px; }
.page-head > div { display: flex; flex-direction: column; gap: 10px; }
.list-wrap { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.list-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .input { flex: 1 1 240px; width: auto; }
.list-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.ecard { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); border-bottom: 6px solid var(--c); text-decoration: none; color: var(--ink); min-width: 0; }
.ecard:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -2px var(--c); }
.ecard[hidden] { display: none; }
.ecard-name { font-size: 19px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.ecard-line { font-size: 14px; color: var(--ink-2); }
.ecard-sub { font-size: 13px; color: var(--muted); }
.more { align-self: center; }
.side-list { flex: 1 1 300px; min-width: 0; border-radius: var(--radius); background: #2B5BD7; color: #fff; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.side-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.side-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 17px; }
.side-list a { color: #fff; font-weight: 700; text-decoration: none; }
.side-list .side-more { text-decoration: underline; }
.side-rank { font-weight: 800; color: #FFC233; }

/* ranking */
.rank-list { list-style: none; margin: 0; padding: 16px 20px; gap: 4px; }
.rank-list li { display: grid; grid-template-columns: 44px minmax(150px, 240px) minmax(0, 1fr) minmax(110px, auto); gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--track); }
.rank-list li[hidden] { display: none; }
.rank-n { font-weight: 800; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rank-name { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; min-width: 0; }
.rank-bar { height: 18px; background: var(--track); border-radius: 4px; }
.rank-bar span { display: block; height: 18px; border-radius: 0 4px 4px 0; background: var(--c); min-width: 2px; }
.rank-value { text-align: right; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rank-bar span { background: var(--cd); } }
@media (max-width: 640px) { .rank-list li { grid-template-columns: 36px 1fr auto; } .rank-bar { grid-column: 2 / -1; grid-row: 2; } }

/* compare */
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); border-radius: 32px; overflow: hidden; }
.vs-side { padding: 32px; display: flex; flex-direction: column; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.vs-right { align-items: flex-end; text-align: right; }
.vs-name { font-size: clamp(30px, 5vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: .95; overflow-wrap: anywhere; }
.vs-sub { font-size: 17px; }
.vs-mid { background: #16141F; color: #FFC233; display: grid; place-items: center; padding: 0 18px; font-size: 34px; font-weight: 800; }
@media (max-width: 640px) { .vs { grid-template-columns: 1fr; } .vs-right { align-items: flex-start; text-align: left; } .vs-mid { padding: 8px; } }
.pick { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { flex: 1 1 220px; min-width: 0; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; align-content: start; }
.h2h { display: flex; flex-direction: column; }
.h2h-row { display: grid; grid-template-columns: minmax(80px, 130px) minmax(0, 1fr) minmax(130px, 190px) minmax(0, 1fr) minmax(80px, 130px); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--track); }
.h2h-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.h2h-val-r { text-align: left; }
.h2h-bar { height: 20px; display: flex; }
.h2h-left { justify-content: flex-end; }
.h2h-bar span { display: block; height: 20px; border-radius: 0 4px 4px 0; }
.h2h-left span { border-radius: 4px 0 0 4px; }
.h2h-label { text-align: center; font-weight: 800; display: flex; flex-direction: column; line-height: 1.2; }
.h2h-label a { color: var(--ink); text-decoration: none; }
.h2h-label small { font-weight: 400; color: var(--muted); }
@media (max-width: 640px) { .h2h-row { grid-template-columns: 1fr 1fr; } .h2h-label { grid-column: 1 / -1; grid-row: 1; } .h2h-val { grid-row: 2; text-align: left; } .h2h-val-r { text-align: right; } .h2h-bar { grid-row: 3; } }


/* explore tiles (theme index, country page) */
.explore { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.explore a { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 24px; text-decoration: none; min-height: 132px; }
.explore a:hover { filter: brightness(1.05); transform: translateY(-2px); }
.explore-name { font-size: 24px; font-weight: 800; line-height: 1.1; }
.explore-text { font-size: 15px; }

/* A1 then and now */
.tm-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); border-radius: 32px; overflow: hidden; min-height: 220px; }
.tm-then { background: var(--dark); color: var(--on-dark); padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.tm-now { background: var(--accent); color: #fff; padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.tm-year { font-size: clamp(64px, 11vw, 132px); font-weight: 800; line-height: .85; letter-spacing: -.04em; }
.tm-name { font-size: clamp(40px, 7vw, 84px); font-weight: 800; line-height: .9; letter-spacing: -.04em; overflow-wrap: anywhere; }
.tm-label { font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 640px) { .tm-head { grid-template-columns: 1fr; } }
.tm-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.tm-headline p { margin: 0; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.35; font-weight: 600; }
.tm-headline strong { color: var(--sun); }
.tm-rows { display: flex; flex-direction: column; }
.tm-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(80px, 120px) minmax(0, 1fr) minmax(90px, 130px) minmax(100px, 140px); gap: 6px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--track); }
.tm-row-head { font-size: 13px; color: var(--muted); font-weight: 700; padding-top: 0; }
.tm-fact a { color: var(--ink); font-weight: 800; text-decoration: none; }
.tm-val { display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tm-val small { color: var(--muted); font-size: 12px; }
.tm-bars { display: flex; flex-direction: column; gap: 4px; }
.tm-b { display: block; height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.tm-b-then { background: var(--neutral); }
.tm-b-now { background: var(--mark); }
.tm-chg { justify-self: start; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; background: var(--track); }
.tm-chg.up { background: color-mix(in srgb, var(--mark) 18%, var(--card)); }
.tm-world { grid-column: 2 / -1; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .tm-row { grid-template-columns: 1fr 1fr; }
  .tm-row-head { display: none; }
  .tm-fact { grid-column: 1 / -1; }
  .tm-bars { grid-column: 1 / -1; grid-row: 3; }
  .tm-chg { grid-column: 1 / -1; }
  .tm-world { grid-column: 1 / -1; }
}

/* A2 the world as 100 people */
.hp-body { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; }
.people-lg { flex: 1 1 420px; max-width: 560px; gap: 8px 6px; }
.people-lg i { width: 12px; height: 12px; }
.people-lg b { width: 19px; height: 19px; border-radius: 10px 10px 4px 4px; }
.people-lg span i, .people-lg span b { background: var(--pc); }
.hp-legend { flex: 1 1 260px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hp-legend li { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.hp-n { min-width: 48px; height: 36px; padding: 0 8px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: var(--pc); font-variant-numeric: tabular-nums; text-shadow: 0 0 2px rgba(0, 0, 0, .5); }
.hp-label a { color: var(--ink); font-weight: 700; }

/* A3 ranking race */
.race-stage { border-radius: 18px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.race-stage canvas { display: block; width: 100%; height: auto; }
.race-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.race-year { display: flex; gap: 10px; align-items: center; flex: 1 1 260px; }
.race-year input { flex: 1; accent-color: var(--blue); min-height: 44px; }
.race-speed { display: flex; gap: 8px; align-items: center; }
.race-speed .select { width: auto; min-height: 44px; }
.race-table caption { text-align: left; }
.race-table td:first-child { width: 3em; }
.race-table th { text-align: left; }


/* pictures that are not flags (planets, …) */
.flag.is-pic { box-shadow: none; background: none; border-radius: 0; object-fit: contain; }
.flag-xl.is-pic, .flag-lg.is-pic { box-shadow: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.svg-ink { fill: var(--ink); font-family: var(--font); }
.svg-muted { fill: var(--muted); font-family: var(--font); }
.scale-row { margin: 0; }
.scale-row svg { display: block; width: 100%; height: auto; max-height: 340px; }
.card-space { background: #12111A; color: #F4F1EA; border-color: #12111A; }
.card-space .svg-ink { fill: #F4F1EA; }
.theme-card-space { background: #12111A; }
.theme-card-space svg { display: block; width: 100%; height: auto; }
.ig-head-planet { background: radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--accent) 70%, #fff) 0, var(--accent) 45%, color-mix(in srgb, var(--accent) 60%, #000) 100%); }
.weight-in { display: flex; flex-direction: column; max-width: 260px; }
.weight-input { font-size: 22px; font-weight: 800; }
.weight-out { margin: 0; font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; }


/* cities */
.small-h { font-size: 18px; margin-top: 8px; }
details.tbl summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.months { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 640px) { .months { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.month { border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; }
.month-t { font-size: 13px; font-weight: 600; }
.m-best { background: #12B89A; color: #16141F; }
.m-good { background: #9be3d2; color: #16141F; }
.m-ok { background: var(--track); color: var(--ink); }
.m-less { background: var(--card); color: var(--muted); border: 1px dashed var(--line); }
.legend i.m-best, .legend i.m-good, .legend i.m-ok, .legend i.m-less { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }


/* settings and admin */
.notice { margin: 0; padding: 14px 18px; border-radius: 14px; background: #d8f4ec; color: #0b4d40; font-weight: 600; }
.code-block { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--dark); color: var(--on-dark); font-size: 13px; overflow-x: auto; white-space: pre-wrap; }
.field-set { border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--blue); }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.s-ok { background: #d8f4ec; color: #0b4d40; }
.s-failed { background: #fde0dc; color: #8a1c10; }
.s-running, .s-queued { background: #fff1c7; color: #6b4b00; }
.admin-nav { align-items: center; }
.admin-who { margin-left: auto; }
.sched-row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--track); }
.input-sm { width: 90px; min-height: 40px; display: inline-block; font-size: 16px; }
details.run { border-bottom: 1px solid var(--track); padding: 10px 0; }
details.run summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
details.run pre { margin-top: 10px; }


/* plants */
.ig-head-photo { padding: 0; gap: 0; align-items: stretch; }
.ig-head-photo .ig-photo { flex: 1 1 360px; min-width: 0; max-height: 420px; width: 100%; object-fit: cover; display: block; }
.ig-head-photo .ig-title { padding: 32px; flex: 999 1 360px; }
.ig-head-photo .ig-actions { padding: 32px 32px 32px 0; }
@media (max-width: 720px) { .ig-head-photo .ig-actions { padding: 0 24px 24px; } .ig-head-photo .ig-title { padding: 24px; } }
.credit { margin: 4px 0 0; font-size: 13px; opacity: .92; }
.credit a { color: inherit; }
.pcard { padding: 0; overflow: hidden; }
.pcard > span { padding: 0 14px; }
.pcard > span:last-child { padding-bottom: 12px; }
.pcard-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--track); }
.theme-card-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; background: #fff; }
.theme-card-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.mrow { display: flex; flex-direction: column; gap: 8px; }
.mbars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 140px; align-items: end; }
.mbar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 4px; }
.mbar i { display: block; background: var(--mark-soft); border-radius: 4px 4px 0 0; min-height: 2px; }
.mbar.peak i { background: var(--mark); }
.mbar b { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cal-month { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: var(--track); }
.cal-name { font-weight: 800; }
.cal-month a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.cal-month img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; border: 2px solid var(--c); }

/* about */
.src-list { margin: 0; padding-left: 20px; }

/* tooltip */
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.35; max-width: 260px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.tip b { font-weight: 800; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 60; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .feature, .bubble { transform: none; } }
@media print {
  .top, .foot, .no-export, .crumbs, .skip { display: none !important; }
  body { background: #fff; }
  .card, .stat, .ig-head { break-inside: avoid; }
}

/* City population: three figures, three definitions */
.pop-rows { display: grid; gap: 12px; margin: 16px 0; }
.pop-row { display: grid; grid-template-columns: minmax(140px, 220px) minmax(120px, 200px) 1fr; gap: 6px 20px; align-items: baseline; padding: 14px 18px; border-radius: 18px; background: var(--mark-soft); }
.pop-label { font-weight: 800; }
.pop-value { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pop-value-sm { font-size: 18px; }
.pop-note { color: var(--muted); font-size: 15px; }
.axis-t { fill: var(--muted); font-size: 13px; font-family: var(--font); }
@media (max-width: 640px) { .pop-row { grid-template-columns: 1fr; } }
.ig-name-long { font-size: clamp(36px, 5.2vw, 64px); overflow-wrap: normal; }

/* Food */
.food-emoji { font-size: clamp(96px, 14vw, 180px); line-height: 1; filter: drop-shadow(0 8px 0 rgba(0,0,0,.15)); }
.flag-chip { width: 22px; height: auto; border-radius: 3px; vertical-align: -3px; }
/* A ranking as a table: every row shares the columns (subgrid), so bars and numbers line up */
.food-top { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: 28px minmax(140px, 220px) 1fr auto; gap: 8px 12px; }
.food-top.has-share { grid-template-columns: 28px minmax(140px, 220px) 1fr auto auto; }
.food-top.wide-name { grid-template-columns: 28px minmax(220px, 380px) 1fr auto; }
.food-top li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.food-top-rank { font-weight: 900; color: var(--muted); text-align: right; }
.food-top-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.food-top-bar { height: 14px; border-radius: 7px; background: var(--mark-soft); overflow: hidden; }
.food-top-bar span { display: block; height: 100%; background: var(--mark); border-radius: 7px; }
.food-top-val, .food-top-share { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; text-align: right; white-space: nowrap; }
.food-top-share { min-width: 4.5em; }
.fcard-emoji { font-size: 48px; line-height: 1; }
.food-firsts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 16px; }
.food-first { display: grid; gap: 4px; padding: 12px 16px; border-radius: 18px; background: var(--mark-soft); }
.food-first-name { font-weight: 800; color: inherit; text-decoration: none; }
.food-first-n { color: var(--muted); font-size: 14px; }
.food-first-items { font-size: 26px; display: flex; flex-wrap: wrap; gap: 4px; }
.food-first-items a { text-decoration: none; }
.theme-card-food { display: flex; flex-wrap: wrap; gap: 6px; font-size: 40px; align-content: center; justify-content: center; }
@media (max-width: 640px) {
  .food-top, .food-top.has-share { grid-template-columns: 24px 1fr auto; }
  .food-top-bar { grid-column: 2 / -1; }
  .food-top-name { grid-column: 2; }
}
.flag.flag-chip { display: inline-block; width: 22px; height: auto; margin: 0; }
.food-top-name { display: flex; gap: 8px; align-items: center; }

/* Today */
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.today-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.today-list li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--mark-soft); }
.today-list a { font-weight: 700; color: inherit; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.today-rank { font-weight: 900; color: var(--muted); }
.today-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.today-sub { margin: 18px 0 10px; font-size: 20px; }
.today-theme { font-weight: 800; color: inherit; opacity: .75; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }

/* Animals */
.you-rows { display: grid; gap: 18px; margin-top: 12px; }
.you-row { display: grid; gap: 6px; }
.you-label { font-weight: 800; }
.you-label small { font-weight: 500; color: var(--muted); }
.you-bar { position: relative; display: block; height: 34px; border-radius: 12px; background: var(--mark-soft); overflow: hidden; }
.you-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 12px; background: var(--mark); }
.you-you i { background: #FFC233; }
.you-bar b { position: relative; display: block; padding: 6px 12px; font-size: 15px; white-space: nowrap; color: var(--ink); }
.you-it b { color: #fff; mix-blend-mode: normal; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.you-note { color: var(--muted); font-size: 15px; }
.animal-league li.is-you .food-top-name a { color: inherit; font-weight: 900; }

/* Volcanoes */
.volcano-art svg { display: block; width: clamp(120px, 18vw, 220px); height: auto; }
.vei { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 10px; font-weight: 800; text-align: center; background: var(--mark-soft); }
.vei-5, .vei-6, .vei-7, .vei-8 { background: #E03131; color: #fff; }
.vei-4 { background: #F08C00; color: #16141F; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* Weather */
.wx-now { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 8px 0 18px; }
.wx-emoji { font-size: 64px; line-height: 1; }
.wx-temp { font-size: 56px; font-weight: 900; font-variant-numeric: tabular-nums; }
.wx-line { color: var(--muted); }
.wx-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wx-days li { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--mark-soft); text-align: center; }
.wx-day { font-weight: 800; font-size: 14px; }
.wx-emoji-sm { font-size: 30px; line-height: 1.1; }
.wx-max { font-weight: 900; }
.wx-min { color: var(--muted); font-size: 14px; }
.wx-rain { color: #1C7ED6; font-size: 13px; min-height: 1em; }
@media (max-width: 720px) { .wx-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Climate */
.stripes-box { margin: 8px 0 0; border-radius: 18px; overflow: hidden; }
.stripes-box svg { display: block; width: 100%; height: 220px; }
.stripes-sm svg { height: 80px; }
.mini-stripes { display: block; border-radius: 6px; overflow: hidden; margin-top: 6px; }
.mini-stripes svg { display: block; width: 100%; height: 22px; }
.theme-card-stripes svg { width: 100%; height: 100%; display: block; }

/* With nine themes the menu needs to be tighter to stay on one line on a laptop. */
@media (min-width: 1000px) { .nav { gap: 0; } .nav a { padding: 8px 9px; font-size: 15.5px; } }

/* Settings as a gear in the top right; Wikipedia next to the breadcrumbs */
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.gear { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); background: var(--track); }
.gear:hover, .gear.is-on { background: var(--sun); color: #16141F; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.wiki-link { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--track); }
.wiki-link:hover { background: var(--sun); color: #16141F; }
@media (max-width: 999px) { .top-right { order: 2; } .nav { order: 3; flex-basis: 100%; } }

/* Admin: content corrections, statistics, fill in the blanks */
.admin-find { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.admin-find .grow { flex: 1 1 260px; }
.admin-forms { display: grid; gap: 14px; }
.admin-corr { display: grid; grid-template-columns: minmax(180px, 260px) minmax(160px, 1fr) minmax(160px, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--track); }
.admin-corr .label { margin: 0; }
.admin-corr .muted { grid-column: 2 / -1; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--sun); color: #16141F; font-size: 12px; font-weight: 800; }
.notice-err { background: #ffe3e3; color: #a51111; }
.admin-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.admin-list li { padding: 8px 12px; border-radius: 12px; background: var(--mark-soft); }
form.inline { display: inline; margin-left: 8px; }
@media (max-width: 760px) { .admin-corr { grid-template-columns: 1fr; } .admin-corr .muted { grid-column: auto; } }
.admin-corr .input-sm { width: 100%; max-width: 220px; }

/* Admin, part 2, and the feedback form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.feedback-form, .admin-word { display: grid; gap: 12px; }
.feedback-form textarea, .admin-word textarea { width: 100%; min-height: 3em; font: inherit; }
.admin-list li.is-done { opacity: .55; }
.feedback-msg { margin: 0 0 6px; }
.release ul { margin: 6px 0 0; padding-left: 20px; }
.admin-nav { flex-wrap: wrap; }

/* Mountains, rivers and lakes */
.geo-country { display: grid; gap: 18px; }
.geo-country .h3 { font-size: 20px; }
.geo-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.geo-links .wiki-link { background: rgba(255,255,255,.92); color: #16141F; }
.geo-links-sm { margin: 4px 0 8px; }
.geo-links-sm .wiki-link { font-size: 13px; padding: 4px 10px; background: var(--track); }

/* Languages */
.lang-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.lang-scale { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.lang-scale li { display: grid; gap: 4px; opacity: .45; }
.lang-scale li.is-me { opacity: 1; }
.lang-step { height: 14px; border-radius: 7px; background: var(--c); }
.lang-scale li.is-me .lang-step { height: 22px; box-shadow: 0 0 0 3px var(--ink); }
.lang-step-t { font-weight: 800; font-size: 14px; }
.lang-step-d { font-size: 12.5px; color: var(--muted); }
@media (max-width: 700px) { .lang-scale { grid-template-columns: repeat(3, 1fr); } }
.lang-path { line-height: 1.8; }
.lang-path span { color: var(--muted); }
.lang-list { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; }
.lang-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lang-stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin: 12px 0; }
.lang-stack-sm { height: 14px; margin: 6px 0; }
.lang-areas { display: grid; gap: 10px; }
.lang-area { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: center; }
.lang-area-name { font-weight: 700; }
@media (max-width: 700px) { .lang-area { grid-template-columns: 1fr; gap: 2px; } }
.lang-more summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.lang-hits:empty { display: none; }

/* The "More" menu */
.nav-more { position: relative; }
.nav-more summary { list-style: none; cursor: pointer; padding: 9px 14px; border-radius: 999px; font-weight: 600; color: var(--ink); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover, .nav-more[open] summary { background: var(--track); }
.nav-more summary[aria-current="page"] { background: var(--sun); color: #16141F; font-weight: 700; }
.nav-menu { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; min-width: 200px; display: grid; gap: 2px; padding: 8px;
  background: var(--card); border-radius: 16px; box-shadow: 0 12px 32px rgba(22, 20, 31, .18); left: auto; right: 0; }
.nav-menu a { border-radius: 10px; }
@media (min-width: 1000px) { .nav-more summary { padding: 8px 9px; font-size: 15.5px; } }
.ig-head .lang-pill { box-shadow: 0 0 0 2px #fff; }

/* Admin: APIs & sources */
.dg-wrap { overflow-x: auto; }
.dg { min-width: 900px; }
.dg-head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; fill: var(--muted); }
.dg rect { fill: var(--track); }
.dg text { fill: var(--ink); }
.dg-live rect { fill: #D0EBFF; }
.dg-job rect { fill: #FFE8CC; }
.dg-hand rect { fill: var(--track); stroke: var(--muted); stroke-dasharray: 3 3; }
.dg-theme rect { fill: #D3F9D8; }
:root[data-theme="dark"] .dg-live rect, :root[data-theme="dark"] .dg-job rect, :root[data-theme="dark"] .dg-theme rect { fill-opacity: .25; }
.dg-edge { fill: none; stroke: #339AF0; stroke-width: 1.4; opacity: .55; }
.dg-edge-hand { stroke: var(--muted); stroke-dasharray: 4 4; opacity: .4; }
.dg-key-live { background: #339AF0 !important; }
.dg-key-hand { background: repeating-linear-gradient(90deg, #868E96 0 4px, transparent 4px 8px) !important; }
.admin-table td, .admin-table th { vertical-align: top; }
.admin-table .num { text-align: right; white-space: nowrap; }
.run-ok { color: #2F9E44; font-weight: 700; }
.run-failed { color: #E03131; font-weight: 700; }
.pill-off { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--track); }
.stat-value-sm { font-size: 20px; }

/* Energy */
.en-rows { display: grid; gap: 10px; margin: 12px 0; }
.en-rows > div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; }
.en-row-label { font-weight: 700; }
@media (max-width: 700px) { .en-rows > div { grid-template-columns: 1fr; gap: 4px; } }
.en-bar { display: flex; height: 34px; border-radius: 10px; overflow: hidden; margin: 8px 0; }
.en-bar span { display: grid; place-items: center; min-width: 0; }
.en-bar b { font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }

/* The disclaimer above the footer, on every page */
.foot-note { padding-top: 18px; padding-bottom: 4px; }
.foot-note p { margin: 0; max-width: 980px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.foot-note strong { color: var(--ink); }

/* Resources */
.res-bars { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 7px; }
.res-bars li { display: grid; grid-template-columns: 200px 1fr 190px; gap: 12px; align-items: center; }
.res-name { font-weight: 700; display: flex; gap: 6px; align-items: center; min-width: 0; }
.res-name a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-track { height: 14px; background: var(--track); border-radius: 7px; overflow: hidden; }
.res-track span { display: block; height: 100%; background: var(--mark, #5F3DC4); border-radius: 7px; }
.res-val { white-space: nowrap; }
@media (max-width: 700px) { .res-bars li { grid-template-columns: 1fr; gap: 3px; } }

/* Birds: wingspan */
.wing-rows { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.wing-rows li { display: grid; grid-template-columns: 220px 1fr 90px; gap: 12px; align-items: center; }
.wing-name { font-weight: 700; }
.wing-track svg { display: block; height: 34px; }
.wing-val { font-weight: 800; text-align: right; }
@media (max-width: 700px) { .wing-rows li { grid-template-columns: 1fr 70px; } .wing-track { grid-column: 1 / -1; order: 3; } }

/* Home: your country */
.mine-card { border-top: 6px solid var(--c); }
.mine-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.mine-head .flag-xl { width: 72px; height: auto; border-radius: 8px; }
.chip-big { font-size: 15px; padding: 8px 14px; }
tr.is-you td, li.is-you { background: color-mix(in srgb, #FFC233 28%, transparent); }
.you-tag { font-size: 12px; font-weight: 700; background: #FFC233; color: #16141F; border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.you-jump { margin: 0 0 10px; font-weight: 700; }
.mine-card .chip-big { background: var(--track); color: var(--ink); text-decoration: none; font-weight: 700; }
.mine-card .chip-big:hover { background: #FFC233; color: #16141F; }

/* People: age pyramid */
.people-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .people-grid { grid-template-columns: 1fr; } }
.pyramid-ctl { display: grid; gap: 4px; margin-top: 8px; }
.pyramid-ctl input { width: 100%; accent-color: #E64980; }
.people-facts { display: grid; gap: 12px; }
.pf { display: grid; padding: 12px 14px; border-radius: 14px; background: var(--track); }
.pf-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.pf-val { font-size: 30px; font-weight: 800; line-height: 1.1; }
.pf-sub { font-size: 13px; color: var(--muted); }
.lang-official { margin-bottom: 14px; }
.eco-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 12px 0; }
.eco-small .pf-val { font-size: 24px; }
a.pf { color: inherit; text-decoration: none; }
a.pf:hover { outline: 2px solid #FFC233; }

/* On a phone: the site is made for a bigger screen (closed once, it stays closed) */
.mobile-note { display: flex; gap: 12px; align-items: flex-start; margin: 8px 16px 0; padding: 12px 14px; border-radius: 16px; background: var(--dark); color: var(--on-dark); font-size: 14px; line-height: 1.4; }
.mobile-note[hidden] { display: none; }
.mobile-note p { margin: 0; flex: 1; }
.mobile-note-x { background: none; border: 0; color: inherit; font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer; }
@media (min-width: 761px) { .mobile-note { display: none; } }
/* Chart.js: the canvas takes the place of the SVG */
.chart-js { position: relative; width: 100%; }
/* The types within a group (animals): a second, smaller row of filters */
.chip-row-sub { margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--line); }
.chip-row-sub[hidden] { display: none; }
.chip-row-sub .chip-btn { font-size: 13px; padding: 6px 12px; }
/* Zoom on the world maps: + and − in a corner; borders keep their width; drag when zoomed in */
.map-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.map-zoom button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 18px/1 var(--font); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.map-zoom button:hover { background: var(--track); }
.map-zoom button[hidden] { display: none; }
.map > svg { touch-action: pan-y; }
/* Flat or globe: every big world map can turn into a globe (three.js, assets/js/globe.js) */
.map-mode { position: absolute; top: 8px; left: 8px; z-index: 3; display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.map-mode button { border: 0; background: none; color: var(--muted); font: 600 13px/1 var(--font); padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.map-mode button:hover { color: var(--ink); }
.map-mode button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.map-mode button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.map.is-globe > svg, .map.is-globe > .inset, .map.is-globe > .map-zoom { display: none; }
.map .globe { position: relative; width: 100%; aspect-ratio: 1000 / 487; min-height: 340px; }
.map .globe canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; border-radius: 12px; outline: none; }
.map .globe canvas:active { cursor: grabbing; }
.map .globe canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.map .globe .map-zoom button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.globe-hint { position: absolute; left: 10px; bottom: 6px; margin: 0; font-size: 12px; color: var(--muted); pointer-events: none; }
@media print { .map.is-globe > svg { display: block; } .map .globe, .map-mode { display: none; } }
/* Tectonic plates on a map */
.map path.plate { stroke: #495057; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; opacity: .75; }
.map path.plate-sub { stroke: #C2255C; stroke-width: 2; opacity: .9; }
.map path.plate:hover { stroke-width: 3.2; opacity: 1; }
.legend i.legend-line { height: 4px; border-radius: 2px; width: 22px; }
/* A volcano cut open (assets/js/volcano3d.js) */
.v3d { margin: 8px 0 0; position: relative; }
.v3d-box { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; border-radius: 16px; overflow: hidden; background: linear-gradient(var(--globe-sea), var(--card) 70%); }
.v3d-box canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.v3d-box canvas:active { cursor: grabbing; }
.v3d-tags { position: absolute; inset: 0; pointer-events: none; }
.v3d-tag { position: absolute; left: 0; top: 0; padding: 3px 9px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.v3d-tag.v3d-hot { background: #E8590C; color: #fff; }
.v3d-tag.v3d-step { background: #FFF8EC; color: #16141F; font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; padding: 6px 12px 6px 8px; border-radius: 4px; border-left: 4px solid #E8590C; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.v3d-tag.v3d-step b { color: #E8590C; margin-right: 4px; }
.v3d-tag.v3d-summit { background: var(--ink); color: var(--bg); }
.v3d-box.v3d-space { background: radial-gradient(ellipse at center, #1B2240, #0B0F1E 75%); }
.v3d-box.v3d-space .v3d-tag { background: rgba(255,255,255,.9); color: #16141F; }
.v3d-box.v3d-sky { background: linear-gradient(#BFD9F2, var(--card) 80%); }
.v3d-tag.v3d-dir { background: transparent; box-shadow: none; font-size: 15px; font-weight: 900; color: #3F5230; }
.v3d-ctl { display: grid; gap: 8px; margin-top: 12px; }
.v3d-ctl-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.v3d-tag.v3d-planet { background: rgba(255,255,255,.9); color: #16141F; text-decoration: none; text-align: center; line-height: 1.2; }
.v3d-tag.v3d-planet small { font-weight: 600; color: #5A5566; }
a.v3d-tag.v3d-planet:hover { background: #FFC233; }
.v3d-tag.v3d-small { font-size: 11.5px; padding: 2px 7px; }
.v3d-box.v3d-tall { aspect-ratio: 16 / 10; }
.v3d-box.v3d-proc { background: linear-gradient(#DCEBF7, var(--card) 85%); }
.proc-ctl { display: grid; gap: 10px; margin-top: 12px; }
.proc-head { display: flex; align-items: center; gap: 12px; }
.proc-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.proc-dots button { width: 12px; height: 12px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.proc-dots button[aria-current="true"] { background: var(--ink); width: 28px; border-radius: 6px; }
.proc-text .h3 { margin: 4px 0; }
.proc-text p { margin: 0; max-width: 70ch; }
.proc-step { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.v3d-info { position: absolute; left: 12px; top: 12px; z-index: 3; max-width: 280px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.95); color: #16141F; font-size: 14px; line-height: 1.45; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.v3d-info .btn { margin-top: 8px; padding: 6px 12px; font-size: 13px; }
.v3d-tag.v3d-star { background: transparent; box-shadow: none; color: #E6EBFF; font-weight: 600; text-shadow: 0 1px 3px #000; }
.v3d-box .map-zoom { top: 12px; right: 12px; }
.v3d:fullscreen { background: #0B0F1E; display: flex; flex-direction: column; justify-content: center; padding: 16px; }
.v3d:fullscreen .v3d-box { aspect-ratio: auto; flex: 1; }
.v3d:fullscreen .v3d-ctl { color: #E6EBFF; }
.v3d-gap { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); max-width: 70%; margin: 0; text-align: center; color: #E6EBFF; font-size: 16px; font-weight: 600; transition: opacity .3s; pointer-events: none; }
.v3d-tag.v3d-dim { background: rgba(20, 24, 50, .65); color: #C9D2F2; box-shadow: none; font-weight: 600; }
.v3d-tag small { font-weight: 600; opacity: .75; }
.v3d-ctl .chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.v3d-ctl input[type=range] { flex: 1 1 200px; }
.v3d-ctl input[type=range] { width: 100%; accent-color: #F59F00; }
.v3d-out { margin: 0; font-variant-numeric: tabular-nums; }
.v3d-out i, .v3d-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.v3d-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
@media print { .v3d-box canvas { display: none; } }
/* Full screen: the map fills the screen, on the page's own background */
.map-full { position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 17px/1 var(--font); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.map-full:hover { background: var(--track); }
.map:fullscreen { background: var(--bg); padding: 24px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.map:fullscreen > svg { width: min(100%, calc((100vh - 48px) * 2.05)); height: auto; }
.map:fullscreen .globe { width: 100%; height: 100%; aspect-ratio: auto; }
.map:fullscreen .map-full { right: 16px; bottom: 16px; }
.map:fullscreen > .map-zoom, .map:fullscreen .globe .map-zoom { top: 16px; right: 16px; }
.map:fullscreen > .map-mode { top: 16px; left: 16px; }
.map.is-zoomed > svg { touch-action: none; cursor: grab; }
.map.is-zoomed > svg:active { cursor: grabbing; }
.map > svg path, .map > svg circle { vector-effect: non-scaling-stroke; }
/* Find with suggestions (cities) */
.suggest { position: relative; margin: 0 0 16px; }
.input-lg { font-size: 18px; padding: 14px 18px; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.suggest-list[hidden] { display: none; }
.suggest-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.suggest-list a span { color: var(--muted); font-size: 14px; margin-left: auto; }
.suggest-list li.on a, .suggest-list a:hover { background: var(--track); }

/* The menu: a bar that stays at the top, four groups with their themes */
.top { position: sticky; top: 0; z-index: 100; background: var(--bg); transition: box-shadow .2s; }
.top.is-scrolled { box-shadow: 0 4px 18px rgba(22, 20, 31, .08); }
.top-in { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; transition: padding .2s; }
.top.is-scrolled .top-in { padding-top: 7px; padding-bottom: 7px; }
.top .nav { flex-wrap: nowrap; align-items: center; gap: 2px; }
.nav-group { position: relative; }
.nav-group summary { list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover, .nav-group[open] summary { background: var(--track); }
.nav-group summary[aria-current="page"] { background: var(--sun); color: #16141F; }
.nav-group .nav-menu { left: 0; right: auto; min-width: 290px; padding: 8px; gap: 2px; }
.nav-item { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 2px 4px 2px 0; border-radius: 10px; }
.nav-item:hover { background: var(--track); }
.nav .nav-item a.nav-theme { padding: 8px 10px; font-weight: 700; font-size: 15.5px; }
.nav .nav-item a.nav-theme:hover { background: none; }
.nav-sub { display: flex; gap: 2px; white-space: nowrap; }
.nav .nav-sub a { padding: 4px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav .nav-sub a:hover { background: var(--card); color: var(--ink); }
.nav .nav-link { white-space: nowrap; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; cursor: pointer; }
/* a jump to a part of a page (#economy) stops under the bar, not behind it */
[id] { scroll-margin-top: 84px; }
@media (max-width: 999px) {
  .top-in { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; }
  .top-right { order: 2; }
  .top .nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; max-height: calc(100vh - 80px); overflow-y: auto; padding-bottom: 8px; }
  .top.nav-open .nav { display: flex; }
  .nav-group .nav-menu { position: static; box-shadow: none; background: transparent; padding: 0 0 6px 10px; min-width: 0; }
  .nav-group summary { border-radius: 12px; }
}
@media print { .top { position: static; } }
/* On a phone the bar is one row: the logo, settings and the menu button */
@media (max-width: 600px) {
  .top-in { gap: 8px 10px; }
  .logo { font-size: 17px; gap: 8px; }
  .logo-mark { width: 24px; height: 24px; }
  .top-right { margin-left: auto; gap: 8px; }
  .gear, .nav-toggle { width: 38px; height: 38px; }
}
/* Licence: the section on /about, and the credit line that only the downloaded PNG shows (and print) */
.licence-list { margin: 14px 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.5; }
.licence-list code { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: var(--track); font-size: 14px; }
.export-only { display: none; }
.is-exporting .export-only { display: block; }
.export-credit { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
@media print { .export-only { display: block; } }
/* The day page: the season, the international day, your country, the questions */
.today-nav { align-items: center; }
.today-day { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 860px) { .today-day { grid-template-columns: 1fr; } }
.today-turn { display: inline-block; margin: 6px 0 10px; padding: 6px 12px; border-radius: 999px; background: var(--sun); color: #16141F; font-weight: 700; }
.today-intl { display: flex; flex-direction: column; justify-content: center; gap: 8px; text-decoration: none; color: #fff; background: #2B5BD7; }
.today-intl:hover { filter: brightness(1.06); }
.today-intl .h2 { color: #fff; }
.today-kicker { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; font-weight: 800; opacity: .85; }
.today-country { border-top: 6px solid var(--c, var(--mark)); }
.today-cw { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.quiz-list { margin: 16px 0 0; padding-left: 22px; display: grid; gap: 18px; }
.quiz-q { margin: 0 0 8px; font-weight: 700; font-size: 18px; }
.quiz .chip-btn.is-right { background: #2F9E44; color: #fff; border-color: #2F9E44; }
.quiz .chip-btn.is-wrong { background: #E03131; color: #fff; border-color: #E03131; }
.quiz-a { margin-top: 8px; }
.quiz-a summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.quiz.done .quiz-a summary { display: none; }
.quiz-a p { margin: 6px 0 0; }
/* Regions: the country map, the boxes of far regions, Belgium explained, what lies in a region */
.region-map svg path { stroke-width: .8; }
.region-box { fill: none; stroke: var(--line); stroke-dasharray: 4 4; }
.region-rank { columns: 2 280px; column-gap: 16px; display: block; }
.region-rank li { break-inside: avoid; margin-bottom: 8px; }
.region-inside { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.region-list { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }
.belgium { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--track); }
.belgium summary { cursor: pointer; }
.belgium-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 10px 0; }
.belgium-grid h4 { margin: 0 0 4px; font-size: 16px; }
.belgium-grid p { margin: 0; line-height: 1.5; }
.ig-head-flag .ig-photo { object-fit: contain; background: #fff; padding: 18px; }
.rcard .pcard-img { object-fit: contain; background: #fff; padding: 10px; }

/* Earthquakes of the last 30 days: the magnitude scale, green to dark red */
.quake-scale { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.quake-scale li { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; align-items: start; font-size: 14px; line-height: 1.35; }
.quake-scale i { width: 14px; height: 14px; border-radius: 50%; margin-top: 2px; grid-row: span 2; }
.quake-scale span { color: var(--ink-2); font-size: 13px; }
.today-val.quake-m { display: inline-flex; align-items: center; gap: 6px; }
.today-val.quake-m::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--qc); flex: none; }

/* The quiz of the day */
.quiz-flag { width: 160px; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); margin-bottom: 8px; }
.quiz-score { margin: 0 0 12px; }

/* Time zones: the offset in front is wider than a rank */
.tz-list li { grid-template-columns: 84px 1fr auto; }
.tz-list .today-rank { white-space: nowrap; }
.logo { white-space: nowrap; }

/* Oceans and islands: rows of bars */
.oc-bars { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.oc-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) 250px; gap: 12px; align-items: center; }
.oc-label { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.oc-track { height: 14px; background: var(--mark-soft); border-radius: 7px; overflow: hidden; }
.oc-fill { display: block; height: 100%; border-radius: 7px; }
.oc-val { font-weight: 700; white-space: nowrap; font-size: 14px; }
.oc-isl { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
@media (max-width: 600px) { .oc-row { grid-template-columns: 1fr auto; } .oc-track { grid-column: 1 / -1; grid-row: 2; } }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; }
.src-grid .card { margin: 0; }
.v3d-range { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; font-size: 14px; }
.v3d-range input { flex: 1; accent-color: var(--accent); }
.v3d-ctl .chip-btn:disabled { opacity: .5; }
/* the world clocks (/timezones) */
.clock-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.clock-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.clock-card .clock { width: 54px; height: 54px; flex: none; }
.clock-face { fill: #FFFDF6; stroke: var(--ink); stroke-width: 1.2; }
.clock-tick { stroke: var(--ink); stroke-width: 1; }
.clock-h { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.clock-m { stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.clock-pin { fill: #E8590C; }
.clock-card.is-night { background: #1E2140; border-color: #1E2140; color: #E6EBFF; }
.clock-card.is-night a, .clock-card.is-night .muted { color: #C9D2F2; }
.clock-card.is-night .clock-face { fill: #2C3160; stroke: #E6EBFF; }
.clock-card.is-night .clock-tick, .clock-card.is-night .clock-h, .clock-card.is-night .clock-m { stroke: #E6EBFF; }
.clock-txt { display: grid; gap: 1px; min-width: 0; }
.clock-txt a { font-weight: 700; text-decoration: none; color: inherit; }
.clock-time { font-size: 20px; font-variant-numeric: tabular-nums; }
/* a name that links to its Wikipedia article */
a.wp { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a.wp:hover { text-decoration-color: currentColor; }
/* bridges and tunnels (3D): the kinds as chips, the legend of the forces */
.proc-chips { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.proc-chips .chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
/* only the bridges' legend floats in its scene; the sun path's (a city page) stays under it in the card */
.v3d-box .v3d-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.9); color: #16141F; font-size: 13px; font-weight: 700; }
.v3d-box .v3d-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.v3d-box.v3d-bridge { background: linear-gradient(#CFE3F5, #F3F7FB 75%); }
/* inside the Earth, the air above (3D) */
.earth-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.earth-fact { display: grid; padding: 6px 12px; border-radius: 12px; background: var(--track); }
.earth-fact small { color: var(--muted); font-weight: 700; font-size: 12px; }
.v3d-box.v3d-air { aspect-ratio: 16 / 10; background: linear-gradient(#0B0F1E, #1B2A55 35%, #7FB3E5 80%, #CFE3F5); }
.air-chips { justify-content: center; }
.air-chips .chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.v3d-tag.air-layer { background: rgba(255,255,255,.85); }
.v3d-tag.air-km { background: transparent; box-shadow: none; color: #E6EBFF; text-shadow: 0 1px 2px #000; }
.air-h { font-weight: 800; color: #2B5BD7; }
/* landings on the Moon and Mars */
.land-stage { margin-top: 8px; }
.land-svg { display: block; width: 100%; height: auto; border-radius: 14px; background: #111; }
.land-grid { stroke: rgba(255,255,255,.12); stroke-width: 1.2; }
.land-dot { stroke: #16141F; stroke-width: 2.5; cursor: pointer; }
.land-dot:hover { stroke: #FFC233; stroke-width: 4; }
.land-globe { aspect-ratio: 2 / 1; }
.land-tip { position: fixed; z-index: 60; display: none; max-width: 300px; padding: 8px 12px; border-radius: 10px; background: rgba(22,20,31,.95); color: #fff; font-size: 13.5px; line-height: 1.4; pointer-events: none; }
.land-legend i { border: 1.5px solid #16141F; }
.land-route { display: block; width: 100%; max-width: 560px; height: auto; border-radius: 14px; }
.route-all { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 3; stroke-linejoin: round; }
.route-done { fill: none; stroke: #FFC233; stroke-width: 4; stroke-linejoin: round; }
.route-start { fill: #FFFFFF; stroke: #16141F; stroke-width: 3; }
.route-rover { fill: #4FC3F7; stroke: #16141F; stroke-width: 3; }
.route-label { fill: #fff; font-size: 26px; font-weight: 800; paint-order: stroke; stroke: rgba(0,0,0,.7); stroke-width: 5px; }
.route-play { margin-top: 10px; }
.routes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
/* the air above: names that link, zoom, the mini map */
.v3d-tags .air-link { pointer-events: auto; cursor: pointer; }
.v3d-tags .air-link:hover { background: #FFC233; color: #16141F; }
.air-zoom { position: absolute; top: 12px; right: 12px; display: grid; gap: 6px; z-index: 3; }
.air-zoom button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,.92); color: #16141F; font-weight: 800; font-size: 17px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.air-mini { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 46%; border-radius: 8px; overflow: hidden; background: #0B0F1E; box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer; z-index: 3; }
.air-mini-band { position: absolute; left: 0; right: 0; display: block; opacity: .9; }
.air-mini-dot { position: absolute; left: 50%; width: 5px; height: 5px; margin: 0 0 -2px -2px; border-radius: 50%; background: #FFC233; }
.air-mini-view { position: absolute; left: 1px; right: 1px; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }
.v3d-box.v3d-oil { aspect-ratio: 16 / 9; background: linear-gradient(#BFD9F2, #E8F0F8 55%); }
/* the periodic table */
.el-table { display: grid; grid-template-columns: repeat(18, 1fr); gap: 3px; margin-top: 10px; }
.el-cell { aspect-ratio: 1 / 1.05; border: 0; border-radius: 6px; padding: 3px 2px; cursor: pointer; display: grid; align-content: center; justify-items: center; color: #16141F; line-height: 1.05; font-family: inherit; }
.el-cell b { font-size: clamp(11px, 1.35vw, 19px); }
.el-cell small { font-size: clamp(7px, 0.6vw, 10px); opacity: .8; }
.el-cell:hover, .el-cell[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 1px; }
.el-gap { grid-column: span 18; height: 8px; }
.el-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.el-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.el-facts div { display: grid; padding: 6px 10px; border-radius: 10px; background: var(--track); }
.el-facts small { color: var(--muted); font-weight: 700; font-size: 12px; }
.el-atom { aspect-ratio: 1 / 0.85; }
.el-atom-tag { position: absolute; left: 12px; top: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(11,15,30,.75); color: #fff; font-size: 14px; line-height: 1.45; pointer-events: none; }
.el-land { aspect-ratio: 16 / 9; }
/* weather */
.v3d-box.v3d-weather { aspect-ratio: 16 / 9; background: linear-gradient(#9FC6EC, #E4EEF8 70%); }
.wx-scales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.v3d-box.v3d-plates { aspect-ratio: 16 / 9; background: linear-gradient(#BFD9F2, #E8F0F8 60%); }
.v3d-box.v3d-currents { aspect-ratio: 16 / 9; background: linear-gradient(#BFD9F2, #E8F0F8 60%); }
/* planets with their moons */
.moon-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.moon-info { margin: 8px 0 0; font-weight: 700; }
.v3d-box.v3d-motion { aspect-ratio: 16 / 9; }
.oni-now { padding: 10px 14px; border-radius: 12px; background: var(--track); }
.oni-now.oni-nino { background: color-mix(in srgb, #D9302C 14%, var(--card)); }
.oni-now.oni-nina { background: color-mix(in srgb, #2E6FB4 14%, var(--card)); }
/* the ozone hole */
.v3d-box.oz-box { aspect-ratio: 16 / 9; }
.oz-tag { position: absolute; left: 14px; top: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(11,15,30,.75); color: #fff; font-size: 15px; line-height: 1.5; pointer-events: none; }
.oz-ctl { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.oz-ctl input[type=range] { flex: 1; }
.oz-year { min-width: 3.5em; font-size: 20px; }
.v3d-box.v3d-night { background: linear-gradient(#0E1733, #2A3A66 75%); }
.month-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.month-bars li { display: grid; grid-template-columns: 3em 1fr 4.5em; gap: 8px; align-items: center; }
.month-bars i { height: 14px; border-radius: 4px; background: #D9302C; }
.month-bars b { text-align: right; font-size: 13px; }
.high-bars { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.high-bars li { display: grid; grid-template-columns: 2.2em minmax(0, 1.3fr) minmax(0, 2fr) 4.5em; gap: 10px; align-items: center; }
.hb-bar { height: 16px; background: var(--track); border-radius: 6px; overflow: hidden; }
.hb-bar i { display: block; height: 100%; background: #7A1FA2; border-radius: 6px; }
.hb-ref .hb-bar i { background: var(--muted); }
.high-bars b { text-align: right; }

/* Share and embed (as on Countdown Wizard): the icons top right of every page (share_actions()),
   and under every map, globe and chart (shareVisuals() in si.js); each panel opens under its icon. */
.share-row { display: flex; align-items: center; gap: 6px; position: relative; }
.share-btn, .share-pop > summary { width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); cursor: pointer; list-style: none; }
.share-pop > summary::-webkit-details-marker { display: none; }
.share-btn:hover, .share-pop > summary:hover, .share-pop[open] > summary { border-color: var(--ink); }
.share-btn:focus-visible, .share-pop > summary:focus-visible { outline: 3px solid var(--accent, #7A4DD8); outline-offset: 2px; }
.share-pop { position: static; }
.share-pop .pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: max-content; max-width: min(320px, calc(100vw - 32px));
  padding: 14px; border-radius: 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgb(0 0 0 / .22);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: left; }
.share-pop .pop p { margin: 0; align-self: flex-start; }
.share-pop .pop img { background: #fff; border-radius: 8px; }
.share-pop .pop textarea { width: min(290px, calc(100vw - 64px)); font: 12px/1.4 ui-monospace, monospace; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); resize: vertical; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.vis-share { justify-content: flex-end; align-self: flex-end; margin-top: 8px; }
.vis-share .share-btn, .vis-share .share-pop > summary { width: 34px; height: 34px; min-width: 34px; }
.vis-share .pop { top: auto; bottom: calc(100% + 8px); }
.is-exporting .vis-share { display: none; }
@media print { .share-row { display: none; } }

/* ?embed=…: the page or one visual on another website, without header and footer */
body.embed { background: var(--bg); }
body.embed main { padding: 12px 0 0; }
body.embed .embed-hide { display: none !important; }
body.embed .embed-path { margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; min-height: 0 !important; }
body.embed .embed-box { max-width: none; }
body.embed .wrap.embed-path { padding-left: 12px; padding-right: 12px; }
.embed-credit { margin: 8px 12px 12px; font-size: 13px; text-align: right; }
.embed-credit a { color: var(--muted); }
.top .share-btn, .top .share-pop > summary { background: var(--track); border-color: transparent; }
.top .share-btn:hover, .top .share-pop > summary:hover, .top .share-pop[open] > summary { background: var(--sun); color: #16141F; }

/* on a phone the bar stays one row: only share (a QR code and embed code are for a computer) */
@media (max-width: 600px) { .top .share-pop { display: none; } }
body.embed .wrap { max-width: none; }
@media (max-width: 600px) { .top .share-btn { width: 38px; height: 38px; min-width: 38px; } .top-right { gap: 6px; } }
@media (max-width: 380px) { .top-in { column-gap: 6px; } .logo { font-size: 16px; gap: 6px; } .top .share-btn, .gear { width: 36px; height: 36px; min-width: 36px; } }
/* /admin/photos: where each photo is shown from */
details.photo-list { margin-top: 6px; }
details.photo-list summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
details.photo-list .table-wrap { margin-top: 10px; max-height: 70vh; overflow: auto; }
.photo-from { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.photo-from-local { background: #D3F9D8; color: #1B5E20; }
.photo-from-wikimedia { background: #FFE8CC; color: #8A4B00; }
.photo-from-drawing { background: var(--track); color: var(--muted); }
.photo-fetch { display: inline-block; margin-left: 8px; }
/* the Milky Way: what just happened (a jump, the star you flew to) under the scene, until the next message */
.v3d-note { margin: 10px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--track); font-size: 16px; line-height: 1.5; max-width: 80ch; }
.v3d:fullscreen .v3d-note { background: rgba(255,255,255,.1); color: #E6EBFF; }
/* the Milky Way: the quadrants (click one to zoom in) and the kind of star you flew to */
/* the quadrants are buttons: their own colour (violet), yellow when chosen; the other labels stay white */
.v3d-box .v3d-tag.v3d-quad { pointer-events: auto; cursor: pointer; background: #7A4DD8; color: #fff; font-size: 13px; font-weight: 800; padding: 5px 12px; border: 2px solid #B79CFF; box-shadow: 0 2px 10px rgba(0,0,0,.4); z-index: 2; }
.v3d-box .v3d-tag.v3d-quad::after { content: ' ›'; }
.v3d-box .v3d-tag.v3d-quad:hover, .v3d-box .v3d-tag.v3d-quad:focus-visible, .v3d-box .v3d-tag.v3d-quad.is-on { background: #FFC233; color: #16141F; border-color: #FFC233; outline: none; }
.mw-kind { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.mw-portrait { position: relative; width: 150px; height: 150px; border-radius: 14px; background: #0B0F1E; display: grid; place-items: center; overflow: hidden; }
.mw-ball { display: block; border-radius: 50%; }
.mw-sun { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mw-sun small { font-size: 10.5px; color: #C9D2F2; line-height: 1.1; }
.mw-kind-title { display: block; font-size: 18px; margin-bottom: 2px; }
.mw-kind-text { display: block; }
.mw-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.mw-facts span { background: var(--card); border-radius: 999px; padding: 2px 12px; font-size: 14px; font-weight: 600; }
.mw-src { display: block; color: var(--muted); font-size: 12.5px; }
.v3d:fullscreen .mw-facts span { background: rgba(255,255,255,.12); }
@media (max-width: 560px) { .mw-kind { grid-template-columns: 1fr; } }
/* the map colours: the choice next to a map's legend, and in /settings */
.pal-pick { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.pal-pick select { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; }
.pal-sw { display: inline-flex; border-radius: 6px; overflow: hidden; }
.pal-sw i { width: 18px; height: 14px; }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pal-opt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 700; }
.pal-opt:has(input:checked) { border-color: var(--ink); }
.pal-opt .pal-sw i { width: 22px; height: 18px; }
/* full screen: the scene's buttons on its dark background; the chosen one yellow, the others outlined */
.v3d:fullscreen .v3d-ctl .chip-btn { background: transparent; color: #E6EBFF; border-color: rgba(230, 235, 255, .35); }
.v3d:fullscreen .v3d-ctl .chip-btn:hover { border-color: #E6EBFF; }
.v3d:fullscreen .v3d-ctl .chip-btn[aria-pressed="true"] { background: #FFC233; color: #16141F; border-color: #FFC233; }
.v3d:fullscreen .v3d-ctl .btn-ink { background: #E6EBFF; color: #16141F; }
/* the share icons keep their own look wherever they are (a map styles every path, a chart every svg) */
.share-row svg { width: 18px !important; height: 18px !important; max-width: none; flex: none; }
.top .share-row svg { width: 20px !important; height: 20px !important; }
.share-row svg path, .share-row svg circle, .share-row svg rect { fill: none !important; stroke: currentColor !important; stroke-width: 2 !important; }

/* /admin/stats: lists as bars, the grids of cards, the period */
.sbars { width: 100%; border-collapse: collapse; }
.sbars th { text-align: left; font-weight: 600; padding: 4px 10px 4px 0; width: 45%; }
.sbars th a { color: inherit; }
.sbars td { padding: 4px 0; }
.sbar-cell { width: 45%; }
.sbar { display: block; height: 10px; border-radius: 5px; background: var(--mark); min-width: 2px; }
.sbars .num { text-align: right; padding-left: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }
.stats-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stats-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px 28px; }
.stats-period { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0; }
.stats-dates { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 100%; }
.stats-dates .input { width: 140px; max-width: 100%; min-height: 40px; font-size: 15px; }
.stats-focus { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stats-ct td, .stats-ct th { padding: 8px 8px; vertical-align: top; }
/* what each country looks at most: the country on one line, left; its themes as pills (the most viewed one stronger); the views right */
.stats-ct th { text-align: left; white-space: nowrap; font-weight: 700; padding-top: 11px; }
.stats-ct th a { display: inline-flex; align-items: center; gap: 8px; }
.stats-ct td.num { padding-top: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats-ct tr + tr > * { border-top: 1px solid var(--line); }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--track); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ct-chip b { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-chip:hover { background: var(--sun); color: #16141F; }
.ct-chip:hover b { color: #16141F; }
.ct-chip.top { background: var(--mark-soft, var(--track)); }
/* on a phone: the country and its views on one line, its pills on the full width under it */
@media (max-width: 600px) {
  .stats-ct, .stats-ct tbody { display: block; }
  .stats-ct tr { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
  .stats-ct tr + tr > * { border-top: 0; }
  .stats-ct tr + tr { border-top: 1px solid var(--line); }
  .stats-ct th { white-space: normal; grid-column: 1; grid-row: 1; padding-bottom: 4px; }
  .stats-ct td.num { grid-column: 2; grid-row: 1; padding-bottom: 4px; }
  .stats-ct td:not(.num) { grid-column: 1 / -1; grid-row: 2; padding-top: 0; }
}
.stats-latest td { vertical-align: top; }
@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr; } }


/* ------------------------------------------------------------------ the header (B: search + group chips)
   The logo alone (its name as tooltip), the groups, the search, your country (a flag, as Countdown Wizard), share,
   QR, embed and settings. On a phone or tablet (below 1200 px, where the groups and the search do not fit in one row): logo, search, flag and ☰ in one row; the groups as chips under
   it that you can swipe; ☰ opens share, QR, embed, settings and the footer's links. */
.top .logo { flex: none; order: 0; width: 40px; height: 40px; justify-content: center; border-radius: 12px; }
.top .logo:hover { background: var(--track); }
.top .logo-mark { width: 30px; height: 30px; }
.top .nav { order: 1; }
.top-find { order: 2; position: relative; flex: 0 1 230px; min-width: 150px; margin: 0 0 0 auto; display: flex; align-items: center; }
.top-find > svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.top-find input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; }
.top-find input::placeholder { color: var(--muted); }
.top-find input:focus { outline: 3px solid var(--accent, #7A4DD8); outline-offset: 1px; border-color: transparent; }
.top-find input::-webkit-search-cancel-button { cursor: pointer; }
.top-find .suggest-list { left: 0; right: auto; width: max(100%, 340px); max-width: calc(100vw - 24px); z-index: 130; }
.top-find .suggest-list a b { font-weight: 700; }
.top-find .suggest-list a span { white-space: nowrap; }
.top .top-right { order: 4; margin-left: 0; }
.top-more-links { display: none; }
.country-pick { order: 3; position: relative; flex: none; }
.country-pick > summary { list-style: none; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 46px; height: 40px; padding: 0 8px; border-radius: 999px; background: var(--track); font-size: 11px; font-weight: 800; line-height: 1; color: var(--ink); }
.country-pick > summary::-webkit-details-marker { display: none; }
.country-pick > summary:hover, .country-pick[open] > summary { background: var(--sun); color: #16141F; }
.country-pick > summary:focus-visible { outline: 3px solid var(--accent, #7A4DD8); outline-offset: 2px; }
.country-pick .cp-flag { width: 22px; height: 15px; border-radius: 3px; }
.country-pick .cp-none { font-size: 18px; }
.cp-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 130; width: min(330px, calc(100vw - 24px)); max-height: min(70vh, 540px); overflow: auto;
  padding: 10px; border-radius: 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgb(0 0 0 / .2); }
.cp-lead { margin: 2px 6px 8px; color: var(--muted); line-height: 1.4; }
.cp-panel .cp-find { width: 100%; min-height: 42px; margin: 0 0 6px; }
.cp-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px;
  font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; min-height: 0; box-shadow: none; }
.cp-opt:hover, .cp-opt:focus-visible { background: var(--track); }
.cp-opt.on { background: var(--track); font-weight: 800; }
.cp-opt .flag-sm { width: 24px; height: 17px; border-radius: 3px; flex: none; }
.cp-list { list-style: none; margin: 4px 0 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
.cp-nothing { margin: 8px 10px; color: var(--muted); }

@media (max-width: 1199px) {
  .top-in { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 0; }
  .top.is-scrolled .top-in { padding-top: 6px; padding-bottom: 0; }
  .top-find { order: 1; flex: 1 1 0; min-width: 0; margin: 0; }
  .top-find .suggest-list { width: min(calc(100vw - 24px), 520px); left: -48px; }
  .country-pick { order: 2; }
  .nav-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
  .top.nav-open .nav-toggle { background: var(--sun); color: #16141F; border-color: transparent; }
  /* the groups: chips in a row you can swipe; a group's themes open under the whole bar */
  .top .nav { order: 4; display: flex; flex: 1 1 100%; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px; max-height: none;
    overflow-x: auto; overflow-y: hidden; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .top .nav::-webkit-scrollbar { display: none; }
  .top .nav-group { position: static; flex: none; }
  .top .nav-group summary, .top .nav .nav-link { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14.5px; font-weight: 700; white-space: nowrap; }
  .top .nav-group summary[aria-current="page"], .top .nav .nav-link[aria-current="page"] { background: var(--sun); border-color: var(--sun); color: #16141F; }
  .top .nav-group[open] summary { border-color: var(--ink); }
  .top .nav-group .nav-menu { position: absolute; top: calc(100% - 4px); left: 12px; right: 12px; min-width: 0; max-height: min(65vh, 520px); overflow: auto;
    padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgb(0 0 0 / .18); z-index: 120; }
  /* ☰: share, QR, embed and settings, and the footer's links, in a box under the bar */
  .top .top-right { display: none; }
  .top.nav-open .top-right { display: flex; position: absolute; top: calc(100% + 4px); left: 12px; right: 12px; z-index: 120; flex-direction: column; align-items: stretch; gap: 8px;
    padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgb(0 0 0 / .18); }
  .top.nav-open .top-right .gear { display: none; }
  .top.nav-open .top-right .share-row { justify-content: flex-start; gap: 8px; }
  .top.nav-open .top-right .share-pop { display: block; }
  .top.nav-open .top-right .share-pop .pop { left: 0; right: auto; }
  .top.nav-open .top-more-links { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 6px; }
  .top-more-links a { padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
  .top-more-links a:hover { background: var(--track); }
}
@media (max-width: 380px) { .top-find input { padding-right: 8px; font-size: 14.5px; } .country-pick > summary { min-width: 42px; padding: 0 6px; } }

/* international organisations: the abbreviation as a big mark in the header; a long one (Commonwealth) smaller on a card */
.org-abbr { position: absolute; right: 28px; bottom: 6px; font-size: clamp(64px, 11vw, 150px); font-weight: 900; line-height: 1; letter-spacing: -.04em; color: #ffffff2e; pointer-events: none; }
.org-abbr-long { font-size: clamp(40px, 6vw, 84px); }
.ig-official a { color: inherit; text-decoration-thickness: 1px; }
.ecard-name-long { font-size: 16px; overflow-wrap: normal; word-break: normal; }
@media (max-width: 600px) { .org-abbr { top: 14px; bottom: auto; right: 16px; font-size: 56px; } .org-abbr-long { font-size: 30px; } }
/* the card of facts of an organisation (themes/organisations/blocks/about.php) */
.org-what { margin: 4px 0 16px; max-width: 70ch; }
.org-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; margin: 0; }
.org-facts > div { padding: 10px 0; border-top: 1px solid var(--line); }
.org-facts dt { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.org-facts dd { margin: 0; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }

/* Languages: the filters, the decades of lost languages */
.lang-filters { display: grid; gap: 8px; margin: 12px 0 6px; }
.lang-frow { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.lang-flabel { font-size: 13px; font-weight: 700; color: var(--ink-2); min-width: 150px; }
.lang-fdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lang-fselects { gap: 12px; }
.lang-fselects label { display: flex; flex-direction: column; gap: 4px; }
.lang-fselects select { max-width: 260px; }
.legend-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.legend-btn:hover { text-decoration: underline; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.lang-flags { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-left: 6px; vertical-align: middle; }
.lang-decades { display: flex; align-items: flex-end; gap: 6px; height: 180px; margin: 12px 0 18px; }
.lang-decade { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.lang-decade-bar { width: 100%; background: #5C5F66; border-radius: 4px 4px 0 0; min-height: 2px; }
.lang-decade-n { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.lang-decade-y { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
@media (max-width: 600px) { .lang-flabel { min-width: 100%; } .lang-decade-y { writing-mode: vertical-rl; } }
.lang-lost li { grid-template-columns: 52px 1fr auto; }
.lang-lost a, .lang-official-list a { display: inline; }
.lang-official-list li > span:nth-child(2) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

/* Languages: the family tree as a sunburst */
.lang-tree-jumps { align-items: center; margin-bottom: 8px; }
.lang-tree-trail { margin: 6px 0; min-height: 1.4em; }
.lang-tree-fig { margin: 0 auto; max-width: 640px; }
.lang-tree-svg { width: 100%; height: auto; display: block; }
.lang-tree-label { fill: #fff; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.25); stroke-width: 2px; }
.lang-tree-mid { font-weight: 800; font-size: 14px; fill: var(--ink); pointer-events: none; }
.lang-tree-count { font-size: 12px; fill: var(--ink-2); pointer-events: none; }
.lang-tree-info { margin-top: 8px; }

/* Languages: first and second language in one bar */
.lang-total-bar { display: flex; }
.lang-total-bar .l1 { background: #2B5BD7; border-radius: 4px 0 0 4px; }
.lang-total-bar .l2 { background: #F59F00; border-radius: 0 4px 4px 0; }
.lang-l1, .lang-l2 { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lang-l1 { background: #2B5BD7; } .lang-l2 { background: #F59F00; }

/* "+ 9 more" countries: a click shows them all, as chips like the others (in a row of their own) */
.chip-more > summary { list-style: none; cursor: pointer; }
.chip-more > summary::-webkit-details-marker { display: none; }
.chip-more[open] { flex-basis: 100%; }
.chip-more[open] > summary { display: none; }

/* Mountains, rivers and lakes to scale: each one a link to its page */
.scale-link { cursor: pointer; }
.scale-link:hover text { text-decoration: underline; }
.scale-link:hover path, .scale-link:hover circle { opacity: .75; }

/* A river over its land in 3D */
.river3d-bar { align-items: center; margin-bottom: 8px; }
.river3d-taller { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.river3d-stage { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--mark-soft) 40%, transparent); min-height: 200px; }
.river3d-stage canvas { display: block; width: 100%; height: auto; cursor: grab; }

/* Geography: a title per kind (mountains, rivers …), a row of links to them */
.geo-kind-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.geo-kind-title::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--mark); }
.geo-jump { margin-top: 12px; }
.geo-jump .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* A science page's link to the Earth & space quiz */
.quiz-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.quiz-link .h2 { margin-bottom: 4px; }
.river3d-stage .globe-hint { left: 12px; bottom: 8px; }
/* a 3D view in full screen: the page's background, the buttons above the stage */
.river3d:fullscreen { background: var(--bg); padding: 16px; overflow: auto; }
.river3d:fullscreen .river3d-stage { border-radius: 12px; }
/* Geography's overview: a card per section */
.geo-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.geo-section-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border-top: 6px solid var(--mark); transition: transform .15s; }
.geo-section-card:hover { transform: translateY(-2px); }
.geo-section-art svg { display: block; height: 70px; width: auto; }
.geo-section-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.geo-section-go { margin-top: auto; font-weight: 700; color: var(--mark); }
.geo-jump .chip[aria-current="page"] { background: var(--ink); color: var(--bg); }
/* 3D views: the names as balloons above the land, a small tail pointing at the place */
.r3d-pins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.r3d-pin { position: absolute; left: 0; top: 0; white-space: nowrap; padding: 3px 8px; border-radius: 8px; font: 700 12px/1.25 var(--font); color: #16141F; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(0,0,0,.25); will-change: transform; }
.r3d-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: rgba(255,255,255,.94); }
.r3d-pin.is-marked { background: #E03131; color: #fff; font-weight: 800; font-size: 13px; z-index: 2; }
.r3d-pin.is-marked::after { border-top-color: #E03131; }
.r3d-pin.is-big { font-size: 14px; font-weight: 800; z-index: 1; }
.r3d-pin.is-desert.is-big { background: #B5651D; color: #fff; } .r3d-pin.is-desert.is-big::after { border-top-color: #B5651D; }
.r3d-pin.is-forest.is-big { background: #0B4F1E; color: #fff; } .r3d-pin.is-forest.is-big::after { border-top-color: #0B4F1E; }
.r3d-pin.is-island.is-big { background: #5F3DC4; color: #fff; } .r3d-pin.is-island.is-big::after { border-top-color: #5F3DC4; }
.r3d-pin.is-country { background: rgba(255, 236, 170, .95); font-weight: 800; } .r3d-pin.is-country::after { border-top-color: rgba(255, 236, 170, .95); }
/* A country's places of the geography pages, per kind */
.geo-all { display: grid; gap: 14px; }
.geo-all-row .h3 { margin: 0 0 6px; }
.chip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* The plates map: each plate's speed by its arrow */
.plate-speed { font: 800 11px var(--font); fill: #16141F; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: auto; }

/* The ocean's surface currents: a soft glow, and light dashes running the way the water flows */
.cur-glow { opacity: .22; stroke-linecap: round; stroke-linejoin: round; }
.cur-flow { stroke: rgba(255,255,255,.95); stroke-linecap: round; stroke-dasharray: 2 14; animation: cur-flow 1.6s linear infinite; }
.cur-flow.is-strong { animation-duration: .9s; }
@keyframes cur-flow { to { stroke-dashoffset: -32; } }
@media (prefers-reduced-motion: reduce) { .cur-flow { animation: none; } }
.legend-wide { width: 26px !important; height: 7px !important; border-radius: 4px !important; background: linear-gradient(90deg, #E03131, #1971C2) !important; }

/* Forest lost each year: two lists of countries with a bar */
.forest-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 12px; }
.forest-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.forest-bar { display: block; height: 12px; border-radius: 6px; }
.forest-bar.is-loss { background: #E8590C; } .forest-bar.is-gain { background: #5C940D; }

/* 3D views: the scale floating over the view, bottom left (sharp at any zoom; true for the middle of the view) */
.r3d-scale { position: absolute; left: 12px; bottom: 30px; display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(0,0,0,.18); pointer-events: none; }
.r3d-scale-bar { display: block; height: 7px; min-width: 20px; border: 1.5px solid #16141F; border-radius: 2px; background: linear-gradient(90deg, #16141F 25%, #fff 25% 50%, #16141F 50% 75%, #fff 75%); }
.r3d-scale-text { font: 700 11px/1 var(--font); color: #16141F; white-space: nowrap; }
