/* ==========================================================================
   Hearth & Herb — shared stylesheet
   One design system for every page. The pages themselves are generated by
   source/build.py; nothing needs building to deploy.
   ========================================================================== */

/* fonts:start (generated by source/tools/make_fonts.py; SIL Open Font License, see /fonts/OFL.txt) */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/caveat-normal-latin-ext.f626b95c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/caveat-normal-latin.891951df.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fraunces-italic-latin-ext.d78e69db.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fraunces-italic-latin.2270c0e8.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-normal-latin-ext.bafaa06e.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-normal-latin.e7916543.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-franklin-italic-latin-ext.73547924.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Franklin";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-franklin-italic-latin.a3d7ad6c.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/libre-franklin-normal-latin-ext.61216d8e.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/libre-franklin-normal-latin.52e60585.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* fonts:end */

/* ---------- Design tokens ---------- */
:root {
  --paper: #ece0bf;
  --paper-raised: #f6eed4;
  --paper-edge: #c3ac6e;
  --ink: #2b2216;
  --ink-soft: #5c4e33;
  --ink-faint: #8a7a56;
  --forest: #3d5a3f;
  --forest-deep: #223821;
  --seal: #a3492c;
  --seal-deep: #7c341f;
  --brass: #a07f34;

  --stain-a: rgba(160, 127, 52, 0.10);
  --stain-b: rgba(124, 52, 31, 0.06);
  --shadow: 43, 34, 22;
  --grain: url(#grain-dark);
  --grain-opacity: 0.045;

  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Libre Franklin", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  --rail-w: 5.5rem;
  --measure: 38rem;
  --content-w: 72rem;
  --radius: 0.375rem;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #211a10;
    --paper-raised: #2c2416;
    --paper-edge: #4d3f24;
    --ink: #ecdfc0;
    --ink-soft: #c2b18a;
    --ink-faint: #8c7c58;
    --forest: #86a87f;
    --forest-deep: #5e8158;
    --seal: #cf7c53;
    --seal-deep: #e0966b;
    --brass: #d3ae5f;

    /* candlelight: warm glow pooled in the upper corner, soot at the edges */
    --stain-a: rgba(211, 174, 95, 0.07);
    --stain-b: rgba(0, 0, 0, 0.28);
    --shadow: 0, 0, 0;
    --grain: url(#grain-light);
    --grain-opacity: 0.035;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 60% 45% at 85% 8%, var(--stain-a), transparent 70%),
    radial-gradient(ellipse 50% 40% at 12% 92%, var(--stain-b), transparent 70%),
    radial-gradient(ellipse 35% 30% at 55% 55%, var(--stain-a), transparent 75%);
  background-attachment: fixed;
  position: relative;
}

/* Film grain: full-viewport layer above the paper, below content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000;
  filter: var(--grain);
  opacity: var(--grain-opacity);
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 60, "opsz" 72;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 4.2vw + 1rem, 3.75rem); font-weight: 520; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.2vw + 1rem, 1.85rem); }
h3 { font-size: 1.15rem; font-variation-settings: "SOFT" 40, "opsz" 24; }

p { margin: 0 0 1em; }

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--forest-deep); }

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

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 60;
  padding: 0.6rem 1rem;
  background: var(--forest-deep);
  color: #f6eed4;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: #f6eed4; }

/* ==========================================================================
   Book-tab rail (desktop) → top bar (≤ 860px)
   ========================================================================== */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 1rem 0 1.25rem;
  background: color-mix(in srgb, var(--paper) 78%, var(--paper-edge));
  border-right: 1px solid var(--paper-edge);
  box-shadow: inset -0.5rem 0 1rem -0.75rem rgba(var(--shadow), 0.35);
}

