/* =========================================================
   Listcapsreelroundp — Heritage Archive Design System
   Vanilla CSS · No external dependencies
   ========================================================= */

:root {
  --primary: #7A3E2F;
  --primary-deep: #5E2E22;
  --secondary: #8A7654;
  --accent: #C9A227;
  --bg: #E9DDC7;
  --surface: #F7F0E3;
  --text: #30251F;
  --muted: #766B5D;
  --line: rgba(48, 37, 31, 0.22);
  --line-strong: rgba(48, 37, 31, 0.45);
  --shadow-paper: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -22px rgba(48,37,31,.45), 0 4px 10px -6px rgba(48,37,31,.3);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --display: "Didot", "Bodoni 72", "Bodoni MT", "Iowan Old Style", Georgia, serif;
  --radius: 3px;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(255,255,255,.35), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(138,118,84,.18), transparent 60%),
    repeating-linear-gradient(93deg, rgba(48,37,31,.018) 0 2px, transparent 2px 7px);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.19 0 0 0 0 0.14 0 0 0 0 0.12 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(images/%23n)'/%3E%3C/svg%3E");
  animation: archivalDrift 90s linear infinite;
}
@keyframes archivalDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-220px, -220px, 0); } }

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; color: var(--text); margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--surface); padding: .6rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; position: relative; z-index: 1; }
.eyebrow {
  font-variant: small-caps; letter-spacing: .22em; text-transform: lowercase;
  color: var(--secondary); font-size: .95rem; margin-bottom: .6rem; display: inline-flex; align-items: center; gap: .7rem;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.lede { font-size: 1.2rem; color: #4a3c33; max-width: 62ch; }
.muted { color: var(--muted); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--accent); margin: 2.4rem 0; }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; max-width: 220px; background: linear-gradient(90deg, transparent, var(--secondary), transparent); }

