/* PDAI landing pages — shared styles for landing pages and narratives.
   Visual system of Kepleriana 2026 and Kármán 2026: Oxford blue, gold, sandstone. */

:root {
  --oxford: #002147;
  --oxford-deep: #00152e;
  --oxford-soft: #2c4a6e;
  --ink: #1b2733;
  --muted: #5c5348;
  --gold: #c4a15a;
  --gold-deep: #8c6d2a;
  --gold-pale: #efe3c4;
  --sand: #f6f1e7;
  --sand-deep: #ece3d2;
  --paper: #fffdf8;
  --line: #e3d9c6;
  --line-strong: #cdbfa4;
  --serif: "Source Serif 4", "Palatino Linotype", Palatino, serif;
  --display: "Fraunces", "Source Serif 4", Palatino, serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --p-studium: #8c6d2a;
  --p-aachen: #002147;
  --p-pasadena: #3f7686;
  --p-beratung: #9a4f3c;
  --p-agard: #5f6b3a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.no-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 50% -180px, rgba(196, 161, 90, 0.16), transparent 60%),
    var(--sand);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
}
a { color: var(--oxford); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-deep); }
img { max-width: 100%; }
.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--oxford); color: #fff; padding: 0.4rem 0.7rem;
}
.skip:focus { top: 0.6rem; z-index: 50; }

/* ---------------------------------------------------------------- mast */
.mast {
  background: var(--oxford-deep);
  color: #f4efe4;
  border-bottom: 3px solid var(--gold);
  position: relative;
  z-index: 20;
}
.mast-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.brand {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-weight: 650;
}
.brand.brand-lg {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  letter-spacing: -0.01em;
  font-weight: 560;
  line-height: 1.1;
}
.brand a { color: #f4efe4; text-decoration: none; }
.brand span { color: var(--gold); }
.mast nav { font-family: var(--sans); font-size: 0.92rem; }
.mast nav a { color: #f4efe4; text-decoration: none; margin-left: 1.15rem; }
.mast nav a:hover, .mast nav a[aria-current="page"] { color: var(--gold); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 3.4rem 0 1.6rem; }
.kicker {
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  font-weight: 650;
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--oxford);
}
h1 em { font-style: italic; font-weight: 460; color: var(--gold-deep); }
.lead {
  max-width: 44rem;
  margin: 1.35rem 0 0;
  font-size: 1.22rem;
  line-height: 1.45;
}
.byline { margin: 1.1rem 0 0; max-width: 44rem; color: var(--muted); font-size: 0.98rem; }
.credit {
  margin: 0.9rem 0 0;
  max-width: 44rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
  border-left: 3px solid var(--gold);
  padding: 0.15rem 0 0.15rem 0.7rem;
}

/* ---------------------------------------------------------------- key figures */
.figures {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), 1fr);
  gap: 0;
  margin: 1.8rem 0 1.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.figures div { padding: 0.8rem 0.7rem 0.75rem; border-right: 1px solid var(--line); }
