/* A Jewellery History - magazine edition.
   Editorial layout: centred nameplate masthead, section-coloured kickers,
   picture-led story cards, and long-read article pages with a sticky
   sidebar for quick facts and contents. Palette keeps the original ivory,
   ink, antique gold and garnet; each section adds its own accent. */

:root {
  --paper: #faf7f1;
  --paper-deep: #f2ebdf;
  --surface: #ffffff;
  --ink: #1d1916;
  --ink-soft: #3a332d;
  --muted: #6f6257;
  --rule: #e2d7c5;
  --rule-strong: #1d1916;

  --gold: #9c7638;
  --gold-soft: #c9a06a;
  --garnet: #7a2335;
  --link: #7a2335;
  --link-hover: #9c7638;

  --band-bg: #1f1a17;
  --band-ink: #f3ede3;
  --band-muted: #b9ad9f;

  --sec: var(--gold);

  --note-tip: #3f6e52;
  --note-warning: #9b3b34;
  --note-historical: #9c7638;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, "Iowan Old Style", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 76rem;
  --measure: 41rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161310;
    --paper-deep: #1e1a16;
    --surface: #1f1b17;
    --ink: #f1ebe1;
    --ink-soft: #ddd4c7;
    --muted: #a99d90;
    --rule: #3a322a;
    --rule-strong: #e9e1d4;
    --gold: #d6b07a;
    --gold-soft: #c99a5c;
    --garnet: #d48a98;
    --link: #e2a3ae;
    --link-hover: #d6b07a;
    --band-bg: #0e0c0a;
    --note-tip: #86bd9a;
    --note-warning: #e09a90;
    --note-historical: #d6b07a;
  }
}

