/* ============================================================================
   APEC — OUR COMMITTEE · STYLESHEET
   Bold poster energy: noir, warm cream, brass, hard rectangles. Anton for
   mega type, Fraunces italic for the accent words, Instrument Sans for text,
   IBM Plex Mono for labels.

   THE EXECUTIVE THEATER (#exec) has three layouts, switched by a class the
   engine puts on <html>:
     html.thx  — desktop: the stage pins and scroll ZOOMS through the
                 officers (each flies past the camera; ~62svh each),
                 ending on a hand-off card into the Honoured chapter.
     html.crs  — narrow screens: a native swipe carousel (scroll-snap).
     neither   — reduced motion / ?static=1 / no JS: a plain vertical list.
   The engine drives slide scale/opacity/z-index inline and sets .vis/.on.
   ========================================================================== */

:root {
  --ink:        #0a0b0d;
  --ink-2:      #101217;
  --ink-3:      #161922;
  --line:       rgba(237, 231, 216, 0.14);
  --line-soft:  rgba(237, 231, 216, 0.07);
  --cream:      #ede7d8;
  --cream-dim:  #b6afa0;
  --muted:      #837e70;
  --gold:       #c9a45c;
  --gold-hi:    #e6c581;
  --gold-dim:   rgba(201, 164, 92, 0.35);

  --font-mega:    "Anton", "Arial Narrow", Impact, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text:    "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", Consolas, "Courier New", monospace;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --measure: 34em;
  --head-h: 4.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-slam: cubic-bezier(0.2, 1.2, 0.3, 1);
  --ease-wipe: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 125%; /* +25%: 16→20px base type scale, for PC legibility */ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
}

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

::selection { background: var(--gold); color: var(--ink); }

a { color: var(--gold-hi); text-decoration-color: var(--gold-dim); text-underline-offset: 3px; }
a:hover { color: var(--cream); }

.skip-link {
  position: fixed; top: -4rem; left: 1rem; z-index: 300;
  background: var(--gold); color: var(--ink);
  padding: 0.6rem 1rem; font-family: var(--font-mono); font-size: 0.8rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.38em;
  text-transform: uppercase; color: var(--gold);
}

/* Film grain */
.grain {
  position: fixed; inset: -50%; z-index: 120; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ---- Intro curtain: one hard beat ------------------------------------------ */
.loader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--ink);
  display: grid; place-items: center;
  transition: transform 0.6s var(--ease-wipe);
}
.loader.done { transform: translateY(-101%); pointer-events: none; }
.loader__inner { text-align: center; transition: opacity 0.3s; }
.loader.done .loader__inner { opacity: 0; }
.loader__label {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.42em;
  text-transform: uppercase; color: var(--muted);
}
.loader__word {
  font-family: var(--font-mega); font-weight: 400;
  font-size: clamp(3rem, 11vmin, 7rem); line-height: 0.92;
  color: var(--cream); letter-spacing: 0.02em;
  margin: 1.6rem 0 1.1rem;
}
.loader__term {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.3em;
  color: var(--gold); margin-bottom: 2rem;
}
.loader__line { width: min(46vw, 20rem); height: 2px; background: var(--line); margin: 0 auto; }
.loader__line i {
  display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform: scaleX(0); transform-origin: 0 50%;
}
html.locked { overflow: hidden; }

body:not(.booted) .reveal-load,
body:not(.booted) .hero__word .ch { animation-play-state: paused; }
body:not(.booted) .flagway__track { animation-play-state: paused; }

/* ---- Custom cursor (same as the Our History page) --------------------------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 500; pointer-events: none;
  border-radius: 50%; opacity: 0;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold-hi); margin: -3px 0 0 -3px; }
.cursor-ring {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 1px solid rgba(201, 164, 92, 0.65);
  display: grid; place-items: center;
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              margin 0.3s var(--ease-out), border-color 0.3s, background-color 0.3s;
}
.cursor-ring span {
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity 0.2s;
  user-select: none;
}
body.cursor-on { cursor: none; }
body.cursor-on a, body.cursor-on button, body.cursor-on [role="button"] { cursor: none; }
body.cursor-on .cursor-dot, body.cursor-on .cursor-ring { opacity: 1; }
.cursor-ring.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--gold); }
.cursor-ring.is-view {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  background: var(--gold-hi); border-color: var(--gold-hi);
}
.cursor-ring.is-view span { opacity: 1; }
.cursor-ring.is-down { transform: scale(0.85); }

/* ---- Fixed chrome ----------------------------------------------------------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  transition: background-color 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-head.scrolled {
  background: rgba(10, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand__mark { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.14em;
  color: var(--cream); font-size: 1.02rem;
}
.brand__text small {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}

/* Term picker — a stamp for one term, a menu once history accumulates */
.head-side { display: flex; align-items: center; gap: 1.4rem; }
.head-home {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold-hi); text-decoration: none;
  border-bottom: 1px solid var(--gold-dim); padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.head-home:hover { color: var(--cream); border-color: var(--cream); }

