/* =========================================================================
   Archival Digitization & Digital Preservation Workflows
   Light, elegant, professional theme — teal + amber on parchment.
   ========================================================================= */

:root {
  /* Palette */
  --bg: #fbfaf6;          /* parchment */
  --surface: #ffffff;
  --surface-2: #f4f2ea;   /* warm sand */
  --ink: #1f2a2e;         /* slate ink */
  --ink-soft: #45555b;
  --muted: #6b7780;
  --line: #e4e0d4;        /* hairline */

  --teal: #0d6e6e;
  --teal-strong: #0a5258;
  --teal-soft: #e2f0ef;
  --amber: #d9822b;
  --amber-strong: #b9651a;
  --amber-soft: #fbeede;

  --link: #0d6e6e;
  --link-hover: #b9651a;

  --code-bg: #f6f4ec;
  --code-ink: #2b3a36;
  --inline-code-bg: #eef2ec;

  /* Type */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Georgia", serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Metrics */
  --header-h: 68px;
  --container: 1200px;
  --container-wide: 1480px;
  --container-prose: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 40, 40, .06), 0 2px 8px rgba(20, 40, 40, .05);
  --shadow-md: 0 6px 22px rgba(13, 110, 110, .12);
  --ease: cubic-bezier(.4, .14, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-main { flex: 1 0 auto; }

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

/* Background texture: subtle dual radial wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(217, 130, 43, .07), transparent 60%),
    radial-gradient(1000px 560px at 0% 0%, rgba(13, 110, 110, .07), transparent 55%);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2.25rem);
}

/* ----- Links ------------------------------------------------------------- */
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

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

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  font-weight: 700;
}
.brand__logo { transition: transform .35s var(--ease); }
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.05); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 1.05rem; letter-spacing: -.01em; }
.brand__sub { font-size: .74rem; color: var(--muted); font-weight: 500; }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.nav-link__icon { display: inline-flex; }
.nav-link__icon svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-link:hover {
  background: var(--teal-soft);
  color: var(--teal-strong);
}
.nav-link.is-active {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 22px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Hero / homepage
   ========================================================================= */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}
.hero--compact { padding-block: clamp(2rem, 5vw, 3.5rem); }
.error-code {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  margin: .5rem 0 0;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--teal), var(--amber-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo {
  display: block;
  filter: drop-shadow(0 10px 22px rgba(13, 110, 110, .22));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 1.2rem 0 .4rem;
  max-width: 16ch;
  background: linear-gradient(100deg, var(--teal-strong), var(--teal) 45%, var(--amber-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-align: left;
  padding: .95rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.cta:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
  color: var(--ink);
}
.cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  flex: none;
}
.cta__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cta--1 .cta__icon { background: linear-gradient(135deg, var(--teal), var(--teal-strong)); }
.cta--2 .cta__icon { background: linear-gradient(135deg, var(--amber), var(--amber-strong)); }
.cta__text { display: flex; flex-direction: column; line-height: 1.2; }
.cta__label { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.cta__hint { font-size: .82rem; color: var(--muted); }

/* Intro + section blocks */
.intro { padding: clamp(1rem, 3vw, 2rem) 0; }
.intro__inner { max-width: var(--container-prose); }
.sections { padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; }
.section-block + .section-block { margin-top: clamp(2.5rem, 5vw, 4rem); }
.section-block__head { margin-bottom: 1.4rem; }
.section-block__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 0 0 .4rem;
  color: var(--teal-strong);
}
.section-block__title a { color: inherit; }
.section-block__title a:hover { color: var(--amber-strong); }
.section-block__desc { color: var(--ink-soft); max-width: 75ch; margin: 0; }

/* ----- Cards ------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.25rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(var(--teal), var(--amber));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
  color: var(--ink);
}
.card:hover::before { transform: scaleY(1); }
.card__label { font-weight: 700; font-size: 1.08rem; color: var(--teal-strong); }
.card__desc { color: var(--ink-soft); font-size: .94rem; }
.card__meta { font-size: .8rem; color: var(--amber-strong); font-weight: 600; }
.card__cue {
  margin-top: auto;
  padding-top: .4rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--amber-strong);
  transition: transform .25s var(--ease);
}
.card:hover .card__cue { transform: translateX(4px); }

/* =========================================================================
   Article / content page
   ========================================================================= */
.article { padding: clamp(1.25rem, 3vw, 2.5rem) 0 3.5rem; }
.article__container { max-width: var(--container); }

.breadcrumbs { margin-bottom: 1.5rem; font-size: .88rem; }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "/";
  margin-right: .35rem;
  color: var(--line);
}
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--teal); }
.breadcrumbs [aria-current="page"] span { color: var(--ink); font-weight: 600; }

