/* ==========================================================================
   Women’s and Girls’ Hair: a cultural history — "the dressing table archive"
   The intimacy of a dressing table or salon station with the rigour of a
   museum study room (plan §13). Warm paper, ink, oxblood, brass and muted
   salon teal; deliberately not gender-coded pink. Fine comb-tooth rules,
   roller circles and hairpin shapes as quiet graphics.
   ========================================================================== */

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-latin-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #241b1c;
  --ink-soft: #4b3f3f;
  --muted: #6a5d58;
  --paper: #fbf7f0;
  --paper-2: #f3ebdf;
  --card: #fffdf9;
  --rule: #dfd1c0;
  --rule-strong: #bfa98f;

  --plum: #561828;          /* oxblood: headings, nav, footer */
  --plum-2: #6f2236;
  --link: #7b2338;
  --link-hover: #561828;
  --brass: #c09234;
  --brass-deep: #7a5b12;
  --brass-wash: #f6ecd5;
  --teal: #1d5a61;
  --teal-wash: #e0eeee;
  --sage: #3d6a4c;
  --sage-wash: #e4efe5;
  --rose: #a13a3c;
  --rose-wash: #f7e3df;
  --violet: #5a3f7a;
  --violet-wash: #ece6f3;

  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.06rem, 1.02rem + 0.2vw, 1.15rem);
  --step-1: clamp(1.25rem, 1.18rem + 0.35vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.7vw, 1.95rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.4vw, 2.7rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.4vw, 3.5rem);

  --gutter: 1rem;
  --radius: 6px;
  --shadow: 0 1px 0 rgb(36 27 28 / 0.04), 0 6px 18px -10px rgb(36 27 28 / 0.28);
  /* Comb teeth: a fine, even row of short vertical strokes. */
  --comb: repeating-linear-gradient(90deg, var(--rule-strong) 0 1.5px, transparent 1.5px 4.5px);
}

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  overflow-wrap: break-word;
}

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

[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.18;
  color: var(--plum);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.005em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1rem; }

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

/* brass-deep: at least 5:1 on every light surface. Dark plum areas (nav,
   footer) override this with the lighter brass, which is 4.75:1 on plum. */
