/* ==========================================================================
   Frame by Frame — visual system
   Paper stock, storyboard frames, sprocket rails, controlled accent colour.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */

:root {
  --paper:        #f6f2ea;
  --paper-deep:   #ece5d8;
  --surface:      #fffdf9;
  --surface-alt:  #fbf7ef;
  --ink:          #191720;
  --ink-soft:     #453f52;
  --ink-mute:     #6b6478;
  --rule:         #ded4c0;
  --rule-soft:    #e9e1d2;

  --vermilion:    #d8412a;
  --vermilion-dk: #ad3220;
  --amber:        #eda32f;
  --teal:         #10756c;
  --indigo:       #3a3f96;

  --focus:        #1b57d6;

  --shadow-flat:  4px 4px 0 rgba(25, 23, 32, .12);
  --shadow-lift:  0 18px 40px -22px rgba(25, 23, 32, .55);
  --shadow-panel: 0 1px 0 var(--rule-soft), 0 24px 48px -34px rgba(25, 23, 32, .5);

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 14px;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --measure: 68ch;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 620px at 82% -8%, rgba(237, 163, 47, .16), transparent 62%),
    radial-gradient(900px 520px at 4% 2%, rgba(58, 63, 150, .10), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fine paper grain, drawn rather than photographed. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  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%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

/* Artwork never grows past the space it is given. */
img, video {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.35rem + 3.1vw, 3.9rem); }
h2 { font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.4rem); }
h3 { font-size: clamp(1.18rem, 1.02rem + .68vw, 1.5rem); }
h4 { font-size: 1.05rem; letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--vermilion-dk); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vermilion); }

strong { font-weight: 650; }

::selection { background: var(--amber); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: var(--paper); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ layout */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; position: relative; z-index: 1; }
.wrap--narrow { width: min(100% - 2.5rem, 860px); }

.section { padding-block: clamp(3rem, 6vw, 5.5rem); position: relative; z-index: 1; }
.section--tight { padding-block: clamp(2rem, 4vw, 3.25rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--vermilion-dk);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--vermilion);
  flex: none;
}

.lede {
  font-size: clamp(1.06rem, 1rem + .38vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.lede--spaced { margin-bottom: 2.25rem; }
.lede--wide { margin-bottom: 2.5rem; }
.lede--centred { margin-inline: auto; }
/* The opening paragraph of a long essay, set in the display face. */
.lede--opening {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.5;
}

/* Sprocket rule — a strip of film seen edge-on. */
.sprocket-rule {
  height: 18px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background-image:
    repeating-linear-gradient(to right,
      transparent 0 10px,
      rgba(25, 23, 32, .16) 10px 20px,
      transparent 20px 30px);
  background-size: 30px 6px;
  background-position: center;
  background-repeat: repeat-x;
  opacity: .55;
  margin-block: clamp(2rem, 5vw, 3.5rem);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 242, 234, .88);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--ink);
  flex: none;
  min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand__logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: min(240px, 48vw);
  flex: none;
}
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand__tag {
  display: block;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.25;
  max-width: 9.5rem;
}
@media (max-width: 520px) {
  .brand { gap: .55rem; }
  .brand__logo { height: 30px; }
  .brand__tag { display: none; }
}

.nav-toggle {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: .5rem .8rem;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: .3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: .5rem .72rem;
  border-radius: var(--r-md);
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--paper-deep); color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--vermilion);
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-lift);
    padding: .75rem 1.25rem 1.1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: .7rem .5rem; border-bottom: 1px solid var(--rule-soft); border-radius: 0; }
}

/* -------------------------------------------------------------- breadcrumb */

