/* =========================================================
   ما بعد | THE AFTER — stylesheet
   Palette from the project's visual identity:
   فحمي charcoal · عاجي ivory · خمري wine · رملي sand · رمادي gray
   ========================================================= */

:root {
  /* palette */
  --ink: #1a1b1d;          /* فحمي */
  --ink-raised: #232427;
  --ink-deep: #121314;
  --ivory: #f5eee6;        /* عاجي */
  --paper: #ebe2d6;
  --wine: #924d50;         /* خمري */
  --wine-deep: #7a3f42;
  --wine-soft: #c98a8c;    /* wine for text on dark (6.1:1) */
  --sand: #c7b6a4;         /* رملي */
  --gray: #a9a29a;         /* رمادي */
  --muted-paper: #5f5953;  /* muted text on ivory (6:1) */

  --line-dark: rgba(245, 238, 230, 0.14);
  --line-light: rgba(26, 27, 29, 0.14);

  /* type */
  --f-display: "Aref Ruqaa", "IBM Plex Sans Arabic", serif;
  --f-text: "IBM Plex Sans Arabic", system-ui, sans-serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.25rem;
  --t-lg: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  --t-h3: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
  --t-h2: clamp(2.375rem, 1.6rem + 2.6vw, 3.75rem);
  --t-h1: clamp(3rem, 1.8rem + 4.6vw, 6rem);
  --t-mega: clamp(6rem, 2rem + 16vw, 15rem);

  /* layout */
  --wrap: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --header-h: 76px;
  --head: var(--header-h);
  --radius: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--t-base);
  line-height: 1.85;
  color: var(--ivory);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.35em; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.theme-paper :focus-visible { outline-color: var(--wine); }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100;
  background: var(--ivory); color: var(--ink); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 40rem; }

/* section bands + themes */
.band { padding-block: var(--band); }
.band--tight { padding-block: calc(var(--band) * 0.6); }
.theme-ink { background: var(--ink); color: var(--ivory); }
.theme-deep { background: var(--ink-deep); color: var(--ivory); }
.theme-paper { background: var(--ivory); color: var(--ink); }
.theme-paper-2 { background: var(--paper); color: var(--ink); }
.theme-wine { background: var(--wine-deep); color: var(--ivory); }

/* ---------- type ---------- */
.display { font-family: var(--f-display); font-weight: 700; line-height: 1.3; }
.h1 { font-family: var(--f-display); font-size: var(--t-h1); line-height: 1.25; }
.h2 { font-family: var(--f-display); font-size: var(--t-h2); line-height: 1.3; }
.h3 { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.35; }
.lede { font-size: var(--t-lg); font-weight: 300; line-height: 1.75; }
.kicker { font-size: var(--t-sm); font-weight: 500; color: var(--sand); }
.theme-paper .kicker, .theme-paper-2 .kicker { color: var(--wine); }
.muted { color: var(--gray); }
.theme-paper .muted, .theme-paper-2 .muted { color: var(--muted-paper); }
.latin { font-family: var(--f-text); letter-spacing: 0.32em; font-weight: 500; direction: ltr; unicode-bidi: isolate; }

.stack > * + * { margin-top: var(--stack, 1.25rem); }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-family: var(--f-display); font-size: var(--t-h3); margin-top: 2.2em; }
.prose h3 { font-size: var(--t-md); font-weight: 600; margin-top: 1.8em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: 0.5em; }
.prose blockquote {
  margin: 2em 0; padding-inline-start: 1.25em; border-inline-start: 3px solid var(--wine);
  font-size: var(--t-lg); font-weight: 300;
}

/* ---------- the moment rule (signature device) ----------
   a dot = 8 December 2024; the line = everything after it */
