/* ==========================================================================
   Bible Stories -- shared base styles (design tokens, shell, catalog)
   Loaded by the catalog and by every story page.
   No frameworks, no CDNs, no web fonts: this must still work in 10 years.
   ========================================================================== */

:root {
  /* palette -- warm parchment */
  --paper:      #fbf7f0;
  --paper-2:    #f3ece0;
  --card:       #fffdf9;
  --ink:        #2b2118;
  --ink-soft:   #5d4f3f;
  --ink-mute:   #6b5d4d;
  --line:       #e4d9c6;
  /* --line: decorative rules and card edges (exempt from WCAG 1.4.11).
     --line-strong: the only visible boundary of a restyled control, so it
     must clear 3:1 on --paper, --card and --paper-2. */
  --line-strong: #978264;
  --accent:     #9a5b2c;
  --accent-ink: #ffffff;
  --gold:       #b8862b;
  /* one token for every text drawn on --gold, so the catalog badge and the
     story draft badge can never drift apart */
  --on-gold:    #1a1409;
  --focus:      #1f6feb;

  /* generated fallback cover: letter over an inline --c1/--c2 wash */
  --cover-ink:   rgba(255, 255, 255, .92);
  --cover-shade: rgba(0, 0, 0, .25);

  /* map palette (story pages) */
  --map-sea:   #dce8ef;
  --map-land:  #efe7d7;
  --map-river: #7ba5bb;

  /* quiz marking -- always paired with a text label and an icon shape */
  --ok:  #1c6440;
  --bad: #97302c;

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* space + shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(43, 33, 24, .06), 0 6px 18px rgba(43, 33, 24, .07);
  --shadow-hi: 0 2px 4px rgba(43, 33, 24, .08), 0 14px 30px rgba(43, 33, 24, .13);
  --wrap: 1080px;
  --read: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #15120d;
    --paper-2:  #1b1712;
    --card:     #201b15;
    --ink:      #ece3d5;
    --ink-soft: #c6b7a3;
    --ink-mute: #9d8d79;
    --line:     #362e24;
    --line-strong: #72675b;
    --accent:   #d99055;
    --accent-ink: #1a1409;
    --gold:     #d8ab52;
    /* --on-gold needs no override: the dark gold is lighter, so the same
       near-black reads at 8.6:1 there. Kept explicit to document that. */
    --on-gold:  #1a1409;
    --focus:    #7cb0ff;
    --map-sea:   #101c24;
    --map-land:  #262019;
    --map-river: #487a94;
    --ok:  #74c89b;
    --bad: #f0918a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 18px rgba(0, 0, 0, .38);
    --shadow-hi: 0 2px 4px rgba(0, 0, 0, .55), 0 14px 30px rgba(0, 0, 0, .5);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--ink);
  padding: .6rem 1rem;
  z-index: 20;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* --- site header --------------------------------------------------------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--paper-2), var(--paper));
}

.site-head__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  padding-block: clamp(1.5rem, 5vw, 2.75rem) 1.5rem;
}