.term { position: relative; }
.term__chip {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em;
  color: var(--cream-dim); background: none;
  border: 1px solid var(--line);
  padding: 0.5rem 1.05rem;
  display: inline-flex; align-items: center; gap: 0.55rem;
  white-space: nowrap;
}
button.term__chip { cursor: pointer; transition: border-color 0.3s, color 0.3s; }
button.term__chip:hover, button.term__chip[aria-expanded="true"] { border-color: var(--gold-dim); color: var(--cream); }
.term__chip .caret {
  display: inline-block; width: 0.5em; height: 0.5em;
  border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s;
}
.term__chip[aria-expanded="true"] .caret { transform: rotate(-135deg) translateY(-2px); }
.term__menu {
  position: absolute; top: calc(100% + 0.55rem); right: 0; min-width: 100%;
  background: var(--ink-2); border: 1px solid var(--line);
  padding: 0.4rem; display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.term__menu.open { display: flex; }
.term__menu button {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--cream-dim); background: none; border: 0;
  padding: 0.55rem 0.9rem; text-align: right; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.term__menu button:hover { background: rgba(201, 164, 92, 0.08); color: var(--cream); }
.term__menu button[aria-current="true"] { color: var(--gold-hi); }

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 210;
}
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ---- Load reveals ------------------------------------------------------------ */
.reveal-load {
  opacity: 0; transform: translateY(22px);
  animation: rise 0.9s var(--ease-out) forwards; animation-delay: var(--d, 0s);
}
.hero__line { display: block; overflow: hidden; padding: 0 0.06em; }
.hero__word { display: inline-block; white-space: nowrap; }
.hero__word .ch {
  display: inline-block;
  transform: translateY(112%);
  animation: char-up 0.7s var(--ease-slam) forwards;
  animation-delay: calc(var(--d, 0s) + var(--ci, 0) * 0.03s);
}
@keyframes rise    { to { opacity: 1; transform: none; } }
@keyframes char-up { to { transform: none; } }

/* Character cascade for big titles revealed on scroll */
.w { display: inline-block; white-space: nowrap; }
.split-title[data-rv] { opacity: 1; transform: none; }
.split-title .ch {
  display: inline-block;
  opacity: 0; transform: translateY(0.5em);
  transition: opacity 0.5s var(--ease-slam), transform 0.5s var(--ease-slam);
  transition-delay: calc(var(--d, 0s) + var(--ci, 0) * 0.018s);
}
.split-title.in .ch { opacity: 1; transform: none; }

/* Scroll reveals */
[data-rv] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-rv].in { opacity: 1; transform: none; }

/* ---- Flag (always a sharp rectangle) -----------------------------------------
   <span class="flag-chip"><i class="flag-chip__f" data-cc="lb"><img …></i><b>Lebanon</b></span> */
.flag-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--cream-dim);
  white-space: nowrap;
}
.flag-chip__f {
  position: relative; display: inline-block; flex: none;
  width: 36px; height: 24px; overflow: hidden;
  background: var(--ink-3);
}
.flag-chip__f img { width: 100%; height: 100%; object-fit: cover; }
.flag-chip__f::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(237, 231, 216, 0.22);
  pointer-events: none;
}
/* Nepal's pennant is the one flag that must never be cropped or boxed */
.flag-chip__f[data-cc="np"] { background: none; overflow: visible; }
.flag-chip__f[data-cc="np"] img { object-fit: contain; }
.flag-chip__f[data-cc="np"]::after { display: none; }

