/* ------------------------------------------------------------------
   URC 2027 external edition
   Engineering-editorial system: paper, ink, rust, teal, mono data.
   ------------------------------------------------------------------ */

:root {
  --paper: #faf7f2;
  --paper-2: #f2ece2;
  --paper-3: #e9e1d4;
  --ink: #1b1a17;
  --muted: #625c52;
  --line: #d8cfc0;
  --rust: #a63f1c;
  --rust-soft: #f3dfd6;
  --teal: #1f5f5b;
  --teal-soft: #dcebe8;
  --gold: #7d5c00;
  --gold-soft: #f4ecd2;
  --blue: #2c527a;
  --blue-soft: #dde8f2;
  --red: #9b2c2c;
  --red-soft: #f4dede;
  --shadow: 0 1px 2px rgba(27, 26, 23, .06), 0 8px 24px rgba(27, 26, 23, .05);

  --md-text-font: "Source Serif 4";
  --md-code-font: "IBM Plex Mono";
  --md-primary-fg-color: #faf7f2;
  --md-primary-bg-color: #1b1a17;
  --md-accent-fg-color: #a63f1c;
  --md-default-bg-color: #faf7f2;
  --md-default-fg-color: #1b1a17;
  --md-default-fg-color--light: #625c52;
  --md-typeset-color: #1b1a17;
  --md-typeset-a-color: #a63f1c;
  --md-code-bg-color: #f2ece2;
}

[data-md-color-scheme="slate"] {
  --paper: #12110f;
  --paper-2: #1b1916;
  --paper-3: #24211c;
  --ink: #ece6da;
  --muted: #a9a094;
  --line: #34302a;
  --rust: #e07a4f;
  --rust-soft: #38241c;
  --teal: #6fc2ba;
  --teal-soft: #17302e;
  --gold: #d8b45c;
  --gold-soft: #332b15;
  --blue: #8ab4dd;
  --blue-soft: #1c2a38;
  --red: #e58b8b;
  --red-soft: #38201f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);

  --md-primary-fg-color: #12110f;
  --md-primary-bg-color: #ece6da;
  --md-accent-fg-color: #e07a4f;
  --md-default-bg-color: #12110f;
  --md-default-fg-color: #ece6da;
  --md-default-fg-color--light: #a9a094;
  --md-typeset-color: #ece6da;
  --md-typeset-a-color: #e07a4f;
  --md-code-bg-color: #1b1916;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.md-header {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--ink);
  box-shadow: none;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.md-header__title,
.md-header__button,
.md-header__topic {
  color: var(--ink);
}

.md-header__title {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  letter-spacing: -.01em;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.6rem;
  width: 1.6rem;
}

.md-search__form {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.md-search__input::placeholder {
  color: var(--muted);
}

.md-search__input {
  color: var(--ink);
  font-family: "Archivo", sans-serif;
}

.md-search__output {
  background: var(--paper);
  border: 1px solid var(--line);
}

.md-grid {
  max-width: 86rem;
}

.md-main {
  background: var(--paper);
}

.md-main__inner {
  margin-top: 1.1rem;
}

.md-content {
  background: var(--paper);
}

.md-content__inner {
  max-width: 50rem;
  margin: 0 auto;
  padding: 1.2rem 1.2rem 5rem;
}

.md-content__inner::before {
  height: 0;
}

.md-typeset {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}

.md-typeset p,
.md-typeset li {
  max-width: 46rem;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: "Archivo", sans-serif;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -.02em;
  scroll-margin-top: 4.2rem;
}

.md-typeset h1 {
  font-size: 2.55rem;
  line-height: 1.08;
  margin: 0 0 1.1rem;
  font-weight: 700;
}

.md-typeset h1 + p {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 0;
}

.md-typeset h2 {
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 2.6rem 0 .9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.md-typeset h3 {
  font-size: 1.17rem;
  margin: 1.9rem 0 .6rem;
}

.md-typeset h4 {
  font-size: 1rem;
  margin: 1.4rem 0 .4rem;
}

.md-typeset a {
  color: var(--rust);
  text-decoration-thickness: .06em;
  text-underline-offset: .18em;
}

.md-typeset a:hover {
  color: var(--ink);
  text-decoration-thickness: .12em;
}

.md-typeset strong {
  font-weight: 600;
}

.md-typeset blockquote {
  border-left: 3px solid var(--rust);
  background: var(--paper-2);
  margin: 1.4rem 0;
  padding: .8rem 1.1rem;
  color: var(--muted);
  font-style: normal;
}

.md-typeset hr {
  border-bottom: 1px solid var(--line);
  margin: 2.4rem 0;
}

.md-typeset code,
.md-typeset kbd {
  font-family: "IBM Plex Mono", monospace;
  font-size: .82em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .08em .3em;
  color: var(--ink);
}

.md-typeset pre > code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
}

.md-typeset ul,
.md-typeset ol {
  margin: .7rem 0 1rem;
}

.md-typeset li {
  margin-bottom: .35rem;
}

.md-typeset li::marker {
  color: var(--rust);
}

/* ---------------------------------------------------------------- sidebar */

.md-sidebar {
  background: transparent;
}

.md-sidebar__scrollwrap {
  scrollbar-width: thin;
}

.md-nav {
  font-family: "Archivo", sans-serif;
  font-size: .76rem;
  line-height: 1.45;
}

.md-nav__title {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .6rem .6rem .2rem;
}

.md-nav__link {
  color: var(--muted);
  margin-top: .18rem;
  padding: .18rem .4rem;
  border-radius: 3px;
}

.md-nav__link:hover {
  color: var(--rust);
  background: var(--paper-2);
}

.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  color: var(--rust);
  font-weight: 600;
}

.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
  font-weight: 600;
  color: var(--ink);
  font-size: .8rem;
}