/* Section accents - applied to the page (html[data-section]) and to cards */
[data-section="jewellery"] { --sec: #9c7638; }
[data-section="eras"]      { --sec: #7a2335; }
[data-section="materials"] { --sec: #5c6b4c; }
[data-section="techniques"]{ --sec: #46596e; }
[data-section="gemstones"] { --sec: #2d6a66; }
[data-section="symbols"]   { --sec: #8a5326; }
[data-section="mourning"]  { --sec: #3d3542; }
[data-section="identify"]  { --sec: #6a4b7c; }
[data-section="compare"]   { --sec: #9a4a2a; }
[data-section="glossary"]  { --sec: #9c7638; }
@media (prefers-color-scheme: dark) {
  [data-section="jewellery"] { --sec: #d6b07a; }
  [data-section="eras"]      { --sec: #d9909c; }
  [data-section="materials"] { --sec: #a9b892; }
  [data-section="techniques"]{ --sec: #93a9c2; }
  [data-section="gemstones"] { --sec: #7cc0b9; }
  [data-section="symbols"]   { --sec: #d5a175; }
  [data-section="mourning"]  { --sec: #b7a9c0; }
  [data-section="identify"]  { --sec: #bfa0d3; }
  [data-section="compare"]   { --sec: #e0a07f; }
  [data-section="glossary"]  { --sec: #d6b07a; }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { color-scheme: light dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
::selection { background: var(--gold-soft); color: #1d1916; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.container { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--ink); letter-spacing: -0.005em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0; }
h2 { font-size: 1.75rem; margin: 2.75rem 0 0.9rem; }
h3 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
p { margin: 0 0 1.15rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s ease; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px;
}

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

/* Kicker: small capitals label above headlines, in the section colour */
.kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sec);
  margin: 0 0 0.5rem;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.kicker--lg { font-size: 0.8rem; }

/* Section heading with a rule running to the edge */
.rule-heading {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 1.5rem;
}
.rule-heading::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }
.rule-heading--small { font-size: 0.72rem; margin-bottom: 0.75rem; }

/* ---------- Masthead ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead__bar { border-bottom: 1px solid var(--rule); font-family: var(--font-ui); font-size: 0.78rem; color: var(--muted); }
.masthead__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; }
.masthead__tagline { margin: 0; letter-spacing: 0.04em; }
.masthead__brand { text-align: center; padding: 1.4rem var(--gutter) 1.1rem; }
.masthead__name {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.masthead--home .masthead__brand { padding: 2.4rem var(--gutter) 1.8rem; }
.masthead--home .masthead__name { font-size: clamp(2.6rem, 8vw, 5rem); }
.masthead__name:hover { color: var(--ink); }
.masthead__nav { border-top: 3px double var(--rule-strong); }
.masthead__nav ul {
  list-style: none; margin: 0 auto; display: flex; justify-content: center; gap: 0.25rem 1.6rem;
  flex-wrap: wrap; padding-top: 0.7rem; padding-bottom: 0.7rem;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.masthead__nav a { color: var(--ink-soft); text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.masthead__nav a:hover { color: var(--gold); }
.masthead__nav a[aria-current] { border-bottom-color: var(--sec); color: var(--ink); }

.site-search { display: flex; align-items: center; }
.site-search input {
  font-family: var(--font-ui); font-size: 0.8rem; padding: 0.3rem 0.1rem; width: 11rem; max-width: 40vw;
  border: none; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink);
}
.site-search input::placeholder { color: var(--muted); }
.site-search input:focus { outline: none; border-bottom-color: var(--gold); }
.site-search button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0.3rem; display: flex; }
.site-search button:hover { color: var(--gold); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 2.25rem 1.75rem; }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 1.5rem; }

.card { min-width: 0; }
.card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #15120f;
  margin-bottom: 0.9rem;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.card__link:hover .card__media img { transform: scale(1.035); }
.card__media--diagram { background: var(--paper-deep); }
.card__media--diagram img { object-fit: contain; padding: 1rem; }
.card__media--plain {
  --tone: 0%;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 11px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 62%),
    linear-gradient(135deg, color-mix(in srgb, var(--sec) 80%, #000) 0%, color-mix(in srgb, var(--sec), #000 var(--tone)) 100%);
  display: flex; align-items: center; justify-content: center;
}
.card:nth-child(3n+1) .card__media--plain { --tone: 18%; }
.card:nth-child(3n+2) .card__media--plain { --tone: 32%; }
.card:nth-child(3n) .card__media--plain { --tone: 6%; }
.card__media--plain::before {
  content: ""; position: absolute; inset: 0.7rem; border: 1px solid rgba(255, 255, 255, 0.35);
}
.card__mono {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 5.5rem; line-height: 1; color: rgba(255, 255, 255, 0.88);
}
@media (prefers-color-scheme: dark) {
  .card__media--plain { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 11px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 11px), linear-gradient(135deg, color-mix(in srgb, var(--sec) 22%, #0e0c0a) 0%, color-mix(in srgb, var(--sec) 40%, #1a1714) 100%); }
  .card__media--plain::before { border-color: color-mix(in srgb, var(--sec) 50%, transparent); }
  .card__mono { color: var(--sec); }
}
/* Comparison cards: the two subjects set against each other */
.card__versus {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0 1.25rem; text-align: center; color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-display); font-size: 1.55rem; line-height: 1.1;
}
.card__versus em { font-family: var(--font-ui); font-style: normal; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.75; padding: 0.3rem 0; }
.card--feature .card__versus { font-size: 2.6rem; }
.card--compact .card__versus { font-size: 1.25rem; }
/* Identify cards: the initial struck like a hallmark punch */
.card__mono--mark {
  font-style: normal; font-weight: 600; font-size: 3.4rem; width: 5.4rem; height: 6rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.8); border-radius: 0.6rem 0.6rem 2.7rem 2.7rem;
}
.card--compact .card__mono--mark { font-size: 2.6rem; width: 4.2rem; height: 4.8rem; }
.card--feature .card__mono--mark { font-size: 5rem; width: 8rem; height: 9rem; }
@media (prefers-color-scheme: dark) {
  .card__versus { color: var(--sec); }
  .card__mono--mark { border-color: var(--sec); }
}
.card__title { font-size: 1.3rem; line-height: 1.2; margin: 0 0 0.45rem; transition: color 0.15s ease; }
.card__link:hover .card__title { color: var(--sec); }
.card__dek {
  font-size: 0.98rem; line-height: 1.55; color: var(--ink-soft); margin: 0 0 0.6rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { font-family: var(--font-ui); font-size: 0.72rem; color: var(--muted); margin: 0; letter-spacing: 0.03em; }

.card--compact .card__title { font-size: 1.08rem; }
.card--compact .card__mono { font-size: 4rem; }

.card--feature .card__link { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.card--feature .card__media { aspect-ratio: 5 / 4; margin: 0; }
.card--feature .card__title { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; margin-bottom: 0.8rem; }
.card--feature .card__dek { font-size: 1.12rem; -webkit-line-clamp: 6; }
.card--feature .card__mono { font-size: 9rem; }

/* ---------- Homepage ---------- */
.cover {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(15rem, 1fr); gap: 2.5rem;
  padding-top: 2.5rem; padding-bottom: 3rem;
}
.cover__lead .card--feature .card__link { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.cover__issue { border-left: 1px solid var(--rule); padding-left: 2rem; }
.issue-list { list-style: none; counter-reset: issue; margin: 0; padding: 0; }
.issue-list li { counter-increment: issue; border-bottom: 1px solid var(--rule); }
.issue-list li:last-child { border-bottom: none; }
.issue-list a { display: grid; grid-template-columns: 2rem 1fr; padding: 0.85rem 0; text-decoration: none; color: inherit; }
.issue-list a::before {
  content: counter(issue); grid-row: span 2; font-family: var(--font-display); font-style: italic;
  font-size: 1.6rem; line-height: 1; color: var(--gold);
}
.issue-list .kicker { margin-bottom: 0.2rem; }
.issue-list__title { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.25; }
.issue-list a:hover .issue-list__title { color: var(--garnet); }

.home-block { padding-top: 1rem; padding-bottom: 3rem; }
.rail-head { display: flex; align-items: baseline; gap: 1.5rem; }
.rail-head .rule-heading { flex: 1; }
.rail-head__more { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; white-space: nowrap; text-decoration: none; }

.band { background: var(--band-bg); color: var(--band-ink); margin: 1rem 0 4rem; padding: 3.5rem 0; }
.band__inner { display: grid; grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.6fr); gap: 2.5rem; align-items: start; }
.band .kicker { color: var(--gold-soft); }
.band__title { color: var(--band-ink); font-size: 2.1rem; margin: 0 0 1rem; }
.band__intro p { color: var(--band-muted); font-size: 1.02rem; }
.band__more { color: var(--gold-soft); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.band__more:hover { color: #fff; }
.band .card__title { color: var(--band-ink); }
.band .card__meta { color: var(--band-muted); }
.band .card__link:hover .card__title { color: var(--gold-soft); }
.band .kicker { color: var(--gold-soft); }

.about-strip { display: grid; grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); gap: 3rem; }
.about-strip__lede { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.45; color: var(--ink); }
.about-strip__sections ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; font-family: var(--font-ui); font-size: 0.9rem; }
.about-strip__sections li { break-inside: avoid; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 0.5rem; }
.about-strip__sections a { text-decoration: none; color: var(--ink); font-weight: 600; }
.about-strip__sections a:hover { color: var(--gold); }
.about-strip__sections span { color: var(--muted); }

/* ---------- Article (story) ---------- */
.story-header { max-width: 52rem; text-align: center; padding-top: 2rem; padding-bottom: 2rem; }
.story-header .breadcrumb { justify-content: center; }
.story-title { font-size: clamp(2.3rem, 5.2vw, 3.8rem); line-height: 1.06; margin: 0.2rem 0 1rem; }
.story-dek {
  font-family: var(--font-body); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.5; color: var(--ink-soft); max-width: 44rem; margin: 0 auto 1.25rem;
}
.byline {
  font-family: var(--font-ui); font-size: 0.78rem; letter-spacing: 0.03em; color: var(--muted);
  margin: 0; padding-top: 1rem; border-top: 1px solid var(--rule); display: inline-block;
}
.byline a { color: var(--ink); font-weight: 600; text-decoration: none; }
.byline a:hover { color: var(--gold); }
.byline span { margin: 0 0.4rem; }

.breadcrumb { font-family: var(--font-ui); font-size: 0.75rem; color: var(--muted); margin: 0 0 1.25rem; display: flex; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: inherit; padding: 0; margin: 0; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin: 0 0.45rem; color: var(--rule); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current] { display: none; }
.breadcrumb li:nth-last-child(2)::after { content: none; }

.story-layout { display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: center; gap: 3.5rem; padding-bottom: 2rem; }
.story--aside .story-layout { grid-template-columns: minmax(0, var(--measure)) 17rem; }
.story-aside { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow: auto; font-family: var(--font-ui); }
.story-main { grid-column: 1; grid-row: 1; min-width: 0; }

/* Prose */
.prose { font-size: 1.15rem; }
.prose > p:first-of-type { font-size: 1.32rem; line-height: 1.6; color: var(--ink); }
.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--font-display); font-weight: 600; color: var(--sec);
  font-size: 4.6em; line-height: 0.82; margin: 0.08em 0.1em 0 0; padding-right: 0.02em;
}
.prose h2 { padding-top: 1.1rem; border-top: 1px solid var(--rule); scroll-margin-top: 1.5rem; }
.prose h3 { scroll-margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--sec); }
.prose strong { font-weight: 600; }
.prose blockquote {
  margin: 2rem 0; padding: 0 0 0 1.4rem; border-left: 3px solid var(--sec);
  font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.45;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-family: var(--font-ui); font-size: 0.88rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 2px solid var(--rule-strong); }

/* Contents (details element; opened on wide screens by toc.js) */
.toc { border-top: 3px double var(--rule-strong); padding-top: 0.75rem; margin: 0 0 2rem; font-size: 0.85rem; }
.toc__label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between;
}
.toc__label::-webkit-details-marker { display: none; }
.toc__label::after { content: "+"; font-size: 1rem; line-height: 1; color: var(--muted); }
.toc[open] .toc__label::after { content: "\2013"; }
.toc ol { list-style: none; margin: 0.75rem 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: grid; grid-template-columns: 1.6rem 1fr; padding: 0.38rem 0; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: 0.68rem; padding-top: 0.15rem; color: var(--gold); }
.toc a:hover { color: var(--ink); }
.toc a.toc__link--active { color: var(--ink); font-weight: 600; }

/* Quick facts */
.object-facts { border-top: 3px solid var(--sec); background: var(--surface); padding: 1rem 1.1rem 1.1rem; margin: 0 0 2rem; font-size: 0.82rem; box-shadow: 0 1px 0 var(--rule); }
.object-facts h2 {
  margin: 0 0 0.75rem; padding: 0; border: none; font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink); display: flex; align-items: center; gap: 0.4rem;
}
.object-facts h2 svg { color: var(--sec); }
.object-facts dl { margin: 0; }
.object-facts dt { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.6rem; }
.object-facts dt:first-child { margin-top: 0; }
.object-facts dd { margin: 0.1rem 0 0; text-transform: capitalize; color: var(--ink); line-height: 1.4; }

/* Diagrams */
.diagram { margin: 2rem 0; border: 1px solid var(--rule); background: var(--surface); max-width: 32rem; }
.diagram img { display: block; width: 100%; height: auto; }
.diagram--wide { max-width: 100%; }
.diagram figcaption { font-family: var(--font-ui); font-size: 0.78rem; color: var(--muted); padding: 0.6rem 0.9rem; border-top: 1px solid var(--rule); }
.story-aside .diagram { margin: 0 0 2rem; max-width: 100%; }

/* Museum photographs */
.museum-image { margin: 2.25rem 0; }
.prose > .museum-image:first-of-type { margin-top: 1.75rem; }
.museum-image img { display: block; width: 100%; max-height: 40rem; object-fit: contain; background: #12100d; }
.museum-image figcaption {
  font-family: var(--font-ui); font-size: 0.8rem; line-height: 1.5; color: var(--ink-soft);
  padding: 0.7rem 0 0; border-top: none;
}
.museum-image__credit { display: block; margin-top: 0.2rem; font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; }
.museum-image__credit a { color: var(--muted); }

/* Notes / callouts - set as sidebar boxes */
.note {
  display: flex; align-items: flex-start; gap: 0.75rem; font-family: var(--font-ui); font-size: 0.9rem; line-height: 1.6;
  border-top: 2px solid var(--note-color, var(--gold)); background: var(--paper-deep);
  padding: 1rem 1.15rem 1.05rem; margin: 2rem 0;
}
.note__icon { flex-shrink: 0; margin-top: 0.2rem; color: var(--note-color, var(--gold)); }
.note__body { flex: 1; min-width: 0; }
.note__body p { margin: 0; }
.note__body p + p { margin-top: 0.5rem; }
.note__label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem; margin-bottom: 0.35rem !important; color: var(--ink); }
.note--tip { --note-color: var(--note-tip); }
.note--warning { --note-color: var(--note-warning); }
.note--historical { --note-color: var(--note-historical); }
.note--source { --note-color: var(--rule-strong); background: transparent; border-top-width: 1px; padding-left: 0; padding-right: 0; font-size: 0.82rem; margin-top: 3rem; }
.note--source ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.note--source li { margin-bottom: 0.3rem; color: var(--ink-soft); }
.note--source .note__icon { color: var(--muted); }

/* Comparison tables */
.comparison-table-wrap { overflow-x: auto; margin: 1.75rem 0; }
.comparison-table { width: 100%; min-width: 28rem; border-collapse: collapse; font-family: var(--font-ui); font-size: 0.88rem; line-height: 1.45; }
.comparison-table th, .comparison-table td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.comparison-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 2px solid var(--rule-strong); }
.comparison-table tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Era timeline */
.era-timeline { display: flex; overflow-x: auto; margin: 0 0 2.5rem; padding: 1rem 0 1.1rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--font-ui); }
.era-timeline__item { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex: 1 0 6.5rem; min-width: 6.5rem; padding: 0 0.4rem; text-decoration: none; color: var(--muted); position: relative; text-align: center; }
.era-timeline__item::before, .era-timeline__item::after { content: ""; position: absolute; top: 0.33rem; height: 1px; background: var(--rule); }
.era-timeline__item::before { left: 0; right: 50%; }
.era-timeline__item::after { left: 50%; right: 0; }
.era-timeline__item:first-child::before, .era-timeline__item:last-child::after { background: transparent; }
.era-timeline__dot { width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--muted); z-index: 1; }
.era-timeline__label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.era-timeline__dates { font-size: 0.68rem; }
.era-timeline__item:hover { color: var(--ink); }
.era-timeline__item--current { color: var(--ink); }
.era-timeline__item--current .era-timeline__dot { background: var(--sec); border-color: var(--sec); }

/* Share */
.share-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-family: var(--font-ui); }
.share-buttons__label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-right: 0.4rem; }
.share-buttons__link { display: flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft); text-decoration: none; transition: border-color 0.15s ease, color 0.15s ease; }
.share-buttons__link:hover { color: var(--gold); border-color: var(--gold); }

/* Read next */
.read-next { background: var(--paper-deep); padding: 3rem 0 3.5rem; margin-top: 2rem; }
.more-links { margin-top: 2.5rem; }
.more-links ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 1.75rem; }
.more-links li { border-top: 1px solid var(--rule); }
.more-links a { display: block; padding: 0.6rem 0; font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.more-links a:hover { color: var(--gold); }
.related { display: none; }

/* ---------- Section fronts ---------- */
.section-header { text-align: center; padding-top: 2.25rem; padding-bottom: 2.5rem; max-width: 52rem; }
.section-header .breadcrumb { justify-content: center; }
.section-title { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.04; margin: 0.2rem 0 1rem; }
.section-dek { font-style: italic; font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); }
.section-dek p:last-child { margin-bottom: 0; }
.section-count { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 1.25rem 0 0; }
.section-lead { padding: 2rem 0 3rem; border-top: 3px double var(--rule-strong); margin-bottom: 1rem; }
.section-front .card-grid { padding-bottom: 4rem; }

.letter-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; margin-top: 1.5rem; font-family: var(--font-ui); }
.letter-jump a { min-width: 2rem; padding: 0.3rem 0.5rem; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--rule); }
.letter-jump a:hover { border-color: var(--gold); color: var(--gold); }
.letter-jump--words a { padding: 0.35rem 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }

.group-section { padding-top: 1rem; padding-bottom: 3rem; scroll-margin-top: 1rem; }

/* Glossary */
.glossary { max-width: 56rem; padding-bottom: 4rem; }
.glossary-group { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.5rem; border-top: 3px double var(--rule-strong); padding: 1.25rem 0 1rem; scroll-margin-top: 1rem; }
.glossary-group__letter { margin: 0; font-size: 3rem; font-style: italic; font-weight: 400; color: var(--gold); line-height: 1; border: none; padding: 0; }
.glossary-list { margin: 0; padding: 0; }
.glossary-list__entry { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.glossary-list__entry:last-child { border-bottom: none; }
.glossary-list dt { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 0; scroll-margin-top: 1rem; }
.glossary-list dt a { color: var(--ink); text-decoration: none; }
.glossary-list dt a:hover { color: var(--garnet); }
.glossary-list dd { margin: 0.2rem 0 0; font-size: 1.02rem; color: var(--ink-soft); line-height: 1.6; }

/* Search */
.search-page { padding-top: 2.5rem; padding-bottom: 4rem; }
.search-page h1 { text-align: center; margin-bottom: 1.5rem; }
.search-form input {
  width: 100%; font-family: var(--font-display); font-size: 1.5rem; padding: 0.6rem 0.2rem;
  border: none; border-bottom: 2px solid var(--rule-strong); background: transparent; color: var(--ink);
}
.search-form input:focus { outline: none; border-bottom-color: var(--gold); }
.search-status { font-family: var(--font-ui); font-size: 0.8rem; color: var(--muted); margin: 1rem 0; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results__item { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.search-results__item a { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.search-results__item a:hover { color: var(--garnet); }
.search-results__section { display: inline-block; margin-left: 0.6rem; font-family: var(--font-ui); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); vertical-align: middle; }
.search-results__section--gold { color: var(--gold); }
.search-results__section--accent { color: var(--garnet); }
.search-results__item p { margin: 0.3rem 0 0; font-size: 1rem; color: var(--ink-soft); }

.not-found-icon { color: var(--gold-soft); margin: 0 0 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--band-bg); color: var(--band-muted); font-family: var(--font-ui); font-size: 0.85rem; padding: 3.5rem 0 2rem; margin-top: 0; }
.read-next + .site-footer, main + .site-footer { margin-top: 0; }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer__name { font-family: var(--font-display); font-style: italic; font-size: 1.9rem; color: var(--band-ink); text-decoration: none; display: inline-block; margin-bottom: 0.75rem; }
.site-footer__brand p { max-width: 28rem; line-height: 1.6; }
.site-footer__heading { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--band-ink); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1rem; }
.site-footer__nav:last-child ul { columns: 1; }
.site-footer li { padding: 0.2rem 0; }
.site-footer a { color: var(--band-muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.site-footer__legal { padding-top: 1.5rem; font-size: 0.75rem; }
.site-footer__legal p { margin: 0; }

main { display: block; min-height: 50vh; }
main > .container { padding-top: 2rem; padding-bottom: 3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 64rem) {
  .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story--aside .story-layout { grid-template-columns: minmax(0, var(--measure)); gap: 0; }
  .story-aside { grid-column: 1; grid-row: 1; position: static; max-height: none; overflow: visible; }
  .story-main { grid-row: 2; }
  .story-aside .diagram { max-width: 22rem; }
  .cover { grid-template-columns: 1fr; }
  .cover__issue { border-left: none; padding-left: 0; }
  .band__inner { grid-template-columns: 1fr; }
  .about-strip { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 48rem) {
  .card--feature .card__link, .cover__lead .card--feature .card__link { grid-template-columns: 1fr; gap: 1rem; }
  .card--feature .card__media { aspect-ratio: 4 / 3; }
  .masthead__tagline { display: none; }
  .masthead__bar-inner { justify-content: flex-end; }
  .masthead__nav ul { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 1.25rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .masthead__nav ul::-webkit-scrollbar { display: none; }
  .masthead__nav { position: relative; }
  .masthead__nav::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2.5rem; pointer-events: none; background: linear-gradient(to right, transparent, var(--paper)); }
  .site-footer__inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .card-grid--3 { grid-template-columns: 1fr; }
  .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .card--compact .card__title { font-size: 1rem; }
  .glossary-group { grid-template-columns: 1fr; gap: 0.25rem; }
  .prose { font-size: 1.08rem; }
  .prose > p:first-of-type { font-size: 1.18rem; }
  .rail-head { flex-direction: column; gap: 0; }
  .rail-head .rule-heading { width: 100%; margin-bottom: 0.4rem; }
  .rail-head__more { margin-bottom: 1.25rem; }
}
@media (max-width: 26rem) {
  .card-grid--4 { grid-template-columns: 1fr; }
}
