/* Sermorelin Telehealth — Art Nouveau apothecary-bound-volume aesthetic */

:root {
  /* Palette */
  --primary: #4A6741;
  --primary-50: #EAF0E7;
  --primary-200: #B9CDB2;
  --primary-900: #243821;
  --secondary: #4A1942;
  --secondary-50: #EFE3EE;
  --secondary-900: #2A0E26;
  --accent: #B8860B;
  --accent-50: #F6EBC9;
  --accent-bright: #D4A12A;
  --terracotta: #C67A4B;
  --terracotta-50: #F5E2D3;
  --rose: #C9A0A0;
  --rose-50: #F4E5E5;
  --olive: #6B7B3A;
  --skyblue: #87CEEB;
  --neutral-50: #FFF8DC;
  --neutral-100: #F6EFCE;
  --neutral-200: #E4D9A8;
  --neutral-500: #8B7D5C;
  --neutral-700: #3F3826;
  --neutral-900: #1F1B12;
  --ink: #2B2618;
  --ink-muted: #5C5236;
  --bg: #FFF8DC;
  --surface: #FFFCEC;
  --surface-elevated: #FFFFF4;
  --surface-dark: #2A1E2A;
  --text: #2B2618;
  --text-muted: #5C5236;
  --text-inverse: #FFF8DC;
  --text-inverse-muted: #D8C9A2;
  --rule: #D8C68A;
  --rule-strong: #B8860B;
  --rule-plum: #7A2E6E;
  --success: #4A6741;
  --warning: #B8860B;
  --danger: #8E2A2A;

  /* Layout */
  --max-width: 76rem;
  --reading-width: 44rem;
  --container-px: clamp(1.25rem, 4vw, 3rem);

  /* Typography */
  --font-display: 'Tangerine', 'Allura', 'Snell Roundhand', cursive;
  --font-heading: 'Cinzel', 'Trajan Pro', 'Cinzel Decorative', 'Cormorant Garamond', Georgia, serif;
  --font-subhead: 'Cormorant Garamond', 'EB Garamond', 'Garamond', Georgia, serif;
  --font-body: 'EB Garamond', 'Garamond', 'Adobe Garamond Pro', Georgia, 'Times New Roman', serif;
  --font-annotation: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;

  /* Motion */
  --transition: 240ms ease-out;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Faint damask background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'><g fill='none' stroke='%234A6741' stroke-width='0.5' opacity='0.06'><path d='M48 12 C 36 24, 36 36, 48 48 C 60 36, 60 24, 48 12 Z'/><path d='M12 48 C 24 60, 36 60, 48 48 C 36 36, 24 36, 12 48 Z'/><path d='M48 84 C 60 72, 60 60, 48 48 C 36 60, 36 72, 48 84 Z'/><path d='M84 48 C 72 36, 60 36, 48 48 C 60 60, 72 60, 84 48 Z'/><circle cx='48' cy='48' r='2.5' fill='%23B8860B' stroke='none' opacity='0.5'/></g></svg>");
  background-size: 96px 96px;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--secondary); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--transition); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; color: var(--ink); }
h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1.18;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.875rem, 3.75vw, 2.875rem);
  line-height: 1.18;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin: 3.5rem 0 1.25rem;
  color: var(--ink);
}
h3 {
  font-family: var(--font-subhead);
  font-weight: 700;
  font-size: 1.4375rem;
  line-height: 1.32;
  letter-spacing: 0;
  margin: 1.5rem 0 0.75rem;
  color: var(--ink);
}
h4 {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.32;
  margin: 1.25rem 0 0.5rem;
}

p { margin: 0 0 1.125rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-family: var(--font-subhead);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 58ch;
}

.eyebrow {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.flourish {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3.25rem, 7vw, 5.75rem);
  line-height: 1;
  color: var(--secondary);
  letter-spacing: 0;
  text-transform: none;
}

small, .small { font-size: 0.9375rem; }

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.reading {
  max-width: var(--reading-width);
  margin: 0 auto;
}

main { padding-bottom: 4rem; }