.md-sidebar--secondary .md-nav__title {
  font-size: .66rem;
}

.md-sidebar--secondary .md-nav__link {
  font-size: .72rem;
  border-left: 2px solid transparent;
  border-radius: 0;
  padding-left: .6rem;
}

.md-sidebar--secondary .md-nav__link--active {
  border-left-color: var(--rust);
}

.md-nav__icon {
  color: var(--muted);
}

.md-top {
  background: var(--ink);
  color: var(--paper);
  font-family: "Archivo", sans-serif;
  font-size: .7rem;
}

/* ---------------------------------------------------------------- kicker */

.page-kicker {
  font-family: "Archivo", sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rust);
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin: .2rem 0 .7rem;
}

.page-kicker__chapter {
  color: var(--muted);
  font-weight: 500;
}

.page-kicker__sep {
  color: var(--line);
}

/* ---------------------------------------------------------------- citations and badges */

.cite {
  font-family: "IBM Plex Mono", monospace;
  font-size: .64rem;
  line-height: 1;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .12em .28em;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: .08em;
}

.cite:hover {
  color: var(--rust);
  border-color: var(--rust);
}

.clause,
.ref {
  font-family: "IBM Plex Mono", monospace;
  font-size: .82em;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.clause:hover,
.ref:hover {
  color: var(--rust);
}

.ev {
  display: inline-block;
  font-family: "Archivo", sans-serif;
  font-size: .58rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .14em .42em;
  border-radius: 999px;
  border: 1px solid;
  vertical-align: .1em;
  white-space: nowrap;
}

.ev-confirmed { color: #245c3a; background: #e2f0e7; border-color: #a9cdb8; }
.ev-reported { color: #24476b; background: #e3edf7; border-color: #a9c5df; }
.ev-inferred { color: #6b4d00; background: #f6edd3; border-color: #dcc587; }
.ev-unknown { color: #5c5650; background: #ece8e1; border-color: #cfc6b9; }

[data-md-color-scheme="slate"] .ev-confirmed { color: #9fd6b4; background: #1a2c22; border-color: #345c45; }
[data-md-color-scheme="slate"] .ev-reported { color: #a9c8e8; background: #1b2838; border-color: #38516d; }
[data-md-color-scheme="slate"] .ev-inferred { color: #e2c477; background: #2e2714; border-color: #5f5025; }
[data-md-color-scheme="slate"] .ev-unknown { color: #c4bcae; background: #24211d; border-color: #4a443b; }

/* ---------------------------------------------------------------- stats */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin: 1.5rem 0 1.8rem;
}

.stat {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rust);
  border-radius: 4px;
  padding: .9rem .9rem .8rem;
  min-width: 0;
}

.stat__value {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.stat__label {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rust);
  margin-top: .45rem;
}

.stat__note {
  display: block;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--muted);
  margin-top: .3rem;
}

.stat__period {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: .62rem;
  color: var(--muted);
  margin-top: .35rem;
}

.stat__meta {
  display: block;
  margin-top: .3rem;
}

.stat__src {
  font-family: "IBM Plex Mono", monospace;
  font-size: .58rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- figures and video */

.figure,
.video {
  margin: 2rem 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.figure__frame {
  background: #fff;
  padding: .55rem;
  text-align: center;
}

[data-md-color-scheme="slate"] .figure__frame {
  background: #0c0b0a;
}

.figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78vh;
  margin: 0 auto;
  border: 0;
}

.figure figcaption,
.video figcaption {
  padding: .8rem 1rem .95rem;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  line-height: 1.55;
}

.figure__cap {
  display: block;
  color: var(--ink);
}

.figure__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .8rem;
  align-items: baseline;
  margin-top: .45rem;
  font-family: "Archivo", sans-serif;
  font-size: .66rem;
  color: var(--muted);
}

.figure__link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: .15em;
}

.figure__link:hover {
  color: var(--rust);
}

.figure__credit {
  color: var(--muted);
}

.pdf-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.2rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.pdf-card__icon {
  font-family: "Archivo", sans-serif;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  background: var(--rust);
  border-radius: 3px;
  padding: .3rem .45rem;
}

.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video__frame iframe,
.video__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video__title {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .82rem;
}

.video__credit {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  margin-top: .2rem;
}

.video figcaption a {
  display: inline-block;
  margin-top: .35rem;
  font-family: "Archivo", sans-serif;
  font-size: .7rem;
}

/* ---------------------------------------------------------------- admonitions */

.md-typeset .admonition {
  border: 1px solid var(--line);
  border-left: 4px solid var(--rust);
  border-radius: 4px;
  background: var(--paper-2);
  box-shadow: none;
  font-size: .92rem;
  margin: 1.5rem 0;
  padding: .7rem .9rem .8rem;
}

.md-typeset .admonition-title {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
  background: transparent;
  border: 0;
  margin: 0 0 .45rem;
  padding: 0;
  color: var(--ink);
}

.md-typeset .admonition-title::before {
  display: none;
}

.md-typeset .admonition > :last-child {
  margin-bottom: 0;
}

.md-typeset .admonition.key { border-left-color: var(--rust); }
.md-typeset .admonition.decision { border-left-color: var(--teal); background: var(--teal-soft); }
.md-typeset .admonition.risk { border-left-color: var(--red); background: var(--red-soft); }
.md-typeset .admonition.rule { border-left-color: var(--gold); background: var(--gold-soft); }
.md-typeset .admonition.evidence { border-left-color: var(--blue); background: var(--blue-soft); }
.md-typeset .admonition.stat { border-left-color: var(--rust); background: var(--rust-soft); }

.md-typeset .admonition.key .admonition-title { color: var(--rust); }
.md-typeset .admonition.decision .admonition-title { color: var(--teal); }
.md-typeset .admonition.risk .admonition-title { color: var(--red); }
.md-typeset .admonition.rule .admonition-title { color: var(--gold); }
.md-typeset .admonition.evidence .admonition-title { color: var(--blue); }

/* ---------------------------------------------------------------- tables */

.md-typeset table:not([class]) {
  font-family: "Archivo", sans-serif;
  font-size: .78rem;
  line-height: 1.45;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: table;
  width: 100%;
}

.md-typeset table:not([class]) th {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding: .55rem .6rem;
  vertical-align: bottom;
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--line);
  padding: .5rem .6rem;
  vertical-align: top;
}

.md-typeset table:not([class]) tr:nth-child(even) td {
  background: color-mix(in srgb, var(--paper-2) 55%, transparent);
}

.md-typeset__table {
  overflow-x: auto;
  margin: 1.3rem 0;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- data tables */

.data-table {
  margin: 1.4rem 0 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
}

.data-table__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  padding: .65rem .7rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.data-table__search {
  flex: 1 1 15rem;
  min-width: 10rem;
  font-family: "Archivo", sans-serif;
  font-size: .76rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .38rem .55rem;
}

.data-table__select {
  font-family: "Archivo", sans-serif;
  font-size: .72rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .38rem .45rem;
}

.data-table__count {
  font-family: "IBM Plex Mono", monospace;
  font-size: .62rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

.data-table__scroll {
  overflow: auto;
  max-height: 72vh;
}

.dt-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Archivo", sans-serif;
  font-size: .73rem;
  line-height: 1.4;
  color: var(--ink);
}

.dt-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  background: var(--paper-3);
  color: var(--ink);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .5rem .55rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.dt-table th button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font: inherit;
  color: inherit;
}

.dt-table th button::after {
  content: "↕";
  color: var(--muted);
  font-size: .7rem;
}

.dt-table th[data-sort="asc"] button::after { content: "↑"; color: var(--rust); }
.dt-table th[data-sort="desc"] button::after { content: "↓"; color: var(--rust); }

.dt-table td {
  padding: .48rem .55rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  vertical-align: top;
}

.dt-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}

.dt-table tbody tr:hover {
  background: var(--rust-soft);
}

.dt-table td.num {
  font-family: "IBM Plex Mono", monospace;
  text-align: right;
  white-space: nowrap;
}

.dt-table td.nowrap {
  white-space: nowrap;
}

.data-table__loading,
.chart-block__loading {
  padding: 1rem;
  font-family: "Archivo", sans-serif;
  font-size: .75rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- charts */

.chart-block {
  position: relative;
  min-height: 320px;
  margin: 1.2rem 0 2rem;
  padding: .8rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.chart-block canvas {
  width: 100% !important;
  height: 360px !important;
}

.chart-block__title {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .78rem;
  color: var(--ink);
  margin: 0 0 .4rem;
}

/* ---------------------------------------------------------------- countdown */

.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1rem;
  margin: 1.2rem 0;
  padding: .9rem 1rem;
  background: var(--rust-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rust);
  border-radius: 4px;
}

.countdown__label {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .8rem;
  color: var(--ink);
}

.countdown__days {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--rust);
}

.countdown__date {
  font-family: "IBM Plex Mono", monospace;
  font-size: .68rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- page sources */

.page-sources {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--line);
}

.page-sources h2 {
  font-size: 1.1rem;
  margin-top: 0;
  border: 0;
  padding-top: 0;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: .8rem 0 0;
  counter-reset: src;
  font-size: .76rem;
}

.source-list li {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  gap: .2rem .8rem;
  padding: .5rem 0;
  border-bottom: 1px dotted var(--line);
}

.source-list__id {
  font-family: "IBM Plex Mono", monospace;
  font-size: .64rem;
  color: var(--rust);
  overflow-wrap: anywhere;
}

.source-list__title {
  font-family: "Archivo", sans-serif;
  color: var(--ink);
  line-height: 1.35;
}

.source-list__meta,
.source-list__links {
  grid-column: 2;
  font-family: "Archivo", sans-serif;
  font-size: .66rem;
  color: var(--muted);
}

.source-list__links a {
  margin-right: .7rem;
}

.muted {
  color: var(--muted);
}

/* ---------------------------------------------------------------- home and cards */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, .85fr);
  gap: 2.2rem;
  align-items: center;
  padding: 1.4rem 0 1rem;
}

.home-hero h1 {
  font-size: 3.1rem;
  line-height: 1.02;
  margin-bottom: .8rem;
}

.home-hero__deck {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
}

.home-hero__meta {
  font-family: "Archivo", sans-serif;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: .7rem;
}

.home-hero__cover img {
  display: block;
  width: 100%;
  max-width: 19rem;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(27, 26, 23, .18);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.3rem;
}

.home-actions a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: "Archivo", sans-serif;
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  padding: .55rem .8rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.home-actions a.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.home-actions a:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}

