/* The Scent Atlas — styles
   Palette: moss #254239 · cream #FFF6E6 · dusty rose #D08D91 · brass #B88D52
   Text-safe derivatives are defined below and contrast-checked (see README). */

:root {
  --moss: #254239;
  --moss-deep: #1A3029;
  --cream: #FFF6E6;
  --paper: #F8EBD3;
  --paper-2: #F2E2C4;
  --rose: #D08D91;
  --rose-soft: #F2D5D3;
  --rose-ink: #8A4349;      /* rose for text on cream */
  --brass: #B88D52;
  --brass-ink: #725321;     /* brass for text on cream */
  --brass-soft: #E9D6B2;
  --ink: #1E302A;
  --muted: #4A5A53;
  --focus: #8A4349;

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

  --measure: 42rem;
  --wide: 74rem;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(37, 66, 57, 0.08), 0 10px 30px -18px rgba(37, 66, 57, 0.45);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

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

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

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--moss); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin: 0.2em 0 0.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; margin: 1.8em 0 0.5em; }
h4 { font-size: 1.2rem; margin: 0.15em 0 0.4em; }
p { margin: 0 0 1em; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--moss); color: var(--cream); padding: 0.7rem 1rem;
  font-family: var(--sans); font-weight: 600; border-radius: 6px;
}
.skip:focus { top: 0.75rem; color: var(--cream); }

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: 1rem; }
.wrap--wide { max-width: var(--wide); }
@media (min-width: 600px) { .wrap { padding-inline: 1.5rem; } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--moss);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.95rem;
  border-bottom: 3px solid var(--brass);
}
.topbar__inner {
  max-width: var(--wide); margin: 0 auto; padding: 0.35rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.topbar a {
  color: var(--cream); text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem;
}
.topbar a:hover { color: var(--rose-soft); text-decoration: underline; }
.topbar a:focus-visible { outline-color: var(--rose-soft); }
.topbar__title { font-family: var(--serif); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; opacity: 0.9; }
@media (max-width: 520px) { .topbar__title { display: none; } }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(208, 141, 145, 0.22), transparent 60%),
    radial-gradient(40rem 26rem at 10% 90%, rgba(184, 141, 82, 0.18), transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--brass-soft);
}
.hero__inner {
  max-width: var(--wide); margin: 0 auto; padding: 2.5rem 1rem 3rem;
  display: grid; gap: 2rem; align-items: center;
}
@media (min-width: 820px) {
  .hero__inner { grid-template-columns: 1.25fr 0.75fr; padding: 4.5rem 1.5rem 4.5rem; }
}
.crumbs { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-bottom: 1.4rem; }
.crumbs a { color: var(--muted); }
.kicker {
  font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--brass-ink); font-weight: 700; margin-bottom: 0.4rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 1.6rem + 6vw, 5.4rem); margin: 0 0 0.3em; letter-spacing: -0.025em;
  font-weight: 600; line-height: 1;
}
.hero__lede { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); max-width: 34em; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.hero__art { margin: 0; justify-self: center; max-width: 340px; width: 100%; }
.hero__svg { display: block; width: 100%; }
.band { transform-box: fill-box; transform-origin: center; animation: drift 9s ease-in-out infinite alternate; }
.band--heart { animation-duration: 11s; animation-delay: -3s; }
.band--base { animation-duration: 13s; animation-delay: -6s; }
@keyframes drift { from { transform: translateY(-2px) skewY(-1deg); } to { transform: translateY(3px) skewY(1deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 44px; padding: 0.6rem 1.15rem;
  font-family: var(--sans); font-weight: 650; font-size: 1rem; line-height: 1.2;
  border-radius: 999px; border: 2px solid var(--moss);
  background: transparent; color: var(--moss); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--moss); background: var(--paper); text-decoration: none; }
.btn--primary { background: var(--moss); color: var(--cream); }
.btn--primary:hover { background: var(--moss-deep); color: var(--cream); }
.btn--ghost { background: rgba(255, 246, 230, 0.6); }
.btn--small { min-height: 44px; padding: 0.45rem 0.95rem; font-size: 0.95rem; }
.btn--quiet { border-style: dashed; }
.btn--brass { background: var(--brass-soft); border-color: var(--brass-ink); color: var(--moss-deep); }
.btn--brass:hover { background: var(--brass); color: var(--moss-deep); }
.btn--large { font-size: 1.1rem; padding: 0.85rem 1.5rem; }

/* ---------- Disclosure ---------- */
.disclosure { padding-top: 2.5rem; max-width: var(--wide); }
.disclosure__grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .disclosure__grid { grid-template-columns: 1fr 1fr; } }
.disclosure__col {
  background: var(--paper); border: 1px solid var(--brass-soft); border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.disclosure__col:last-child { background: var(--rose-soft); border-color: #E6BDBB; }
.disclosure h3 { margin: 0 0 0.4rem; font-size: 1.1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; }
.disclosure ul { margin: 0; padding-left: 1.2rem; font-size: 1rem; }
.disclosure li { margin-bottom: 0.25rem; }
.legend { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-top: 1rem; line-height: 2; }

/* Claim labels (text + shape, never colour alone) */
.claim {
  display: inline-block; font-family: var(--sans); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
  padding: 0.1rem 0.45rem; border-radius: 3px; vertical-align: 0.12em; margin-right: 0.25rem;
  border: 1px solid currentColor; white-space: nowrap;
}
.claim--evidence { color: #1F4A3E; background: #DCEBDF; }
.claim--framework { color: #5B4317; background: #F1E3C4; }
.claim--interp { color: #7A3940; background: #F6E0DE; }
.claim--hypo { color: #3E3A66; background: #E4E2F2; border-style: dashed; }
.claim--illus { color: #4A4A4A; background: #ECE8E0; border-style: dotted; }

/* ---------- TOC ---------- */
.toc { padding-block: 2.5rem 1rem; max-width: var(--wide); }
.toc h2 { font-size: 1.4rem; }
.toc__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  font-family: var(--sans); font-size: 1rem;
}
.toc__list a {
  display: flex; gap: 0.75rem; align-items: baseline; padding: 0.55rem 0.25rem; min-height: 44px;
  text-decoration: none; border-bottom: 1px dotted var(--brass);
}
.toc__list a:hover { background: var(--paper); }
.toc__num {
  flex: 0 0 3.3rem; font-family: var(--serif); font-style: italic; color: var(--brass-ink); font-size: 0.95rem;
}

/* ---------- Chapters ---------- */
.chapter { padding-block: 3.5rem 1rem; scroll-margin-top: 4rem; }
section[id], article[id] { scroll-margin-top: 4rem; }
.chapter__num {
  font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--brass-ink); font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 0.6rem;
}
.chapter__num::after { content: ""; flex: 1; height: 1px; background: var(--brass); opacity: 0.6; }
.dropcap::first-letter {
  float: left; font-size: 3.6em; line-height: 0.8; padding: 0.08em 0.08em 0 0; color: var(--moss); font-weight: 600;
}
.pull {
  margin: 2rem 0; padding: 1.2rem 1.4rem; border-left: 4px solid var(--rose);
  background: linear-gradient(90deg, var(--rose-soft), transparent);
  font-size: 1.25rem; font-style: italic; color: var(--moss);
}
.pull p { margin: 0; }

.figure { margin: 2rem 0; }
.figure__svg { display: block; width: 100%; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--brass-soft); }
.figure figcaption { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.fig-label { font: 600 18px var(--serif); fill: #1E302A; }
.fig-small { font: 600 14px var(--sans); fill: #1E302A; }
.fig-small--light { fill: #FFF6E6; }
.fig-note { font: 13px var(--sans); fill: #4A5A53; }

.defs { margin: 1.5rem 0; display: grid; gap: 0.8rem; }
.defs__item { background: var(--paper); border-radius: var(--radius); padding: 1rem 1.2rem; border-top: 4px solid var(--brass); }
.defs dt { font-weight: 700; font-size: 1.15rem; color: var(--moss); }
.defs dd { margin: 0.2rem 0 0; }

.ladder { padding-left: 1.4rem; }
.ladder li { margin-bottom: 0.5rem; padding-left: 0.3rem; }
.ladder li::marker { color: var(--brass-ink); font-weight: 700; }

.compare-pair { display: grid; gap: 1rem; margin: 1rem 0 1.4rem; }
@media (min-width: 640px) { .compare-pair { grid-template-columns: 1fr 1fr; } }
.compare-pair__item { padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--brass-soft); }
.compare-pair__item:first-child { background: #EFE7DA; font-style: italic; }
.compare-pair__tag { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; color: var(--brass-ink); text-transform: uppercase; letter-spacing: 0.08em; font-style: normal; }

details { margin: 1rem 0; }
summary { cursor: pointer; font-family: var(--sans); font-weight: 650; color: var(--moss); min-height: 44px; display: flex; align-items: center; gap: 0.4rem; }
summary::marker { color: var(--brass-ink); }
.glossary dl { margin: 0.5rem 0 0; padding: 0.5rem 1.1rem 1rem; background: var(--paper); border-radius: var(--radius); }
.glossary dt { font-weight: 700; margin-top: 0.6rem; }
.glossary dd { margin: 0; }

.checklist { padding-left: 1.2rem; }
.checklist li { margin-bottom: 0.6rem; }

.warning-plate {
  border: 2px solid var(--brass); background: var(--paper); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin: 1.2rem 0; font-family: var(--sans); font-size: 1rem; position: relative;
}
.warning-plate p { margin: 0; }
.warning-plate--strong { border-color: var(--rose-ink); background: var(--rose-soft); }

.myths { display: grid; gap: 0.75rem; margin: 1rem 0; }
.myths__item { border: 1px dashed var(--brass); border-radius: var(--radius); padding: 0.9rem 1.1rem; }
.myths dt { font-weight: 700; color: var(--rose-ink); }
.myths dt::before { content: "Myth? "; font-family: var(--sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.myths dd { margin: 0.25rem 0 0; }

.open-q { font-size: 1.3rem; color: var(--moss); border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); padding: 1rem 0; }

/* ---------- Rooms ---------- */
.room { padding-block: 3.5rem; margin-top: 3rem; }
#atlas.room { background: linear-gradient(var(--paper), var(--cream)); border-top: 1px solid var(--brass-soft); }
.room__intro { max-width: var(--measure); }

/* Filters */
.filters {
  background: var(--cream); border: 1px solid var(--brass); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 1.5rem 0 1rem; font-family: var(--sans); box-shadow: var(--shadow);
}
.filters__label { display: block; font-weight: 700; font-size: 0.95rem; color: var(--moss); margin-bottom: 0.4rem; }
.filters__hint { font-weight: 400; color: var(--muted); }
.filters input[type="search"] {
  width: 100%; max-width: 30rem; min-height: 44px; font: inherit; font-size: 1rem;
  padding: 0.5rem 0.8rem; border: 2px solid var(--moss); border-radius: 8px; background: #fff; color: var(--ink);
}
.filters__chips { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 44px; padding: 0.4rem 0.95rem; border-radius: 999px; font: 600 0.95rem var(--sans);
  border: 2px solid var(--moss); background: var(--cream); color: var(--moss); cursor: pointer;
}
.chip:hover { background: var(--paper-2); }
.chip[aria-pressed="true"] { background: var(--moss); color: var(--cream); }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.filters__status { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-top: 1rem; }
.filters__count { margin: 0; font-weight: 600; }
.empty { background: var(--rose-soft); border-radius: var(--radius); padding: 1rem 1.2rem; font-family: var(--sans); }
.noscript-note { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); }

/* Families & drawers */
.family { margin-top: 2.2rem; }
.family__title { display: flex; align-items: center; gap: 0.75rem; font-size: 1.35rem; margin: 0 0 1rem; }
.family__rule { width: 2.2rem; height: 2px; background: var(--brass); display: inline-block; }
.drawer { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }

.specimen {
  position: relative; background: var(--cream); border: 1px solid var(--brass);
  border-radius: 4px 4px var(--radius) var(--radius); padding: 0 1.15rem 1rem; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.specimen::before { /* drawer pull */
  content: ""; position: absolute; left: 50%; top: 86px; width: 44px; height: 8px; margin-left: -22px;
  border-radius: 0 0 8px 8px; background: var(--brass); opacity: 0.85;
}
.specimen:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(37, 66, 57, 0.6); }
.specimen:target { outline: 3px solid var(--rose-ink); outline-offset: 4px; }
.specimen__swatch {
  position: relative; height: 86px; margin: 0 -1.15rem 0.9rem; overflow: hidden;
  background: var(--paper); border-bottom: 1px solid var(--brass);
}
.specimen__swatch span {
  position: absolute; left: -10%; width: 120%; height: 46px; border-radius: 50%; opacity: 0.6;
  mix-blend-mode: multiply;
}
.specimen__swatch span:nth-child(1) { top: -10px; transform: rotate(-4deg); }
.specimen__swatch span:nth-child(2) { top: 18px; transform: rotate(3deg); }
.specimen__swatch span:nth-child(3) { top: 46px; transform: rotate(-2deg); }
.specimen__no {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brass-ink); margin: 0;
}
.tags { list-style: none; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tags li {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 0.05rem 0.55rem;
  border-radius: 999px; background: var(--paper-2); color: var(--moss);
}
.vignette { font-style: italic; font-size: 1.08rem; color: var(--ink); }
.note-line { font-family: var(--sans); font-size: 0.95rem; line-height: 1.55; margin-bottom: 0.6rem; }
.note-line strong { color: var(--moss); }
.note-line--compare { border-top: 1px dotted var(--brass); padding-top: 0.6rem; }
.behind { margin: 0.2rem 0 0; font-family: var(--sans); font-size: 0.95rem; }
.behind p { margin: 0.3rem 0 0; }

/* Swatch colours (symbolic) */
.sw-lemon span:nth-child(1) { background: #F2D04B; } .sw-lemon span:nth-child(2) { background: #E8E28A; } .sw-lemon span:nth-child(3) { background: #FFF1B8; }
.sw-grass span:nth-child(1) { background: #7DB46C; } .sw-grass span:nth-child(2) { background: #B7D98B; } .sw-grass span:nth-child(3) { background: #5E8F55; }
.sw-fig span:nth-child(1) { background: #8BAA6F; } .sw-fig span:nth-child(2) { background: #EFE3C8; } .sw-fig span:nth-child(3) { background: #9C7193; }
.sw-rose span:nth-child(1) { background: #E7A5AA; } .sw-rose span:nth-child(2) { background: #D08D91; } .sw-rose span:nth-child(3) { background: #F4D2B0; }
.sw-jasmine span:nth-child(1) { background: #F8F0D6; } .sw-jasmine span:nth-child(2) { background: #EBD889; } .sw-jasmine span:nth-child(3) { background: #D3A970; }
.sw-lavender span:nth-child(1) { background: #A99BCB; } .sw-lavender span:nth-child(2) { background: #C9C1E2; } .sw-lavender span:nth-child(3) { background: #8EAA94; }
.sw-cardamom span:nth-child(1) { background: #9CC08A; } .sw-cardamom span:nth-child(2) { background: #D8B477; } .sw-cardamom span:nth-child(3) { background: #A3C9C0; }
.sw-cedar span:nth-child(1) { background: #D4AE7B; } .sw-cedar span:nth-child(2) { background: #B88D52; } .sw-cedar span:nth-child(3) { background: #8D6A45; }
.sw-vetiver span:nth-child(1) { background: #6F7B4E; } .sw-vetiver span:nth-child(2) { background: #8C7A55; } .sw-vetiver span:nth-child(3) { background: #4F5B3E; }
.sw-petrichor span:nth-child(1) { background: #A7B3B4; } .sw-petrichor span:nth-child(2) { background: #B99A7D; } .sw-petrichor span:nth-child(3) { background: #7D8E86; }
.sw-frank span:nth-child(1) { background: #C9C2B2; } .sw-frank span:nth-child(2) { background: #E2C98F; } .sw-frank span:nth-child(3) { background: #8C8478; }
.sw-vanilla span:nth-child(1) { background: #F3DDB0; } .sw-vanilla span:nth-child(2) { background: #D9B07C; } .sw-vanilla span:nth-child(3) { background: #8B5E3C; }

/* ---------- Instrument ---------- */
.room--instrument { background: var(--moss); color: var(--cream); --focus: #F6D6D4; }
.room--instrument h2, .room--instrument .chapter__num { color: var(--cream); }
.room--instrument .chapter__num::after { background: var(--rose); }
.room--instrument a { color: var(--rose-soft); }
.room--instrument .warning-plate { background: rgba(255, 246, 230, 0.08); border-color: var(--rose); color: var(--cream); }
.instrument { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 900px) { .instrument { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.instrument__controls { font-family: var(--sans); }
.instrument__help { font-size: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field__sub { font-weight: 400; opacity: 0.9; }
.note-select {
  width: 100%; min-height: 48px; font: inherit; font-size: 1.05rem; padding: 0.5rem 0.8rem;
  border-radius: 8px; border: 2px solid var(--brass); background: var(--cream); color: var(--ink);
}
.instrument__buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.room--instrument .btn { border-color: var(--cream); color: var(--cream); }
.room--instrument .btn:hover { background: rgba(255, 246, 230, 0.12); color: var(--cream); }
.instrument__stage { display: grid; gap: 1rem; }
.layers { display: block; width: 100%; border-radius: var(--radius); border: 2px solid var(--brass); background: var(--cream); }
.layers path { transition: fill .7s ease; }
.layers__label { font: 700 15px var(--sans); fill: #1E302A; paint-order: stroke; stroke: #FFF6E6; stroke-width: 4px; stroke-linejoin: round; }
.sentence-card { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 1.2rem 1.3rem; border-left: 6px solid var(--rose); --focus: #8A4349; }
.sentence-card__label { font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--brass-ink); margin-bottom: 0.4rem; }
.sentence { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); line-height: 1.45; color: var(--moss); font-style: italic; margin-bottom: 0.7rem; }
.sentence-card__reflection { font-size: 1.02rem; }
.sentence-card__reflection:empty, .sentence-card__status:empty { display: none; }
.sentence-card__status { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--moss); }
.sentence-card__check { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); border-top: 1px dotted var(--brass); padding-top: 0.6rem; margin: 0; }
.instrument-static { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-top: 1.5rem; }
.instrument-static[hidden] { display: none; }
.room--instrument .how { background: rgba(255, 246, 230, 0.06); border-radius: var(--radius); padding: 0.3rem 1rem 0.5rem; margin-top: 1.5rem; }
.room--instrument .how summary { color: var(--cream); }
.room--instrument .how summary::marker { color: var(--rose); }
.room--instrument .how p { font-family: var(--sans); font-size: 1rem; }

/* ---------- Journal ---------- */
.room--journal { background: var(--paper); border-top: 1px solid var(--brass-soft); border-bottom: 1px solid var(--brass-soft); }
.journal__print-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-family: var(--sans); }
.journal__print-row[hidden] { display: none; }
.journal__print-hint { font-size: 0.9rem; color: var(--muted); }
.journal-sheet {
  background: #FFFDF8; border: 1px solid var(--brass); border-radius: 4px; padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow); margin-top: 1.2rem;
  background-image: linear-gradient(90deg, transparent 2.2rem, rgba(208, 141, 145, 0.35) 2.2rem, rgba(208, 141, 145, 0.35) calc(2.2rem + 1px), transparent calc(2.2rem + 1px));
}
.journal-sheet__title { font-weight: 700; color: var(--moss); font-size: 1.2rem; margin-bottom: 0.3rem; padding-left: 1.6rem; }
.journal-sheet__meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); padding-left: 1.6rem; }
.journal-q { padding-left: 3.3rem; margin: 1rem 0; }
.journal-q li { padding: 0.4rem 0 1.4rem; border-bottom: 1px solid rgba(184, 141, 82, 0.5); margin-bottom: 0.4rem; }
.journal-q li::marker { color: var(--brass-ink); font-weight: 700; }
.journal-sheet__foot { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); padding-left: 1.6rem; margin: 0; }

/* ---------- Sources ---------- */
.shelf { padding-block: 3.5rem 1rem; }
.sources { padding-left: 1.3rem; }
.sources li { margin-bottom: 1.3rem; padding-left: 0.3rem; }
.sources li::marker { color: var(--brass-ink); font-weight: 700; }
.src__cite { margin-bottom: 0.3rem; }
.src__shows { font-family: var(--sans); font-size: 0.93rem; color: var(--muted); }
.src__shows strong { color: var(--moss); }
.shelf__note { font-family: var(--sans); font-size: 0.95rem; border-top: 1px dotted var(--brass); padding-top: 1rem; }

/* ---------- Related ---------- */
.related { padding-block: 2.5rem 3.5rem; }
.related__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.door {
  display: flex; flex-direction: column; gap: 0.4rem; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--brass); border-radius: 60px 60px var(--radius) var(--radius);
  padding: 1.6rem 1.2rem 1.2rem; transition: transform .2s ease, background-color .2s ease;
}
.door:hover { transform: translateY(-3px); background: var(--rose-soft); color: var(--ink); text-decoration: none; }
.door__name { font-weight: 700; font-size: 1.15rem; color: var(--moss); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 0.2em; }
.door__name::after { content: " ↗"; font-size: 0.9em; }
.door__why { font-family: var(--sans); font-size: 0.95rem; line-height: 1.5; }

/* ---------- Footer ---------- */
.footer { background: var(--moss-deep); color: var(--cream); padding-block: 3rem; --focus: #F6D6D4; }
.footer a { color: var(--rose-soft); }
.footer a:hover { color: var(--cream); }
.footer__inner { display: grid; gap: 2rem; }
@media (min-width: 820px) { .footer__inner { grid-template-columns: 0.8fr 1.2fr; align-items: center; } }
.footer__eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: var(--brass-soft); }
.footer .btn--brass { color: var(--moss-deep); }
.footer__about { font-size: 1rem; }
.footer__small { font-family: var(--sans); font-size: 0.85rem; opacity: 0.92; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.notfound .btn { margin: 0.4rem; }

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

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .skip, .hero__actions, .hero__art, .filters, .instrument, .instrument__buttons,
  .journal__print-row, .footer__return, .room--instrument .how { display: none !important; }
  .room, .room--instrument, .room--journal, .footer { background: #fff !important; color: #000 !important; }
  .room--instrument h2, .room--instrument .chapter__num, .footer a, .room--instrument a { color: #000 !important; }
  .specimen, .journal-sheet { box-shadow: none; break-inside: avoid; }
  details > *:not(summary) { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  .door::after { content: none; }
  .journal-q li { padding-bottom: 2.2rem; }

  body.print-journal main > *:not(#journal),
  body.print-journal .footer,
  body.print-journal #journal .chapter__num,
  body.print-journal #journal h2,
  body.print-journal #journal > .wrap > p:not(.journal__print-row) { display: none !important; }
  body.print-journal #journal { padding: 0; margin: 0; border: 0; }
  body.print-journal .journal-sheet { border: 0; margin: 0; }
}

@media (max-width: 819px) { .hero__art { max-width: 230px; } }
