/* ==========================================================================
   Dioscorides — design system
   Editorial / botanical-journal look derived from the brand mark:
   aubergine (#7C007C) wordmark + delta green (#8CE78C), on a parchment ground.
   ========================================================================== */

:root {
  /* Colour */
  --paper: #faf7f1;
  --paper-2: #f3eee3;
  --paper-3: #ebe4d6;
  --surface: #ffffff;
  --ink: #1e1a22;
  --ink-2: #47414f;
  --muted: #6a6473;
  --line: #e4dccd;
  --line-strong: #d3c9b6;
  --plum: #6d0f6d;
  --plum-strong: #520852;
  --plum-tint: #f4e9f2;
  --herb: #2d6a4c;
  --herb-tint: #e6f1e8;
  --delta: #8ce78c;
  --danger: #b42318;
  --danger-tint: #fdecea;
  --night: #1b1720;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.1875rem, 1.12rem + 0.3vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.8rem + 2.2vw, 3.5rem);
  --step-5: clamp(2.75rem, 2rem + 3.6vw, 5rem);

  /* Space & shape */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --section: clamp(4rem, 2.8rem + 5vw, 7.5rem);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(30 26 34 / 0.06), 0 1px 1px rgb(30 26 34 / 0.04);
  --shadow: 0 2px 4px rgb(30 26 34 / 0.04), 0 12px 32px -8px rgb(30 26 34 / 0.14);
  --shadow-lg: 0 24px 60px -20px rgb(60 20 60 / 0.35);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; }
[x-cloak] { display: none !important; }

:focus-visible {
  outline: 2.5px solid var(--plum);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

::selection { background: var(--delta); color: var(--ink); }

.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;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

.icon {
  width: 1.15em; height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(44rem + 2 * var(--gutter)); }

/* ---------- Shared typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--herb);
}
.eyebrow .icon { width: 0.95em; height: 0.95em; color: var(--herb); }

.section-title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem;
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.meta .icon { width: 1em; height: 1em; margin-right: 0.15rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; color: var(--plum);
  text-decoration: none;
  white-space: nowrap;
}
.link-arrow .icon { transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--plum); color: #fff; box-shadow: 0 6px 18px -8px rgb(109 15 109 / 0.7); }
.btn--primary:hover { background: var(--plum-strong); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn--sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.925rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgb(250 247 241 / 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgb(30 26 34 / 0.35); }
.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 22px; width: auto; }
@media (min-width: 761px) { .site-header .brand img { height: 26px; } }

.site-nav ul {
  display: flex; align-items: center; gap: 0.25rem;
  padding: 0; list-style: none;
}
.site-nav__link {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.95rem; font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav__link:hover { color: var(--ink); background: var(--paper-2); }
.site-nav__link[aria-current="page"] { color: var(--plum); }
.site-nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 6px;
  width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--herb);
}
.site-nav .btn { margin-left: 0.5rem; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--paper);
    border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .site-header.is-open .site-nav {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; padding-top: 1.5rem; }
  .site-nav__link {
    width: 100%; min-height: 64px; padding: 0;
    font-family: var(--font-display); font-size: 1.75rem; font-weight: 450;
    color: var(--ink); border-radius: 0;
  }
  .site-nav__link:hover { background: none; color: var(--plum); }
  .site-nav__link[aria-current="page"]::after { left: auto; right: 0; bottom: 50%; margin: 0 0 -2.5px; }
  .site-nav .btn { width: 100%; margin: 0; min-height: 54px; font-size: 1.05rem; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1rem + 6vw, 6.5rem) clamp(3.5rem, 2rem + 6vw, 7rem);
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgb(140 231 140 / 0.18), transparent 60%),
    radial-gradient(50rem 30rem at 0% 100%, rgb(109 15 109 / 0.08), transparent 60%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 5vw, 6rem);
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 450;
  font-style: italic;
  font-variation-settings: "opsz" 144;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero__lede {
  max-width: 38rem;
  margin-top: 1.5rem;
  font-family: var(--font-text);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.hero__art { position: relative; isolation: isolate; justify-self: center; width: min(100%, 460px); }
.hero__delta {
  position: absolute; z-index: -1;
  width: 70%; height: 70%;
  right: -14%; bottom: -12%;
  color: var(--delta);
  opacity: 0.55;
}

.arch {
  position: relative;
  overflow: hidden;
  aspect-ratio: 7 / 8;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  background: var(--paper-3);
  box-shadow: var(--shadow-lg);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
/* The hero painting has a red border along its bottom edge: crop it out. */
.hero .arch img { transform: scale(1.16); transform-origin: 50% 15%; }
.arch--soft { aspect-ratio: 5 / 7; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise 0.8s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero__art { animation: rise 1s 0.1s var(--ease) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { width: min(78%, 380px); order: -1; }
  .arch { aspect-ratio: 1 / 1; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) var(--section); }
.section--tinted { background: var(--paper-2); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card:focus-within { box-shadow: var(--shadow); }
.card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; padding: 1.4rem 1.5rem 1.5rem; }
.card__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.card__title--lg { font-size: var(--step-3); line-height: 1.12; }
.card__link { text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__link:focus-visible { outline: none; }
.card__link:focus-visible::after { outline: 2.5px solid var(--plum); outline-offset: -3px; border-radius: var(--radius); }
.card__excerpt {
  font-family: var(--font-text);
  color: var(--ink-2);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__more {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: auto; padding-top: 0.5rem;
  font-size: 0.925rem; font-weight: 600; color: var(--plum);
}
.card__more .icon { transition: transform 0.25s var(--ease); }
.card:hover .card__more .icon { transform: translateX(4px); }

.card--featured { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: 1.75rem; }
.card--featured .card__media { aspect-ratio: auto; min-height: 100%; }
.card--featured .card__body { justify-content: center; gap: 1rem; padding: clamp(1.5rem, 1rem + 2.5vw, 3.25rem); }
.card--featured .card__excerpt { -webkit-line-clamp: 4; line-clamp: 4; font-size: var(--step-1); }
@media (max-width: 860px) {
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card__media { aspect-ratio: 3 / 2; }
}

@media (max-width: 640px) {
  .page-home .card-grid > .card:nth-child(n + 4) { display: none; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.75rem;
}

/* ---------- About teaser ---------- */
.about-teaser {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 5vw, 6rem);
}
.about-teaser__text {
  max-width: 40rem;
  margin: 1.25rem 0 2rem;
  font-family: var(--font-text);
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--ink-2);
}
@media (max-width: 760px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser__art { width: min(70%, 280px); }
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: start;
}
.contact__lede { margin-top: 1rem; font-family: var(--font-text); font-size: var(--step-1); color: var(--ink-2); }
.contact__card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 1rem;
  font: inherit; font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.55; }
.field input:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--plum);
  box-shadow: 0 0 0 4px rgb(109 15 109 / 0.14);
}
.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }
.field__error { font-size: 0.875rem; color: var(--danger); }