/* ============ MASTHEAD ============ */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--primary);
  position: relative;
}
.site-header .container {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
}
.site-brand .brand-modifier {
  font-weight: 500;
  letter-spacing: 0.16em;
}
.site-brand .brand-flourish {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--secondary);
  letter-spacing: 0;
  text-transform: none;
  margin-left: 0.5rem;
}

/* Gold rule with rosette beneath masthead */
.site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: var(--accent);
  position: relative;
}
.headband {
  height: 56px;
  background-repeat: repeat-x;
  background-position: center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='56' viewBox='0 0 320 56'><g fill='none' stroke='%234A6741' stroke-width='1.25'><path d='M0 28 C 40 12, 60 44, 100 28 C 140 12, 180 44, 220 28 C 260 12, 280 44, 320 28' /></g><g fill='%23B8860B' stroke='none'><circle cx='160' cy='28' r='3.2'/><path d='M160 18 a3 3 0 0 1 3 3 a3 3 0 0 1 -3 3 a3 3 0 0 1 -3 -3 a3 3 0 0 1 3 -3 z M160 32 a3 3 0 0 1 3 3 a3 3 0 0 1 -3 3 a3 3 0 0 1 -3 -3 a3 3 0 0 1 3 -3 z' opacity='0.7'/></g><g fill='none' stroke='%234A6741' stroke-width='0.9'><path d='M50 28 q-6 -10 -16 -4 M50 28 q-6 10 -16 4'/><path d='M270 28 q6 -10 16 -4 M270 28 q6 10 16 4'/></g></svg>");
  background-color: var(--bg);
}

/* ============ NAV ============ */
.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.site-nav li { display: inline-flex; align-items: center; }
.site-nav li + li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.75rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><circle cx='4' cy='4' r='1.2' fill='%23B8860B'/><g fill='%23B8860B' opacity='0.85'><circle cx='4' cy='1' r='0.7'/><circle cx='4' cy='7' r='0.7'/><circle cx='1' cy='4' r='0.7'/><circle cx='7' cy='4' r='0.7'/><circle cx='2' cy='2' r='0.55'/><circle cx='6' cy='2' r='0.55'/><circle cx='2' cy='6' r='0.55'/><circle cx='6' cy='6' r='0.55'/></g></svg>");
}
.site-nav a {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
}
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.site-nav a:hover { color: var(--secondary); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--ink);
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.16em;
  font-size: 0.8125rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  cursor: pointer;
}

/* ============ HERO ============ */
.hero {
  padding: 3.5rem 0 2.5rem;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 58% 42%; gap: 3rem; }
}
.hero-eyebrow-rule {
  display: block;
  width: 100%;
  max-width: 14rem;
  height: 2px;
  margin: 0.5rem 0 1.25rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='4' viewBox='0 0 220 4' preserveAspectRatio='none'><path d='M0 2 C 50 0, 90 4, 140 2 C 180 0, 200 4, 220 2' fill='none' stroke='%23B8860B' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.hero-headline {
  margin-bottom: 0.25rem;
}
.hero-flourish {
  display: block;
  margin: 0 0 1.5rem;
}
.hero-lede {
  margin-bottom: 1.5rem;
}
.hero-fleuron {
  width: 24px;
  height: 24px;
  margin: 0.5rem 0 1.5rem;
}
.hero-figure {
  position: relative;
  padding: 0.5rem;
}
.hero-figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.hero-figure figcaption {
  margin-top: 0.875rem;
  font-family: var(--font-subhead);
  font-style: italic;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

/* Cartouche frame around hero figure */
.cartouche {
  position: relative;
  padding: 1rem;
}
.cartouche::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  border-radius: 12px;
  pointer-events: none;
}
.cartouche::after {
  content: "";
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  border: 1.5px solid var(--accent);
  border-radius: 16px;
  pointer-events: none;
  opacity: 0.55;
}

/* ============ HERO STATUS STRIP ============ */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* ============ BUTTONS ============ */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.875rem 1.625rem;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--primary);
  transition: background-color var(--transition), color var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
}
.btn-primary:hover { background: var(--primary-900); color: var(--text-inverse); }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-50); color: var(--primary-900); }
.btn::before, .btn::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23B8860B' stroke-width='1.25'><path d='M2 10 Q 2 4 8 2 Q 5 6 10 10'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: filter var(--transition);
}
.btn::before { top: 4px; left: 4px; }
.btn::after { bottom: 4px; right: 4px; transform: rotate(180deg); }
.btn:hover::before, .btn:hover::after { filter: brightness(1.4); }
.btn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* ============ SECTION LABELS / RULES ============ */
.section-label {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--secondary);
  margin: 0 0 0.5rem;
  display: block;
}