.wordmark {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.wordmark:hover { color: var(--forest-deep); }
.wordmark__seal { width: 4rem; height: 4rem; }
.wordmark__text {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.1;
  white-space: nowrap;
}
/* On the rail the seal already carries the name; keep the text for AT. */
@media (min-width: 860.02px) {
  .wordmark__text {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

.tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.tab {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 1rem 0.55rem;
  margin-right: -0.8rem; /* overhang the rail's edge, like a tab glued to a page */
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-right: 0;
  /* rotated 180°: visual right edge is the element's left edge */
  border-radius: 0.5rem 0 0 0.5rem;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, color 0.2s;
}
.tab:hover {
  color: var(--forest-deep);
  background: var(--paper-raised);
}
.tab[aria-current] {
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--forest) 14%, var(--paper-raised));
  border-left: 3px solid var(--forest); /* visual outer (right) edge after rotation */
  transform: rotate(180deg) translateX(-0.6rem); /* shifted outward past the rail */
  box-shadow: -0.25rem 0 0.6rem rgba(var(--shadow), 0.12);
}
.tab:focus-visible { outline-offset: 2px; }

.rail__sprig {
  margin-top: auto;
  align-self: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--forest);
  opacity: 0.8;
}

.page {
  position: relative;
  z-index: 1;
  margin-left: var(--rail-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3.5rem) 4rem;
}
main:focus { outline: none; }

@media (max-width: 860px) {
  html { scroll-padding-top: 7.5rem; }
  .rail {
    position: sticky; /* stays in flow so content starts below it */
    top: 0;
    bottom: auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    column-gap: 1rem;
    row-gap: 0.5rem;
    padding: 0.6rem 1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--paper-edge);
    box-shadow: 0 0.35rem 0.8rem -0.6rem rgba(var(--shadow), 0.35);
  }
  .wordmark {
    flex-direction: row;
    align-self: center;
    gap: 0.55rem;
    margin: 0 0 0.35rem;
  }
  .wordmark__seal { width: 2.6rem; height: 2.6rem; }
  .tabs {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.3rem;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 0.5rem 0.75rem 0.45rem;
    margin: 0 0 -1px;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--paper-edge);
    border-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
  }
  .tab[aria-current] {
    transform: none;
    border-left: 1px solid var(--paper-edge);
    border-bottom: 3px solid var(--forest);
    padding-bottom: calc(0.45rem - 2px);
    box-shadow: none;
  }
  .rail__sprig { display: none; }
  .page { margin-left: 0; }
}

