/* =========================================================================
   orl.nl — Prof. dr. Wilko Grolman
   Light editorial system (v117, previously dark). No third-party requests: no webfonts, no trackers,
   no CDN. Everything below ships from your own origin.
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Surfaces — light paper system, in the spirit of the ANBI site.
     The token names are kept (ink, ink-band, …) so nothing else changes. */
  --ink:        #F7F9FB;   /* page */
  --ink-band:   #EEF3F8;   /* alternating band */
  --ink-card:   #FFFFFF;   /* cards, panels */
  --ink-deep:   #E7EDF3;   /* footer */

  /* Rules */
  --rule:       #D8E0E8;
  --rule-soft:  #E5EBF1;
  --rule-loud:  #BFCAD5;

  /* Text — slate ink */
  --text:       #1F2A36;
  --text-2:     #4A5868;
  --text-3:     #71808F;

  /* Accent — the gold shared with grolman-orl.fr.
     --gold is the text-safe shade (4.8:1 on the page);
     --gold-bright is the true logo gold for lines, bars and fills. */
  --gold:        #8F6D00;
  --gold-bright: #E8B200;
  --gold-lift:   #6B5200;
  --gold-dim:    #C9A227;
  --gold-wash:   rgba(232, 178, 0, 0.12);

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
           Arial, "Helvetica Neue", sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
           "Liberation Mono", monospace;

  /* Measure & rhythm */
  --measure: 63ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --page: 1200px;
  --page-narrow: 780px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- 2. Reset & base ---------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-lift); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold-bright); color: #1B1B15; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-bright); color: #1B1B15;
  padding: 0.75rem 1.25rem; z-index: 100; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- 3. Layout ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--page-narrow); }

section { position: relative; }