/* ---- Hero ------------------------------------------------------------------- */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--head-h) + 2vh) var(--pad) 0;
  overflow: clip;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(52% 40% at 74% 24%, rgba(201, 164, 92, 0.1), transparent 70%),
    linear-gradient(180deg, transparent 55%, rgba(201, 164, 92, 0.04));
}
.hero__inner { width: 100%; max-width: 96rem; margin: 0 auto; }
.hero__kicker {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.hero__kicker i { flex: 0 1 6rem; height: 1px; background: var(--gold-dim); }
.hero__kicker span { color: var(--cream-dim); letter-spacing: 0.3em; }
.hero__title {
  font-family: var(--font-mega); font-weight: 400;
  font-size: clamp(4.2rem, 16.5vw, 15rem);
  line-height: 0.9; letter-spacing: 0.015em;
  color: var(--cream);
  margin: 2rem 0 2.2rem;
  text-transform: uppercase;
}
.hero__accent { color: var(--gold-hi); }
.hero__row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2.5rem; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.hero__sub {
  max-width: 30em;
  color: var(--cream-dim); font-size: clamp(0.98rem, 1.8vw, 1.12rem);
  text-wrap: balance;
}
.hero__sub em { font-family: var(--font-display); font-style: italic; color: var(--gold-hi); }
.hero__stats { display: flex; gap: clamp(1.4rem, 3vw, 3rem); }
.stat { display: flex; align-items: baseline; gap: 0.7rem; }
.stat__n {
  font-family: var(--font-mega); font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1;
  color: var(--gold-hi); font-variant-numeric: tabular-nums;
}
.stat__l {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted);
  max-width: 8em; line-height: 1.5;
}
/* Every member nation, sailing past */
.flagway {
  width: calc(100% + 2 * var(--pad));
  margin: clamp(2rem, 4.5vh, 3.4rem) calc(-1 * var(--pad)) 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line-soft);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.flagway__track {
  display: flex; width: max-content; gap: 2.8rem;
  animation: flagway-run 38s linear infinite;
}
.flagway:hover .flagway__track { animation-play-state: paused; }
@keyframes flagway-run { to { transform: translateX(-50%); } }
.flagway .flag-chip { opacity: 0.8; transition: opacity 0.3s; }
.flagway .flag-chip:hover { opacity: 1; }
.flagway .flag-chip__f { width: 44px; height: 30px; }

/* ---- Shared section shell ----------------------------------------------------- */
.sect { position: relative; padding: clamp(4.5rem, 12vh, 8rem) var(--pad); }
.shead { max-width: 96rem; margin: 0 auto clamp(2.2rem, 6vh, 4rem); }
.shead .kicker { display: block; margin-bottom: 1.1rem; }
.shead__t {
  font-family: var(--font-mega); font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 5.6rem); line-height: 0.98;
  letter-spacing: 0.015em; text-transform: uppercase;
  color: var(--cream);
}
.shead__t em {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: 0;
  color: var(--gold-hi); font-size: 0.94em;
}
.shead__p { margin-top: 1.3rem; max-width: var(--measure); color: var(--cream-dim); }

/* ============================================================================
   THE EXECUTIVE THEATER
   Base layout (no thx/crs class) = plain vertical list — used for reduced
   motion, ?static=1 and any environment without the engine.
   ========================================================================== */
.theater { position: relative; background: var(--ink); }
.theater__pin { position: relative; padding: clamp(4.5rem, 12vh, 8rem) var(--pad); }
.theater__head { max-width: 96rem; margin: 0 auto clamp(2.2rem, 5vh, 3.4rem); }

.theater__num {
  display: none;
  font-family: var(--font-mega); line-height: 1;
  color: var(--cream);
}
.theater__num b { font-size: clamp(2.2rem, 4.5vw, 3.6rem); color: var(--gold-hi); font-weight: 400; }
.theater__num i { font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.26em; color: var(--muted); }
.theater__num b.tick { animation: num-tick 0.4s var(--ease-slam); }
@keyframes num-tick {
  from { transform: translateY(0.55em); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.theater__stage { position: relative; max-width: 96rem; margin: 0 auto; }

/* --- one officer = one slide (base: a stacked card) --- */
.tslide { position: relative; }
.tslide + .tslide { margin-top: clamp(2.5rem, 7vh, 5rem); }

.tghost {
  position: absolute; z-index: 0; right: -2vw; top: 4%;
  font-family: var(--font-mega); font-size: clamp(5rem, 17vw, 15rem);
  line-height: 1; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(237, 231, 216, 0.08);
  user-select: none; pointer-events: none;
}

.tmedia {
  position: relative; z-index: 1;
  width: min(100%, 30rem); aspect-ratio: 4 / 4.7;
  overflow: hidden; background: var(--ink-3);
  border: 1px solid var(--line);
}
.tmedia img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 15%;
}
.tmedia::after {
  content: ""; position: absolute; left: 0; bottom: 0; top: auto;
  width: 100%; height: 4px;
  background: var(--acc, var(--gold));
}

.tinfo { position: relative; z-index: 2; padding-top: 1.6rem; }
.tidx {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em;
  color: var(--muted);
}
.tidx b { color: var(--gold-hi); font-weight: 500; }
.trole {
  display: inline-block; margin-top: 0.9rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--gold);
  border-left: 3px solid var(--acc, var(--gold));
  padding-left: 0.8rem;
  text-wrap: balance;
}
.trole small {
  display: block; font-size: 0.86em; letter-spacing: 0.26em;
  color: var(--muted); margin-top: 0.3rem;
}
.tname {
  margin: 1.1rem 0 1.2rem;
  font-family: var(--font-mega); font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.015em;
  font-size: clamp(2.6rem, 7.5vw, 7rem);
  line-height: 0.94; color: var(--cream);
}
.tname .tline { display: block; overflow: hidden; padding-bottom: 0.06em; }
.tname .tline > span { display: inline-block; }
.tname .tline--family > span { color: var(--gold-hi); }
.tcountry { display: block; }
.tcountry .flag-chip { font-size: 0.78rem; gap: 0.9rem; color: var(--cream); }
.tcountry .flag-chip__f { width: 56px; height: 38px; }
.tterm {
  margin-top: 1.6rem;
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted);
}