@media (max-width: 560px) {
  .tabs { flex: 1 1 100%; justify-content: space-between; }
  .tabs li { flex: 1 1 auto; }
  .tab { text-align: center; padding-inline: 0.4rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--paper-edge);
  padding: 1.75rem clamp(1.25rem, 4vw, 3.5rem);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.site-footer p {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-footer .icon { color: var(--forest); width: 1.4rem; height: 1.4rem; }

/* ==========================================================================
   Shared page pieces
   ========================================================================== */
.page-header { max-width: var(--measure); margin-bottom: clamp(2rem, 4vw, 3rem); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest);
}
.eyebrow .icon { width: 1.2rem; height: 1.2rem; }

.lede {
  font-family: var(--font-serif);
  font-variation-settings: "SOFT" 80, "opsz" 24;
  font-size: clamp(1.15rem, 0.6vw + 1rem, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.rule {
  border: 0;
  height: 7px;
  margin: 2.5rem 0;
  max-width: var(--measure);
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  opacity: 0.55;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  line-height: 1;
}

/* ==========================================================================
   Home
   ========================================================================== */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.intro__text { max-width: var(--measure); }
.intro__body { color: var(--ink); }
.intro__seal {
  width: clamp(9rem, 18vw, 14rem);
  height: auto;
  aspect-ratio: 1;
  color: var(--forest);
  opacity: 0.9;
  transform: rotate(-4deg);
  margin-top: 0.5rem;
}
@media (max-width: 700px) {
  .intro { grid-template-columns: 1fr; }
  .intro__seal { display: none; }
}

.guide {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
  display: grid;
  gap: 0.25rem;
}
.guide a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  padding: 1rem 1rem 1rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px dashed color-mix(in srgb, var(--paper-edge) 70%, transparent);
  transition: background-color 0.2s;
}
.guide a:hover { background: var(--paper-raised); }
.guide .icon { grid-row: span 2; width: 1.6rem; height: 1.6rem; color: var(--forest); margin-top: 0.2rem; }
.guide__name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 580;
  color: var(--forest-deep);
}
.guide a:hover .guide__name { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.guide__desc { color: var(--ink-soft); }
@media (prefers-color-scheme: dark) {
  .guide__name { color: var(--forest); }
}

/* ==========================================================================
   Book cover (index.html only)
   ========================================================================== */
.has-cover { overflow: hidden; }

.cover-stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  perspective: 2200px;
  perspective-origin: 0% 50%;
}

.cover {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 2rem;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  color: #e6cf93;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(211, 174, 95, 0.10), transparent 70%),
    radial-gradient(ellipse 45% 35% at 20% 80%, rgba(0, 0, 0, 0.30), transparent 70%),
    linear-gradient(140deg, #4a2f1c 0%, #3a2a1a 30%, #2c3b27 62%, #1b2a1b 100%);
  transform-origin: left center;
  transform: rotateY(0deg);
  backface-visibility: hidden;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    transform 1s var(--ease-out),
    box-shadow 1s var(--ease-out);
}
/* double brass frame */
.cover::before,
.cover::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(211, 174, 95, 0.75);
}
.cover::before { inset: clamp(0.9rem, 2.5vw, 1.6rem); }
.cover::after { inset: calc(clamp(0.9rem, 2.5vw, 1.6rem) + 6px); border-color: rgba(211, 174, 95, 0.45); }

.cover:focus-visible { outline: 2px solid #e6cf93; outline-offset: -0.45rem; border-radius: 0; }

.cover__seal {
  width: clamp(11rem, 34vmin, 19rem);
  height: auto;
  aspect-ratio: 1;
  color: #d9b86a;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}
.cover__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1.4vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #e6cf93;
  padding-left: 0.32em; /* optically recentre tracked text */
}
.cover__prompt {
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 500;
  color: #f0e2bb;
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.cover.is-opening {
  transform: rotateY(-100deg);
  box-shadow: 2.5rem 0 5rem rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   Herb Library
   ========================================================================== */
.finder {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.25rem;
}
.finder__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.search { max-width: 26rem; }
.search__field { position: relative; }
.search .icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  border-radius: 999px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
}
.search input::placeholder { color: var(--ink-faint); opacity: 1; }
.search input:focus-visible { outline-offset: 2px; border-color: var(--forest); }

.filters { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters legend { padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.pill {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--paper-edge);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.pill:hover { border-color: var(--forest); color: var(--forest-deep); }
.pill[aria-pressed="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper-raised);
}
@media (prefers-color-scheme: dark) {
  .pill[aria-pressed="true"] { color: #1c170e; }
}

.results-count { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

.specimens {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 2.25rem 1.75rem;
  align-items: start;
}

.specimen {
  position: relative;
  padding: 1.6rem 1.35rem 1.25rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow:
    0 1px 1px rgba(var(--shadow), 0.10),
    0 0.5rem 1rem -0.5rem rgba(var(--shadow), 0.25);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.specimens > li:nth-child(3n + 1) .specimen { --tilt: -1.4deg; }
.specimens > li:nth-child(3n + 2) .specimen { --tilt: 1.1deg; }
.specimens > li:nth-child(3n + 3) .specimen { --tilt: -0.6deg; }
.specimens > li:nth-child(4n) .specimen { --tilt: 0.7deg; }

.specimen:hover,
.specimen:focus-within {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 2px 2px rgba(var(--shadow), 0.10),
    0 1.2rem 2rem -0.8rem rgba(var(--shadow), 0.45);
}

/* the pin */
.specimen::before {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: 50%;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: -0.425rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8a27a 0 18%, var(--seal) 45%, var(--seal-deep) 100%);
  box-shadow: 0 2px 3px rgba(var(--shadow), 0.4), 0 0 0 2px var(--brass);
}

.specimen__no {
  font-size: 1.55rem;
  color: var(--brass);
}
.specimen__photo {
  margin: -0.35rem -0.35rem 1rem;
  padding: 0.35rem 0.35rem 0.35rem;
  background: #fbf7ea;
  box-shadow: 0 1px 2px rgba(var(--shadow), 0.25);
}
.specimen__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.specimen__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.specimen__icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--forest);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.specimen h2 { font-size: 1.4rem; margin-bottom: 0.1rem; }
.specimen__latin {
  font-family: var(--font-serif);
  font-style: italic;
  font-variation-settings: "opsz" 18;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}
.specimen__meta {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--paper-edge) 65%, transparent);
}
.specimen__blurb { font-size: 0.98rem; }

.tags { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--forest) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--forest) 30%, transparent);
}
@media (prefers-color-scheme: dark) {
  .tag { color: var(--ink); }
}

.more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--seal-deep);
  text-decoration: none;
  padding: 0.2rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