.moment-rule { display: flex; align-items: center; gap: 0; width: min(100%, 14rem); }
.moment-rule::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--wine); flex: none;
}
.moment-rule::after { content: ""; height: 1px; flex: 1; background: currentColor; opacity: 0.45; }
.theme-ink .moment-rule::before, .theme-deep .moment-rule::before { background: var(--wine-soft); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.55rem 1.4rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: var(--t-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--solid { background: var(--wine); color: var(--ivory); }
.btn--solid:hover { background: var(--wine-deep); }
.btn--line { border-color: currentColor; }
.btn--line:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.theme-paper .btn--line:hover, .theme-paper-2 .btn--line:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.theme-wine .btn--solid { background: var(--ivory); color: var(--wine-deep); }
.theme-wine .btn--solid:hover { background: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: var(--t-sm); text-decoration: underline;
  text-decoration-color: var(--wine-soft); text-underline-offset: 0.5em;
}
.theme-paper .text-link, .theme-paper-2 .text-link { text-decoration-color: var(--wine); }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  color: var(--ivory);
  background: rgba(26, 27, 29, 0.96);
  border-bottom: 1px solid var(--line-dark);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.has-hero .site-header:not(.is-solid) { background: transparent; border-bottom-color: transparent; }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; transition: opacity 0.3s var(--ease); }
.brand__ar { font-family: var(--f-display); font-weight: 700; font-size: 2.1rem; line-height: 1.05; }
.brand__en { font-size: 0.5625rem; letter-spacing: 0.42em; margin-top: 0.45rem; padding-left: 0.42em; color: var(--sand); }

.site-nav ul { list-style: none; display: flex; gap: clamp(1rem, 1.6vw, 1.75rem); }
.site-nav a {
  display: block; padding-block: 0.4rem; font-size: var(--t-sm); font-weight: 500;
  text-decoration: none; white-space: nowrap; color: rgba(245, 238, 230, 0.82);
  border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--ivory); }
.site-nav a[aria-current="page"] { color: var(--ivory); border-bottom-color: var(--wine-soft); }

.menu-btn {
  display: none; align-items: center; gap: 0.6rem;
  background: none; border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 0.5rem 0.9rem; font-size: var(--t-sm); font-weight: 500;
}
.menu-btn__bars { width: 18px; height: 10px; position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after {
  content: ""; position: absolute; inset-inline: 0; height: 1.5px; background: currentColor;
  transition: transform 0.25s var(--ease);
}
.menu-btn__bars::before { top: 0; }
.menu-btn__bars::after { bottom: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(4.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-4.25px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--ink-deep); color: var(--ivory);
  padding: calc(var(--head) + 2rem) var(--gutter) 2rem; overflow-y: auto;
}
.menu ol { list-style: none; counter-reset: none; }
.menu li { border-bottom: 1px solid var(--line-dark); }
.menu a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-block: 0.9rem; text-decoration: none;
}
.menu a span:first-child { font-family: var(--f-display); font-size: 1.9rem; line-height: 1.4; }
.menu a span + span { font-size: var(--t-xs); color: var(--gray); }
.menu a[aria-current="page"] span:first-child { color: var(--wine-soft); }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: var(--ink-deep); border-bottom-color: var(--line-dark); }
body.menu-open .site-header .brand { opacity: 1; pointer-events: auto; }

@media (max-width: 1100px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-flex; }
}

main { display: block; }
.page-top { padding-top: var(--head); }

/* ---------- home hero ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: grid; align-items: end; overflow: hidden; isolation: isolate; color: var(--ivory);
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(18, 19, 20, 0.96) 0%, rgba(18, 19, 20, 0.72) 30%, rgba(18, 19, 20, 0.12) 62%, rgba(18, 19, 20, 0.45) 100%),
    linear-gradient(to left, rgba(18, 19, 20, 0.55) 0%, rgba(18, 19, 20, 0) 55%);
}
@media (min-width: 861px) {
  .hero--end .hero__media::after {
    background:
      linear-gradient(to top, rgba(18, 19, 20, 0.9) 0%, rgba(18, 19, 20, 0.2) 30%, rgba(18, 19, 20, 0) 55%, rgba(18, 19, 20, 0.45) 100%),
      linear-gradient(to right, rgba(18, 19, 20, 0.92) 0%, rgba(18, 19, 20, 0.7) 32%, rgba(18, 19, 20, 0) 62%);
  }
}
.grain::before {
  content: ""; position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__body { padding-top: calc(var(--head) + 3rem); padding-bottom: 2.25rem; }
.hero--end .hero__body { max-width: 40rem; margin-inline-start: auto; }
@media (max-width: 860px) { .hero--end .hero__body { max-width: none; } }
.hero__mark { font-family: var(--f-display); font-weight: 700; font-size: var(--t-mega); line-height: 0.95; letter-spacing: 0; }
.hero__latin { font-size: clamp(0.75rem, 0.6rem + 0.5vw, 1rem); color: var(--sand); margin-top: 0.4rem; text-align: right; }
.hero__tagline { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.45; margin-top: 1.5rem; max-width: 22ch; }
.hero__lede { margin-top: 1rem; max-width: 34rem; font-size: var(--t-md); font-weight: 300; color: rgba(245, 238, 230, 0.86); }
.hero .btn-row { margin-top: 2rem; }

/* the moment line across the bottom of the hero */
.moment { position: relative; padding-block: 1.4rem 2rem; }
.moment__track { position: relative; height: 1px; background: rgba(245, 238, 230, 0.18); }
.moment__line {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 100%;
  background: var(--wine-soft); transform-origin: right center;
}
.moment__dot {
  position: absolute; inset-inline-start: 0; top: 50%; width: 13px; height: 13px; margin-top: -6.5px;
  border-radius: 50%; background: var(--wine); box-shadow: 0 0 0 5px rgba(146, 77, 80, 0.35);
}
.moment__labels { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.9rem; font-size: var(--t-sm); }
.moment__labels b { font-weight: 600; color: var(--ivory); }
.moment__labels span { color: rgba(245, 238, 230, 0.75); }