.whiplash-rule {
  margin: 3rem auto;
  width: 100%;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='480' height='16' viewBox='0 0 480 16' preserveAspectRatio='none'><path d='M0 8 C 80 2, 140 14, 220 8 L 230 8 M 250 8 L 260 8 C 340 2, 400 14, 480 8' fill='none' stroke='%234A6741' stroke-width='1.5'/><g transform='translate(240 8)' fill='%23B8860B'><circle r='2.6'/><g opacity='0.9'><circle cx='0' cy='-4.5' r='1.5'/><circle cx='0' cy='4.5' r='1.5'/><circle cx='-4' cy='-2.2' r='1.3'/><circle cx='4' cy='-2.2' r='1.3'/><circle cx='-4' cy='2.2' r='1.3'/><circle cx='4' cy='2.2' r='1.3'/></g></g></svg>");
  background-size: 100% 100%;
}

/* ============ DROP CAP ============ */
.drop-cap::first-letter {
  font-family: var(--font-subhead);
  font-weight: 700;
  font-size: clamp(3.5rem, 6vw, 5rem);
  line-height: 0.9;
  float: left;
  padding: 0.3rem 0.6rem 0 0;
  color: var(--secondary);
  shape-outside: margin-box;
}

/* ============ SECTIONS ============ */
section {
  margin-bottom: 1.5rem;
}
section h2 + p {
  margin-top: 0.5rem;
}

/* Inline citation markers */
sup a, .citation {
  font-family: var(--font-subhead);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.75em;
  color: var(--secondary);
  padding: 0 0.15em;
}
sup a:hover { color: var(--accent); }

/* ============ CARDS ============ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.875rem;
  margin: 1.5rem 0;
}
.card-elevated { background: var(--surface-elevated); }
.card-eyebrow {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}
.card-rule {
  height: 1px;
  background: var(--accent);
  position: relative;
  margin: 0.5rem 0 1rem;
}
.card-rule::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><circle cx='6' cy='6' r='2' fill='%23B8860B'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.card h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--font-subhead);
  font-weight: 700;
}

/* Card corner cartouches */
.card::before, .card::after,
.card .corner-tl, .card .corner-br {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A6741' stroke-width='1.1'><path d='M2 22 Q 4 8 14 6 M14 6 Q 10 12 18 18 M2 22 q 2 -6 6 -8'/><path d='M2 22 Q 8 18 8 14' stroke='%23B8860B' stroke-width='0.8'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: filter var(--transition);
}
.card::before { top: -6px; left: -6px; }
.card::after { bottom: -6px; right: -6px; transform: rotate(180deg); }
.card .corner-tr {
  position: absolute;
  width: 24px; height: 24px;
  top: -6px; right: -6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A6741' stroke-width='1.1'><path d='M22 22 Q 20 8 10 6 M10 6 Q 14 12 6 18 M22 22 q -2 -6 -6 -8'/><path d='M22 22 Q 16 18 16 14' stroke='%23B8860B' stroke-width='0.8'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: filter var(--transition);
}
.card .corner-bl {
  position: absolute;
  width: 24px; height: 24px;
  bottom: -6px; left: -6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A6741' stroke-width='1.1'><path d='M2 2 Q 4 16 14 18 M14 18 Q 10 12 18 6 M2 2 q 2 6 6 8'/><path d='M2 2 Q 8 6 8 10' stroke='%23B8860B' stroke-width='0.8'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transition: filter var(--transition);
}
.card:hover::before, .card:hover::after,
.card:hover .corner-tr, .card:hover .corner-bl {
  filter: brightness(1.3) saturate(1.2);
}

.card-regulatory {
  background: var(--surface-elevated);
  border-left: 2px solid var(--secondary);
}