/* the whole card is a click target for its Read more link */
.more::after { content: ""; position: absolute; inset: 0; }
.more:focus-visible { outline: none; }
.more:focus-visible::after { outline: 2px solid var(--seal); outline-offset: 4px; border-radius: 2px; }
.specimen { cursor: pointer; }
.more:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.more__chev {
  width: 0.7rem; height: 0.7rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.25s var(--ease-out);
}
.more:hover .more__chev { transform: translateX(3px); }

.empty {
  max-width: var(--measure);
  padding: 1.5rem 1.5rem;
  border: 1px dashed var(--paper-edge);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.empty p { margin: 0 0 0.75rem; }
.link-button {
  font: inherit;
  font-weight: 600;
  color: var(--forest);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.link-button:hover { color: var(--forest-deep); }

/* ==========================================================================
   Extraction Methods
   ========================================================================== */
.methods {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 48rem;
}
.method {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  column-gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid color-mix(in srgb, var(--paper-edge) 70%, transparent);
}
.method:last-child { border-bottom: 1px solid color-mix(in srgb, var(--paper-edge) 70%, transparent); }
.method__num {
  font-size: 2.4rem;
  color: var(--seal);
  text-align: right;
  padding-top: 0.1rem;
}
.method h2 { margin-bottom: 0.4rem; }
.used-for {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}
.used-for span {
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--forest) 28%, transparent);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-left: 0.3rem;
}
@media (prefers-color-scheme: dark) {
  .used-for span { color: var(--ink); }
}
.method p:last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .method { grid-template-columns: 2.75rem 1fr; column-gap: 0.75rem; }
  .method__num { font-size: 1.9rem; }
}

/* ==========================================================================
   Recipes
   ========================================================================== */
.recipes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
  gap: 1.75rem;
  align-items: start;
}
.recipe {
  height: 100%;
  padding: 1.6rem 1.5rem 1.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: 0 0.5rem 1rem -0.6rem rgba(var(--shadow), 0.25);
  position: relative;
}
.recipe::after {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border: 1px solid color-mix(in srgb, var(--paper-edge) 55%, transparent);
  border-radius: 2px;
  pointer-events: none;
}
.recipes > li { display: flex; }
.recipe__kicker { font-size: 1.45rem; color: var(--seal); margin: 0 0 0.4rem; }
.recipe h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.recipe__lede { color: var(--ink-soft); }
.recipe h3 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 1.25rem 0 0.5rem;
}
.recipe ul, .recipe ol { margin: 0; padding-left: 1.2rem; }
.recipe li { margin-bottom: 0.35rem; font-size: 0.97rem; }
.recipe ul li::marker { color: var(--brass); content: "✦  "; font-size: 0.7em; }
.recipe ol li::marker { color: var(--seal); font-weight: 600; }
.recipe__note {
  margin: 1.25rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--paper-edge);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   Sources
   ========================================================================== */