@media (prefers-reduced-motion: no-preference) {
  .js .moment__line { animation: draw 2.4s var(--ease) 0.5s both; }
  .js .hero__body > * { animation: rise 1s var(--ease) both; }
  .js .hero__body > *:nth-child(2) { animation-delay: 0.08s; }
  .js .hero__body > *:nth-child(3) { animation-delay: 0.16s; }
  .js .hero__body > *:nth-child(4) { animation-delay: 0.24s; }
  .js .hero__body > *:nth-child(5) { animation-delay: 0.32s; }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- home: logline + axes ---------- */
.logline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.logline__title { font-family: var(--f-display); font-size: var(--t-h2); line-height: 1.35; }
.logline__text .lede { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); }
.axes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line-light); }
.axis { padding: 1.75rem 0 0; padding-inline-end: 2rem; }
.axis + .axis { border-inline-start: 1px solid var(--line-light); padding-inline-start: 2rem; }
.axis .axis__word { margin-top: 0; font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.3; color: var(--wine); }
.axis p { margin-top: 0.6rem; color: var(--muted-paper); }

@media (max-width: 860px) {
  .logline { grid-template-columns: 1fr; }
  .axes { grid-template-columns: 1fr; }
  .axis, .axis + .axis { padding-inline: 0; border-inline-start: 0; }
  .axis + .axis { border-top: 1px solid var(--line-light); margin-top: 1.5rem; }
}

/* ---------- section heading block ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.section-head__text { max-width: 44rem; }
.section-head__text p { margin-top: 1rem; color: var(--gray); }
.theme-paper .section-head__text p, .theme-paper-2 .section-head__text p { color: var(--muted-paper); }
@media (max-width: 760px) { .section-head { flex-direction: column; align-items: start; } }

/* ---------- act cards (home) ---------- */
.acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.act {
  position: relative; display: flex; flex-direction: column; justify-content: end;
  min-height: 30rem; padding: 1.5rem; text-decoration: none; color: var(--ivory);
  overflow: hidden; isolation: isolate; background: var(--ink-raised);
}
.act--lead { grid-column: 1 / -1; min-height: clamp(26rem, 48vw, 36rem); padding: clamp(1.5rem, 3vw, 3rem); }
.act__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.act::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(18, 19, 20, 0.97) 8%, rgba(18, 19, 20, 0.6) 48%, rgba(18, 19, 20, 0.1) 100%);
}
.act--lead::after {
  background:
    linear-gradient(to top, rgba(18, 19, 20, 0.95) 0%, rgba(18, 19, 20, 0.2) 60%),
    linear-gradient(to left, rgba(18, 19, 20, 0.85) 0%, rgba(18, 19, 20, 0) 65%);
}
.act:hover .act__img { transform: scale(1.04); }
.act__ord { font-size: var(--t-sm); color: var(--sand); }
.act__title { font-family: var(--f-display); font-size: clamp(1.75rem, 1.4rem + 0.9vw, 2.25rem); line-height: 1.35; margin-top: 0.35rem; }
.act--lead .act__title { font-size: var(--t-h2); max-width: 14ch; }
.act__kind { font-size: var(--t-sm); color: var(--gray); margin-top: 0.15rem; }
.act__blurb { margin-top: 0.9rem; font-size: var(--t-sm); line-height: 1.8; color: rgba(245, 238, 230, 0.84); }
.act--lead .act__blurb { font-size: var(--t-base); max-width: 34rem; }
.act__cta { margin-top: 1.25rem; display: inline-flex; align-items: center; gap: 0.55rem; font-size: var(--t-sm); font-weight: 600; }
.act__cta svg { width: 1.6rem; height: 1.6rem; flex: none; }
.act:hover .act__cta span, .act:focus-visible .act__cta span { text-decoration: underline; text-decoration-color: var(--wine-soft); text-underline-offset: 0.5em; }