.band {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--rule-soft);
}
.band--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.band--alt { background: var(--ink-band); }
.band--deep { background: var(--ink-deep); }
.band--flush { border-top: 0; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--pair { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Split: sticky heading column + content column */
.split {
  display: grid;
  gap: clamp(1.75rem, 4vw, 4rem);
  grid-template-columns: 1fr;
}
/* Grid items default to min-width:auto and will happily push the page wider
   than the viewport. This lets wide children (tables) scroll instead. */
.split > *, .grid > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
  .split__aside { position: sticky; top: 6.5rem; align-self: start; }
}

/* ---------- 4. Type ------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 1.6rem + 4.4vw, 5rem); }
h2 { font-size: clamp(1.9rem, 1.45rem + 2.1vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.6rem); }
h4 { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); }

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.05rem + 1.15vw, 1.9rem);
  line-height: 1.42;
  color: var(--text);
  letter-spacing: -0.01em;
  max-width: 34ch;
}

.prose { max-width: var(--measure); color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }

.muted   { color: var(--text-3); }
.dim     { color: var(--text-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.eyebrow::before {
  content: "";
  width: 2rem; height: 1px;
  background: var(--gold-bright);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 0.7rem;
}

.section-no {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.9rem;
}

.footnote {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-3);
  max-width: 68ch;
}
.footnote a { color: var(--text-2); border-bottom: 1px solid var(--rule-loud); }
.footnote a:hover { color: var(--gold); border-color: var(--gold); }

.hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

/* Inline text link inside prose */
.prose a, .link {
  color: var(--text);
  border-bottom: 1px solid var(--gold-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.prose a:hover, .link:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- 5. Masthead -------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 251, 0.84);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.masthead.is-stuck {
  border-bottom-color: var(--rule);
  background: rgba(247, 249, 251, 0.95);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.nav { margin-left: auto; }

/* Language switcher — EN · FR · IT */
.lang {
  display: flex; align-items: center; gap: 0.15rem;
  margin-left: auto; flex: none;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
}
@media (min-width: 900px) { .lang { margin-left: 0.25rem; } }
.lang a {
  color: var(--text-3); padding: 0.3rem 0.4rem; border-radius: 2px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { color: var(--gold); background: var(--gold-wash); }
@media (max-width: 899px) { .masthead__inner { gap: 0.75rem; } .lang a { padding: 0.3rem 0.3rem; } }
@media (max-width: 480px) { .brand > span:not(.brand__mark) { display: none; } }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand__mark {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.9rem); }
}
.nav a {
  color: var(--text-2);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Mobile nav */
.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: none; border: 1px solid var(--rule-loud); color: var(--text);
  font: inherit; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.5rem 0.85rem;
  cursor: pointer; border-radius: 2px;
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
@media (min-width: 900px) { .nav-toggle { display: none; } }

.nav-panel {
  border-top: 1px solid var(--rule);
  background: var(--ink-band);
}
.nav-panel[hidden] { display: none; }
.nav-panel ul { list-style: none; margin: 0; padding: 0.5rem 0 1.25rem; }
.nav-panel li { border-bottom: 1px solid var(--rule-soft); }
.nav-panel li:last-child { border-bottom: 0; }
.nav-panel a {
  display: block; padding: 0.95rem 0;
  color: var(--text-2); font-size: 0.95rem;
}
.nav-panel a[aria-current="page"] { color: var(--gold); }
@media (min-width: 900px) { .nav-panel { display: none !important; } }

/* No JavaScript: the toggle can't work, so hide it and show the list instead. */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .nav-panel[hidden] { display: block; }

/* ---------- 6. Hero ------------------------------------------------------ */

.hero {
  padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 45% auto -20%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(232,178,0,0.16), transparent 72%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero__name {
  margin-bottom: 0.35em;
}
.hero__name .given {
  display: block;
  font-size: 0.34em;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.9rem;
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
@media (min-width: 940px) {
  .hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

/* Record card — the factual plate beside the hero */
.record {
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold-bright);
  background: linear-gradient(180deg, rgba(232,178,0,0.09), #fff 45%);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.record dl { margin: 0; display: grid; gap: 1.05rem; }
.record div { display: grid; gap: 0.15rem; }
.record dt {
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}
.record dd {
  margin: 0; color: var(--text); font-size: 0.95rem; line-height: 1.45;
}
.record dd span { display: block; color: var(--text-3); font-size: 0.85rem; }

/* Profile links row */
.idlinks {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 2rem 0 0; padding: 0;
}
.idlinks a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--rule-loud);
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--text-2); border-radius: 2px;
  transition: all 0.2s var(--ease);
}
.idlinks a:hover {
  border-color: var(--gold); color: var(--gold);
  background: var(--gold-wash);
}
.idlinks .id-val { color: var(--text-3); font-family: var(--mono); font-size: 0.72rem; }

/* ---------- 7. Counters (stat tiles) ------------------------------------- */

.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.counter {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.5rem, 3.5vw, 2.4rem) clamp(1.1rem, 2.5vw, 1.75rem);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.counter__value {
  font-family: var(--sans);              /* figures stay sans, never serif */
  font-weight: 650;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--gold);
  display: inline-block;                 /* width locked by JS before count-up */
}
.counter__value .unit {
  font-size: 0.42em; letter-spacing: 0.02em; color: var(--gold-dim);
  margin-left: 0.15em; font-weight: 600;
}
.counter__value .unit--pre { margin: 0 0.1em 0 0; }

/* Digits keep a constant width while a number is counting, so nothing
   shuffles sideways mid-animation. Removed again once it lands. */
.is-counting { font-variant-numeric: tabular-nums; }
.counter__label {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}
.counter__note {
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.45;
}

.counters--lead .counter__value { font-size: clamp(2.9rem, 1.8rem + 4vw, 4.75rem); }

.counter-group__title {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  margin: 0 0 0.9rem;
}
.counter-group + .counter-group { margin-top: clamp(2rem, 4vw, 3rem); }

.source-line {
  margin-top: 1.1rem;
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.01em;
}

/* ---------- 8. Cards ----------------------------------------------------- */

.card {
  border: 1px solid var(--rule);
  background: var(--ink-card);
  box-shadow: 0 1px 2px rgba(31,42,54,0.04);
  padding: clamp(1.35rem, 3vw, 1.9rem);
  display: flex; flex-direction: column; gap: 0.7rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--rule-loud); }
a.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card h3 { margin: 0; }
.card p { color: var(--text-2); font-size: 0.93rem; margin: 0; }
.card__figure {
  font-family: var(--sans); font-weight: 650;
  font-size: 1.6rem; color: var(--gold); letter-spacing: -0.02em;
  line-height: 1;
}
.card__meta {
  margin-top: auto; padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
}

.card--flat { background: transparent; }

/* ---------- 9. Programme list -------------------------------------------- */

.programme {
  border-top: 1px solid var(--rule);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  gap: clamp(0.9rem, 2.5vw, 2.5rem);
}
@media (min-width: 820px) {
  .programme { grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 15rem); align-items: start; }
}
.programme:last-of-type { border-bottom: 1px solid var(--rule); }
.programme__no {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--gold); letter-spacing: 0.08em; padding-top: 0.45rem;
}
.programme__body h3 { margin-bottom: 0.5rem; }
.programme__body p { color: var(--text-2); font-size: 0.95rem; }
.programme__facts {
  display: grid; gap: 0.75rem;
  border-left: 1px solid var(--rule);
  padding-left: 1.1rem;
}
@media (max-width: 819px) {
  .programme__facts { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-soft); padding-top: 1rem; }
}
.programme__facts div { display: grid; gap: 0.1rem; }
.programme__facts dt {
  font-size: 0.64rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-3);
}
.programme__facts dd { margin: 0; font-size: 0.88rem; color: var(--text); }
.programme__facts .hi { color: var(--gold); font-weight: 600; }