.breadcrumb {
  font-size: .82rem;
  color: var(--ink-mute);
  padding-top: 1.5rem;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: 0; padding: 0;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: .45rem;
  color: var(--rule);
}
.breadcrumb a { display: inline-block; padding-block: .25rem; color: var(--ink-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--vermilion-dk); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink-soft); font-weight: 550; }

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero__art svg { position: absolute; }
.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title { margin-bottom: .55em; }
.hero__title em {
  font-style: normal;
  color: var(--vermilion);
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .06em;
  height: .16em;
  background: var(--amber);
  opacity: .45;
  z-index: -1;
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
@media (max-width: 1100px) {
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat__num {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  display: block;
  color: var(--ink);
}
.stat__label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: .4rem;
  display: block;
}

.hero__figure { margin: 0; }
.hero__figure img { display: block; width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { order: -1; max-width: 420px; margin-inline: auto; }
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn--primary {
  background: var(--vermilion);
  color: #fff;
  box-shadow: 0 10px 26px -14px rgba(216, 65, 42, .95);
}
.btn--primary:hover {
  background: var(--vermilion-dk);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(216, 65, 42, .95);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-mute); }
.btn--sm { padding: .5rem .85rem; font-size: .84rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
.btn-row--centred { justify-content: center; }

/* ------------------------------------------------------------- storyboards */

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1.35rem;
}

.board {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.4rem 1.35rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.board:hover {
  transform: translateY(-3px);
  border-color: var(--ink-mute);
  box-shadow: var(--shadow-flat);
  color: var(--ink);
}
.board__num {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.board__num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-soft);
}
.board :is(h2, h3) { font-size: 1.16rem; margin-bottom: .45rem; }
.board p { font-size: .93rem; color: var(--ink-soft); margin: 0; }
.board__more {
  margin-top: 1.1rem;
  font-size: .86rem;
  font-weight: 650;
  color: var(--vermilion-dk);
}
a.board:hover .board__more { text-decoration: underline; }

/* ------------------------------------------------------------- filter bar */

.tl-layout {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}
@media (max-width: 1040px) {
  .tl-layout { grid-template-columns: 1fr; }
}

.panel {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.15rem 1.15rem 1.3rem;
  box-shadow: var(--shadow-panel);
  max-height: calc(100vh - var(--header-h) - 34px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 1040px) {
  .panel { position: static; max-height: none; }
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.panel__head h2 { font-size: 1.02rem; margin: 0; letter-spacing: 0; }

.field { margin-bottom: 1.05rem; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field > .field__label {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .45rem;
}

.input, .select {
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.input:focus, .select:focus { background: #fff; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236b6478' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  padding-right: 2rem;
}

.search-field { position: relative; }
.search-field .input { padding-left: 2.1rem; }
.search-field svg {
  position: absolute;
  left: .68rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-mute);
}

.decade-links {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
  list-style: none;
  margin: 0; padding: 0;
}
.decade-links a, .decade-links button {
  display: block;
  padding: .32rem .5rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: var(--surface-alt);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  text-decoration: none;
  cursor: pointer;
}
.decade-links a:hover, .decade-links button:hover {
  border-color: var(--ink-mute);
  color: var(--ink);
  background: #fff;
}
.decade-links .is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.result-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.result-count {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.result-count b { color: var(--ink); font-weight: 700; }

.view-switch {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.view-switch button {
  padding: .42rem .8rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-mute);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.view-switch button + button { border-left: 1px solid var(--rule); }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .5rem .3rem .65rem;
  font-size: .78rem;
  font-weight: 550;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--ink-soft);
}
.chip button {
  display: grid;
  place-items: center;
  width: 17px; height: 17px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font: inherit;
  font-size: .78rem;
  line-height: 1;
  cursor: pointer;
}
.chip button:hover { background: var(--vermilion); color: #fff; }

/* ---------------------------------------------------------------- timeline */

.timeline {
  position: relative;
  padding-left: 62px;
  list-style: none;
  margin: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 30px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  background:
    linear-gradient(var(--surface-alt), var(--surface-alt)) padding-box,
    repeating-linear-gradient(to bottom,
      rgba(25, 23, 32, .17) 0 9px,
      transparent 9px 26px);
  background-size: 100% 100%, 7px 26px;
  background-position: center, center 6px;
  background-repeat: no-repeat, repeat-y;
  border-radius: 2px;
}
@media (max-width: 620px) {
  .timeline { padding-left: 40px; }
  .timeline::before { left: 6px; width: 20px; background-size: 100% 100%, 5px 22px; }
}

.tl-decade {
  position: relative;
  margin: 3.25rem 0 1.6rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.tl-decade:first-child { margin-top: .5rem; }
.tl-decade__label {
  display: inline-flex;
  align-items: baseline;
  gap: .7rem;
  background: var(--ink);
  color: var(--paper);
  padding: .38rem .95rem;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tl-decade__label span { color: rgba(246, 242, 234, .6); font-size: .72rem; letter-spacing: .06em; }
.tl-decade::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 50%;
  width: 34px;
  height: 1px;
  background: var(--rule);
}
@media (max-width: 620px) { .tl-decade::before { left: -34px; width: 24px; } }

.tl-item {
  position: relative;
  margin-bottom: 1.05rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 26px;
  width: 34px;
  height: 1px;
  background: var(--rule);
}
.tl-item::after {
  content: "";
  position: absolute;
  left: -52px;
  top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-mute);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.tl-item:hover::after, .tl-item.is-open::after {
  background: var(--vermilion);
  border-color: var(--vermilion);
  transform: scale(1.25);
}
.tl-item.is-target::after {
  background: var(--amber);
  border-color: var(--vermilion-dk);
  transform: scale(1.35);
}
@media (max-width: 620px) {
  .tl-item::before { left: -34px; width: 24px; }
  .tl-item::after { left: -38px; }
}

/* Storyboard frame card */
.frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tl-item:hover .frame { border-color: var(--ink-mute); box-shadow: var(--shadow-flat); }
.tl-item.is-target .frame { border-color: var(--vermilion); box-shadow: 0 0 0 3px rgba(237, 163, 47, .3); }

/* corner ticks, like registration marks on a storyboard sheet */
.frame::before, .frame::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--rule);
  border-style: solid;
  opacity: .9;
  pointer-events: none;
}
.frame::before { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.frame::after { bottom: 6px; right: 6px; border-width: 0 1px 1px 0; }

.frame__btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1.05rem 1.2rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: var(--r-md);
}
/* The same card, rendered without the expand control. */
.frame__btn--static { cursor: auto; }

.frame__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin-bottom: .5rem;
}
.frame__year {
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--vermilion-dk);
  background: rgba(216, 65, 42, .09);
  padding: .12rem .45rem;
  border-radius: var(--r-sm);
}
.frame__date {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--ink-mute);
}
.frame__flag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(16, 117, 108, .35);
  border-radius: 100px;
  padding: .1rem .5rem;
}
.frame__title {
  display: block;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.012em;
  margin: 0 0 .4rem;
}
.frame__summary { display: block; font-size: .95rem; color: var(--ink-soft); margin: 0; }
.frame__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .8rem;
}
.tag {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--surface-alt);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  padding: .18rem .45rem;
}
.tag--country { color: var(--indigo); border-color: rgba(58, 63, 150, .25); }
.tag--technique { color: var(--teal); border-color: rgba(16, 117, 108, .25); }