:focus-visible {
  outline: 3px solid var(--brass-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

main:focus { outline: none; }

cite { font-style: italic; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted { color: var(--muted); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li + li { margin-top: 0.3rem; }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--plum);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* -------------------------------------------------------------- header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--plum);
  min-height: 44px;
}
.brand__mark { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__title { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem); }
.brand__note {
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-header__tools { display: flex; align-items: center; gap: 0.5rem; }

.search-link, .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--plum);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.search-link:hover, .nav-toggle:hover { border-color: var(--plum); color: var(--plum); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 16px; height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 30rem) {
  .brand__note { display: none; }
  .search-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.site-nav { background: var(--plum); }
.site-nav__list {
  list-style: none;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.1rem;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  color: #f5ebe0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: #fff; border-bottom-color: rgb(255 255 255 / 0.35); }
.site-nav a[aria-current] { color: #fff; border-bottom-color: var(--brass); }
.site-nav a:focus-visible { outline-color: var(--brass); outline-offset: -3px; }

/* Collapsible only when JS is present and the screen is narrow. */
@media (max-width: 64rem) {
  .site-nav.is-collapsible { display: none; }
  .site-nav.is-collapsible.is-open { display: block; }
  .site-nav.is-collapsible .site-nav__list { flex-direction: column; padding-block: 0.5rem; }
  .site-nav.is-collapsible a { border-bottom: 0; border-left: 3px solid transparent; }
  .site-nav.is-collapsible a[aria-current] { border-left-color: var(--brass); }
}

/* --------------------------------------------------------- breadcrumbs */
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.85rem 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--rule-strong); }
.breadcrumbs a { color: var(--ink-soft); }

/* ---------------------------------------------------------------- hero
   The hero is a line-up of many wearers, so it is never covered by text:
   the card sits below it, overlapping only the decorative bottom edge.
   It keeps the image's own ratio (1916 x 821) so the faces at both edges
   are never cropped; very wide screens trim only top and bottom. */
.hero { position: relative; }
.hero__media { background: var(--paper-2); }
.hero__media picture, .hero__img {
  width: 100%;
  aspect-ratio: 1916 / 821;
  object-fit: cover;
  object-position: 50% 35%;
}
.hero__card {
  position: relative;
  margin-top: -2rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.hero__card::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  pointer-events: none;
}
.hero__card::after {
  content: "";
  position: absolute;
  top: 0.45rem; left: 2rem; right: 2rem;
  height: 6px;
  background: var(--comb);
  pointer-events: none;
}
.hero h1 { font-size: var(--step-4); margin-bottom: 0.35em; }
.hero__lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.hero__proposition {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--plum);
}
.hero__proposition small { display: block; margin-top: 0.4rem; font-family: var(--font-body); font-style: normal; font-size: var(--step--1); color: var(--muted); }

@media (min-width: 52rem) {
  .hero__media picture, .hero__img { max-height: min(72vh, 40rem); }
  .hero__card {
    margin-top: -5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: end;
    padding: 2.2rem 2.4rem 2.2rem;
    background: rgb(251 247 240 / 0.97);
  }
  .hero__proposition { padding: 0 0 0 1.5rem; border-top: 0; border-left: 1px solid var(--rule); }
}

/* ------------------------------------------------------------- buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.3rem;
  border: 2px solid var(--plum);
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--plum-2); border-color: var(--plum-2); color: #fff; }
.button--ghost { background: transparent; color: var(--plum); }
.button--ghost:hover { background: var(--brass-wash); color: var(--plum); border-color: var(--plum); }
.button--small { min-height: 44px; padding: 0.35rem 1rem; font-size: var(--step--1); }

.linklike {
  background: none; border: 0; padding: 0;
  font: inherit; color: var(--link);
  text-decoration: underline; cursor: pointer;
  min-height: 44px;
}

/* --------------------------------------------------------------- home */
.home-intro { padding-block: 2.5rem 1rem; }
.home-intro__text {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 50rem;
  color: var(--ink-soft);
}
.independence {
  display: inline-block;
  font-size: var(--step--1);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
}

.band { background: var(--paper-2); padding-block: 2.5rem; margin-block: 2rem; border-block: 1px solid var(--rule); }
.band--paper { background: var(--card); }

.section-title {
  font-size: var(--step-2);
  position: relative;
  padding-bottom: 0.55rem;
  margin-bottom: 1.25rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 5.5rem; height: 6px;
  background: var(--comb);
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; }
.section-head .section-title { margin-bottom: 1.25rem; }
.section-intro { max-width: 46rem; color: var(--ink-soft); margin-top: -0.5rem; }
.more { font-weight: 600; white-space: nowrap; }
.more::after { content: " →"; }

.routes {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.route {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: var(--shadow);
}
.route:hover { border-color: var(--rule-strong); }
.route h3 { margin: 0.9rem 0 0.35rem; }
.route h3 a { text-decoration: none; color: var(--plum); }
.route h3 a::after { content: ""; position: absolute; inset: 0; }
.route h3 a:hover { text-decoration: underline; }
.route p { margin: 0; color: var(--ink-soft); }
/* Roller circles: a solid disc ringed with a dotted "roller" edge. */
.route__icon {
  display: inline-grid;
  place-items: center;
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: var(--c, var(--plum));
  outline: 2px dotted var(--c, var(--plum));
  outline-offset: 3px;
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.3);
  margin: 5px;
}
.route--period { --c: var(--plum); }
.route--age { --c: var(--teal); }
.route--style { --c: var(--rose); }
.route--technique { --c: var(--brass-deep); }

.period-strip {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
}
.period-strip a, .period-strip .period-strip__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 100%;
  padding: 0.9rem 0.9rem 0.8rem;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--plum);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
}
.period-strip li:nth-child(even) a { border-top-color: var(--brass); }
.period-strip a:hover { background: var(--brass-wash); }
.period-strip__years { font-family: var(--font-head); font-weight: 700; color: var(--plum); font-size: 1.05rem; }
.period-strip__label { font-size: 0.95rem; line-height: 1.3; }
.period-strip__count { margin-top: auto; padding-top: 0.3rem; font-size: var(--step--1); color: var(--muted); }
.period-strip__count--written { color: var(--sage); font-weight: 600; }