.notice {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.notice .icon { margin-top: 0.15rem; }
.notice--success { background: var(--herb-tint); color: var(--herb); }
.notice--error { background: var(--danger-tint); color: var(--danger); }

/* ---------- Blog index ---------- */
.page-hero {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(1rem, 0.5rem + 2vw, 2rem);
  background: radial-gradient(50rem 22rem at 90% 0%, rgb(140 231 140 / 0.16), transparent 60%);
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 450;
  font-variation-settings: "opsz" 144;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.page-hero__lede,
.page-hero__intro {
  max-width: 40rem;
  margin-top: 1rem;
  font-family: var(--font-text);
  font-size: var(--step-1);
  color: var(--ink-2);
}
.page-hero__intro h2, .page-hero__intro h3, .page-hero__intro h4, .page-hero__intro h5 { font: inherit; }

.search { position: relative; max-width: 40rem; margin-bottom: 0.75rem; }
.search__icon {
  position: absolute; left: 1.15rem; top: 50%;
  width: 1.25rem; height: 1.25rem;
  transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.search__input {
  width: 100%;
  min-height: 56px;
  padding: 0 3.25rem 0 3.1rem;
  font: inherit; font-size: 1.025rem; color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__input::placeholder { color: var(--muted); }
.search__input:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 4px rgb(109 15 109 / 0.14); }
.search__clear {
  position: absolute; right: 0.5rem; top: 50%;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  transform: translateY(-50%);
  border: 0; border-radius: 50%;
  background: var(--paper-2); color: var(--ink);
  cursor: pointer;
}
.search__clear:hover { background: var(--paper-3); }
.search__status { min-height: 1.6em; margin-bottom: 1.5rem; font-size: var(--step--1); color: var(--muted); }

.empty-state {
  display: grid; justify-items: center; gap: 1rem;
  padding: 4rem 1rem;
  text-align: center; color: var(--ink-2);
}
.empty-state .icon { width: 2.5rem; height: 2.5rem; color: var(--herb); }

/* ---------- Article ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: 3px;
  pointer-events: none;
}
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--herb), var(--plum));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.article__header { padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem); padding-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.breadcrumb { margin-bottom: 1.75rem; }
.breadcrumb a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.925rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
}
.breadcrumb a:hover { color: var(--plum); }
.breadcrumb .icon { transition: transform 0.25s var(--ease); }
.breadcrumb a:hover .icon { transform: translateX(-3px); }
.article__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 500;
  font-variation-settings: "opsz" 120;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.article__dek {
  margin-top: 1.25rem;
  font-family: var(--font-text);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-2);
}
.article__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.article__footer { display: grid; gap: 2rem; padding-block: 1rem var(--section); }
.page-standard .article { padding-bottom: var(--section); }

.share { display: inline-flex; align-items: center; gap: 0.4rem; }
.share__label { margin-right: 0.35rem; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.share__btn:hover { color: var(--plum); border-color: var(--plum); background: var(--plum-tint); }
.share__btn .icon { width: 18px; height: 18px; }
.share__toast { font-size: var(--step--1); color: var(--herb); font-weight: 600; }

/* Long-form reading */
.prose {
  font-family: var(--font-text);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.75;
  color: var(--ink);
  font-feature-settings: "kern", "liga", "onum";
}
.prose > * + * { margin-top: 1.35em; }
.prose h2, .prose h3, .prose h4, .prose h5 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--ink);
}
.prose h2 { font-size: 1.75em; margin-top: 2.2em; }
.prose h3 { font-size: 1.45em; margin-top: 2em; }
.prose h4 { font-size: 1.22em; margin-top: 1.8em; }
.prose h5 { font-family: var(--font-text); font-size: 1.08em; font-weight: 600; margin-top: 1.6em; line-height: 1.5; }
.prose > :first-child { margin-top: 0; }
.prose :is(h2, h3, h4, h5) + * { margin-top: 0.7em; }
.prose strong, .prose b { font-weight: 600; color: var(--ink); }
.prose a {
  color: var(--plum);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgb(109 15 109 / 0.35);
  transition: text-decoration-color 0.2s var(--ease);
}
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.5em; }
.prose ul > li::marker { content: "◆  "; color: var(--herb); font-size: 0.6em; }
.prose ol > li::marker { color: var(--herb); font-family: var(--font-ui); font-weight: 600; font-size: 0.9em; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5em; }
.prose p:empty { display: none; }