.frame__toggle {
  position: absolute;
  right: .85rem;
  bottom: .8rem;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--surface-alt);
  color: var(--ink-mute);
  pointer-events: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.tl-item.is-open .frame__toggle { transform: rotate(180deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }

.frame__body {
  border-top: 1px dashed var(--rule);
  padding: 1.15rem 1.2rem 1.3rem;
}
.frame__body[hidden] { display: none; }

.dl {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: .05rem 1rem;
  margin: 0 0 1.1rem;
  font-size: .93rem;
}
.dl dt {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: .35rem;
}
.dl dd { margin: 0 0 .7rem; color: var(--ink-soft); }
.dl dd:last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .dl { grid-template-columns: 1fr; gap: 0; }
  .dl dt { padding-top: .6rem; }
  .dl dd { margin-bottom: .5rem; }
}

.frame__section { margin-bottom: 1.05rem; }
.frame__section:last-child { margin-bottom: 0; }
.frame__section h4 {
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--vermilion-dk);
  margin-bottom: .35rem;
}
.frame__section p { font-size: .93rem; color: var(--ink-soft); margin: 0; }

.link-list { list-style: none; margin: 0; padding: 0; font-size: .89rem; }
.link-list li { margin-bottom: .35rem; }
.link-list li:last-child { margin-bottom: 0; }
.link-list .src-pub { color: var(--ink-mute); }

.frame__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: 1.2rem;
  padding-top: .95rem;
  border-top: 1px solid var(--rule-soft);
}

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1px dashed var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface-alt);
}
.empty-state h3 { margin-bottom: .5rem; }
.panel__note { font-size: .82rem; color: var(--ink-mute); margin: 0; }
.glossary__letter { scroll-margin-top: 88px; }
.empty-state p { color: var(--ink-mute); max-width: 44ch; margin-inline: auto; }