/* ---------- 9b. Numbered steps ------------------------------------------- */

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 clamp(1.5rem, 3vw, 2.25rem) 3.25rem;
  border-left: 1px solid var(--rule);
  margin-left: 0.75rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -0.15rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--gold);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  padding: 0.25rem 0.4rem;
}
.band--alt .steps > li::before { background: var(--ink-band); }
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--text-2); font-size: 0.95rem; margin: 0; }

/* ---------- 10. Timeline ------------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: 0.6rem; bottom: 0.6rem;
  width: 1px; background: var(--rule);
}
@media (min-width: 720px) { .timeline::before { left: 7.5rem; } }

.tl {
  position: relative;
  padding-left: 1.75rem;
  padding-block: 0 clamp(1.6rem, 3.5vw, 2.4rem);
}
@media (min-width: 720px) {
  .tl { padding-left: 9.25rem; }
}
.tl:last-child { padding-bottom: 0; }
.tl::before {
  content: ""; position: absolute; left: -4px; top: 0.62rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 1px solid var(--gold-dim);
}
@media (min-width: 720px) { .tl::before { left: calc(7.5rem - 4px); } }
.tl--major::before { background: var(--gold-bright); border-color: var(--gold-bright); }

.tl__year {
  font-family: var(--mono); font-size: 0.8rem; color: var(--gold);
  letter-spacing: 0.04em; display: block; margin-bottom: 0.35rem;
}
@media (min-width: 720px) {
  .tl__year { position: absolute; left: 0; top: 0.35rem; width: 6.5rem; text-align: right; margin: 0; }
}
.tl h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); margin-bottom: 0.35rem; }
.tl p { color: var(--text-2); font-size: 0.93rem; margin: 0; }
.tl__where {
  font-size: 0.78rem; color: var(--text-3); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 0.5rem;
}

/* ---------- 11. Data tables & inline bars -------------------------------- */

/* Scrolls inside its own box — never widens the page. */
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-loud) transparent;
}

table.data {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem;
}
table.data caption {
  text-align: left; color: var(--text-3); font-size: 0.78rem;
  padding-bottom: 0.9rem; letter-spacing: 0.04em;
}
table.data th, table.data td {
  text-align: left; padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}
table.data thead th {
  font-size: 0.66rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.7rem;
}
table.data td.num, table.data th.num {
  text-align: right; font-variant-numeric: tabular-nums;  /* columns only */
  padding-right: 0; padding-left: 1.5rem; white-space: nowrap;
}
table.data tbody tr:hover td { background: rgba(232,178,0,0.07); }
table.data .row-label { color: var(--text); }
table.data .accent { color: var(--gold); font-weight: 600; }

/* single-series bar, drawn in the accent hue, 4px rounded data-end */
.bar-cell { width: 40%; min-width: 4.5rem; padding-right: 0.9rem !important; }
@media (min-width: 640px) { .bar-cell { min-width: 8rem; } }
.bar {
  position: relative;
  height: 10px;                     /* thin mark, well under the 24px cap */
  background: rgba(232,178,0,0.16); /* track: lighter step of the same ramp */
  border-radius: 0 5px 5px 0;
}
.bar__fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--gold-bright);
  border-radius: 0 5px 5px 0;       /* square at baseline, rounded data-end */
  width: 0;
  transition: width 1s var(--ease);
}
.bar__fill.is-dim { background: var(--gold-dim); }

/* Rows that stack into blocks on small screens rather than scroll sideways */
@media (max-width: 639px) {
  table.data--stack, table.data--stack tbody, table.data--stack tr,
  table.data--stack th, table.data--stack td { display: block; width: 100%; }
  table.data--stack thead { position: absolute; left: -9999px; }
  table.data--stack tr {
    border-bottom: 1px solid var(--rule-soft);
    padding-block: 0.9rem;
  }
  table.data--stack th, table.data--stack td { border: 0; padding: 0 0 0.15rem; }
  table.data--stack td:last-child { color: var(--text-2); font-size: 0.86rem; }
}