.part-grid,
.card-grid,
.team-grid,
.gallery-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.4rem 0 2rem;
}

.card {
  display: block;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, border-color .15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--rust);
  color: var(--ink);
}

.card__label {
  display: block;
  font-family: "Archivo", sans-serif;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: .35rem;
}

.card__title {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.3;
  margin-bottom: .3rem;
}

.card__text {
  display: block;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
}

.card__meta {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: .6rem;
  color: var(--muted);
  margin-top: .45rem;
}

/* ---------------------------------------------------------------- explorers */

.explorer-controls,
.browser-controls,
.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 1rem 0 1.2rem;
  padding: .7rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.explorer-controls input,
.explorer-controls select,
.browser-controls input,
.browser-controls select,
.gallery-controls input,
.gallery-controls select {
  font-family: "Archivo", sans-serif;
  font-size: .76rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .38rem .5rem;
}

.explorer-controls input,
.browser-controls input,
.gallery-controls input {
  flex: 1 1 14rem;
}

.explorer-count,
.browser-count,
.gallery-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: .64rem;
  color: var(--muted);
}

.team-card,
.gallery-card,
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
}

.team-card:hover,
.gallery-card:hover,
.video-card:hover {
  border-color: var(--rust);
  color: var(--ink);
}

.team-card__body,
.gallery-card__body,
.video-card__body {
  padding: .7rem .8rem .8rem;
}