@media (max-width: 1080px) { .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .acts { grid-template-columns: 1fr; }
  .act { min-height: 24rem; }
}

/* ---------- split feature ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__media figcaption { margin-top: 0.75rem; font-size: var(--t-xs); color: var(--muted-paper); }
.theme-ink .split__media figcaption { color: var(--gray); }
.split__text .h2 { max-width: 16ch; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split__media img { aspect-ratio: 4 / 3; }
}

/* ---------- vox pop teaser ---------- */
.question { font-family: var(--f-display); font-size: var(--t-h1); line-height: 1.35; max-width: 18ch; }
.sentences { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line-light); }
.sentence { padding: 1.75rem 0 0; padding-inline-end: 2rem; }
.sentence + .sentence { border-inline-start: 1px solid var(--line-light); padding-inline-start: 2rem; }
.sentence blockquote { margin: 0; font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.45; }
.sentence figcaption { margin-top: 0.9rem; font-size: var(--t-sm); color: var(--muted-paper); }
@media (max-width: 860px) {
  .sentences { grid-template-columns: 1fr; }
  .sentence, .sentence + .sentence { padding-inline: 0; border-inline-start: 0; }
  .sentence + .sentence { border-top: 1px solid var(--line-light); margin-top: 1.75rem; }
}

/* ---------- archive mosaic (home) ---------- */
.mosaic { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(9rem, 15vw, 13rem); gap: 0.75rem; }
.mosaic a { position: relative; display: block; overflow: hidden; background: var(--ink-raised); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity 0.4s; }
.mosaic a:hover img { transform: scale(1.04); }
.mosaic .m1 { grid-column: span 3; grid-row: span 2; }
.mosaic .m2 { grid-column: span 3; }
.mosaic .m3 { grid-column: span 2; }
.mosaic .m4 { grid-column: span 1; }
.mosaic .m5 { grid-column: span 2; }
.mosaic .m6 { grid-column: span 4; }
.mosaic .m7 { grid-column: 1 / -1; grid-row: span 2; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 9.5rem; }
  .mosaic .m1, .mosaic .m7 { grid-column: 1 / -1; }
  .mosaic .m2, .mosaic .m3, .mosaic .m4, .mosaic .m5, .mosaic .m6 { grid-column: span 1; grid-row: span 1; }
  .mosaic .m6 { grid-column: 1 / -1; }
}