/* ----- Prose ------------------------------------------------------------- */
.prose {
  /* Wide on desktop, never a cramped column, never edge-to-edge */
  max-width: var(--container-prose);
}
.prose > * { margin-block: 0 1.15rem; }
.prose > *:first-child { margin-top: 0; }

.prose h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 1.1rem;
  color: var(--teal-strong);
  background: linear-gradient(100deg, var(--teal-strong), var(--teal) 55%, var(--amber-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--teal-strong);
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
  position: relative;
}
.prose h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin-top: 2.4rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--line);
}
.prose h3 { font-size: clamp(1.2rem, 1.9vw, 1.4rem); margin-top: 1.9rem; color: var(--amber-strong); }
.prose h4 { font-size: 1.1rem; margin-top: 1.5rem; color: var(--ink); }

.heading-anchor {
  position: absolute;
  left: -1.1em;
  opacity: 0;
  color: var(--amber);
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s var(--ease);
}
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor { opacity: 1; }

.prose p { color: var(--ink); }
.prose strong { color: var(--teal-strong); }

.prose a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--teal) 35%, transparent);
  text-underline-offset: 2.5px;
  transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
.prose a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--amber);
}

.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-block: .35rem; }
.prose li::marker { color: var(--amber); }

.prose blockquote {
  margin: 1.5rem 0;
  padding: .8rem 1.2rem;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}

/* Inline code: light tint, no border, blends in */
.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--inline-code-bg);
  color: var(--code-ink);
  padding: .12em .4em;
  border-radius: 5px;
  border: 0;
  white-space: break-spaces;
}

/* ----- Code blocks ------------------------------------------------------- */
.codeblock {
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: var(--shadow-sm);
}
.codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem .65rem .45rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.codeblock__lang {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.codeblock__copy {
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--teal-strong);
  padding: .3rem .7rem;
  border-radius: 999px;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.codeblock__copy:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.codeblock__copy.is-copied { background: var(--amber); color: #fff; border-color: var(--amber); }

.codeblock pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--code-ink);
  background: var(--code-bg);
  tab-size: 4;
}
.codeblock code { font-family: inherit; background: none; padding: 0; }