/* ============ CALLOUTS ============ */
.callout {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--primary);
  border-radius: 10px;
  padding: 1.875rem 1.875rem 1.875rem 2.25rem;
  margin: 1.75rem 0;
}
.callout-eyebrow {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.callout-eyebrow::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><circle cx='6' cy='6' r='2' fill='%23B8860B'/><g fill='%23B8860B' opacity='0.85'><circle cx='6' cy='1.5' r='1'/><circle cx='6' cy='10.5' r='1'/><circle cx='1.5' cy='6' r='1'/><circle cx='10.5' cy='6' r='1'/></g></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}
.callout-warning { border-left-color: var(--accent); }
.callout-regulatory { border-left-color: var(--secondary); }
.callout-wada { border-left-color: var(--terracotta); }

/* ============ TIFFANY CHIPS ============ */
.tiffany-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: var(--accent-50);
  transition: border-color var(--transition);
}
.tiffany-chip::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><circle cx='4' cy='4' r='1.4' fill='%23B8860B'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}
.tiffany-chip:hover { border-color: var(--accent-bright); }
.chip-fda { background: var(--accent-50); }
.chip-compounding { background: var(--terracotta-50); }
.chip-wada { background: var(--secondary-50); }
.chip-neutral { background: var(--primary-50); }
.chip-historical { background: var(--rose-50); }

/* ============ PULL QUOTE ============ */
.pull-quote {
  position: relative;
  margin: 2.5rem auto;
  padding: 1.25rem 0 1.5rem 2.5rem;
  max-width: 36rem;
}
.pull-quote blockquote {
  font-family: var(--font-subhead);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.32;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.pull-quote::before {
  content: "“";
  position: absolute;
  top: -1.2rem;
  left: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
}
.pull-quote-rule {
  height: 1px;
  width: 80%;
  background: var(--accent);
  margin: 1rem 0 0.75rem;
}
.pull-quote cite {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-style: normal;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

/* ============ FIGURE ============ */
figure.illustration {
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--surface-elevated);
  border-radius: 12px;
  position: relative;
}
figure.illustration img {
  width: 100%;
  border-radius: 6px;
}
figure.illustration figcaption {
  margin-top: 0.875rem;
  font-family: var(--font-subhead);
  font-style: italic;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}
figure.illustration::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0.7;
}