/* ---------- closing band ---------- */
.closing { position: relative; overflow: hidden; isolation: isolate; }
.closing__quote { font-family: var(--f-display); font-size: var(--t-h1); line-height: 1.4; max-width: 18ch; }
.closing .btn-row { margin-top: 2.5rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink-deep); color: var(--ivory); padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); }
.site-footer .brand { align-items: start; }
.site-footer .brand__ar { font-size: 3rem; }
.site-footer .brand__en { margin-top: 0.7rem; }
.footer-tag { margin-top: 1.25rem; font-family: var(--f-display); font-size: 1.4rem; line-height: 1.5; }
.footer-col h2 { font-size: var(--t-sm); font-weight: 600; color: var(--sand); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 0.45rem; }
.footer-col a { text-decoration: none; color: rgba(245, 238, 230, 0.85); font-size: var(--t-sm); }
.footer-col a:hover { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--wine-soft); }
.footer-col dl { font-size: var(--t-sm); }
.footer-col dt { color: var(--gray); }
.footer-col dd + dt { margin-top: 0.75rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: clamp(3rem, 5vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid var(--line-dark);
  font-size: var(--t-xs); color: var(--gray);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- draft strip (remove at launch: set draft False in build.py) ---------- */
.is-draft { --head: calc(var(--header-h) + 2rem); }
.draft-strip {
  height: 2rem; display: flex; align-items: center; justify-content: center; gap: 0.3em;
  background: var(--wine-deep); color: var(--ivory); font-size: var(--t-xs); text-align: center; padding-inline: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.draft-strip b { font-weight: 600; }
.draft-strip__short { display: none; }
@media (max-width: 560px) { .draft-strip__long { display: none; } .draft-strip__short { display: inline; } }

/* =========================================================
   inner pages
   ========================================================= */
.page-head { padding-top: calc(var(--head) + clamp(3rem, 6vw, 5.5rem)); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-head__ord { font-size: var(--t-sm); color: var(--sand); }
.theme-paper .page-head__ord, .theme-paper-2 .page-head__ord { color: var(--wine); }
.page-head .h1 { margin-top: 0.5rem; max-width: 16ch; }
.page-head__kind { margin-top: 0.75rem; font-size: var(--t-md); color: var(--gray); }
.theme-paper .page-head__kind { color: var(--muted-paper); }
.page-head .moment-rule { margin-top: 2rem; }
.page-head__lede { margin-top: 1.75rem; max-width: 40rem; }

.two-col { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.two-col__aside { position: sticky; top: calc(var(--head) + 2rem); }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col__aside { position: static; }
}

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.5rem 2rem; border-top: 1px solid var(--line-dark); padding-top: 1.5rem; }
.theme-paper .facts, .theme-paper-2 .facts { border-top-color: var(--line-light); }
.facts dt { font-size: var(--t-xs); color: var(--gray); }
.theme-paper .facts dt { color: var(--muted-paper); }
.facts dd { margin-top: 0.25rem; font-weight: 500; }

.research-note {
  border-inline-start: 3px solid var(--wine); padding: 0.25rem 0; padding-inline-start: 1.5rem; max-width: 44rem;
}
.research-note h2 { font-size: var(--t-sm); font-weight: 600; color: var(--sand); }
.theme-paper .research-note h2, .theme-paper-2 .research-note h2 { color: var(--wine); }
.research-note p { margin-top: 0.5rem; font-size: var(--t-md); font-weight: 300; line-height: 1.8; }

/* act navigation at the foot of each act */
.act-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-dark); }
.theme-paper .act-nav, .theme-paper-2 .act-nav { border-top-color: var(--line-light); }
.act-nav a { display: block; padding: 2rem 0; text-decoration: none; }
.act-nav a + a, .act-nav span + a { text-align: end; }
.act-nav small { display: block; font-size: var(--t-sm); color: var(--gray); }
.theme-paper .act-nav small { color: var(--muted-paper); }
.act-nav strong { display: block; font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.4; margin-top: 0.25rem; }
.act-nav a:hover strong { color: var(--wine-soft); }
.theme-paper .act-nav a:hover strong { color: var(--wine); }

/* ---------- video player ---------- */
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: #000; isolation: isolate;
}
.player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: opacity 0.4s; }
.player::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(18, 19, 20, 0.15) 0%, rgba(18, 19, 20, 0.65) 100%);
}
.player__play {
  position: absolute; inset: 0; margin: auto; width: clamp(4.5rem, 9vw, 6.5rem); height: clamp(4.5rem, 9vw, 6.5rem);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(146, 77, 80, 0.92); border: 0; color: var(--ivory);
  transition: transform 0.25s var(--ease), background-color 0.25s;
}
.player__play:hover { transform: scale(1.06); background: var(--wine); }
.player__play svg { width: 38%; height: 38%; margin-left: 8%; }
.player__meta {
  position: absolute; inset-inline: 0; bottom: 0; padding: 1.25rem 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; font-size: var(--t-sm);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}