.rich-figure img {
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
@media (min-width: 1000px) {
  .page-article .prose > .rich-figure:first-child,
  .page-article .prose > p:empty:first-child + .rich-figure { margin-inline: -4rem; }
}

.callout {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: var(--herb-tint);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.callout .icon { width: 1.4rem; height: 1.4rem; margin-top: 0.1rem; color: var(--herb); }
.callout a { display: inline-block; margin-top: 0.35rem; font-weight: 600; color: var(--herb); }

/* Disclaimer page: a single statement, give it presence. */
.page-disclaimer .prose { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.45; }
.page-disclaimer .prose h4 { font: inherit; }

/* ---------- 404 ---------- */
.not-found { padding-block: clamp(4rem, 2rem + 8vw, 9rem); text-align: center; }
.not-found .hero__actions { justify-content: center; }
.not-found__mark { width: 4.5rem; height: 4.5rem; margin: 0 auto 1.5rem; display: block; color: var(--delta); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--night);
  color: rgb(247 242 232 / 0.72);
  font-size: 0.95rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5rem);
}
.site-footer .brand img { height: 22px; }
.site-footer__brand p { max-width: 26rem; margin-top: 1.5rem; font-family: var(--font-text); font-size: 1.025rem; line-height: 1.65; }
.site-footer__mission { font-style: italic; color: #f7f2e8; }
.site-footer__title {
  margin-bottom: 1rem;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--delta);
}
.site-footer ul { padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.site-footer__col a {
  display: inline-block; padding: 0.3rem 0;
  color: #f7f2e8; text-decoration: none;
  transition: color 0.2s var(--ease);
}
.site-footer__col a:hover { color: var(--delta); }
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgb(247 242 232 / 0.12);
  font-size: 0.85rem;
}
.site-footer__delta .icon { color: var(--delta); }
.site-footer :focus-visible { outline-color: var(--delta); }
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s, background-color 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.to-top:hover { background: var(--plum); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .share, .to-top, .progress, .section--tinted { display: none !important; }
  body { background: #fff; }
}