/* ---------- 12. Definition / fact lists ---------------------------------- */

.facts {
  display: grid; gap: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.facts > div {
  display: grid; gap: 0.25rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--rule-soft);
}
@media (min-width: 640px) {
  .facts > div { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 1.5rem; align-items: baseline; }
}
.facts dt {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}
.facts dd { margin: 0; color: var(--text); font-size: 0.95rem; }
.facts dd .sub { display: block; color: var(--text-3); font-size: 0.85rem; margin-top: 0.15rem; }

/* ---------- 12b. Country slider ------------------------------------------ */

.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.plain-list li {
  color: var(--text); font-size: 0.95rem;
  padding-left: 1.1rem; position: relative;
}
.plain-list li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 5px; height: 1px; background: var(--gold);
}

.rank {
  font-family: var(--mono); font-size: 0.85rem; color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.slider__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem;
}
.slider__head h2 { margin: 0; }
.slider__controls { display: flex; gap: 0.5rem; }
.slider__btn {
  width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--rule-loud); background: none; color: var(--text-2);
  font: inherit; font-size: 1rem; cursor: pointer; border-radius: 2px;
  transition: all 0.2s var(--ease);
}
.slider__btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.slider__btn:disabled { opacity: 0.3; cursor: default; }

/* Native horizontal scrolling with snap: works with no JavaScript at all;
   the buttons and dots are enhancement on top. */
.slider__track {
  list-style: none; margin: 0; padding: 0 0 1rem;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(min(100%, 20rem), 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--rule-loud) transparent;
}
@media (min-width: 760px) {
  .slider__track { grid-auto-columns: minmax(0, calc(50% - 1rem)); }
}
.slide {
  scroll-snap-align: start;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold-bright);
  background: var(--ink-card);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: 0.65rem;
}
.slide__rank {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--gold); margin: 0;
}
.slide__country { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.slide__count {
  font-family: var(--sans); font-weight: 650; letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.4rem); line-height: 1;
  color: var(--gold); margin: 0.2rem 0 0;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.slide__unit {
  font-size: 0.28em; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
}
.slide__summary { color: var(--text-2); font-size: 0.92rem; margin: 0.4rem 0 1.1rem; }
.slide .btn { align-self: flex-start; margin-top: auto; }

.slider__dots { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.slider__dot {
  width: 2rem; height: 3px; padding: 0; border: 0; cursor: pointer;
  background: var(--rule-loud); transition: background 0.2s var(--ease);
}
.slider__dot:hover { background: var(--gold-dim); }
.slider__dot[aria-current="true"] { background: var(--gold-bright); }
html:not(.js) .slider__controls, html:not(.js) .slider__dots { display: none; }

/* ---------- 12c. Video cards & photo gallery ------------------------------ */

.vid {
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold-bright);
  background: var(--ink-card);
  padding: clamp(1.3rem, 3vw, 1.8rem);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.vid__kind {
  font-size: 0.66rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-3); margin: 0;
}
.vid__title { font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; margin: 0; }
.vid__note { color: var(--text-2); font-size: 0.92rem; margin: 0 0 1.1rem; }
.vid .btn { align-self: flex-start; margin-top: auto; }

.gallery {
  display: grid; gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.shot { margin: 0; }
.shot a {
  display: block; border: 1px solid var(--rule); background: var(--ink-band);
  aspect-ratio: 16 / 10; overflow: hidden;
  transition: border-color 0.25s var(--ease);
}
.shot a:hover { border-color: var(--gold); }
.shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}
.shot a:hover img { transform: scale(1.03); }
.shot img.is-missing { opacity: 0; }
.shot figcaption { padding-top: 0.9rem; display: grid; gap: 0.25rem; }
.shot figcaption strong { color: var(--text); font-size: 0.95rem; font-weight: 600; }
.shot figcaption span { color: var(--text-2); font-size: 0.88rem; line-height: 1.5; }

/* ---------- 13. Publications --------------------------------------------- */

.pubs { list-style: none; margin: 0; padding: 0; }
.pub {
  border-top: 1px solid var(--rule-soft);
  padding-block: 1.35rem;
  display: grid; gap: 0.4rem;
}
.pub:first-child { border-top: 1px solid var(--rule); }
.pub__title {
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.35;
  color: var(--text); margin: 0; font-weight: 600;
}
.pub__authors { font-size: 0.85rem; color: var(--text-2); margin: 0; max-width: none; }
.pub__authors .self { color: var(--gold); font-weight: 600; }
.pub__meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  font-size: 0.78rem; color: var(--text-3); font-family: var(--mono);
  align-items: center;
}
.pub__meta .journal { color: var(--text-2); font-family: var(--sans); font-style: italic; }
.tag {
  display: inline-block; font-family: var(--sans);
  font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--rule-loud); color: var(--text-3);
  padding: 0.2rem 0.5rem; border-radius: 2px;
}
.tag--rct { border-color: var(--gold-dim); color: var(--gold); }