/* Prism light syntax theme matched to palette */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #8a9596; font-style: italic; }
.token.punctuation { color: #5c6b6b; }
.token.property, .token.tag, .token.boolean, .token.number,
.token.constant, .token.symbol, .token.deleted { color: #b9651a; }
.token.selector, .token.attr-name, .token.string, .token.char,
.token.builtin, .token.inserted { color: #0a7a6e; }
.token.operator, .token.entity, .token.url { color: #4a5a5a; }
.token.atrule, .token.attr-value, .token.keyword { color: #0d6e6e; font-weight: 600; }
.token.function, .token.class-name { color: #c2410c; }
.token.regex, .token.important, .token.variable { color: #b9651a; }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }

/* ----- Tables ------------------------------------------------------------ */
.table-wrap {
  margin: 1.6rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: .95rem;
  background: var(--surface);
}
.prose th, .prose td {
  text-align: left;
  padding: .7rem .95rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose thead th {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}
.prose tbody tr:nth-child(even) { background: var(--surface-2); }
.prose tbody tr:hover { background: var(--teal-soft); }
.prose td code { white-space: nowrap; }

/* ----- Task list checkboxes --------------------------------------------- */
.prose ul.contains-task-list { list-style: none; padding-left: .25rem; }
.prose ul.contains-task-list .task-list-item { display: flex; align-items: flex-start; gap: .6rem; }
.prose ul.contains-task-list .task-list-item::marker { content: ""; }
.task-list-item-checkbox {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  margin-top: .28em;
  border: 2px solid var(--teal);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.task-list-item-checkbox:checked { background: var(--teal); border-color: var(--teal); }
.task-list-item-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.task-list-item-checkbox:checked + label,
.task-list-item.is-checked > label { text-decoration: line-through; color: var(--muted); }

/* ----- FAQ accordions ---------------------------------------------------- */
.faq { margin: 1.5rem 0; display: grid; gap: .7rem; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.faq__item[open] { box-shadow: var(--shadow-sm); }
.faq__q {
  list-style: none;
  cursor: pointer;
  padding: .9rem 1.1rem;
  font-weight: 600;
  color: var(--teal-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--amber);
  transition: transform .25s var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__q:hover { background: var(--teal-soft); }
.faq__a { padding: 0 1.1rem 1rem; color: var(--ink-soft); }

/* ----- Mermaid diagrams + fullscreen lightbox ---------------------------- */
pre.mermaid {
  background: transparent;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  text-align: center;
  overflow-x: auto;
}
pre.mermaid:not([data-processed]) { color: transparent; min-height: 60px; }
pre.mermaid svg { max-width: 100%; height: auto; }

.diagram {
  position: relative;
  margin: 1.8rem 0;
  background:
    radial-gradient(1200px 200px at 50% -40%, rgba(13,110,110,.06), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.diagram > pre.mermaid { cursor: zoom-in; }
.diagram__expand {
  position: absolute;
  top: .7rem;
  right: .7rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--teal-strong);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .7rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.diagram:hover .diagram__expand,
.diagram:focus-within .diagram__expand { opacity: 1; transform: translateY(0); }
.diagram__expand:focus-visible { opacity: 1; transform: translateY(0); }
.diagram__expand:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.diagram__expand svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none) {
  .diagram__expand { opacity: 1; transform: none; }
}

body.modal-open { overflow: hidden; }

.diagram-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.diagram-modal.is-open { opacity: 1; }
.diagram-modal[hidden] { display: none; }
.diagram-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 32, .72);
  backdrop-filter: blur(3px);
}
.diagram-modal__dialog {
  position: relative;
  width: 96vw;
  height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(.97);
  transition: transform .2s var(--ease);
}
.diagram-modal.is-open .diagram-modal__dialog { transform: scale(1); }
.diagram-modal__stage {
  width: 96vw;
  height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  padding: clamp(1rem, 3vw, 2.5rem);
}
.diagram-modal__stage svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
.diagram-modal__close {
  position: absolute;
  top: -.25rem;
  right: -.25rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.diagram-modal__close:hover { background: var(--amber); color: #fff; transform: rotate(90deg); }
.diagram-modal__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ----- Related block ----------------------------------------------------- */
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--line);
}
.related__title {
  font-family: var(--font-serif);
  color: var(--teal-strong);
  font-size: 1.5rem;
  margin: 0 0 1.2rem;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--teal-strong);
  color: #dbeae8;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.5rem;
}
.site-footer__brand { display: flex; align-items: center; gap: .9rem; max-width: 42ch; }
.site-footer__logo { background: rgba(255,255,255,.08); border-radius: 10px; padding: 4px; }
.site-footer__name { font-weight: 700; color: #fff; margin: 0 0 .15rem; }
.site-footer__tagline { margin: 0; color: #aecdc9; font-size: .92rem; }
.site-footer__heading {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  color: #8fb6b1;
  margin: 0 0 .7rem;
}
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer__nav a { color: #dbeae8; font-weight: 500; }
.site-footer__nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bar {
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .82rem;
  color: #9fc2bd;
}
.site-footer__bar .container { padding-block: 1rem; }
.site-footer__bar p { margin: 0; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    inset: var(--header-h) 0 auto;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s var(--ease);
  }
  .primary-nav.is-open { max-height: 70vh; }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: .9rem clamp(1rem, 3vw, 2.25rem);
  }
  .nav-link { justify-content: flex-start; }
}

/* Widen generously on large / widescreen displays */
@media (min-width: 1400px) {
  .container { max-width: var(--container-wide); }
  :root { --container-prose: 1180px; }
  .article__container { display: block; }
}
@media (min-width: 1700px) {
  :root { --container-prose: 1280px; }
}

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