.prose { max-width: var(--measure); }
.callout {
  max-width: var(--measure);
  margin: 2.25rem 0 0;
  padding: 1.25rem 1.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  border-left: 4px solid var(--seal);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 0.5rem 1rem -0.7rem rgba(var(--shadow), 0.3);
}
.callout p { margin: 0; }
.callout strong { color: var(--seal-deep); }

.noscript-note {
  max-width: var(--measure);
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--brass);
  background: var(--paper-raised);
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .cover__prompt { animation: none; opacity: 1; }
  .specimen:hover,
  .specimen:focus-within { transform: rotate(0deg); }
  .more:hover .more__chev { transform: none; }
  /* the cover fade is the one transition that stays, and it's opacity only */
  .cover {
    transform: none !important;
    transition: opacity 250ms linear !important;
  }
  .cover.is-opening { transform: none; box-shadow: none; opacity: 0; }
}

@media print {
  .rail, .site-footer, .finder, .more, .cover-stage { display: none !important; }
  .page { margin: 0; }
  body::before { display: none; }
  .entry__aside { position: static; }
  .panels-bar { display: none; }
}

/* nav wrapper inside the rail/top bar */
.rail > nav { display: flex; flex-direction: column; align-items: flex-end; }
@media (max-width: 860px) {
  .rail > nav { flex-direction: row; max-width: 100%; }
}
@media (max-width: 560px) {
  .rail > nav { flex: 1 1 100%; }
  .tabs { width: 100%; }
}
/* short desktop windows: tighten the rail so every tab still fits */
@media (min-width: 860.02px) and (max-height: 620px) {
  .wordmark { margin-bottom: 0.75rem; }
  .wordmark__seal { width: 3.25rem; height: 3.25rem; }
  .tab { padding-block: 0.7rem; }
  .rail__sprig { display: none; }
}

@media (prefers-color-scheme: dark) {
  .tab:hover,
  .tab[aria-current] { color: var(--ink); }
}
@media (max-width: 420px) {
  .tabs { gap: 0.2rem; }
  .tab { font-size: 0.68rem; letter-spacing: 0.02em; padding-inline: 0.3rem; }
}
@media (max-width: 360px) {
  .rail { padding-inline: 0.6rem; }
  .tab { font-size: 0.64rem; letter-spacing: 0; padding-inline: 0.25rem; }
}

/* ==========================================================================
   Full herb entry (herb.html)
   ========================================================================== */
.crumbs {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}
.crumbs a { font-weight: 600; }