.player__note {
  position: absolute; inset-inline: 0; bottom: 4.25rem; margin-inline: auto; width: max-content; max-width: 90%;
  padding: 0.5rem 1rem; background: var(--ivory); color: var(--ink); border-radius: var(--radius); font-size: var(--t-sm);
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player.is-playing .player__poster, .player.is-playing .player__play, .player.is-playing .player__meta { display: none; }

/* ---------- audio player ---------- */
.audio {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.25rem;
  padding: 1.1rem 1.25rem; background: var(--ink-raised); border: 1px solid var(--line-dark); border-radius: var(--radius);
}
.audio__btn {
  width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--wine); color: var(--ivory); transition: background-color 0.2s;
}
.audio__btn:hover { background: var(--wine-deep); }
.audio__btn svg { width: 1.2rem; height: 1.2rem; }
.audio__btn .i-play { margin-left: 3px; }
.audio__btn .i-pause { display: none; }
.audio.is-playing .i-play { display: none; }
.audio.is-playing .i-pause { display: block; }
.audio__wave { position: relative; height: 3rem; cursor: pointer; touch-action: none; }
.audio__bars, .audio__bars--on { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.audio__bars i { flex: 1; min-width: 1px; background: rgba(245, 238, 230, 0.28); border-radius: 1px; }
.audio__bars--on { clip-path: inset(0 0 0 calc(100% - var(--p, 0%))); }
.audio__bars--on i { background: var(--wine-soft); }
.audio__time { font-size: var(--t-xs); color: var(--gray); font-variant-numeric: tabular-nums; direction: ltr; min-width: 5.5rem; text-align: center; }
.audio__note { grid-column: 1 / -1; font-size: var(--t-sm); color: var(--sand); }
.audio-embed { width: 100%; border: 0; border-radius: var(--radius); }
@media (max-width: 560px) {
  .audio { grid-template-columns: auto minmax(0, 1fr); }
  .audio__time { grid-column: 2; text-align: start; min-width: 0; }
}

/* ---------- film page ---------- */
.stage { padding-bottom: var(--band); }
.questions { list-style: none; counter-reset: q; border-top: 1px solid var(--line-dark); }
.questions li {
  counter-increment: q; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding-block: 1.25rem; border-bottom: 1px solid var(--line-dark);
  font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.45;
}
.questions li::before { content: counter(q); font-family: var(--f-text); font-size: var(--t-sm); color: var(--wine-soft); }

.voices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.voice { border-top: 2px solid var(--wine-soft); padding-top: 1.25rem; }
.voice .voice__who { margin-top: 0; color: var(--ivory); font-family: var(--f-display); font-size: 1.65rem; line-height: 1.4; }
.voice p { margin-top: 0.5rem; font-size: var(--t-sm); color: var(--gray); }
@media (max-width: 960px) { .voices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; } }
@media (max-width: 520px) { .voices { grid-template-columns: 1fr; } }

.credits { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; }
.credits dt { font-size: var(--t-xs); color: var(--gray); }
.credits dd { margin-top: 0.2rem; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.4; }

/* ---------- references page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  background: transparent; border: 1px solid var(--line-light); border-radius: 999px;
  padding: 0.45rem 1rem; font-size: var(--t-sm); font-weight: 500; color: inherit;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.theme-ink .chip, .theme-deep .chip { border-color: var(--line-dark); }
.chip:hover { border-color: currentColor; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.theme-ink .chip[aria-pressed="true"], .theme-deep .chip[aria-pressed="true"] { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.chip__count { opacity: 0.6; margin-inline-start: 0.35rem; font-size: var(--t-xs); }

.axis-intro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-light); }
.axis-intro article { padding: 1.75rem 0; padding-inline-end: 2rem; }
.axis-intro article + article { border-inline-start: 1px solid var(--line-light); padding-inline-start: 2rem; }
.axis-intro small { font-size: var(--t-sm); color: var(--wine); font-weight: 600; }
.axis-intro h3 { font-family: var(--f-display); font-size: 1.85rem; line-height: 1.4; margin-top: 0.35rem; }
.axis-intro p { margin-top: 0.6rem; font-size: var(--t-sm); color: var(--muted-paper); }
@media (max-width: 900px) {
  .axis-intro { grid-template-columns: 1fr; }
  .axis-intro article, .axis-intro article + article { padding-inline: 0; border-inline-start: 0; }
  .axis-intro article + article { border-top: 1px solid var(--line-light); }
}

.ref-axis + .ref-axis { margin-top: clamp(3.5rem, 6vw, 5.5rem); }
.ref-axis__head { padding-bottom: 1.5rem; }
.ref-axis__ord { font-size: var(--t-sm); font-weight: 600; color: var(--wine); }
.ref-axis__title { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.35; margin-top: 0.2rem; }
.ref-axis__q { margin-top: 0.6rem; max-width: 46rem; font-size: var(--t-md); font-weight: 300; line-height: 1.75; color: var(--muted-paper); }
.refs { list-style: none; border-top: 1px solid var(--line-light); }
.ref {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 0.85fr); gap: 1.5rem 2.5rem;
  padding-block: 1.75rem; border-bottom: 1px solid var(--line-light);
}
.ref--plain { grid-template-columns: 9rem minmax(0, 1fr); }
.ref__type { font-size: var(--t-sm); font-weight: 600; color: var(--wine); line-height: 1.6; }
.ref__title { font-size: var(--t-md); font-weight: 600; line-height: 1.6; max-width: 44rem; }
.ref__orig { margin-top: 0.3rem; font-size: var(--t-sm); line-height: 1.6; color: var(--muted-paper); max-width: 44rem; }
.ref__meta { margin-top: 0.65rem; font-size: var(--t-sm); line-height: 1.75; }
.ref__meta dt { display: inline; color: var(--muted-paper); }
.ref__meta dd { display: inline; }
.ref__link { margin-top: 0.85rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.75rem; }
.ref__host { font-size: var(--t-xs); color: var(--muted-paper); }
.ref__note { font-size: var(--t-sm); line-height: 1.85; }
.ref__note b { display: block; font-weight: 600; margin-bottom: 0.2rem; }
@media (max-width: 900px) { .ref, .ref--plain { grid-template-columns: 1fr; gap: 0.6rem; } }

/* ---------- podcast page ---------- */
.guest { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.75rem; align-items: center; }
.portrait-ph {
  aspect-ratio: 1; width: 100%; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-raised); border: 1px dashed rgba(245, 238, 230, 0.3);
  font-family: var(--f-display); font-size: 2.25rem; color: var(--sand);
}
.guest__photo { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: center 20%; background: var(--ink-raised); }
.guest h2 { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.35; }
.guest p { margin-top: 0.35rem; color: var(--gray); }