/* --- filmstrip + segmented progress (shown by the engine modes) --- */
.tstrip { display: none; gap: 0.5rem; }
.tstrip button {
  position: relative; width: 52px; height: 66px; padding: 0;
  border: 1px solid var(--line); background: var(--ink-3);
  cursor: pointer; overflow: hidden; flex: none;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.tstrip img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%;
  filter: grayscale(1) brightness(0.62);
  transition: filter 0.3s;
}
.tstrip button:hover img { filter: grayscale(0.4) brightness(0.85); }
.tstrip button.act { border-color: var(--gold-hi); transform: translateY(-4px); }
.tstrip button.act img { filter: none; }

.tsegs { display: none; gap: 6px; }
.tsegs button {
  flex: 1; height: 14px; padding: 0; border: 0; background: none; cursor: pointer;
  position: relative;
}
.tsegs button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px;
  background: var(--line);
  transition: background-color 0.25s;
}
.tsegs button.fill::after { background: var(--gold-hi); }

/* ============================== html.crs — swipe carousel ================= */
html.crs .theater__num { display: block; position: absolute; top: clamp(4.5rem, 12vh, 8rem); right: var(--pad); }
html.crs .theater__head { padding-right: 5.5rem; }
html.crs .theater__stage {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
}
html.crs .theater__stage::-webkit-scrollbar { display: none; }
html.crs .tslide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  padding-right: 6vw;
}
html.crs .tslide + .tslide { margin-top: 0; }
html.crs .tmedia { width: min(100%, 24rem); aspect-ratio: 4 / 4.6; max-height: 52svh; }
html.crs .tname { font-size: clamp(2.4rem, 11vw, 4rem); }
html.crs .tghost { display: none; }
html.crs .tstrip { display: flex; margin-top: 2rem; overflow-x: auto; scrollbar-width: none; }
html.crs .tstrip::-webkit-scrollbar { display: none; }
html.crs .tsegs { display: flex; margin-top: 1rem; }
html.crs .tterm { display: none; }

/* ============================== html.thx — the zoom tunnel ==================
   The stage pins and scroll flies the camera through the officers: each
   slide grows from deep in the tunnel, holds at full size to be read, then
   zooms past the camera as the next emerges behind it. The engine drives
   scale/opacity/z-index inline every frame (transform+opacity only) and
   toggles .vis / .on; the final "slide" is the hand-off card to the
   Honoured chapter. --steps counts windows INCLUDING that card. */