/* ---------- Header (NOT sticky) ---------- */
.site-header { position: relative; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 #fff inset; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 5px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.topline { background: var(--text); color: #e8dcc5; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.topline .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; flex-wrap: wrap; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--text); }
.brand svg { width: 46px; height: 46px; flex: none; }
.brand-name { display: block; font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: .04em; line-height: 1.1; }
.brand-tag { display: block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.primary-nav ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-nav a {
  display: block; padding: .5rem .85rem; text-decoration: none; color: var(--text);
  font-variant: small-caps; letter-spacing: .12em; font-size: 1.02rem; border: 1px solid transparent; transition: border-color .3s, background .3s;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-color: var(--line-strong); background: rgba(201,162,39,.1); color: var(--primary); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); padding: .5rem .9rem; font-family: var(--serif); font-variant: small-caps; letter-spacing: .14em; color: var(--text); cursor: pointer; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .masthead { flex-wrap: wrap; }
  .primary-nav { width: 100%; display: none; }
  .primary-nav.open { display: block; animation: unfold .45s ease both; }
  .primary-nav ul { flex-direction: column; border-top: 1px solid var(--line); padding-top: .6rem; }
}

/* ---------- Page transitions ---------- */
main { position: relative; z-index: 1; transform-origin: left center; animation: pageIn .75s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pageIn { from { opacity: 0; transform: perspective(1600px) rotateY(-5deg) translateX(-14px); } to { opacity: 1; transform: none; } }
body.leaving main { animation: pageOut .38s ease-in forwards; }
@keyframes pageOut { to { opacity: 0; transform: perspective(1600px) rotateY(6deg) translateX(18px); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--serif); font-size: .98rem; font-variant: small-caps; letter-spacing: .12em;
  padding: .62rem 1.15rem; border: 1px solid var(--primary); background: var(--primary); color: var(--surface);
  text-decoration: none; cursor: pointer; border-radius: var(--radius); transition: background .3s, color .3s, transform .3s, box-shadow .3s;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(122,62,47,.35);
}
.btn:hover { background: var(--primary-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: none; }
.btn-ghost:hover { background: var(--primary); color: var(--surface); }
.btn-gold { background: var(--accent); border-color: #a8851c; color: var(--text); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(201,162,39,.5); }
.btn-gold:hover { background: #b38f1f; color: var(--text); }

/* ---------- Hero: Time-Layer Reveal ---------- */
.hero { padding: 3.2rem 0 4rem; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 3rem; align-items: center; }
.hero h1 span { display: block; color: var(--primary); font-style: italic; font-weight: 500; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.hero-meta strong { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--primary); line-height: 1; }
.hero-meta span { font-size: .85rem; color: var(--muted); letter-spacing: .06em; }

.time-stage {
  position: relative; aspect-ratio: 4 / 3.1; overflow: hidden; background: #efe3cc;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-paper), 0 0 0 8px var(--surface), 0 0 0 9px var(--line-strong);
}
.ts-photo-wrap { position: absolute; inset: 0; animation: slowZoom 34s 6s ease-in-out infinite alternate; }
.ts-photo { width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: sepia(1) contrast(.85) blur(3px); transform: scale(1.06); }
.time-stage.play .ts-photo { animation: tsPhoto 3.4s 2.7s cubic-bezier(.25,.6,.2,1) forwards; }
@keyframes tsPhoto { 55% { opacity: .9; filter: sepia(.75) contrast(.95) blur(.5px); } to { opacity: 1; filter: sepia(.08) contrast(1.02) blur(0); transform: scale(1); } }
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.09); } }
.ts-paper {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(48,37,31,.07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(48,37,31,.07) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(ellipse at center, #f6ecd8, #e4d4b6);
}
.time-stage.play .ts-paper { animation: paperFade 2.6s 3s ease forwards; }
@keyframes paperFade { to { opacity: 0; } }
.ts-drawing { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--text); }
.ts-drawing path, .ts-drawing line, .ts-drawing polyline, .ts-drawing rect { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.ts-drawing .dim { stroke-width: .8; stroke-dasharray: 1; }
.time-stage.play .ts-drawing path, .time-stage.play .ts-drawing line, .time-stage.play .ts-drawing polyline, .time-stage.play .ts-drawing rect { animation: draw 2.6s cubic-bezier(.4,.1,.2,1) forwards; animation-delay: calc(var(--d, 0) * 1s); }
.time-stage.play .ts-drawing { animation: drawingTone 2.4s 3.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drawingTone { to { color: #f3dc8b; opacity: .55; } }
.ts-label {
  position: absolute; background: rgba(247,240,227,.93); border: 1px solid var(--line-strong); padding: .3rem .6rem;
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); opacity: 0; transform: translateY(8px);
  box-shadow: 0 6px 14px -8px rgba(0,0,0,.5);
}
.ts-label::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1px solid var(--primary); left: -4px; top: calc(50% - 4px); }
.time-stage.play .ts-label { animation: labelIn .8s ease forwards; animation-delay: var(--ld); }
@keyframes labelIn { to { opacity: 1; transform: none; } }
.l1 { top: 8%; left: 6%; --ld: 1.4s; }
.l2 { top: 34%; right: 5%; --ld: 2.2s; }
.l3 { bottom: 26%; left: 5%; --ld: 3.4s; }
.l4 { bottom: 9%; right: 6%; --ld: 4.6s; }
.ts-dial {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); background: var(--text); color: var(--accent);
  font-family: var(--display); font-size: 1.05rem; letter-spacing: .2em; padding: .3rem 1rem; border: 1px solid var(--accent); white-space: nowrap;
}
.ts-replay { position: absolute; top: 3%; right: 3%; background: rgba(247,240,227,.9); border: 1px solid var(--line-strong); font-family: var(--serif); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .6rem; cursor: pointer; color: var(--text); }
.ts-caption { font-size: .85rem; color: var(--muted); margin-top: 1.1rem; font-style: italic; text-align: center; }

@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } .ts-label { font-size: .64rem; } }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.section-head p { max-width: 58ch; margin: 0; color: var(--muted); }
.section--paper { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--dark { background: var(--text); color: #eadfca; }
.section--dark h2, .section--dark h3 { color: var(--surface); }
.section--dark .eyebrow { color: var(--accent); }

/* Search */
.search-panel {
  background: var(--surface); border: 1px solid var(--line-strong); padding: 1.4rem; box-shadow: var(--shadow-paper);
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; margin-bottom: 2rem; position: relative;
}
.search-panel::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.search-field { position: relative; }
.search-field input {
  width: 100%; font-family: var(--serif); font-size: 1.1rem; padding: .85rem 1rem .85rem 2.8rem; color: var(--text);
  background: #fffaf0; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.search-field svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--secondary); }
.result-count { font-size: .92rem; color: var(--muted); font-style: italic; margin: 0; }
.empty-state { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line-strong); color: var(--muted); grid-column: 1 / -1; }

/* ---------- Artifact cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2rem; }
.artifact-card {
  background: var(--surface); border: 1px solid var(--line-strong); position: relative; display: flex; flex-direction: column;
  box-shadow: var(--shadow-paper); transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s;
}
.artifact-card::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; }
.artifact-card:hover { transform: translateY(-4px) rotate(-.2deg); box-shadow: 0 30px 50px -28px rgba(48,37,31,.6); }
.card-media { margin: 0; position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line-strong); }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.55) saturate(.8); transition: filter .8s, transform 6s ease; }
.artifact-card:hover .card-media img { filter: sepia(0) saturate(1); transform: scale(1.07); }
.plate { position: absolute; top: .8rem; left: .8rem; background: rgba(48,37,31,.85); color: var(--accent); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; padding: .22rem .55rem; }
.card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; position: relative; z-index: 1; }
.card-kicker { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--secondary); margin: 0 0 .35rem; }
.card-body h3 { margin-bottom: .3rem; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { color: var(--primary); }
.card-period { font-style: italic; color: var(--muted); font-size: .92rem; margin-bottom: .7rem; }
.card-body > p:not(.card-kicker):not(.card-period) { font-size: .98rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0 0 1rem; }
.tags li, .tag { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line-strong); padding: .14rem .5rem; color: #5a4a3e; background: rgba(233,221,199,.5); }
.card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 1.2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .6rem 0; }
.card-meta dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card-meta dd { margin: 0; font-family: var(--display); font-size: 1.05rem; }
.card-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: auto; }
.card-actions .btn { flex: 1 1 auto; font-size: .9rem; padding: .55rem .8rem; }

/* ---------- Reveal & unfold ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
.unfold { transform-origin: top center; }
.unfold.in-view { animation: unfold .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes unfold { from { opacity: 0; transform: perspective(900px) rotateX(-14deg) scaleY(.92); clip-path: inset(0 0 60% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
.engrave { text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 -1px 0 rgba(48,37,31,.15); }
.engrave.reveal { clip-path: inset(0 100% 0 0); opacity: 1; transform: none; transition: clip-path 1.4s cubic-bezier(.6,.1,.2,1); }
.engrave.reveal.in-view { clip-path: inset(0 0 0 0); }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.cat-tile { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); padding: 1.3rem; position: relative; transition: background .3s, transform .3s; }
.cat-tile:hover { background: #fffaf0; transform: translateY(-2px); color: var(--primary); }
.cat-tile small { display: block; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.cat-tile strong { font-family: var(--display); font-size: 1.2rem; display: block; margin: .25rem 0; }
.cat-tile::after { content: "→"; position: absolute; right: 1rem; bottom: 1rem; color: var(--accent); }

/* ---------- Map composition ---------- */
.atlas { position: relative; aspect-ratio: 2.1 / 1; border: 1px solid var(--line-strong); background:
  linear-gradient(rgba(122,62,47,.12) 1px, transparent 1px) 0 0 / 8.333% 11.11%,
  linear-gradient(90deg, rgba(122,62,47,.12) 1px, transparent 1px) 0 0 / 8.333% 11.11%,
  radial-gradient(ellipse at 40% 40%, #f4e9d2, #dcc9a6); box-shadow: var(--shadow-paper), 0 0 0 8px var(--surface), 0 0 0 9px var(--line-strong); overflow: hidden; }
.atlas::before { content: "MAPPA · HERITAGE · MUNDI"; position: absolute; left: 50%; top: 4%; transform: translateX(-50%); letter-spacing: .5em; font-size: .78rem; color: var(--secondary); }
.atlas-compass { position: absolute; right: 3%; bottom: 6%; width: 70px; height: 70px; color: var(--primary); opacity: .7; }
.atlas-equator { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(122,62,47,.45); }
.marker { position: absolute; transform: translate(-50%, -100%); text-decoration: none; color: var(--text); display: flex; flex-direction: column; align-items: center; }
.marker-pin { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--primary); border: 2px solid var(--accent); box-shadow: 0 3px 6px rgba(0,0,0,.35); animation: pinDrop .8s both; }
.marker-label { position: absolute; bottom: 120%; white-space: nowrap; background: var(--surface); border: 1px solid var(--line-strong); font-size: .72rem; letter-spacing: .06em; padding: .1rem .4rem; opacity: 0; transition: opacity .25s; pointer-events: none; }
.marker:hover .marker-label, .marker:focus .marker-label { opacity: 1; }
@keyframes pinDrop { from { opacity: 0; transform: rotate(-45deg) translate(-10px, -10px); } to { opacity: 1; } }

/* ---------- Timeline ---------- */
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 2.2rem; --progress: 0; }
.timeline::before { content: ""; position: absolute; left: .55rem; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline::after { content: ""; position: absolute; left: .55rem; top: 0; width: 2px; height: calc(var(--progress) * 100%); background: linear-gradient(var(--accent), var(--primary)); transition: height .2s linear; }
.timeline li { position: relative; padding: 0 0 1.8rem; }
.timeline li::before { content: ""; position: absolute; left: -2.05rem; top: .35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); z-index: 1; }
.timeline .t-year { font-family: var(--display); font-size: 1.25rem; color: var(--primary); display: block; }
.section--dark .timeline .t-year { color: var(--accent); }
.section--dark .timeline li::before { background: var(--text); border-color: var(--accent); }
.timeline .t-text { margin: .1rem 0 0; }
.timeline a { color: inherit; }

/* ---------- Editorial ---------- */
.editorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.editorial { border-top: 3px double var(--line-strong); padding-top: 1.1rem; }
.editorial figure { margin: 0 0 1rem; overflow: hidden; aspect-ratio: 3/2; border: 1px solid var(--line-strong); }
.editorial img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.4); transition: transform 5s ease, filter .6s; }
.editorial:hover img { transform: scale(1.06); filter: sepia(0); }
.editorial .chapter-no { font-family: var(--display); font-style: italic; color: var(--secondary); }
@media (max-width: 900px) { .editorial-grid { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Museum panels ---------- */
.museum-panel { background: var(--surface); border: 1px solid var(--line-strong); padding: 1.6rem; position: relative; box-shadow: var(--shadow-paper); }
.museum-panel::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.museum-panel h3 { font-variant: small-caps; letter-spacing: .1em; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.spec-list { margin: 0; display: grid; gap: .1rem; }
.spec-list div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px dotted var(--line-strong); }
.spec-list dt { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: .2rem; }
.spec-list dd { margin: 0; }
@media (max-width: 520px) { .spec-list div { grid-template-columns: 1fr; gap: .1rem; } }

/* ---------- Detail page ---------- */
.dossier-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line-strong); background: var(--text); }
.dossier-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroCross 2.4s ease both, slowZoom 40s 2s ease-in-out infinite alternate; }
@keyframes heroCross { from { filter: sepia(1) contrast(.8); opacity: .3; } to { filter: sepia(.12); opacity: 1; } }
.dossier-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(48,37,31,.15) 20%, rgba(48,37,31,.88)); }
.dossier-hero .wrap { padding: 4rem 0 3rem; color: var(--surface); z-index: 2; }
.dossier-hero h1 { color: var(--surface); text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.dossier-hero .eyebrow { color: var(--accent); }
.dossier-hero .lede { color: #efe5d2; }
.breadcrumb { font-size: .85rem; letter-spacing: .06em; margin-bottom: 1rem; }
.breadcrumb a { color: #f2e6cf; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; opacity: .7; }
.section--paper .breadcrumb a, .page-intro .breadcrumb a { color: var(--primary); }

.dossier-layout { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; padding: 3.5rem 0; }
.chapter-nav { position: sticky; top: 1.5rem; align-self: start; border-left: 2px solid var(--line-strong); padding-left: 1rem; }
.chapter-nav ol { list-style: none; padding: 0; margin: 0; counter-reset: ch; }
.chapter-nav li { counter-increment: ch; }
.chapter-nav a { display: block; padding: .3rem 0; text-decoration: none; color: var(--muted); font-size: .95rem; }
.chapter-nav a::before { content: counter(ch, upper-roman) ". "; color: var(--secondary); font-family: var(--display); }
.chapter-nav a:hover { color: var(--primary); }
.chapter { margin-bottom: 3.2rem; scroll-margin-top: 1.5rem; }
.chapter-head { display: flex; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1.2rem; padding-bottom: .4rem; }
.chapter-head .num { font-family: var(--display); font-size: 2.2rem; color: var(--accent); line-height: 1; }
.chapter-head h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.feature-list li { background: var(--surface); border: 1px solid var(--line-strong); padding: 1rem 1.1rem; position: relative; }
.feature-list li strong { display: block; font-family: var(--display); font-size: 1.08rem; margin-bottom: .25rem; color: var(--primary); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.person { border: 1px solid var(--line-strong); background: var(--surface); padding: 1rem; text-align: center; }
.person .seal { width: 56px; height: 56px; margin: 0 auto .6rem; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font-family: var(--display); font-size: 1.3rem; color: var(--primary); background: #fffaf0; }
.person strong { display: block; font-family: var(--display); }
.person span { font-size: .88rem; color: var(--muted); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: .8rem; height: 460px; }
.gallery button { padding: 0; border: 1px solid var(--line-strong); background: none; cursor: zoom-in; overflow: hidden; position: relative; }
.gallery button:first-child { grid-row: 1 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 4s ease, filter .6s; filter: sepia(.25); }
.gallery button:hover img { transform: scale(1.06); filter: none; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; } .gallery button { aspect-ratio: 4/3; } .gallery button:first-child { grid-row: auto; } }
.score-row { display: grid; grid-template-columns: 11rem 1fr 3rem; align-items: center; gap: 1rem; margin-bottom: .7rem; }
.score-bar { height: 10px; background: rgba(48,37,31,.1); border: 1px solid var(--line); position: relative; overflow: hidden; }
.score-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--secondary), var(--accent)); width: 0; transition: width 1.6s cubic-bezier(.2,.7,.2,1); }
.in-view .score-bar span { width: var(--w); }
.score-total { font-family: var(--display); font-size: 3rem; color: var(--primary); line-height: 1; }
@media (max-width: 520px) { .score-row { grid-template-columns: 1fr 3rem; } .score-row .score-bar { grid-column: 1 / -1; grid-row: 2; } }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.facts li { padding: 1rem 1.2rem 1rem 3.2rem; position: relative; background: var(--surface); border: 1px solid var(--line-strong); }
.facts li::before { content: "❦"; position: absolute; left: 1.1rem; top: .9rem; color: var(--accent); font-size: 1.2rem; }
.action-bar { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 3px double var(--line-strong); padding-top: 1.4rem; flex-wrap: wrap; }
.pager a { text-decoration: none; }
.pager small { display: block; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
@media (max-width: 900px) { .dossier-layout { grid-template-columns: 1fr; } .chapter-nav { position: relative; top: 0; } }

/* Accordions */
details.accordion { border: 1px solid var(--line-strong); background: var(--surface); margin-bottom: .7rem; }
details.accordion summary { cursor: pointer; padding: 1rem 1.2rem; font-family: var(--display); font-size: 1.12rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .3s; }
details.accordion[open] summary::after { transform: rotate(45deg); }
details.accordion .acc-body { padding: 0 1.2rem 1.1rem; animation: unfold .5s ease both; }

/* ---------- Filters ---------- */
.filter-bar { display: grid; grid-template-columns: 2fr repeat(5, 1fr); gap: .8rem; background: var(--surface); border: 1px solid var(--line-strong); padding: 1.2rem; box-shadow: var(--shadow-paper); margin-bottom: 1rem; }
.filter-bar label { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.filter-bar select, .filter-bar input { width: 100%; font-family: var(--serif); font-size: 1rem; padding: .6rem .7rem; border: 1px solid var(--line-strong); background: #fffaf0; color: var(--text); border-radius: var(--radius); }
.filter-foot { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 1050px) { .filter-bar { grid-template-columns: 1fr 1fr; } .filter-bar .f-search { grid-column: 1 / -1; } }
@media (max-width: 520px) { .filter-bar { grid-template-columns: 1fr; } }

.page-intro { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.chip-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { text-decoration: none; border: 1px solid var(--line-strong); background: var(--surface); padding: .45rem .85rem; color: var(--text); transition: background .3s; }
.chip:hover { background: var(--primary); color: var(--surface); }
.chip em { font-style: normal; color: var(--accent); margin-left: .3rem; }
.taxo-block { margin-bottom: 3rem; scroll-margin-top: 1rem; }

/* Prose pages */
.prose { max-width: 78ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line-strong); font-size: .98rem; }
.data-table th, .data-table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-variant: small-caps; letter-spacing: .1em; background: rgba(138,118,84,.15); }
.table-wrap { overflow-x: auto; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(30,22,18,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 2rem; }
.lightbox.open { display: flex; animation: unfold .45s ease both; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; }
.lightbox img { max-height: 80vh; margin: 0 auto; border: 8px solid var(--surface); }
.lightbox figcaption { color: #eadfca; text-align: center; margin-top: .8rem; font-style: italic; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; background: var(--surface); border: 1px solid var(--accent); font-family: var(--serif); padding: .4rem .9rem; cursor: pointer; letter-spacing: .12em; }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 640px; margin-inline: auto; z-index: 300;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 25px 60px -20px rgba(0,0,0,.55), 0 0 0 6px rgba(247,240,227,.8);
  padding: 1.3rem 1.4rem; animation: unfold .7s ease both;
}
.cookie-banner h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.cookie-banner p { font-size: .93rem; margin-bottom: .9rem; }
.cookie-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--text); color: #d9ccb4; position: relative; z-index: 1; margin-top: 2rem; border-top: 6px double var(--secondary); }
.site-footer a { color: #f1e4c8; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem; padding: 3.5rem 0 2rem; }
.site-footer h2 { color: var(--accent); font-size: 1rem; letter-spacing: .2em; text-transform: uppercase; font-family: var(--serif); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer address { font-style: normal; line-height: 1.7; font-size: .95rem; }
.footer-brand { font-family: var(--display); font-size: 1.5rem; color: var(--surface); }
.notices { border-top: 1px solid rgba(233,221,199,.2); padding: 1.6rem 0; display: grid; gap: .9rem; font-size: .88rem; }
.notices p { margin: 0; padding: .9rem 1.1rem; border: 1px solid rgba(201,162,39,.35); background: rgba(0,0,0,.15); }
.notices strong { color: var(--accent); }
.footer-base { border-top: 1px solid rgba(233,221,199,.2); padding: 1.2rem 0 1.6rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .hero-meta { grid-template-columns: 1fr 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .engrave.reveal { opacity: 1; transform: none; clip-path: none; }
}
@media print {
  .site-header, .site-footer, .chapter-nav, .cookie-banner, .action-bar, .pager { display: none !important; }
  body { background: #fff; }
  .dossier-hero { min-height: auto; }
}