.entry__header { max-width: 46rem; margin-bottom: 2rem; }
.entry__mark { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.entry__icon {
  width: 3rem; height: 3rem;
  color: var(--forest);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.entry__no { font-size: 1.8rem; color: var(--brass); }
.entry__header h1 { margin-bottom: 0.15rem; }
.entry__latin {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0 0 0.3rem;
}
.entry__meta { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.9rem; }
.entry__header .tags { margin-bottom: 1.25rem; }

.entry__photo {
  margin: 0 0 2.75rem;
  max-width: 60rem;
}
.entry__photo img {
  width: 100%;
  height: auto;
  max-height: 34rem;
  object-fit: cover;
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 0.8rem 1.6rem -1rem rgba(var(--shadow), 0.55);
}
.entry__photo figcaption,
.entry__plate figcaption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.entry__photo figcaption a,
.entry__plate figcaption a { color: inherit; }

.entry__body {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(15rem, 20rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.entry__intro {
  font-size: 1.1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper-edge) 70%, transparent);
}
/* collapsible sections */
.panels-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin: 1.25rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.panel { border-bottom: 1px solid color-mix(in srgb, var(--paper-edge) 70%, transparent); }
.panel summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem;
  cursor: pointer;
  border-radius: 2px;
}
.panel summary::-webkit-details-marker { display: none; }
.panel summary h2 {
  font-size: 1.4rem;
  margin: 0;
  transition: color 0.15s;
}
.panel summary:hover h2 { color: var(--forest-deep); }
@media (prefers-color-scheme: dark) { .panel summary:hover h2 { color: var(--forest); } }
.panel summary:focus-visible { outline-offset: 2px; }
.panel__chev {
  width: 0.9rem; height: 0.9rem; flex: none;
  fill: none; stroke: var(--seal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.25s var(--ease-out);
}
.panel[open] > summary .panel__chev { transform: rotate(180deg); }
.panel__body { padding: 0 0.25rem 1.4rem; }
.panel__body p:last-child { margin-bottom: 0; }
/* smooth open/close where the browser can animate to auto height */
@supports (interpolate-size: allow-keywords) {
  .entry { interpolate-size: allow-keywords; }
  .panel::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.3s var(--ease-out), content-visibility 0.3s allow-discrete;
  }
  .panel[open]::details-content { height: auto; }
}

.reading { margin-top: 2.25rem; }
.reading h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.reading ul { list-style: none; margin: 0; padding: 0; }
.reading li {
  padding: 0.55rem 0;
  border-top: 1px dashed color-mix(in srgb, var(--paper-edge) 70%, transparent);
  font-size: 0.95rem;
}
.reading__note { display: block; font-size: 0.85rem; color: var(--ink-soft); }

.entry__aside {
  position: sticky;
  top: 2rem;
  display: grid;
  gap: 2rem;
}
.entry__plate { margin: 0; }
.entry__plate-frame {
  position: relative;
  padding: 0.6rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 0.6rem 1.2rem -0.8rem rgba(var(--shadow), 0.5);
  transform: rotate(1deg);
}
.entry__plate-frame::before {
  content: "";
  position: absolute;
  top: -0.45rem; left: 50%;
  width: 0.85rem; height: 0.85rem; margin-left: -0.425rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8a27a 0 18%, var(--seal) 45%, var(--seal-deep) 100%);
  box-shadow: 0 2px 3px rgba(var(--shadow), 0.4), 0 0 0 2px var(--brass);
}
.entry__plate img { width: 100%; height: auto; }
.entry__plate .hand {
  display: block;
  font-size: 1.35rem;
  color: var(--seal);
  margin-bottom: 0.2rem;
}

.made-into {
  padding: 1.1rem 1.25rem 1.2rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  border-left: 4px solid var(--forest);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.made-into h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.made-into h3 {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.9rem 0 0.35rem;
}
.made-into ul { margin: 0; padding-left: 1.1rem; }
.made-into li { margin-bottom: 0.2rem; }
.made-into li::marker { color: var(--brass); }

.entry-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--paper-edge);
}
.entry-pager a {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 560;
  text-decoration: none;
}
.entry-pager a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.entry-pager__dir {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.entry-pager__next { text-align: right; }
.entry-pager__all { font-size: 0.95rem !important; font-family: var(--font-sans) !important; font-weight: 600 !important; }

.entry-index { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.9; }

@media (max-width: 900px) {
  .entry__body { grid-template-columns: 1fr; }
  .entry__aside {
    position: static;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    align-items: start;
  }
}
@media (max-width: 560px) {
  .entry__aside { grid-template-columns: 1fr; }
  .entry__plate { max-width: 20rem; }
  .entry-pager { grid-template-columns: 1fr 1fr; }
  .entry-pager__all { grid-column: 1 / -1; grid-row: 2; text-align: center; }
}

/* linked-to method or recipe */
.method, .recipes > li { scroll-margin-top: 1.5rem; }
.method:target h2,
.recipe:target h2 { color: var(--seal-deep); }
.recipe:target { border-color: var(--seal); }

/* ---------- Sources: picture credits ---------- */
.credits { max-width: 46rem; margin-top: 3rem; }
.credits h2 { font-size: 1.5rem; }
.credits > p { color: var(--ink-soft); max-width: var(--measure); }
.credits ul { list-style: none; margin: 0; padding: 0; }
.credits li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.25rem 1rem;
  padding: 0.7rem 0;
  border-top: 1px dashed color-mix(in srgb, var(--paper-edge) 70%, transparent);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.credits__herb { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 580; }
@media (max-width: 560px) { .credits li { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .panel::details-content { transition: none !important; }
}
@media print {
  .panel__chev, .panels-bar { display: none !important; }
}

/* ==========================================================================
   Expansion: traditions, profiles, more filters
   ========================================================================== */
.specimen__origin {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}

.more-filters { border-top: 1px dashed color-mix(in srgb, var(--paper-edge) 70%, transparent); padding-top: 0.6rem; }
.more-filters > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--forest-deep);
  width: max-content;
  padding: 0.2rem 0;
}
@media (prefers-color-scheme: dark) { .more-filters > summary { color: var(--forest); } }
.more-filters[open] > summary { margin-bottom: 0.8rem; }
.more-filters .filters + .filters { margin-top: 0.9rem; }