.figures div:last-child { border-right: 0; }
.figures .v {
  display: block;
  font-family: var(--display);
  font-size: 1.85rem;
  color: var(--oxford);
  line-height: 1.05;
  font-variant-numeric: lining-nums tabular-nums;
}
.figures .k { display: block; font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

/* ---------------------------------------------------------------- portal cards */
.portals {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 1rem;
  padding-bottom: 1rem;
}
.portal {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--oxford);
  border-radius: 2px;
  padding: 1.3rem 1.35rem 1.2rem;
  box-shadow: 0 10px 28px rgba(0, 21, 46, 0.05);
  display: flex;
  flex-direction: column;
}
.portal.lead-card { grid-row: span 3; }
.portal.wide { grid-column: span 2; }
.portal.method {
  grid-column: 1 / -1;
  border-top-color: var(--gold);
  background: linear-gradient(180deg, rgba(196, 161, 90, 0.1), transparent 4.5rem), var(--paper);
}
.portal.method h2 span { color: var(--gold-deep); font-style: italic; font-weight: 460; }
.method-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 2rem; }
.method-cols p { margin: 0 0 0.75rem; }
.portal .mark {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  font-weight: 650;
  margin: 0 0 0.45rem;
}
.portal h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.7rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--oxford);
}
.portal p { margin: 0 0 0.85rem; }
.portal .spark { margin: 0.1rem 0 0.9rem; }
.contents { list-style: none; margin: 0.2rem 0 1.1rem; padding: 0; border-top: 1px solid var(--line); }
.contents li { border-bottom: 1px solid var(--line); }
.contents a {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.55rem;
  text-decoration: none;
  padding: 0.4rem 0;
  color: var(--ink);
  font-size: 0.98rem;
}
.contents a:hover { color: var(--oxford); }
.contents .num { font-family: var(--sans); color: var(--gold-deep); font-size: 0.8rem; padding-top: 0.2rem; }
.go {
  margin-top: auto;
  align-self: flex-start;
  display: inline-block;
  background: var(--oxford);
  color: #f7f1e4;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.6rem 0.95rem;
  border-radius: 2px;
}
.go:hover { background: #01315f; color: #fff; }
.go.quiet { background: transparent; color: var(--oxford); border: 1px solid var(--oxford); margin-left: 0.45rem; }
.go.quiet:hover { background: var(--oxford); color: #fff; }
.go-row { margin-top: auto; }

section.band { padding: 1.8rem 0 0.6rem; }
section.band > h2, .band-title {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.7rem;
  color: var(--oxford);
  letter-spacing: -0.02em;
}
.section-lead { margin: -0.35rem 0 1rem; color: var(--muted); max-width: 46rem; }

/* facsimile strip */
.facsimiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
}
.facsimile {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.45rem 0.45rem 0.6rem;
}
.facsimile:hover { border-color: var(--oxford); }
.facsimile img { display: block; width: 100%; aspect-ratio: 5 / 7; object-fit: cover; object-position: top; background: #eee; }
.facsimile .d { display: block; font-family: var(--sans); font-size: 0.76rem; color: var(--gold-deep); margin-top: 0.45rem; font-weight: 650; }
.facsimile .c { display: block; font-family: var(--sans); font-size: 0.8rem; line-height: 1.3; margin-top: 0.15rem; }

/* sources */
.sources { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; padding-bottom: 2.5rem; }
.source-item { background: var(--paper); border: 1px solid var(--line); padding: 1rem 1.15rem; }
.source-item h3 { margin: 0 0 0.3rem; font-family: var(--display); font-weight: 560; font-size: 1.25rem; color: var(--oxford); }
.source-item p { margin: 0 0 0.35rem; font-size: 0.96rem; }
.source-item .meta { font-family: var(--sans); font-size: 0.84rem; color: var(--muted); }
.admission { margin: 0; padding-left: 1.2rem; font-size: 0.96rem; }
.admission li { margin-bottom: 0.3rem; }

footer {
  background: var(--oxford-deep);
  color: #d9d0c2;
  padding: 1.6rem 0 1.8rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  margin-top: 2rem;
}
footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
footer a { color: var(--gold); }
footer p { margin: 0.15rem 0; }

/* ---------------------------------------------------------------- narrative */
.story-hero { padding: 3rem 0 1.2rem; }
.story-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
.home-back { margin: 1.15rem 0 0; }
.home-back a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #f4ead0;
  background: var(--oxford, #002147);
  text-decoration: none;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
}
.home-back a:hover { color: var(--gold, #c8a22a); }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 1.4rem 0 0.5rem;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.toc a {
  display: inline-block;
  text-decoration: none;
  color: var(--oxford);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}
.toc a:hover { border-color: var(--oxford); }
.toc .n { color: var(--gold-deep); margin-right: 0.35rem; font-weight: 650; }

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2.4rem;
  padding: 3.2rem 0 1rem;
  border-top: 1px solid var(--line);
}
.chapter.no-figure { grid-template-columns: minmax(0, 46rem); }
.chapter-text { min-width: 0; }
.chapter-num { font-family: var(--sans); font-size: 0.8rem; color: var(--gold-deep); font-weight: 650; margin: 0 0 0.35rem; letter-spacing: 0.04em; }
.chapter h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: 2.05rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--oxford);
}
.chapter h3 { font-family: var(--display); font-weight: 560; font-size: 1.25rem; color: var(--oxford); margin: 1.4rem 0 0.5rem; }
.step {
  margin: 0 0 2.4rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid transparent;
  transition: border-color 200ms ease, opacity 200ms ease;
  opacity: 0.55;
}
.step:first-of-type { opacity: 1; }
.step.active { border-left-color: var(--gold); opacity: 1; }
.step p { margin: 0 0 0.85rem; }
.step:last-child { margin-bottom: 30vh; }
.chapter.no-figure .step, .chapter.no-figure .step:last-child { opacity: 1; margin-bottom: 1.4rem; }
.chapter-figure { min-width: 0; }
.chapter-figure .sticky {
  position: sticky;
  top: 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem 1rem 0.8rem;
  box-shadow: 0 10px 28px rgba(0, 21, 46, 0.05);
}
.fig { width: 100%; min-height: 320px; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig-title { font-family: var(--sans); font-weight: 650; font-size: 0.92rem; color: var(--oxford); margin: 0 0 0.4rem; }
.fig-note { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin: 0.55rem 0 0; line-height: 1.35; }
.fig-legend { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin: 0.4rem 0 0; }
.fig-legend i { display: inline-block; width: 0.75rem; height: 0.75rem; margin-right: 0.3rem; vertical-align: -0.1rem; border-radius: 1px; }

.locus { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }
.locus a { color: var(--muted); }
.locus a:hover { color: var(--gold-deep); }
.aside {
  font-family: var(--sans);
  font-size: 0.9rem;
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0 1rem;
}
.aside p { margin: 0 0 0.4rem; }
.aside p:last-child { margin: 0; }
.quote-card { display: grid; grid-template-columns: 7rem 1fr; gap: 0.9rem; align-items: start; margin: 0.6rem 0 1.1rem; }
.quote-card img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #fff; }
.quote-card figcaption { font-family: var(--sans); font-size: 0.84rem; color: var(--muted); }
.quote-card figcaption a { font-weight: 650; }

/* manuscript cards (full width band after a chapter) */
.ms-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; padding: 0.6rem 0 2rem; }
.ms-card { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.ms-card:hover { border-color: var(--oxford); }
.ms-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.ms-card .b { padding: 0.65rem 0.75rem 0.75rem; }
.ms-card .y { font-family: var(--sans); font-size: 0.78rem; color: var(--gold-deep); font-weight: 650; }
.ms-card h4 { font-family: var(--display); font-weight: 560; font-size: 1.05rem; margin: 0.15rem 0 0.3rem; color: var(--oxford); line-height: 1.2; }
.ms-card p { font-family: var(--sans); font-size: 0.82rem; margin: 0; color: var(--muted); line-height: 1.35; }

/* tooltip */
.tip {
  position: fixed;
  pointer-events: none;
  z-index: 60;
  background: var(--oxford-deep);
  color: #f4efe4;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.45rem 0.6rem;
  border-radius: 2px;
  max-width: 22rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 120ms ease;
}
.tip b { color: var(--gold); font-weight: 650; }

/* chart text */
.axis text { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.lbl { font-family: var(--sans); font-size: 11px; }
.lbl:not([fill]) { fill: var(--muted); }
.axis path, .axis line { stroke: #cdbfa4; }
.lbl-strong { font-family: var(--sans); font-size: 11.5px; font-weight: 650; }
.lbl-strong:not([fill]) { fill: var(--oxford); }
.lbl-serif { font-family: var(--serif); font-size: 12px; }
.lbl-serif:not([fill]) { fill: var(--ink); }

/* ---------------------------------------------------------------- periods page */
.period-band {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(246, 241, 231, 0.96);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0 0.5rem;
}
.period-band .wrap { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.period-band .lbl-head { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); font-weight: 650; }
.period-band svg { display: block; width: 100%; height: 46px; }
.period-band .seg { cursor: pointer; }
.period-band .seg text { font-family: var(--sans); font-size: 11.5px; fill: #fff; font-weight: 650; pointer-events: none; }
.period-band .seg .yr { font-weight: 400; fill: rgba(255, 255, 255, 0.85); }
.period-band .seg.dim rect { opacity: 0.3; }
.prov {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--gold-deep);
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 0 0.3rem;
  margin-left: 0.4rem;
  vertical-align: 0.1rem;
}
.period-section { padding: 2.8rem 0 1rem; border-top: 1px solid var(--line); scroll-margin-top: 64px; transition: opacity 200ms ease; }
.period-section .head { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.period-section h2 { font-family: var(--display); font-weight: 560; font-size: 2.1rem; color: var(--oxford); margin: 0; letter-spacing: -0.02em; }
.period-section .years { font-family: var(--sans); font-size: 1rem; color: var(--gold-deep); font-weight: 650; }
.period-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 2.2rem; margin-top: 1rem; }
.period-text p { margin: 0 0 0.85rem; }
.period-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; align-content: start; }
.panel { background: var(--paper); border: 1px solid var(--line); padding: 0.7rem 0.8rem 0.6rem; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h4 { font-family: var(--sans); font-size: 0.8rem; font-weight: 650; color: var(--oxford); margin: 0 0 0.35rem; }
.panel .note { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); margin: 0.35rem 0 0; }
.evidence { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 0.82rem; }
.evidence li { border-top: 1px solid var(--line); padding: 0.35rem 0; }
.evidence li:first-child { border-top: 0; }
.evidence .d { color: var(--gold-deep); font-weight: 650; margin-right: 0.35rem; }
.evidence .t { color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.check-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.86rem; margin: 0.6rem 0 0; }
.check-table th, .check-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.check-table th { color: var(--muted); font-weight: 650; }
.check-table .ok { color: var(--p-agard); font-weight: 650; }
.check-table .off { color: var(--p-beratung); font-weight: 650; }
.full-figure { background: var(--paper); border: 1px solid var(--line); padding: 1rem 1rem 0.8rem; margin: 0.8rem 0 1.6rem; box-shadow: 0 10px 28px rgba(0, 21, 46, 0.05); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .portals { grid-template-columns: 1fr 1fr; }
  .portal.lead-card { grid-row: auto; grid-column: 1 / -1; }
  .portal.wide { grid-column: 1 / -1; }
  .figures { grid-template-columns: repeat(3, 1fr); }
  .figures div:nth-child(3) { border-right: 0; }
  .facsimiles { grid-template-columns: repeat(3, 1fr); }
  .ms-cards { grid-template-columns: repeat(2, 1fr); }
  .chapter, .period-grid { grid-template-columns: 1fr; }
  .chapter-figure { order: -1; }
  .chapter-figure .sticky { position: relative; top: 0; }
  .step { opacity: 1; }
  .step:last-child { margin-bottom: 1rem; }
}
@media (max-width: 680px) {
  .mast-inner { flex-direction: column; align-items: flex-start; }
  .mast nav a { margin-left: 0; margin-right: 0.9rem; }
  .portals, .method-cols, .sources, .period-panels { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figures div:nth-child(3) { border-right: 1px solid var(--line); }
  .figures div:nth-child(2n) { border-right: 0; }
  .facsimiles { grid-template-columns: repeat(2, 1fr); }
  .ms-cards { grid-template-columns: 1fr; }
  .go.quiet { margin-left: 0; margin-top: 0.45rem; }
  .hero { padding-top: 2.2rem; }
  .period-band .wrap { grid-template-columns: 1fr; gap: 0.2rem; }
  .quote-card { grid-template-columns: 5rem 1fr; }
  .chapter-figure .fig, .full-figure .fig { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chapter-figure .fig svg, .full-figure .fig svg { min-width: 600px; }
  .chapter-figure .sticky, .full-figure { padding: 0.7rem 0.6rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step { transition: none; }
}

/* ---------------------------------------------------------------- additions for the PDAI landing family */
.figures .k small { display: block; color: var(--gold-deep); font-size: 0.72rem; margin-top: 0.1rem; }
.status {
  display: inline-block; font-family: var(--sans); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.03em;
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 0.35rem; color: var(--muted); vertical-align: 0.08rem;
}
.status.ok { border-color: #5f6b3a; color: #5f6b3a; }
.status.part { border-color: var(--gold-deep); color: var(--gold-deep); }
.status.gap { border-color: #9a4f3c; color: #9a4f3c; }
.doc-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.88rem; margin: 0.4rem 0 1rem; }
.doc-table th, .doc-table td { text-align: left; padding: 0.4rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table th { color: var(--muted); font-weight: 650; font-size: 0.8rem; }
.doc-table td.n, .doc-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.doc-table a { font-weight: 650; }
.note-box { font-family: var(--sans); font-size: 0.9rem; background: var(--gold-pale); border-left: 3px solid var(--gold); padding: 0.6rem 0.8rem; margin: 0.6rem 0 1rem; }
.note-box p { margin: 0 0 0.4rem; } .note-box p:last-child { margin: 0; }
.specimen { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 0.7rem 0.95rem; margin: 0.6rem 0 1.1rem; font-size: 0.98rem; }
.specimen .src { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin: 0.4rem 0 0; }
.specimen .tl { font-family: "Source Serif 4", serif; font-style: italic; margin: 0 0 0.3rem; }
.fig-img { margin: 0.6rem 0 1.1rem; background: var(--paper); border: 1px solid var(--line); padding: 0.6rem; }
.fig-img img { display: block; width: 100%; height: auto; }
.fig-img figcaption { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.9rem; padding: 0.4rem 0 1.2rem; }
.shots .fig-img { margin: 0; }
.mast nav a.sib { opacity: 0.85; }
.sibs { font-family: var(--sans); font-size: 0.86rem; margin-top: 0.7rem !important; }
.sibs a { margin-right: 0.85rem; }
.sib-row { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }

/* arXiv family */
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 1.2rem; font-family: var(--sans); }
.chip { border: 1px solid var(--line-strong); background: var(--paper); color: var(--oxford); font: inherit; font-size: 0.86rem; padding: 0.3rem 0.7rem; border-radius: 2px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--oxford); color: #f7f1e4; border-color: var(--oxford); }
.chip .c { color: var(--gold-deep); margin-left: 0.3rem; }
.chip[aria-pressed="true"] .c { color: var(--gold); }
.papers { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; padding-bottom: 2rem; }
.paper { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--oxford); display: grid; grid-template-columns: 6.4rem 1fr; gap: 0.9rem; padding: 0.9rem 1rem 0.9rem 0.9rem; box-shadow: 0 10px 28px rgba(0, 21, 46, 0.05); }
.paper[hidden] { display: none; }
.paper .cover { display: block; }
.paper .cover img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #fff; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: top; }
.paper .cover .ph { aspect-ratio: 1 / 1.414; border: 1px dashed var(--line-strong); font-family: var(--sans); font-size: 0.7rem; color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; padding: 0.3rem; }
.paper .theme { font-family: var(--sans); font-size: 0.74rem; color: var(--gold-deep); font-weight: 650; letter-spacing: 0.04em; margin: 0 0 0.2rem; }
.paper h3 { margin: 0 0 0.25rem; font-family: var(--display); font-weight: 560; font-size: 1.12rem; line-height: 1.2; color: var(--oxford); }
.paper .sub { font-family: var(--sans); font-size: 0.84rem; color: var(--muted); margin: 0 0 0.4rem; line-height: 1.3; }
.paper .abs { font-size: 0.9rem; line-height: 1.42; margin: 0 0 0.6rem; }
.paper .meta { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin: 0 0 0.5rem; }
.paper .links { font-family: var(--sans); font-size: 0.86rem; display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: auto; }
.paper .links a { font-weight: 650; }
.paper .body { display: flex; flex-direction: column; min-width: 0; }
.stage { font-family: var(--sans); font-size: 0.7rem; font-weight: 650; border: 1px solid var(--gold); color: var(--gold-deep); padding: 0 0.3rem; border-radius: 2px; margin-left: 0.4rem; vertical-align: 0.1rem; }
@media (max-width: 680px) { .paper { grid-template-columns: 4.6rem 1fr; } }

/* ── Specimen: one real catalogue entry beside its facsimile (generated by a collector) ── */
.specimen { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 1.4rem; align-items: start; margin: 0.6rem 0 1rem; }
.specimen .sp-img img { display: block; width: 100%; border: 1px solid var(--line-strong); background: #eee; }
.specimen .sp-cap { margin: 0 0 0.5rem; font-family: var(--sans); font-size: 0.82rem; color: var(--gold-deep); font-weight: 650; }
.specimen dl { margin: 0; background: var(--paper); border: 1px solid var(--line); padding: 0.4rem 1rem; }
.specimen .sp-row { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.8rem; padding: 0.42rem 0; border-bottom: 1px solid var(--line); }
.specimen .sp-row:last-child { border-bottom: 0; }
.specimen dt { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--oxford); font-weight: 650; padding-top: 0.2rem; }
.specimen dd { margin: 0; font-size: 0.96rem; line-height: 1.45; }
.specimen dd .sc { font-variant: small-caps; letter-spacing: 0.02em; }
.specimen .sp-note { margin: 0.6rem 0 0; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
@media (max-width: 760px) { .specimen { grid-template-columns: 1fr; } .specimen .sp-row { grid-template-columns: 1fr; gap: 0.1rem; } }

/* ---------------------------------------------------------------- reading guide: "Read first" */
.guide-hint {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem;
  margin: 1.6rem 0 0; padding: 0.9rem 1.2rem;
  background: var(--gold-pale); border: 1px solid var(--gold); border-left: 6px solid var(--gold-deep);
}
.guide-hint-text { margin: 0; font-size: 1.02rem; }
.guide-hint-actions { margin: 0; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.guide-sticker {
  display: inline-block; flex: none;
  font-family: var(--display); font-weight: 560; font-size: 0.95rem; line-height: 1.05; letter-spacing: 0.02em;
  color: var(--paper); background: var(--oxford); border: 2px solid var(--gold);
  padding: 0.45rem 0.7rem; text-align: center; transform: rotate(-6deg);
  box-shadow: 2px 3px 0 rgba(0, 33, 71, 0.22);
}
.guide-toggle {
  font: inherit; font-family: var(--sans); font-size: 0.86rem; color: var(--oxford);
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em;
}
.guide-toggle:hover { color: var(--gold-deep); }
.portal.guide-card { grid-column: 1 / -1; position: relative; border-color: var(--gold); border-top-color: var(--gold); }
.portal.guide-card .guide-sticker { position: absolute; top: -0.9rem; right: 1rem; }
.guide-restore { display: none; margin-left: 0.9rem; }
.guide-off .guide-hint, .guide-off .portal.guide-card .guide-sticker { display: none; }
.guide-off .guide-restore { display: inline; }
@media (max-width: 680px) {
  .guide-hint { grid-template-columns: 1fr; }
  .guide-sticker { justify-self: start; }
}