.episodes { list-style: none; }
.episode { padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line-dark); }
.episode:last-child { border-bottom: 1px solid var(--line-dark); }
.episode__head { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.episode__ord { font-size: var(--t-sm); color: var(--wine-soft); padding-top: 0.6rem; }
.episode h3 { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.4; }
.episode__desc { margin-top: 0.6rem; color: rgba(245, 238, 230, 0.82); max-width: 44rem; }
.episode__body { margin-inline-start: 8rem; margin-top: 1.5rem; }
.transcript { margin-top: 1rem; }
.transcript summary { cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--sand); list-style: none; display: inline-flex; gap: 0.5rem; align-items: center; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::before { content: "+"; font-size: 1.1rem; width: 1rem; text-align: center; }
.transcript[open] summary::before { content: "−"; }
.transcript div { margin-top: 1rem; padding: 1.25rem 1.5rem; background: var(--ink-raised); font-size: var(--t-sm); color: rgba(245, 238, 230, 0.85); max-width: 44rem; }
@media (max-width: 720px) {
  .episode__head { grid-template-columns: 1fr; gap: 0.25rem; }
  .episode__ord { padding-top: 0; }
  .episode__body { margin-inline-start: 0; }
  .guest { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.25rem; }
}

/* ---------- archive page ---------- */
.archive-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.archive-count { font-size: var(--t-sm); color: var(--gray); }
.archive-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(11rem, 16vw, 15rem);
  grid-auto-flow: dense; gap: 1.25rem 1rem;
}
.archive-item { display: flex; flex-direction: column; min-height: 0; }
.archive-item.is-tall { grid-row: span 2; }
.archive-item button {
  flex: 1; min-height: 0; display: block; width: 100%; padding: 0; border: 0; overflow: hidden;
  background: var(--ink-raised); text-align: start; cursor: zoom-in;
}
.archive-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
@media (max-width: 760px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 10.5rem; gap: 1rem 0.6rem; }
  .archive-item__cap { font-size: var(--t-xs); }
}
.archive-item button:hover img { opacity: 0.82; }
.archive-item__cap { flex: none; padding: 0.6rem 0.1rem 0; font-size: var(--t-sm); line-height: 1.6; }
.archive-item__cap span { display: block; font-size: var(--t-xs); color: var(--gray); margin-top: 0.15rem; }