/* traditional profile on herb pages */
.profile {
  margin: 1.75rem 0 0.5rem;
  padding: 1.25rem 1.35rem 1.1rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: 0 0.5rem 1rem -0.8rem rgba(var(--shadow), 0.35);
}
.profile > h2 { font-size: 1.35rem; margin-bottom: 0.9rem; }
.profile h3 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 0.5rem;
}
.profile__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .profile__grid { grid-template-columns: 1fr; } }
.actions, .systems { list-style: none; margin: 0; padding: 0; }
.actions li { margin-bottom: 0.45rem; line-height: 1.35; }
.action {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 600;
  text-transform: capitalize;
  color: var(--ink);
}
.action__def { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.systems { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.systems a {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--forest) 30%, transparent);
}
.systems a:hover { background: color-mix(in srgb, var(--forest) 22%, transparent); }
@media (prefers-color-scheme: dark) { .systems a { color: var(--ink); } }
.frames {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--paper-edge);
}
.frame dl { margin: 0; font-size: 0.88rem; }
.frame dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem; padding: 0.15rem 0; }
.frame dt { color: var(--ink-soft); }
.frame dd { margin: 0; color: var(--ink); }
.frame p { margin: 0; font-size: 0.9rem; }
.frame__note { font-size: 0.78rem; color: var(--ink-soft); }
.profile__note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
}
.profile__more { margin: 0.8rem 0 0; font-size: 0.82rem; }

/* recipes */
.recipe__origin {
  margin: -0.2rem 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}
.recipe__herbs { margin: 0.7rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }

/* sources glossary */
.terms { max-width: 46rem; margin-top: 3rem; }
.terms h2 { font-size: 1.5rem; }
.terms > p { color: var(--ink-soft); max-width: var(--measure); }
.terms h3 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 1.5rem 0 0.4rem;
}
.glossary { margin: 0; }
.glossary > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.2rem 1rem;
  padding: 0.45rem 0;
  border-top: 1px dashed color-mix(in srgb, var(--paper-edge) 70%, transparent);
  font-size: 0.93rem;
}
.glossary dt { font-family: var(--font-serif); font-weight: 600; text-transform: capitalize; }
.glossary dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .glossary > div { grid-template-columns: 1fr; } }
.entry__plate-note { display: block; margin-top: 0.35rem; font-style: italic; }

/* Methods page: how a formula is built */
#formulas { margin-top: 2.5rem; }
#formulas h2 { margin-top: 1.5rem; }
#formulas ul { padding-left: 1.2rem; }
#formulas li { margin-bottom: 0.5rem; }
.source-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1.5rem; }