.team-card__tier,
.gallery-card__topic,
.video-card__team {
  font-family: "Archivo", sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rust);
}

.team-card__name,
.gallery-card__title,
.video-card__title {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .84rem;
  line-height: 1.3;
  margin-top: .25rem;
}

.team-card__meta,
.gallery-card__meta,
.video-card__meta {
  display: block;
  font-size: .7rem;
  color: var(--muted);
  margin-top: .3rem;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-3);
}

.gallery-card--pdf {
  min-height: 12rem;
  justify-content: center;
  align-items: center;
  background: var(--paper-3);
}

/* ---------------------------------------------------------------- gallery lightbox */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 9, 8, .92);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay figure {
  max-width: min(92vw, 1500px);
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
  background: #fff;
}

.lightbox-overlay figcaption {
  color: #f2ece2;
  font-family: "Archivo", sans-serif;
  font-size: .78rem;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: baseline;
  justify-content: center;
  text-align: center;
}

.lightbox-overlay a {
  color: #f0b79c;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

body.lightbox-open {
  overflow: hidden;
}

/* ---------------------------------------------------------------- timeline */

.timeline {
  margin: 1.5rem 0 2rem;
  border-left: 2px solid var(--line);
  padding-left: 1.1rem;
}

.timeline__item {
  position: relative;
  padding: 0 0 1.1rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.42rem;
  top: .35rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--rust);
  border: 2px solid var(--paper);
}