.age-strip {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
}
.age-strip a {
  display: flex; align-items: center; gap: 0.75rem;
  height: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
}
.age-strip a:hover { border-color: var(--teal); background: var(--teal-wash); }
.age-strip__icon {
  flex: none;
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--teal);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.method { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .method { grid-template-columns: 1fr 1.2fr; align-items: start; } }

.status-legend { margin: 0; display: grid; gap: 0.75rem; }
.status-legend > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.75rem; align-items: baseline; }
.status-legend dd { margin: 0; }
@media (max-width: 30rem) { .status-legend > div { grid-template-columns: 1fr; gap: 0.25rem; } }

.updated-list { list-style: none; padding: 0; columns: 20rem 2; column-gap: 2rem; }
.updated-list li { break-inside: avoid; padding: 0.4rem 0; border-bottom: 1px dashed var(--rule); }

/* ------------------------------------------------------- page headers */
.page-header { padding-block: 1.5rem 1.75rem; }
.page-header h1 { max-width: 24ch; }
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.eyebrow a { color: inherit; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 46rem; }
.period-years {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.2rem 0.75rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--plum);
  background: var(--brass-wash);
  border: 1px solid var(--brass);
  border-radius: 3px;
}

/* ------------------------------------------------------ article layout */
.article__layout { display: grid; gap: 2rem; padding-bottom: 3rem; }
@media (min-width: 64rem) {
  .article__layout { grid-template-columns: 17rem minmax(0, 1fr); gap: 3rem; }
  .article__aside > * { position: sticky; top: 1rem; }
  .article__aside > * + * { position: static; }
}
.article__aside:empty { display: none; }

.prose { max-width: 44rem; min-width: 0; }
.prose--wide { max-width: 48rem; }
.prose h2 { margin-top: 2.25rem; font-size: var(--step-2); }
.prose h3 { margin-top: 1.75rem; }
.prose li + li { margin-top: 0.35rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--brass); }
/* Hairpin divider. */
.prose hr {
  border: 0;
  height: 1.5rem;
  margin: 2.25rem 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 12'%3E%3Cpath d='M2 4h50a4 4 0 0 1 0 8H8' fill='none' stroke='%23bfa98f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 4rem auto no-repeat;
}
.page-updated { font-size: var(--step--1); color: var(--muted); margin-top: 2rem; }

.landing { padding-bottom: 3rem; }
.landing > .card-grid { margin-top: 1.5rem; }