.pairs { display: grid; gap: clamp(3.5rem, 7vw, 6rem); }
.pair__images { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pair__images figure { position: relative; }
.pair__images img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pair__images figcaption { margin-top: 0.6rem; font-size: var(--t-xs); color: var(--gray); }
.pair__images figcaption b { display: block; font-size: var(--t-sm); color: var(--ivory); font-weight: 600; }
.pair__text { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 2rem; margin-top: 1.75rem; }
.pair__text h3 { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.4; }
.pair__text p { color: rgba(245, 238, 230, 0.85); }
@media (max-width: 760px) {
  .pair__images { grid-template-columns: 1fr; }
  .pair__text { grid-template-columns: 1fr; gap: 0.75rem; }
}

.lightbox {
  width: min(1200px, 100% - 2rem); max-height: calc(100% - 2rem); padding: 0; border: 0;
  background: var(--ink-deep); color: var(--ivory); overflow: auto;
}
.lightbox::backdrop { background: rgba(8, 8, 9, 0.88); }
.lightbox__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.lightbox__img { background: #000; display: grid; place-items: center; min-height: 20rem; }
.lightbox__img img { max-height: 80vh; width: auto; object-fit: contain; }
.lightbox__info { padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.lightbox__info h2 { font-family: var(--f-display); font-size: 1.9rem; line-height: 1.4; }
.lightbox__info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; font-size: var(--t-sm); }
.lightbox__info dt { color: var(--gray); }
.lightbox__reading h3 { font-size: var(--t-sm); color: var(--sand); font-weight: 600; }
.lightbox__reading p { margin-top: 0.4rem; font-size: var(--t-sm); line-height: 1.9; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line-dark); }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid var(--line-dark); background: transparent; color: var(--ivory);
}
.icon-btn:hover { border-color: var(--ivory); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
.lightbox__close { position: absolute; top: 0.75rem; inset-inline-end: 0.75rem; background: rgba(18, 19, 20, 0.7); }
@media (max-width: 860px) { .lightbox__grid { grid-template-columns: 1fr; } .lightbox__img img { max-height: 55vh; } }

/* ---------- vox pop page ---------- */
.vox-question { font-family: var(--f-display); font-size: var(--t-h1); line-height: 1.35; max-width: 17ch; margin-top: 0.75rem; }
.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.wall figure { background: var(--ivory); color: var(--ink); padding: 1.75rem 1.5rem 1.5rem; border-top: 3px solid var(--wine); display: flex; flex-direction: column; justify-content: space-between; min-height: 15rem; }
.wall blockquote { margin: 0; font-family: var(--f-display); font-size: 1.85rem; line-height: 1.5; }
.wall figcaption { margin-top: 1.5rem; font-size: var(--t-sm); color: var(--muted-paper); }
.wall figcaption b { color: var(--ink); font-weight: 600; }
.wall .is-tall { grid-row: span 2; }
@media (max-width: 960px) { .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .wall { grid-template-columns: 1fr; } .wall .is-tall { grid-row: auto; } }

/* ---------- about page ---------- */
.sub-questions { list-style: none; counter-reset: sq; }
.sub-questions li { counter-increment: sq; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; padding-block: 1rem; border-top: 1px solid var(--line-light); }
.sub-questions li::before { content: counter(sq); font-weight: 600; color: var(--wine); }
.big-question { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 300; line-height: 1.7; max-width: 36ch; }

.method { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-light); }
.method a { display: block; padding: 1.5rem 0; padding-inline-end: 1.25rem; text-decoration: none; }
.method a + a { border-inline-start: 1px solid var(--line-light); padding-inline-start: 1.25rem; }
.method small { font-size: var(--t-xs); color: var(--wine); font-weight: 600; }
.method strong { display: block; font-family: var(--f-display); font-size: 1.6rem; line-height: 1.4; margin-top: 0.25rem; }
.method span { display: block; margin-top: 0.5rem; font-size: var(--t-sm); color: var(--muted-paper); line-height: 1.75; }
.method a:hover strong { color: var(--wine); }
@media (max-width: 1000px) {
  .method { grid-template-columns: 1fr 1fr; }
  .method a, .method a + a { border-inline-start: 0; padding-inline: 0 1rem; border-bottom: 1px solid var(--line-light); }
}
@media (max-width: 560px) { .method { grid-template-columns: 1fr; } }

.wide-figure img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }
.wide-figure figcaption { margin-top: 0.75rem; font-size: var(--t-xs); color: var(--gray); }
@media (max-width: 700px) { .wide-figure img { aspect-ratio: 4 / 3; } }

.objectives { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.objectives li { padding-block: 1.1rem; border-top: 1px solid var(--line-light); }
@media (max-width: 760px) { .objectives { grid-template-columns: 1fr; } }

/* ---------- researcher page ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.profile__figure { max-width: 26rem; }
.profile__figure img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper); }
.profile__photo {
  aspect-ratio: 4 / 5; background: var(--paper); border: 1px dashed rgba(26, 27, 29, 0.25);
  display: grid; place-items: center; text-align: center; padding: 2rem;
}
.profile__photo span { display: block; font-family: var(--f-display); font-size: clamp(4rem, 9vw, 7rem); color: var(--wine); line-height: 1.5; }
.profile__photo small { display: block; font-size: var(--t-sm); color: var(--muted-paper); }
.contact-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } .profile__photo, .profile__figure { max-width: 20rem; } }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; align-content: center; }

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