.timeline__date {
  font-family: "IBM Plex Mono", monospace;
  font-size: .68rem;
  color: var(--rust);
}

.timeline__title {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .86rem;
  margin: .1rem 0 .2rem;
}

.timeline__text {
  display: block;
  font-size: .78rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */

.md-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.md-footer__inner {
  padding: .6rem 0;
}

.md-footer__link {
  color: var(--ink);
}

.md-footer__direction {
  color: var(--muted);
  font-family: "Archivo", sans-serif;
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.md-footer-meta {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.md-copyright {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.2rem;
  font-family: "Archivo", sans-serif;
  font-size: .66rem;
  color: var(--muted);
  width: 100%;
}

.md-copyright__highlight {
  color: var(--ink);
  font-weight: 600;
}

.md-copyright__note {
  color: var(--muted);
}

/* ---------------------------------------------------------------- misc */

.page-kicker + h1 {
  margin-top: 0;
}

.md-typeset .headerlink {
  color: var(--line);
}

.md-typeset .headerlink:hover {
  color: var(--rust);
}

.md-typeset .task-list-item {
  list-style: none;
}

.md-typeset .task-list-control {
  margin-right: .3rem;
}

.missing-asset {
  padding: .8rem;
  border: 1px dashed var(--red);
  color: var(--red);
  font-family: "Archivo", sans-serif;
  font-size: .75rem;
}

.skip-to-content {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 2000;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem .9rem;
  font-family: "Archivo", sans-serif;
  font-size: .8rem;
}

.skip-to-content:focus {
  left: .8rem;
  top: .8rem;
}

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- responsive */

@media screen and (max-width: 76.1875em) {
  .md-content__inner {
    max-width: 46rem;
  }
}

@media screen and (max-width: 60em) {
  .md-typeset h1 { font-size: 2.1rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .part-grid, .card-grid, .team-grid, .gallery-grid, .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-hero { grid-template-columns: 1fr; gap: 1.4rem; }
  .home-hero__cover { order: -1; }
  .home-hero__cover img { max-width: 15rem; }
  .home-hero h1 { font-size: 2.4rem; }
}

@media screen and (max-width: 44em) {
  .md-content__inner { padding: .4rem .8rem 4rem; }
  .md-typeset { font-size: .98rem; }
  .md-typeset h1 { font-size: 1.9rem; }
  .md-typeset h2 { font-size: 1.35rem; }
  .md-typeset h1 + p { font-size: 1.02rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .stat__value { font-size: 1.5rem; }
  .figure, .video { margin: 1.4rem 0; }
  .figure figcaption, .video figcaption { padding: .7rem .8rem; }
  .source-list li { grid-template-columns: 1fr; gap: .1rem; }
  .source-list__meta, .source-list__links { grid-column: 1; }
  .md-typeset table:not([class]) { font-size: .72rem; }
  .lightbox-overlay { padding: .6rem; }
}

@media screen and (max-width: 30em) {
  .stat-grid { grid-template-columns: 1fr; }
  .part-grid, .card-grid, .team-grid, .gallery-grid, .video-grid { grid-template-columns: 1fr; }
  .home-actions a { width: 100%; justify-content: center; }
}

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

/* ---------------------------------------------------------------- print */

@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff !important; color: #000 !important; }
  .md-header, .md-sidebar, .md-footer, .md-top, .md-search, .md-overlay,
  .data-table__toolbar, .chart-block, .lightbox-overlay, .skip-to-content {
    display: none !important;
  }
  .md-main__inner, .md-content, .md-content__inner {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .md-typeset { font-size: 10.5pt; line-height: 1.5; color: #000; }
  .md-typeset h1 { font-size: 22pt; }
  .md-typeset h2 { font-size: 15pt; border-top: 1px solid #999; }
  .md-typeset h3 { font-size: 12pt; }
  .md-typeset a { color: #000; text-decoration: underline; }
  .figure, .stat, .admonition, table, .timeline__item { break-inside: avoid; }
  .figure { box-shadow: none; border: 1px solid #999; }
  .page-sources { break-before: page; }
  .cite { border: 0; background: none; color: #000; }
}

/* ---------------------------------------------------------------- extras */

.table-wrap {
  overflow-x: auto;
  margin: 1.3rem 0;
}

.data-table__more,
.gallery-more {
  display: block;
  margin: .7rem auto;
  padding: .45rem .9rem;
  font-family: "Archivo", sans-serif;
  font-size: .72rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.data-table__more:hover,
.gallery-more:hover {
  border-color: var(--rust);
  color: var(--rust);
}

.explorer-select {
  font-family: "Archivo", sans-serif;
  font-size: .74rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .38rem .45rem;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 9, 8, .94);
}

.video-modal.is-open {
  display: flex;
}

.video-modal__body {
  width: min(1000px, 94vw);
}

.video-modal__body .video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal__body iframe,
.video-modal__body video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal__meta {
  color: #f2ece2;
  font-family: "Archivo", sans-serif;
  font-size: .78rem;
  margin-top: .6rem;
  text-align: center;
}

.video-modal__meta a {
  color: #f0b79c;
}

.video-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.video-card {
  cursor: pointer;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
}

.video-card:hover {
  border-color: var(--rust);
}

.video-card__body {
  padding: .9rem;
}

.video-card__team {
  display: block;
  font-family: "Archivo", sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rust);
}

.video-card__title {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: .84rem;
  line-height: 1.3;
  margin-top: .3rem;
}

.video-card__meta {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  margin-top: .4rem;
  line-height: 1.45;
}

/* ---------------------------------------------------------------- bibliography */

.bib-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 1rem 0 1.2rem;
  padding: .7rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.bib-scroll {
  max-height: 78vh;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.bib-table td {
  vertical-align: top;
}

.bib-title {
  display: block;
  color: var(--ink);
}

.bib-meta {
  display: block;
  color: var(--muted);
  font-size: .67rem;
  margin-top: .15rem;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Archivo", sans-serif;
  font-size: .76rem;
  margin: 1rem 0 2rem;
}

.doc-table th {
  text-align: left;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: .5rem .6rem;
  font-size: .64rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.doc-table td {
  border-top: 1px solid var(--line);
  padding: .45rem .6rem;
  vertical-align: top;
}

/* ---------------------------------------------------------------- downloads */

.download-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  margin: 1.4rem 0 2rem;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.download-card img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.download-card h3 {
  margin-top: .2rem;
}

.download-button {
  display: inline-block;
  padding: .5rem .8rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  font-family: "Archivo", sans-serif;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
}

.download-button:hover {
  background: var(--rust);
  color: #fff;
}

@media screen and (max-width: 44em) {
  .download-card { grid-template-columns: 1fr; }
  .download-card img { max-width: 9rem; }
}

.bib-table {
  table-layout: fixed;
  min-width: 46rem;
}

.bib-table th:nth-child(1) { width: 9.2rem; }
.bib-table th:nth-child(2) { width: auto; }
.bib-table th:nth-child(3) { width: 5.4rem; }
.bib-table th:nth-child(4) { width: 8.2rem; }
.bib-table th:nth-child(5) { width: 6.6rem; }

.bib-table td {
  overflow-wrap: anywhere;
}

.dt-table td.wide {
  min-width: 16rem;
  max-width: 26rem;
  overflow-wrap: anywhere;
}

.data-table__scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.data-table__scroll::after {
  content: "";
  display: block;
}

@media print {
  .video__frame { display: none !important; }
  figure.video figcaption::before {
    content: "Video available in the web edition.";
    display: block;
    font-family: "Archivo", sans-serif;
    font-size: 8pt;
    color: #555;
    margin-bottom: .2rem;
  }
  .data-table__scroll { max-height: none !important; overflow: visible !important; }
  .dt-table th { position: static !important; }
  .data-table__more { display: none !important; }
  .bib-scroll { max-height: none !important; }
  .dt-table { font-size: 8pt; }
  .dt-table td.wide { max-width: none; }
}

.cite--missing {
  color: var(--red);
  border-color: var(--red);
  text-decoration: line-through;
  cursor: help;
}

@media print {
  @page { margin: 12mm 11mm 14mm; }
  .page-sources { display: none !important; }
  .md-typeset { font-size: 8.6pt; line-height: 1.35; }
  .md-typeset h1 { font-size: 18pt; margin-bottom: .4rem; }
  .md-typeset h1 + p { font-size: 9.2pt; }
  .md-typeset h2 { font-size: 11.5pt; margin: 1.1rem 0 .35rem; padding-top: .55rem; }
  .md-typeset h3 { font-size: 9.8pt; margin: .8rem 0 .25rem; }
  .md-typeset p, .md-typeset li { max-width: none; }
  .md-typeset table:not([class]) { font-size: 6.8pt; }
  .md-typeset table:not([class]) th { font-size: 6.2pt; padding: .3rem .35rem; }
  .md-typeset table:not([class]) td { padding: .25rem .35rem; }
  .dt-table { font-size: 6.8pt; }
  .dt-table th { font-size: 6pt; padding: .25rem .3rem; }
  .dt-table td { padding: .22rem .3rem; }
  .data-table, .chart-block { break-inside: auto; }
  .stat-grid { gap: .3rem; margin: .6rem 0 .8rem; }
  .stat { padding: .45rem .5rem; }
  .stat__value { font-size: 1.25rem; }
  .stat__note { font-size: .62rem; }
  .figure { margin: .7rem 0; }
  .figure img { max-height: 8.5cm; }
  .figure figcaption { font-size: 6.8pt; padding: .35rem .45rem; }
  .md-typeset .admonition { font-size: 7.6pt; padding: .4rem .55rem; margin: .7rem 0; }
  .md-typeset .admonition-title { font-size: 7pt; }
  .page-kicker { font-size: 6.5pt; margin-bottom: .25rem; }
  .headerlink { display: none !important; }
  .md-typeset a { text-decoration: none; }
}

/* ---------------------------------------------------------------- URC Bible frontispiece */

.bible-title-page {
  position: relative;
  max-width: 48rem;
  margin: 1.5rem auto 4rem;
  padding: clamp(2.2rem, 6vw, 4.8rem) clamp(1.2rem, 5vw, 3.8rem);
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.bible-title-page::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.bible-title-page::after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  pointer-events: none;
}

.bible-ornament {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--rust);
  margin-bottom: 1.1rem;
}

.bible-label {
  font-family: "Archivo", sans-serif;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .8rem;
}

.bible-title-page h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(3rem, 8vw, 5.4rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.035em;
  margin: 0 0 .9rem;
  color: var(--ink);
}

.bible-subtitle {
  font-family: "Archivo", sans-serif;
  font-size: .78rem;
  font-variant: small-caps;
  letter-spacing: .08em;
  line-height: 1.5;
  color: var(--muted);
  max-width: 30rem;
  margin: 0 auto;
}

.bible-rule {
  width: 7rem;
  height: 1px;
  background: var(--line);
  margin: 1.5rem auto;
  position: relative;
}

.bible-rule::before {
  content: "❧";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper-2);
  padding: 0 .55rem;
  color: var(--rust);
  font-size: .9rem;
  line-height: 1;
}

.bible-proclamation {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  line-height: 1.68;
  color: var(--ink);
  max-width: 34rem;
  margin: 1.2rem auto 1.5rem;
  text-align: left;
}

.bible-proclamation::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: .78;
  padding: .06em .12em 0 0;
  color: var(--rust);
  font-weight: 600;
}

.bible-enter {
  display: inline-block;
  margin-top: .4rem;
  padding: .65rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-family: "Archivo", sans-serif;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}

.bible-enter:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}

.bible-imprint {
  margin: 2rem 0 0;
  font-family: "Archivo", sans-serif;
  font-size: .64rem;
  line-height: 1.7;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media screen and (max-width: 44em) {
  .bible-title-page { margin-top: .6rem; padding: 2.4rem 1.2rem 2.6rem; }
  .bible-title-page::before { inset: 7px; }
  .bible-title-page::after { inset: 11px; }
  .bible-proclamation { text-align: left; }
}

.md-typeset .bible-enter {
  color: var(--paper);
}

.md-typeset .bible-enter:hover {
  color: #fff;
}