/* --------------------------------------------------------------- toc */
.toc {
  font-size: 0.95rem;
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.toc__heading { font-family: var(--font-body); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li + li { margin-top: 0.3rem; }
.toc a { text-decoration: none; display: inline-block; padding-block: 0.15rem; }
.toc a:hover { text-decoration: underline; }

/* ------------------------------------------------ record cards / boxes */
.record-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem 0.9rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
}
.record-card::before {
  content: "";
  position: absolute;
  top: 0; left: 1rem; right: 1rem;
  height: 6px;
  background: var(--comb);
}
.record-card h2 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.record-card dl { margin: 0; font-size: 0.95rem; }
.record-card dl > div { padding: 0.45rem 0; border-top: 1px dashed var(--rule); }
.record-card dl > div:first-child { border-top: 0; padding-top: 0; }
.record-card dt { font-weight: 700; font-size: var(--step--1); color: var(--ink-soft); }
.record-card dd { margin: 0; }
.record-card__check { font-size: 0.92rem; margin: 0.75rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.record-card .chips { margin-top: 0.2rem; }

/* ------------------------------------------------------ evidence status */
.fact-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.05rem 0.55rem 0.1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: 0.1em;
  border: 1px solid;
}
.fact-status::before { font-size: 0.85em; }
.fact-status--verified { color: var(--sage); background: var(--sage-wash); }
.fact-status--verified::before { content: "✓" / ""; }
.fact-status--research { color: var(--brass-deep); background: var(--brass-wash); border-style: dashed; }
.fact-status--research::before { content: "?" / ""; }
.fact-status--interpretation { color: var(--violet); background: var(--violet-wash); }
.fact-status--interpretation::before { content: "✎" / ""; }
.fact-status--current { color: var(--teal); background: var(--teal-wash); }
.fact-status--current::before { content: "◷" / ""; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 0.45rem;
  border-radius: 3px;
  vertical-align: 0.1em;
}
.tag--quiet { color: var(--muted); border: 1px dashed var(--rule-strong); }

/* ---------------------------------------------------------- citations */
.cite { font-size: 0.72em; line-height: 0; margin-left: 0.1em; }
.cite a { text-decoration: none; font-weight: 700; padding: 0.1em; }
.cite a:hover { text-decoration: underline; }

.source-list {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--plum);
  font-size: 0.95rem;
}
.source-list h2 { font-size: var(--step-1); margin-top: 0; }
.source-list ol { padding-left: 1.6rem; }
.source-list li { padding-left: 0.25rem; }
.source-list li:target { background: var(--brass-wash); outline: 2px solid var(--brass); outline-offset: 4px; border-radius: 2px; }
.source-list__locator { color: var(--muted); }
.source-list__note { display: block; color: var(--muted); font-size: 0.9rem; }

/* -------------------------------------------------- notes and warnings */
.context-note, .content-warning, .policy-banner, .myth-check, .safety-note, .technique-steps {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}
.context-note > :last-child, .content-warning > :last-child, .policy-banner > :last-child,
.myth-check > :last-child, .safety-note > :last-child, .technique-steps > :last-child { margin-bottom: 0; }
.context-note { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--sage); }
.context-note__label, .content-warning__label, .myth-check__label, .safety-note__label, .technique-steps__label {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.context-note__label { color: var(--sage); }
.content-warning { background: var(--paper-2); border: 1px solid var(--rule-strong); }
.content-warning__label { color: var(--ink-soft); }
.policy-banner { background: var(--teal-wash); border: 1px solid #a9c9cb; border-left: 4px solid var(--teal); }
.policy-banner--overdue { background: var(--rose-wash); border-color: #e0b3ad; border-left-color: var(--rose); }

.myth-check { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--rose); }
.myth-check__label { color: var(--rose); }
.myth-check__claim {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: line-through;
  text-decoration-color: rgb(161 58 60 / 0.55);
  text-decoration-thickness: 1.5px;
}

.safety-note { background: var(--teal-wash); border: 1px solid #a9c9cb; font-size: 0.96rem; }
.safety-note__label { color: var(--teal); }
.safety-note ul { padding-left: 1.2rem; margin: 0; }

.technique-steps { background: var(--card); border: 1px solid var(--rule); }
.technique-steps__label { color: var(--brass-deep); }
.technique-steps ol { counter-reset: step; list-style: none; padding: 0 !important; margin: 0; }
.technique-steps ol > li {
  counter-increment: step;
  position: relative;
  padding: 0.55rem 0 0.55rem 2.75rem;
  margin: 0 !important;
  border-top: 1px dashed var(--rule);
}
.technique-steps ol > li:first-child { border-top: 0; }
.technique-steps ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.5rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--brass-deep);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--brass-deep);
}