.site-title {
  margin: 0;
  font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.site-title a { color: inherit; text-decoration: none; }
.site-title span { color: var(--accent); }

.site-tagline {
  margin: .35rem 0 0;
  color: var(--ink-mute);
  font-family: var(--ui);
  font-size: .93rem;
}

.count-pill {
  font-family: var(--ui);
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .8rem;
  background: var(--card);
  white-space: nowrap;
}

/* --- section nav (Stories | Characters) ---------------------------------- */
.site-nav {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-nav__inner {
  display: flex;
  gap: .3rem;
  font-family: var(--ui);
}
.site-nav__link {
  padding: .7rem .1rem;
  margin-right: 1.3rem;
  color: var(--ink-mute);
  text-decoration: none;
  font-size: .92rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.site-nav__link:hover { color: var(--accent); }
.site-nav__link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* --- family tree (characters.html) --------------------------------------- */
.tree {
  margin: 0 0 2rem;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow-x: auto;
}
.tree__svg {
  display: block;
  width: 100%;
  min-width: 40rem;   /* the whole cast never squashes; scroll instead */
  height: auto;
}
.tree__box {
  fill: var(--card);
  stroke: var(--line-strong);
  stroke-width: 1;
  transition: fill .15s ease, stroke .15s ease;
}
.tree__node { cursor: pointer; }
.tree__node:hover .tree__box,
.tree__node:focus-visible .tree__box {
  fill: color-mix(in oklab, var(--accent) 14%, var(--card));
  stroke: var(--accent);
}
.tree__label {
  fill: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.tree__node:hover .tree__label { fill: var(--accent); }
.tree__link { stroke: var(--line-strong); stroke-width: 1.5; }
.tree__spouse {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
/* A sibling tie, only drawn for a pair with no parent in the group. Dotted, so
   it is distinguishable from the dashed marriage tie at a glance. */
.tree__sibling {
  stroke: var(--ink-mute);
  stroke-width: 1.5;
  stroke-dasharray: 1.5 3;
}

/* One figure per family group. Genesis and each Gospel household get their own
   tree, because their generations are not comparable (see characters.js). */
.tree__family {
  margin: 0 0 1.4rem;
}
.tree__family:last-of-type { margin-bottom: .4rem; }
.tree__family-caption {
  margin-top: .4rem;
  font-family: var(--ui);
  font-size: .8rem;
  color: var(--ink-mute);
}
/* A small household needs no full-width canvas; cap it so a three-box family
   does not stretch across the page. */
.tree__family .tree__svg { min-width: 0; }
.tree__family + .tree__family { border-top: 1px solid var(--line); padding-top: 1.4rem; }
@media (prefers-reduced-motion: reduce) {
  .tree__box { transition: none; }
}

/* Key for the two line kinds, under the tree. The swatches reuse .tree__link
   and .tree__spouse, so they always match the diagram above. */
.tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.4rem;
  margin: .7rem 0 0;
  font-family: var(--ui);
  font-size: .82rem;
  color: var(--ink-mute);
}
.tree-legend__item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.tree-legend__swatch {
  width: 2rem;
  height: .5rem;
  flex: none;
}

/* --- the whole story (journey.html) -------------------------------------- */
.era-block { margin: 0 0 2rem; }
.era-block__head { margin-top: 1.6rem; }
.era-block__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .3rem;
}
.era-item {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  padding: .5rem .7rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--ui);
}
.era-item:last-child { border-bottom: 0; }
/* The running number, or "Read" once it is done. A word, never colour alone. */
.era-item__mark {
  flex: none;
  min-width: 2.6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.era-item--read .era-item__mark { color: var(--ok); }
.era-item--read .era-item__title { color: var(--ink-soft); }
.era-item__link {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .6rem;
  text-decoration: none;
}
.era-item__title {
  font-family: var(--serif);
  font-size: 1.04rem;
  color: var(--accent);
}
.era-item__link:hover .era-item__title { text-decoration: underline; }
.era-item__ref { font-size: .78rem; color: var(--ink-mute); }
.era-item__time {
  flex: none;
  font-size: .75rem;
  color: var(--ink-mute);
}

/* --- character directory list -------------------------------------------- */
.person-list {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}
.person {
  padding: 1rem 1.1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  font-family: var(--ui);
  scroll-margin-top: 1rem;   /* so a jump from the tree does not tuck it under */
}
/* Briefly ring a card jumped to from the tree, so the eye lands on it. */
.person:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
}
.person__name {
  margin: 0 0 .35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .5rem;
}
.person__name-text {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.person__aka { font-size: .78rem; color: var(--ink-mute); font-style: italic; }
.person__who { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.person__relations { margin: .45rem 0 0; font-size: .82rem; color: var(--ink-mute); }
.person__stories { margin: .5rem 0 0; font-size: .82rem; color: var(--ink-mute); }
.person__stories-label { color: var(--ink-mute); }
.person__story-link { font-weight: 600; }
.person__stories-none { font-style: italic; }

/* --- controls ------------------------------------------------------------ */
.controls {
  display: grid;
  gap: 1rem;
  padding-block: 1.5rem;
  font-family: var(--ui);
}

.controls__row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
}

.search {
  position: relative;
  flex: 1 1 16rem;
  min-width: 0;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: .65rem .75rem .65rem 2.3rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
.search input::placeholder { color: var(--ink-mute); }
.search svg {
  position: absolute;
  left: .7rem; top: 50%;
  transform: translateY(-50%);
  width: 1.05rem; height: 1.05rem;
  fill: none;
  stroke: var(--ink-mute);
  stroke-width: 2;
  pointer-events: none;
}

.field {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  color: var(--ink-soft);
}
.field select {
  font: inherit;
  font-size: .9rem;
  padding: .45rem 1.9rem .45rem .6rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  /* keep the native arrow: fewer moving parts, better a11y */
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: inherit;
  font-size: .85rem;
  padding: .4rem .85rem;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.reset-btn {
  font: inherit;
  font-size: .85rem;
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: .4rem 0;
  text-decoration: underline;
}
.reset-btn[hidden] { display: none; }

/* --- install and update (assets/pwa.js) ---------------------------------- */
/* Both are created or revealed by JS only when they can do something: the
   button when the browser has offered an install prompt, the bar when a new
   version is genuinely waiting. */
.install-host { margin: 0; }
.install-host[hidden] { display: none; }

.install-btn {
  font: inherit;
  font-family: var(--ui);
  font-size: .85rem;
  padding: .45rem 1rem;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}
.install-btn:hover { border-color: var(--accent); }

/* Pinned to the bottom, above the safe-area inset so it clears the iOS home
   bar in standalone mode. Never a dialog: it must not block reading. */
.pwa-bar {
  position: fixed;
  z-index: 20;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: min(28rem, calc(100vw - 2rem));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding: .8rem 1rem;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-hi);
  font-family: var(--ui);
}
.pwa-bar__text {
  margin: 0;
  font-size: .9rem;
  color: var(--ink);
}
.pwa-bar__actions {
  display: flex;
  gap: .5rem;
}
.pwa-bar__btn {
  font: inherit;
  font-size: .85rem;
  padding: .45rem .9rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
}
.pwa-bar__btn--ghost {
  color: var(--accent);
  background: var(--card);
  border-color: var(--line-strong);
}
.pwa-bar__btn[disabled] { opacity: .6; cursor: default; }

@media print {
  .pwa-bar, .install-host { display: none; }
}

/* --- reading progress ---------------------------------------------------- */
/* Filled from window.BIBLE_PROGRESS and hidden until a story is read, so a
   first visit never shows a meter reading zero. */
.progress {
  display: grid;
  gap: .5rem;
  margin: .5rem 0 1.5rem;
  font-family: var(--ui);
}
.progress[hidden] { display: none; }

/* --pct is set inline by catalog.js. A gradient rather than a nested div:
   one element, and the accessible value lives on the role="progressbar". */
.progress__bar {
  height: .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    linear-gradient(to right, var(--accent) 0 var(--pct, 0%), transparent var(--pct, 0%) 100%),
    var(--paper-2);
}

.progress__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin: 0;
}
.progress__text {
  font-size: .85rem;
  color: var(--ink-mute);
}

/* The "Continue reading" hero: one card, so it must not stretch to the full
   grid width on a wide screen. */
.grid--one {
  grid-template-columns: minmax(min(100%, 15.5rem), 22rem);
}

.continue-done {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  font-family: var(--ui);
  color: var(--ink-soft);
}
.continue-done p { margin: 0; }
.continue-done__sub {
  margin-top: .35rem;
  font-size: .87rem;
  color: var(--ink-mute);
}

/* --- section headings ---------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 .9rem;
}
.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--ui);
  font-weight: 650;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.section-head p {
  margin: 0;
  font-family: var(--ui);
  font-size: .82rem;
  color: var(--ink-mute);
}

/* An era heading that collapses its group. The <button> is inside the <h3>, so
   the heading level and the control are the same thing to a screen reader; the
   heading's own styles supply the type, and this only adds the affordance. */
.section-head--toggle { align-items: center; }

.era-toggle {
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  /* Vertical padding, not a min-height: it grows the tap target to a
     comfortable size on a phone without changing where the text sits. */
  padding: .55rem .4rem .55rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.era-toggle:hover { color: var(--accent); }

.era-toggle__caret {
  width: .8em;
  height: .8em;
  flex: none;
  transform: rotate(90deg);
  transition: transform .18s ease;
}
.era-toggle[aria-expanded="false"] .era-toggle__caret {
  transform: rotate(0deg);
}

/* A collapsed group is just its heading row. Pulling back the grid's gap keeps
   a run of folded eras reading as a compact list of headings rather than as
   rows of empty space, which is the whole point of folding them. */
.grid-group .grid[hidden] { display: none; }
.grid-group--shut { margin-bottom: -0.7rem; }
.grid-group--shut .section-head { margin-bottom: 0; }

/* --- story grid ---------------------------------------------------------- */
.grid {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
}

/* Era groups. #grid stays the one <ul> catalog.js clears, so a group is a
   full-width row holding its own heading and its own nested grid. Spacing
   between groups is the outer grid's gap; no colours of its own. */
.grid-group { grid-column: 1 / -1; }
.grid-group .section-head { margin-top: 0; }
.grid-group .grid { margin-bottom: 0; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hi);
  border-color: color-mix(in oklab, var(--accent) 45%, var(--line));
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transition: none; transform: none; }
  .era-toggle__caret { transition: none; }
}

/* A story already read. Deliberately quiet rather than crossed out: the point
   is to let the eye skip it, not to retire it, and rereading is normal. The
   "Read" badge carries the meaning; this is only emphasis, so it never becomes
   colour-only information. */
.card--read { border-color: var(--line); }
.card--read .card__cover { opacity: .55; }
.card--read .card__title { color: var(--ink-soft); }
.card--read:hover .card__cover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .card--read .card__cover { opacity: .7; }
}

.card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}
.card__link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* generated fallback cover: initial over a themed wash */
.card__cover--fallback {
  background: linear-gradient(150deg, var(--c1), var(--c2));
}
.card__cover--fallback span {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--cover-ink);
  text-shadow: 0 2px 10px var(--cover-shade);
  line-height: 1;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
}
.card__eyebrow {
  font-family: var(--ui);
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.card__title {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.card__ref {
  font-family: var(--ui);
  font-size: .84rem;
  color: var(--accent);
}
.card__summary {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-soft);
  /* clamp to keep the grid tidy */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  padding-top: .3rem;
  font-family: var(--ui);
  font-size: .75rem;
  color: var(--ink-mute);
}
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .16rem .55rem;
  background: var(--paper-2);
}
.card__meta .dot { opacity: .5; }

.badge {
  position: absolute;
  top: .7rem; left: .7rem;
  z-index: 3;
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .5rem;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: var(--on-gold);
}

/* Sits on the right so it can never collide with the gold Draft badge, which a
   draft story shows on the left at the same time. --ok is the quiz's "correct"
   green, reused so the site has one green and not two. */
.badge--read {
  left: auto;
  right: .7rem;
  background: var(--ok);
  color: var(--card);
}

.empty {
  margin: 0 0 3rem;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ink-mute);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty[hidden] { display: none; }

/* --- footer -------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--ui);
  font-size: .84rem;
  color: var(--ink-mute);
}
.site-foot__inner {
  padding-block: 1.75rem 2.5rem;
  display: grid;
  gap: .4rem;
}
.site-foot p { margin: 0; }

@media print {
  .controls, .site-foot, .skip-link { display: none; }
  .card { break-inside: avoid; box-shadow: none; }
}