/* ============ LISTS ============ */
ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 1.125rem;
}
li { margin-bottom: 0.5rem; }
ul.fleuron-list {
  list-style: none;
  padding-left: 0;
}
ul.fleuron-list li {
  position: relative;
  padding-left: 1.75rem;
}
ul.fleuron-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65rem;
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><circle cx='6' cy='6' r='1.8' fill='%23B8860B'/><g fill='%23B8860B' opacity='0.85'><circle cx='6' cy='2' r='1'/><circle cx='6' cy='10' r='1'/><circle cx='2' cy='6' r='1'/><circle cx='10' cy='6' r='1'/></g></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ============ REFERENCES LIST ============ */
ol.references-list {
  list-style: none;
  padding-left: 0;
  counter-reset: refnum;
}
ol.references-list li {
  counter-increment: refnum;
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
ol.references-list li::before {
  content: counter(refnum, upper-roman);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.22em;
  color: var(--secondary);
  font-size: 0.95rem;
  width: 3rem;
  text-align: left;
}
ol.references-list .ref-meta {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-subhead);
  font-weight: 500;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.10em;
  color: var(--text-muted);
}
ol.references-list .ref-meta a {
  color: var(--secondary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Inline technical token */
.token {
  font-family: var(--font-subhead);
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.10em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

/* ============ TABLES ============ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: transparent;
}
table thead th {
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--secondary);
  text-align: left;
  padding: 0.875rem 1.125rem;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--primary);
}
table tbody td {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table tbody td:first-child::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 0.5rem;
  vertical-align: 1px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><circle cx='4' cy='4' r='1.4' fill='%23B8860B'/></svg>");
  background-repeat: no-repeat;
}
.num-col { text-align: right; font-variant-numeric: tabular-nums; }

/* ============ FAQ ============ */
.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.faq-item:last-child { border-bottom: none; }

/* ============ CONTACT FORM ============ */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.875rem;
  margin: 1.5rem 0;
}
.contact-form label {
  display: block;
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--secondary);
  margin-bottom: 0.4rem;
  margin-top: 1rem;
}
.contact-form label:first-of-type { margin-top: 0; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
}
.contact-form textarea { min-height: 7rem; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.contact-form .btn { margin-top: 1.5rem; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--surface-dark);
  color: var(--text-inverse);
  margin-top: 5rem;
  border-top: 4px solid var(--accent);
  position: relative;
}
.site-footer::before {
  content: "";
  display: block;
  height: 20px;
  background-repeat: repeat-x;
  background-position: center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='20' viewBox='0 0 240 20'><path d='M0 10 C 40 4, 80 16, 120 10 C 160 4, 200 16, 240 10' fill='none' stroke='%234A6741' stroke-width='1'/><g fill='%23B8860B'><circle cx='120' cy='10' r='1.8'/></g></svg>");
  background-color: var(--surface-dark);
}
.site-footer .container { padding-top: 2.5rem; padding-bottom: 2rem; }
.footer-columns {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) {
  .footer-columns { grid-template-columns: repeat(4, 1fr); }
}
.footer-columns h4 {
  font-family: var(--font-subhead);
  font-weight: 500;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.footer-columns ul {
  list-style: none;
  padding: 0;
}
.footer-columns li { margin-bottom: 0.4rem; }
.footer-columns a {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--text-inverse);
  text-decoration: none;
}
.footer-columns a:hover { color: var(--accent-bright); text-decoration: underline; }

.footer-rule {
  height: 1px;
  background: var(--accent);
  margin: 2rem 0 1.25rem;
  opacity: 0.6;
}
.footer-rosette {
  width: 32px;
  height: 32px;
  margin: 0 auto 1rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='3' fill='%23B8860B'/><g fill='%234A6741' opacity='0.9'><circle cx='16' cy='6' r='2.4'/><circle cx='16' cy='26' r='2.4'/><circle cx='6' cy='16' r='2.4'/><circle cx='26' cy='16' r='2.4'/><circle cx='9' cy='9' r='2'/><circle cx='23' cy='9' r='2'/><circle cx='9' cy='23' r='2'/><circle cx='23' cy='23' r='2'/></g></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.footer-disclaimer {
  font-family: var(--font-subhead);
  font-style: italic;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-inverse-muted);
  text-align: center;
  margin: 0 auto 0.75rem;
  max-width: 36rem;
}
.footer-colophon {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-inverse);
}
.footer-colophon .flourish {
  font-size: 1.5rem;
  color: var(--accent-bright);
  letter-spacing: 0;
  text-transform: none;
}

/* ============ MOBILE NAV ============ */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; }
  .site-nav.open {
    display: block;
    position: absolute;
    top: 96px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--primary);
    padding: 1.25rem var(--container-px);
    z-index: 10;
  }
  .site-nav.open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .site-nav.open li + li::before { display: none; }
  .hero { padding-top: 2rem; }
}

/* ============ TIPPY THEME ============ */
.tippy-box[data-theme~="apothecary"] {
  background: var(--surface-elevated);
  color: var(--ink);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(74, 25, 66, 0.12);
}
.tippy-box[data-theme~="apothecary"] .tippy-content {
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
}
.tippy-box[data-theme~="apothecary"] .tippy-arrow { color: var(--surface-elevated); }
.tippy-box[data-theme~="apothecary"] .ref-title {
  display: block;
  font-family: var(--font-subhead);
  font-weight: 600;
  font-variant: small-caps;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  color: var(--secondary);
  margin-bottom: 0.35rem;
}
.tippy-box[data-theme~="apothecary"] .ref-id {
  display: inline-block;
  margin-right: 0.4rem;
}

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

/* ============ FOCUS VISIBILITY ============ */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

/* ============ HERO 404 ============ */
.error-page {
  text-align: center;
  padding: 5rem 0;
}
.error-page .flourish { display: block; margin: 1rem 0; }
.error-page .btn { margin-top: 1.5rem; }