/* ---------------------------------------------------------- glossary term */
.term { position: relative; display: inline; }
.term > a { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 0.2em; color: inherit; }
.term > a:hover { color: var(--link); }
.term__tip {
  position: absolute;
  left: 0; bottom: calc(100% + 0.4rem);
  z-index: 20;
  width: min(20rem, 80vw);
  padding: 0.65rem 0.8rem;
  background: var(--plum);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.45;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.term:hover .term__tip, .term:focus-within .term__tip { visibility: visible; opacity: 1; }
@media (max-width: 40rem) { .term { position: static; } .term__tip { left: var(--gutter); right: var(--gutter); width: auto; } }

/* --------------------------------------------------------------- chips */
.chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
}
a.chip:hover { border-color: var(--plum); color: var(--plum); }
/* Age and period chips carry a shape as well as a colour (plan §14). */
.chip--age::before { content: ""; width: 0.65rem; height: 0.65rem; border-radius: 50%; border: 2px solid var(--teal); }
.chip--period::before { content: ""; width: 0.7rem; height: 0.45rem; border-top: 2px solid var(--plum); border-bottom: 2px solid var(--plum); }

/* --------------------------------------------------------------- cards */
.card-grid {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.card-grid > li { display: flex; }
.card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1rem;
  box-shadow: var(--shadow);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--plum);
}
.card--style::before { background: var(--rose); }
.card--technique::before { background: var(--brass); }
.card--object::before { background: var(--brass-deep); }
.card--person::before { background: var(--teal); }
.card--theme::before { background: var(--sage); }
.card--source-guide::before, .card--story::before { background: var(--violet); }
.card:hover { border-color: var(--rule-strong); }
.card__kicker {
  margin: 0.2rem 0 0.4rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--brass-deep);
  letter-spacing: 0.04em;
}
.card__title { font-size: var(--step-1); margin-bottom: 0.4rem; }
.card__title a { color: var(--plum); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { text-decoration: underline; }
.card__summary { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ------------------------------------------------------------ timeline */
.timeline-intro { max-width: 48rem; }
.period-jump ul { list-style: none; padding: 0; margin: 1rem 0 2rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.period-jump a {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--card);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.period-jump a:hover { background: var(--brass-wash); }

.timeline__list { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; }
.timeline__list::before {
  content: "";
  position: absolute;
  left: 0.45rem; top: 0.5rem; bottom: 0.5rem;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--rule-strong) 0 8px, transparent 8px 13px);
}
.timeline__item { position: relative; margin-bottom: 1.1rem; scroll-margin-top: 1rem; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.6rem; top: 1.15rem;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--plum);
}
.timeline__item--written::before { background: var(--brass); }
.timeline-card {
  display: grid;
  gap: 0.25rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  box-shadow: var(--shadow);
}
.timeline__item:target .timeline-card { outline: 3px solid var(--brass); }
@media (min-width: 44rem) { .timeline-card { grid-template-columns: 9rem 1fr; } }
.timeline-card__date {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--plum);
  line-height: 1.3;
}
.timeline-card__title { font-size: var(--step-1); margin-bottom: 0.3rem; }
.timeline-card__title a { color: var(--plum); }
.timeline-card__body p { margin-bottom: 0.4rem; }
.timeline-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; font-size: var(--step--1); color: var(--muted); }
.timeline-card details { margin-top: 0.4rem; font-size: 0.95rem; }
.timeline-card summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); min-height: 32px; display: flex; align-items: center; }
.timeline-card details ul { margin: 0.3rem 0 0.2rem; padding-left: 1.2rem; }

.mini-timeline { list-style: none; padding: 0 !important; margin: 0 0 1rem; border-left: 2px dashed var(--rule-strong); }
.mini-timeline li { padding: 0.35rem 0 0.35rem 1rem; margin: 0 !important; }
.mini-timeline__date { display: inline-block; min-width: 6.5rem; font-weight: 700; color: var(--plum); }