html.thx .theater { height: calc(100svh + var(--steps, 8) * 62svh); }
html.thx .theater__pin {
  position: sticky; top: 0; height: 100svh; overflow: clip;
  padding: 0 var(--pad);
  display: flex; flex-direction: column;
}
html.thx .theater__head {
  margin: 0 auto;
  width: 100%;
  padding-top: calc(var(--head-h) + 1.2vh);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem;
  position: relative; z-index: 6;
}
html.thx .theater__head .shead__t { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
html.thx .theater__head .shead__p { display: none; }
html.thx .theater__head { margin-bottom: 0; }
html.thx .theater__num { display: block; text-align: right; flex: none; }

html.thx .theater__stage { flex: 1; width: 100%; min-height: 0; }

html.thx .tslide {
  position: absolute; inset: 0;
  visibility: hidden;
  opacity: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(1.5rem, 4.5vw, 4.5rem);
  padding: 2vh 0 12vh;
  transform-origin: 50% 44%;
  will-change: transform, opacity, filter;
  pointer-events: none;
}
html.thx .tslide.vis { visibility: visible; }
html.thx .tslide + .tslide { margin-top: 0; }

/* ghost word rides its slide through the zoom */
html.thx .tghost { right: auto; left: 34%; top: 6%; }

html.thx .tmedia {
  width: 100%; height: min(64svh, 100%); aspect-ratio: auto;
  justify-self: end;
  max-width: min(34rem, 40vw);
}

/* scroll velocity leans the front officer's type */
html.thx .tinfo { padding-top: 0; max-width: 40rem; }
html.thx .tslide.on .tinfo { transform: skewX(var(--skew, 0deg)); }

/* every second officer passes on the other side — the tunnel weaves */
html.thx .tslide--flip { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
html.thx .tslide--flip .tmedia { order: 2; justify-self: start; }
html.thx .tslide--flip .tinfo { order: 1; justify-self: end; text-align: right; }
html.thx .tslide--flip .trole {
  border-left: 0; padding-left: 0;
  border-right: 3px solid var(--acc, var(--gold)); padding-right: 0.8rem;
}
html.thx .tslide--flip .tcountry .flag-chip { flex-direction: row-reverse; }
html.thx .tslide--flip .tghost { left: auto; right: 34%; }

/* strip + segments pinned at the bottom of the stage */
html.thx .tstrip {
  display: flex; position: absolute; z-index: 5;
  left: 50%; bottom: 5.2vh; transform: translateX(-50%);
}
html.thx .tsegs {
  display: flex; position: absolute; z-index: 5;
  left: var(--pad); right: var(--pad); bottom: 1.4vh;
}

/* =================================================== Honorary Life Members */
.honor { background: var(--ink); border-top: 1px solid var(--line-soft); }
.shead__t--sm { font-size: clamp(1.9rem, 4.6vw, 3.6rem); }
.honor--aud { padding-top: 0; border-top: 0; }
.honor--aud .honor__name { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.honor__list { max-width: 96rem; margin: 0 auto; border-top: 1px solid var(--line); list-style: none; }
.honor__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1.6rem;
  padding: clamp(1.2rem, 3vh, 1.8rem) 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s, padding 0.35s;
}
.honor__row:hover { background: rgba(201, 164, 92, 0.045); padding-left: 1.2rem; padding-right: 1.2rem; }
.honor__name {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.15;
  color: var(--cream);
}
.honor__row:hover .honor__name { color: var(--gold-hi); }
.honor__dots { height: 1px; background: var(--line-soft); min-width: 2rem; }

/* ============================================================= The Council */
.council { background: var(--ink); }
.council__grid {
  max-width: 96rem; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
  list-style: none;
}
.ccard {
  position: relative; height: 100%;
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 1.3rem 1.3rem 1.45rem;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.35s, background-color 0.35s;
}
.ccard::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.45s var(--ease-out);
}
.ccard:hover { transform: translateY(-6px); border-color: var(--gold-dim); background: var(--ink-3); }
.ccard:hover::before { transform: scaleX(1); }
.ccard__top { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.ccard__flag {
  position: relative; display: block; width: 64px; height: 43px;
  overflow: hidden; background: var(--ink-3); flex: none;
  transition: transform 0.4s var(--ease-out);
}
.ccard:hover .ccard__flag { transform: scale(1.06); }
.ccard__flag img { width: 100%; height: 100%; object-fit: cover; }
.ccard__flag::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(237, 231, 216, 0.2);
}
.ccard__flag[data-cc="np"] { background: none; overflow: visible; }
.ccard__flag[data-cc="np"] img { object-fit: contain; }
.ccard__flag[data-cc="np"]::after { display: none; }
.ccard__country {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold);
}
.ccard__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.32rem; line-height: 1.25; color: var(--cream);
}

/* ---- Linked councilor cards -------------------------------------------------
   When the data carries a `url` (data/committee-data.js) the whole card is an
   <a> to the member society's website — with a "Visit the society ↗" hint. */