/* ---------- 14. Pull quote ----------------------------------------------- */

.pull {
  border-left: 2px solid var(--gold);
  padding: 0.4rem 0 0.4rem clamp(1.25rem, 3vw, 2.25rem);
  margin: clamp(2rem, 4vw, 3rem) 0;
  max-width: 46ch;
}
.pull p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.55rem);
  line-height: 1.45; color: var(--text); margin: 0;
}
.pull cite {
  display: block; margin-top: 0.9rem; font-style: normal;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- 15. Callout -------------------------------------------------- */

.callout {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold-dim);
  background: var(--ink-card);
  padding: clamp(1.2rem, 2.5vw, 1.75rem);
}
.callout h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.callout p { font-size: 0.9rem; color: var(--text-2); }

/* ---------- 15b. Contact form ------------------------------------------- */

.form__grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.form__grid .form__field { margin-bottom: 0; }
.form__grid + .form__field { margin-top: 1.1rem; }
.form label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3);
}
.form input, .form select, .form textarea {
  font: inherit; color: var(--text); background: var(--ink-card);
  border: 1px solid var(--rule-loud); border-radius: 2px;
  padding: 0.7rem 0.85rem; width: 100%; min-width: 0;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--gold-bright); box-shadow: 0 0 0 3px var(--gold-wash);
}
.form__field--human { max-width: 22rem; }
.form__hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.form__status:empty { display: none; }
.form__status {
  border: 1px solid var(--gold-dim); border-left: 3px solid var(--gold-bright);
  background: var(--ink-card); padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  font-size: 0.95rem; color: var(--text);
}
.form__status.is-error { border-color: #C0392B; border-left-color: #C0392B; }

/* ---------- 16. Buttons -------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--gold); color: var(--gold);
  padding: 0.7rem 1.4rem; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2px;
  transition: all 0.2s var(--ease);
}
.btn:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #1B1B15; }
.btn--ghost { border-color: var(--rule-loud); color: var(--text-2); }
.btn--ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- 17. Next / prev page ----------------------------------------- */

.next-page {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2rem, 4vw, 3rem);
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: baseline; justify-content: space-between;
}
.next-page__label { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.next-page a { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem); color: var(--text); }
.next-page a:hover { color: var(--gold); }

/* ---------- 18. Footer --------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--ink-deep);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  font-size: 0.85rem;
}
.footer-grid {
  display: grid; gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.footer-head {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
  margin: 0 0 1rem; font-weight: 600;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--gold); }
.footer-grid p { color: var(--text-3); font-size: 0.82rem; line-height: 1.6; }

.colophon {
  border-top: 1px solid var(--rule-soft);
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  justify-content: space-between; align-items: center;
  color: var(--text-3); font-size: 0.75rem;
  font-family: var(--mono); letter-spacing: 0.02em;
}

/* ---------- 19. Reveal on scroll ----------------------------------------- */

/* Content is NEVER hidden by CSS. Earlier builds faded blocks in from
   opacity:0 and relied on JavaScript to reveal them — if that script failed
   to load or threw, whole pages rendered blank. The fade now runs as a
   keyframe animation that ENDS at the visible state, so even if the
   animation never runs the text is simply there. */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal.is-in { animation: rise 0.6s var(--ease); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 20. Motion & print ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .bar__fill { transition: none; }
}

@media print {
  :root { --ink:#fff; --ink-band:#fff; --ink-card:#fff; --ink-deep:#fff;
          --text:#111; --text-2:#333; --text-3:#666;
          --rule:#ccc; --rule-soft:#e5e5e5; --rule-loud:#bbb; --gold:#8a6c05; --gold-bright:#8a6c05; }
  body { background:#fff; color:#111; font-size: 11pt; }
  .masthead, .nav-panel, .btn-row, .next-page, .hero::before { display: none !important; }
  .band { padding-block: 1.5rem; }
  a { color:#111; }
  .counter__value { color:#8a6c05; }
}

@media (forced-colors: active) {
  .bar__fill { forced-color-adjust: none; background: Highlight; }
  .card, .counter, .record { border-color: CanvasText; }
}