.pager { display: grid; gap: 0.75rem; margin-top: 2.5rem; }
@media (min-width: 40rem) { .pager { grid-template-columns: 1fr 1fr; } .pager__next { text-align: right; grid-column: 2; } }
.pager a {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  line-height: 1.35;
}
.pager a:hover { border-color: var(--plum); }
.pager__label { display: block; font-size: var(--step--1); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* -------------------------------------------------------- page record */
.page-record {
  margin-top: 2.5rem;
  padding: 1rem 1.1rem;
  background: var(--paper-2);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.page-record dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; }
.page-record dt { font-weight: 700; color: var(--ink-soft); font-size: var(--step--1); }
.page-record dd { margin: 0; }
.page-record p { margin: 0; }

.related, .linked { margin-top: 2.5rem; }
.related h2, .linked h2 { font-size: var(--step-1); }
.related .card-grid, .linked .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

.figure { margin-bottom: 2rem; }
.figure img { border-radius: var(--radius); }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.figure--hero {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
}
.figure--hero img { width: auto; max-width: 100%; max-height: min(70vh, 34rem); margin-inline: auto; }

.image-pending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 2rem;
  padding: 1.1rem 1.25rem;
  border: 2px dashed var(--rule-strong);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgb(223 209 192 / 0.3) 12px 13px),
    var(--card);
  font-size: 0.95rem;
}
.image-pending p { margin: 0; flex: 1 1 20rem; }

/* ----------------------------------------------------------- quotations */
.quote { margin: 1.75rem 0; padding: 1rem 1.25rem; background: var(--card); border-left: 4px solid var(--brass); }
.quote blockquote { margin: 0 0 0.5rem; padding: 0; border: 0; font-size: 1.1rem; }
.quote figcaption { font-size: 0.9rem; color: var(--muted); }
.quote--recollection { border-left-style: dashed; }

/* -------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.table-wrap:focus-visible { outline-offset: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding-bottom: 0.5rem; color: var(--plum); }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
thead th { border-bottom: 2px solid var(--plum); font-size: var(--step--1); letter-spacing: 0.04em; }
tbody th { font-weight: 700; }

/* ------------------------------------------------------------ age hubs */
.age-grid { display: grid; gap: 1.5rem; margin: 1.5rem 0 2rem; }
@media (min-width: 52rem) { .age-grid { grid-template-columns: 1fr 1fr; } }
.age-grid .record-card { margin: 0; }
.age-grid .record-card ul { padding-left: 1.1rem; margin: 0; }
.age-grid .record-card li + li { margin-top: 0.4rem; }

/* ------------------------------------------------------ style strands */
.strands-filters {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.75rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  align-items: end;
}
.strands-filters__heading { grid-column: 1 / -1; font-size: var(--step-1); margin: 0; }
.strands-filters label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.strands-filters select {
  width: 100%;
  min-height: 44px;
  padding: 0.3rem 0.6rem;
  font: inherit;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.strands-filters__status { grid-column: 1 / -1; margin: 0; font-weight: 600; color: var(--ink-soft); }
.strands-filters__status:empty { display: none; }
.strands-group { margin-bottom: 2rem; }
.strands-group.is-filtered-empty { display: none; }
.strands__empty { padding: 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }

/* ------------------------------------------------------------ research */
.research-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 60rem) { .research-grid { grid-template-columns: 1.1fr 1fr; } }
.evidence-ladder { counter-reset: rung; list-style: none; padding: 0 !important; }
.evidence-ladder li {
  counter-increment: rung;
  position: relative;
  padding: 0.6rem 0 0.6rem 2.75rem;
  margin: 0 !important;
  border-top: 1px dashed var(--rule);
}
.evidence-ladder li::before {
  content: counter(rung);
  position: absolute;
  left: 0; top: 0.55rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--plum);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--plum);
}
.repo-list {
  list-style: none; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.repo { padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); height: 100%; }
.repo h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.repo p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.repo__kind { font-size: var(--step--1) !important; color: var(--brass-deep); font-weight: 600; }

.bibliography { margin-bottom: 2rem; }
.bibliography__list { padding-left: 1.2rem; max-width: 52rem; }
.bibliography__list li { margin-bottom: 0.6rem; }

.planned-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.planned-list li { padding: 0.9rem 1rem; border: 1px dashed var(--rule-strong); border-radius: var(--radius); margin: 0 !important; }
.planned-list strong { display: block; font-family: var(--font-head); color: var(--plum); font-size: 1.08rem; }