a.ccard { display: block; color: inherit; text-decoration: none; }
.ccard--link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ccard--link:hover .ccard__country { color: var(--gold-hi); }
.ccard__go {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.9rem;
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.35s;
}
.ccard__go i {
  font-style: normal; font-size: 0.78rem; line-height: 1; color: var(--gold);
  transition: transform 0.35s var(--ease-out);
}
.ccard--link:hover .ccard__go { color: var(--gold-hi); }
.ccard--link:hover .ccard__go i { transform: translate(2px, -2px); }

/* ============================================================ Closing line */
.finale { text-align: center; background: var(--ink); padding-top: 0; }
.finale__closing {
  max-width: var(--measure); margin: clamp(2.2rem, 6vh, 3.4rem) auto 0;
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.45;
  color: var(--cream-dim); text-wrap: balance;
}
.finale__closing b { color: var(--gold-hi); font-weight: 400; }

/* ------------------------------------------------------------------ Footer */
.site-foot {
  position: relative; background: var(--ink);
  padding: clamp(3.6rem, 9vh, 5.5rem) var(--pad) 3.2rem;
  text-align: center;
  border-top: 1px solid var(--line-soft);
}
.site-foot img { margin: 0 auto 1.4rem; opacity: 0.9; }
.site-foot__org {
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.06em;
  color: var(--cream);
}
.site-foot__note { margin-top: 0.9rem; color: var(--muted); font-size: 0.85rem; }
.site-foot__link { margin-top: 1.6rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.2em; }
.site-foot__social { display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin-top: 1.6rem; }
.site-foot__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  color: var(--gold-hi); border: 1px solid var(--gold-dim);
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}
.site-foot__social a:hover { color: var(--cream); border-color: var(--cream); transform: translateY(-2px); }
.site-foot__social svg { display: block; width: 1.1rem; height: 1.1rem; }

/* ---------------------------------------------------------------- Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: min(92vw, 70rem); max-height: 92vh;
}
.lightbox::backdrop { background: rgba(6, 7, 9, 0.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox figure { margin: 0; }
.lightbox img {
  max-width: min(92vw, 70rem); max-height: 82vh;
  width: auto; height: auto; margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.lightbox figcaption {
  margin-top: 1rem; text-align: center;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--cream-dim);
}
.lightbox__close {
  position: fixed; top: 1.2rem; right: 1.4rem;
  width: 3rem; height: 3rem;
  border: 1px solid var(--line); background: rgba(16, 18, 23, 0.8);
  color: var(--cream); font-size: 1.5rem; line-height: 1;
  cursor: pointer; transition: border-color 0.3s, transform 0.3s;
}
.lightbox__close:hover { border-color: var(--gold); transform: rotate(90deg); }

/* ---------------------------------------------------------------- Noscript */
.noscript-note {
  min-height: 40vh; display: grid; place-items: center;
  padding: 4rem var(--pad); text-align: center; color: var(--cream-dim);
}

/* -------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .brand__text small { display: none; }
  .hero { justify-content: center; }
  .hero__row { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
}

@media (max-width: 560px) {
  .hero__title { font-size: clamp(3rem, 19vw, 4.6rem); }
  .flagway__track { gap: 1.8rem; }
  .hero__stats { flex-wrap: wrap; gap: 1.1rem 1.6rem; }
  .honor__row { grid-template-columns: 1fr auto; }
  .honor__dots { display: none; }
  .honor__name { font-size: 1.35rem; }
  .term__chip { letter-spacing: 0.12em; padding: 0.42rem 0.8rem; }
}

/* ---- Static mode (?static=1) — everything visible, nothing moves ---------- */
html.static-mode { scroll-behavior: auto; }
html.static-mode .grain { animation: none; }
html.static-mode .reveal-load,
html.static-mode [data-rv] { opacity: 1 !important; transform: none !important; animation: none !important; }
html.static-mode .hero__word .ch,
html.static-mode .split-title .ch { opacity: 1 !important; transform: none !important; animation: none !important; }
html.static-mode .loader { display: none; }
html.static-mode .cursor-dot, html.static-mode .cursor-ring { display: none; }
html.static-mode .flagway__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; row-gap: 1rem; }
html.static-mode .flagway { mask-image: none; -webkit-mask-image: none; }

/* ---- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .reveal-load, [data-rv] { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero__word .ch, .split-title .ch { opacity: 1 !important; transform: none !important; animation: none !important; }
  .loader { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
  .flagway__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; row-gap: 1rem; }
  .flagway { mask-image: none; -webkit-mask-image: none; }
  .ccard, .ccard__flag, .ccard__go, .ccard__go i { transition: none; }
}