/* --------------------------------------------------- position indicator */

.tl-progress {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem .5rem .85rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 100px;
  box-shadow: var(--shadow-lift);
}
.tl-progress__text {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tl-progress__text b { color: var(--vermilion-dk); }
.tl-progress__bar {
  width: 74px;
  height: 4px;
  border-radius: 4px;
  background: var(--paper-deep);
  overflow: hidden;
}
.tl-progress__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--vermilion);
  transition: width .18s linear;
}
.step-btn {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}
.step-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.step-btn:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 620px) {
  .tl-progress { right: 10px; bottom: 10px; padding: .4rem .45rem .4rem .7rem; }
  .tl-progress__bar { display: none; }
}

/* ------------------------------------------------------------------- prose */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: .45em; }
.prose blockquote {
  margin: 1.8em 0;
  padding: .2em 0 .2em 1.4rem;
  border-left: 3px solid var(--amber);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink);
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }

.callout {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1.1rem 1.25rem;
  margin: 1.9em 0;
  font-size: .95rem;
  color: var(--ink-soft);
}
.callout h3, .callout h4 { margin-top: 0; margin-bottom: .4rem; font-family: var(--sans); font-size: .95rem; letter-spacing: 0; }

.article-head { padding-block: clamp(1.75rem, 3vw, 2.75rem) 0; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* -------------------------------------------------------------- data table */

.facts {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  margin: 1.9em 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.facts th, .facts td {
  text-align: left;
  padding: .78rem 1rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
/* A cell holding nothing but a link is a target in its own right. */
.facts td > a:only-child,
.facts th > a:only-child { display: inline-block; padding-block: .25rem; }
.facts th {
  width: 190px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--surface-alt);
}
@media (max-width: 620px) {
  .facts th, .facts td { display: block; width: auto; }
  .facts th { border-bottom: 0; padding-bottom: .2rem; }
  .facts td { padding-top: .2rem; }
}

/* ------------------------------------------------------------- pager / rel */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.pager a {
  display: block;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .18s ease, transform .18s ease;
}
.pager a:hover { border-color: var(--ink-mute); transform: translateY(-2px); color: var(--ink); }
.pager .dir {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .3rem;
}
.pager .pg-title { font-weight: 600; font-size: .95rem; line-height: 1.35; }
.pager .pg--next { text-align: right; grid-column: 2; }
@media (max-width: 620px) {
  .pager { grid-template-columns: 1fr; }
  .pager .pg--next { grid-column: 1; text-align: left; }
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--rule);
  background: var(--surface-alt);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h2 {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .15rem; }
.footer-grid a {
  display: inline-block;
  padding-block: .3rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .92rem;
}
.footer-grid a:hover { color: var(--vermilion-dk); text-decoration: underline; }
.footer-blurb { font-size: .92rem; color: var(--ink-mute); max-width: 38ch; }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .82rem;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------- glossary */

.glossary { display: grid; gap: 1rem; }
.gloss-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.1rem 1.25rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.gloss-item dt {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.gloss-item dd { margin: 0; font-size: .95rem; color: var(--ink-soft); }

.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}
.alpha-nav a {
  display: grid;
  place-items: center;
  min-width: 30px;
  padding: .25rem .4rem;
  font-family: var(--mono);
  font-size: .78rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  text-decoration: none;
}
.alpha-nav a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------------- 404 */

.err {
  text-align: center;
  padding-block: clamp(3rem, 9vw, 7rem);
}
.err__code {
  font-family: var(--mono);
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--ink);
  opacity: .12;
  margin: 0;
}
.err__inner { margin-top: -2.5rem; position: relative; }

/* ------------------------------------------------------------------ misc */

.figure {
  margin: 2.2em 0;
}
.figure svg, .figure img { display: block; width: 100%; height: auto; }
.figure figcaption {
  margin-top: .7rem;
  font-size: .82rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

.credit {
  font-size: .78rem;
  color: var(--ink-mute);
  font-style: italic;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.mark-list { list-style: none; padding: 0; margin: 0; }
.mark-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .7rem;
}
.mark-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 9px; height: 9px;
  border: 2px solid var(--vermilion);
  border-radius: 2px;
}

.no-js-note {
  background: var(--surface);
  border: 1px solid var(--amber);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
  font-size: .92rem;
}