/* ------------------------------------------------------------ glossary */
.glossary { max-width: 52rem; margin: 0; }
.glossary__entry { padding: 1rem 0; border-top: 1px dashed var(--rule); scroll-margin-top: 1rem; }
.glossary__entry:target { background: var(--brass-wash); outline: 2px solid var(--brass); outline-offset: 0; padding-inline: 0.75rem; border-radius: var(--radius); }
.glossary dt { font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); color: var(--plum); }
.glossary dd { margin: 0.3rem 0 0; }
.glossary dd p { margin-bottom: 0.4rem; }
.glossary__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.9rem; color: var(--ink-soft); }
.glossary__note { font-size: 0.92rem; padding: 0.4rem 0.7rem; background: var(--paper-2); border-radius: 3px; }
.glossary__see { font-size: 0.92rem; }

/* ------------------------------------------------------------- themes */
.theme-index { margin-top: 3rem; }
.theme-index__list {
  list-style: none; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.theme-index__list > li { padding: 1rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); scroll-margin-top: 1rem; }
.theme-index__list > li:target { outline: 3px solid var(--brass); }
.theme-index__list h3 { font-size: 1.15rem; }
.theme-index__list .plain { font-size: 0.95rem; }
.theme-browse { margin-top: 2.5rem; }

/* -------------------------------------------------------------- search */
.search-form { max-width: 40rem; margin-bottom: 2rem; }
.search-form__label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.search-form__row { display: flex; gap: 0.5rem; }
.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.search-form input:focus-visible { border-color: var(--plum); }
.search-results__list { padding-left: 1.25rem; max-width: 48rem; }
.search-results__list li { margin-bottom: 1rem; }
.search-results__list p { margin: 0.2rem 0 0; color: var(--ink-soft); }
.az-list { columns: 18rem 3; column-gap: 2rem; padding-left: 1.1rem; }
.az-list li { break-inside: avoid; margin-bottom: 0.35rem; }

.sitemap-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.sitemap-grid h2 { font-size: var(--step-1); }

.start-routes ul { list-style: none; padding: 0 !important; display: grid; gap: 0.5rem; }
.start-routes li { padding: 0.6rem 0.9rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); margin: 0 !important; }

/* -------------------------------------------------------------- footer */
.site-footer {
  margin-top: 3rem;
  background: var(--plum);
  color: #eee2d6;
  padding-block: 2.75rem 2.5rem;
  font-size: 0.95rem;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0.6rem; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.28) 0 1.5px, transparent 1.5px 4.5px);
}
.site-footer__inner { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .site-footer__inner { grid-template-columns: 1.4fr 1fr; } }
.site-footer__title { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: #fff; }
.site-footer a { color: #fff; }
.site-footer a:focus-visible { outline-color: var(--brass); }
.site-footer__links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 1.5rem; }
.site-footer__links li { break-inside: avoid; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__researched { color: #e3cfd3; }

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

@media (forced-colors: active) {
  .fact-status, .chip, .card, .button { border: 1px solid CanvasText; }
}

@media print {
  .site-header, .site-nav, .site-footer, .breadcrumbs, .strands-filters, .pager, .skip-link, .search-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .card, .record-card, .timeline-card { box-shadow: none; }
}

/* Card grids and lists inside prose keep their own spacing. */
.prose .card-grid, .prose .mini-timeline { padding-left: 0; }
.prose .card-grid > li { margin: 0; }

.nowrap { white-space: nowrap; }

/* ------------------------------------------------------- object story */
.object-story__list { margin: 0; }
.object-story__list > div { padding: 0.8rem 0; border-top: 1px dashed var(--rule); }
.object-story__list dt { font-family: var(--font-head); font-weight: 600; color: var(--plum); font-size: 1.1rem; }
.object-story__list dd { margin: 0.25rem 0 0; }

.section-head--flush { margin-top: 0; }
.age-strip--spaced { margin-block: 1.5rem 2.5rem; }
.source-list--reading { margin-top: 1.5rem; border-top-width: 1px; }
.source-list--reading ul { padding-left: 1.2rem; }
