/* PeptideGrids - "Modern Medical" brand system (locked 2026-06-01).
   Ported from the approved mockup direction-3-modern-medical.html.
   Bright white + soft sage/mint, calm deep green, Hanken Grotesk + Spline Sans Mono,
   Newsreader italic accents. Rounded cards, soft shadows, pill grade-badges.
   Logo: peptide-chain mark. Risk-forward: safety panel stays clearly flagged. */

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

:root {
  --white: #ffffff;
  --surface: #f3f7f5;
  --surface-mint: #eef5f1;
  --green-primary: #0e7c66;
  --green-dark: #0a5e4d;
  --green-text: #094d3f;
  --text: #1f2a2e;
  --text-muted: #6b7a76;
  --border: #dce8e3;
  --border-light: #eaf0ed;
  --grade-a: #1f8a4c;
  --grade-b: #2563a8;
  --grade-c: #c2820f;
  --grade-d: #cf3b2d;
  --grade-ne: #8a8e88;
  --risk-red: #cf3b2d;
  --risk: #cf3b2d;
  --risk-wash: #fdf3f1;
  --shadow-sm: 0 1px 4px rgba(14,124,102,0.07), 0 2px 12px rgba(14,124,102,0.05);
  --shadow-md: 0 4px 16px rgba(14,124,102,0.09), 0 2px 6px rgba(14,124,102,0.06);
  --shadow-lg: 0 8px 32px rgba(14,124,102,0.11), 0 2px 8px rgba(14,124,102,0.07);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --display: "Hanken Grotesk", system-ui, sans-serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
}

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

body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-primary); text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.reveal { animation: fadeUp 0.55s ease both; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.35s; }
.reveal-5 { animation-delay: 0.45s; }
/* Never let the entrance animation hide content: in print/PDF and for reduced-motion
   users (and any renderer that doesn't run the animation) keep .reveal fully visible. */
@media (prefers-reduced-motion: reduce), print {
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---- STICKY HEADER ---- */
header.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-wordmark {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-wordmark span { color: var(--green-primary); }

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
nav a:hover { color: var(--green-primary); background: var(--surface-mint); }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  min-width: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pill-search:focus-within {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(14,124,102,0.12);
}
.pill-search svg { flex-shrink: 0; }
.pill-search input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  width: 100%;
}
.pill-search input::placeholder { color: var(--text-muted); }

.btn-primary {
  background: var(--green-primary);
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); color: var(--white); }

/* ---- MAIN (full-bleed; width controlled per-section) ---- */
main { display: block; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(160deg, #eef5f1 0%, #f3f7f5 40%, #ffffff 100%);
  padding: 80px 24px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0;
  border: none;
  border-radius: 0;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(14,124,102,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--green-primary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grade-a);
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  font-family: var(--display);
}
.hero h1 em {
  font-style: normal;
  color: var(--green-primary);
}
.hero-sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
  font-weight: 400;
}
.hero-search-wrap {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-md);
  gap: 10px;
}
.hero-search-wrap:focus-within {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 4px rgba(14,124,102,0.1), var(--shadow-md);
}
.hero-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: transparent;
}
.hero-search-wrap input::placeholder { color: var(--text-muted); }
.hero-search-wrap button {
  background: var(--green-primary);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 22px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.hero-search-wrap button:hover { background: var(--green-dark); }

.hero-hints {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hero-hints span { font-weight: 500; }
.hero-hint-tag {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.hero-hint-tag:hover { background: var(--surface-mint); color: var(--green-primary); }

/* ---- STATS ROW ---- */
.stats-row {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 48px 24px;
}
.stats-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-mint);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-number {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  color: var(--green-primary);
  letter-spacing: -1.5px;
  line-height: 1;
  font-family: var(--display);
}
.stat-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.stat-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- SECTION CHROME ---- */
section { padding: 72px 24px; }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section-header { margin-bottom: 40px; }
.section-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.6px;
  margin-bottom: 8px;
  font-family: var(--display);
}
.section-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 500px;
}
.section-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: 8px;
}

/* ---- GRADE SCALE ---- */
.grades-section { background: var(--surface); }
.grades-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.grade-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.grade-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.grade-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: 'Spline Sans Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
}
.grade-pill.a { background: var(--grade-a); }
.grade-pill.b { background: var(--grade-b); }
.grade-pill.c { background: var(--grade-c); }
.grade-pill.d { background: var(--grade-d); }
.grade-pill.ne { background: var(--grade-ne); font-size: 14px; }

.grade-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.grade-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin: 0;
}
.grade-example {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-family: 'Newsreader', Georgia, serif;
}

/* ---- COMPOUND CARDS (home) ---- */
.compounds-section { background: var(--white); }
.compounds-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.compound-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.compound-card-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.compound-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-family: 'Spline Sans Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--white);
  flex-shrink: 0;
}
.compound-grade-badge.a { background: var(--grade-a); }
.compound-grade-badge.b { background: var(--grade-b); }
.compound-grade-badge.c { background: var(--grade-c); }
.compound-grade-badge.d { background: var(--grade-d); }
.compound-grade-badge.ne { background: var(--grade-ne); font-size: 16px; }

.compound-title-group { flex: 1; }
.compound-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.compound-aliases {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: 'Spline Sans Mono', monospace;
  margin-bottom: 8px;
}
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid;
  letter-spacing: 0.2px;
}
.tag-green { color: var(--green-primary); border-color: rgba(14,124,102,0.25); background: rgba(14,124,102,0.06); }
.tag-red { color: var(--grade-d); border-color: rgba(207,59,45,0.2); background: rgba(207,59,45,0.06); }
.tag-blue { color: var(--grade-b); border-color: rgba(37,99,168,0.2); background: rgba(37,99,168,0.06); }
.tag-gray { color: var(--text-muted); border-color: var(--border); background: var(--surface); }

.compound-card-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }

.tldr-box {
  background: var(--surface-mint);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.tldr-box .tldr-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: 6px;
}
.tldr-quote {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

.key-takeaways h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.takeaway-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.takeaway-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.takeaway-list li .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.risk-panel {
  background: #fff8f7;
  border: 1.5px solid rgba(207,59,45,0.2);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.risk-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--grade-d);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.risk-panel p {
  font-size: 13.5px;
  color: #6b3030;
  line-height: 1.55;
  margin: 0;
}

.sources-list h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.source-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.source-item:last-child { border-bottom: none; }
.source-item a {
  color: var(--green-primary);
  text-decoration: none;
  font-family: 'Spline Sans Mono', monospace;
  font-size: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(14,124,102,0.2);
  background: rgba(14,124,102,0.05);
  padding: 2px 8px;
  border-radius: 6px;
}
.source-item a:hover { background: rgba(14,124,102,0.12); }
.source-meta { color: var(--text-muted); font-size: 12.5px; }
.source-meta strong { color: var(--text); font-size: 13px; display: block; margin-bottom: 2px; }
.study-type {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-family: 'Spline Sans Mono', monospace;
  white-space: nowrap;
}

/* Small compound card */
.compound-card-sm {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.compound-card-sm:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.compound-card-sm-header { display: flex; align-items: flex-start; gap: 12px; }
.compound-card-sm-badge {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Spline Sans Mono', monospace;
  font-size: 17px;
  font-weight: 500;
  color: var(--white);
  flex-shrink: 0;
}
.compound-card-sm-badge.a { background: var(--grade-a); }
.compound-card-sm-badge.b { background: var(--grade-b); }
.compound-card-sm-badge.c { background: var(--grade-c); }
.compound-card-sm-badge.d { background: var(--grade-d); }
.compound-card-sm-badge.ne { background: var(--grade-ne); font-size: 14px; }
.compound-card-sm-name { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.compound-card-sm-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }
.compound-card-sm-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.view-link {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 6px 14px;
  background: var(--surface-mint);
  border-radius: 999px;
  border: 1.5px solid var(--border);
  transition: background 0.15s;
}
.view-link:hover { background: rgba(14,124,102,0.1); }

/* ---- DIRECTORY SECTION ---- */
.directory-section { background: var(--surface); }
.directory-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.clinic-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.clinic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.clinic-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.clinic-name { font-size: 16px; font-weight: 700; color: var(--text); }
.clinic-type { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--grade-a);
  background: rgba(31,138,76,0.08);
  border: 1.5px solid rgba(31,138,76,0.2);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.clinic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.clinic-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}
.clinic-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
  margin: 0;
}

.dir-cta {
  text-align: center;
  margin-top: 32px;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--green-primary);
  color: var(--green-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-outline:hover { background: var(--green-primary); color: var(--white); }

/* ---- INDEPENDENCE BANNER ---- */
.independence-banner {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 100%);
  padding: 56px 24px;
  text-align: center;
  color: var(--white);
}
.independence-banner h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.4px;
  color: var(--white);
  font-family: var(--display);
}
.independence-banner p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--green-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
  cursor: pointer;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); color: var(--green-primary); }

/* ====================================================================
   DETAIL PAGES - centered reading column, same visual language
   ==================================================================== */
.reading {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 24px 4rem;
}
.reading h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 0.5rem; font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; }
.reading h2 { font-size: 1.45rem; margin: 2rem 0 0.7rem; font-family: var(--display); letter-spacing: -0.01em; }
.reading h3 { font-size: 1.1rem; font-family: var(--display); }
.reading p { margin: 0 0 1rem; }
.reading section { padding: 0; }

/* compound detail */
.compound > header, .clinic > header { margin-bottom: 1.5rem; }
.compound > header h1, .clinic > header h1 { margin-bottom: 0.3rem; }
.aliases { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.01em; margin: 0.1rem 0 1rem; }

/* signature: evidence grade as a rounded pill-badge with letter glyph */
.grade {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
  padding: 0.3rem 0.9rem 0.3rem 0.35rem;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.grade::before {
  font-family: var(--mono); font-weight: 600; font-size: 1rem; line-height: 1; color: #fff;
  background: var(--grade-ne); width: 1.85rem; height: 1.85rem;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
}
.grade-A { border-color: rgba(31,138,76,0.4); }
.grade-B { border-color: rgba(37,99,168,0.4); }
.grade-C { border-color: rgba(194,130,15,0.4); }
.grade-D { border-color: rgba(207,59,45,0.4); }
.grade-NE { border-color: rgba(138,142,136,0.45); }
.grade-A::before { background: var(--grade-a); content: "A"; }
.grade-B::before { background: var(--grade-b); content: "B"; }
.grade-C::before { background: var(--grade-c); content: "C"; }
.grade-D::before { background: var(--grade-d); content: "D"; }
.grade-NE::before { background: var(--grade-ne); content: "NE"; font-size: 0.66rem; }

/* AEO blocks (detail pages) */
.aeo-tldr {
  font-family: var(--serif); font-style: italic; font-size: 1.18rem; line-height: 1.5; color: var(--green-text);
  background: var(--surface-mint); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.aeo-tldr strong { font-family: var(--mono); font-style: normal; font-size: 0.68rem; letter-spacing: 0.08em; color: var(--green-primary); display: inline-block; margin-right: 0.4rem; vertical-align: 0.1em; }
.aeo-takeaways, .aeo-sources {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm);
}
.aeo-takeaways h2, .aeo-sources h2 { margin-top: 0; font-size: 0.78rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green-primary); }
.aeo-takeaways ul { margin: 0; padding-left: 1.2rem; }
.aeo-takeaways li { margin: 0.35rem 0; }
.aeo-sources ol { margin: 0; padding-left: 1.4rem; }
.aeo-sources li { margin: 0.5rem 0; }

/* structure figure */
.structure { float: right; margin: 0 0 1rem 1.5rem; max-width: 220px; text-align: center; }
.structure img { width: 100%; height: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.structure figcaption { font-family: var(--mono); font-size: 0.68rem; color: var(--text-muted); margin-top: 0.35rem; }

/* safety - risk-forward */
.safety {
  background: var(--risk-wash); border: 1.5px solid rgba(207,59,45,0.25);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.75rem 0; box-shadow: var(--shadow-sm);
}
.safety h2 { margin-top: 0; color: var(--risk); font-size: 1.15rem; display: flex; align-items: center; gap: 0.4rem; }
.safety h2::before { content: "\26A0"; font-size: 1rem; }

.reviewed { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border-light); padding-top: 0.9rem; margin-top: 2rem; }

/* clinic detail */
.clinic .type { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-primary); margin: 0.2rem 0; }
.clinic .loc { color: var(--text-muted); margin: 0; }
.clinic dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.3rem; margin: 1.5rem 0; background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.clinic dt { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); padding-top: 0.15rem; }
.clinic dd { margin: 0; }
.verified { font-family: var(--mono); font-size: 0.8rem; color: var(--grade-a); padding-top: 0.4rem; }
.verified::before { content: "\2713  "; font-weight: 600; }

/* hubs */
.hub .count { font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.hub-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.hub-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 0.85rem 1rem; margin-bottom: 0.5rem; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-sm); transition: box-shadow .15s, transform .15s; }
.hub-list li:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); background: var(--white); }
.hub-list .sub { font-family: var(--mono); font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; }

/* static + search */
.static, .search-page { max-width: 66ch; }
.search-page input { max-width: 32rem; width: 100%; font-size: 1.05rem; font-family: var(--sans); color: var(--text); padding: 0.55rem 1rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; }
.search-page input:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 4px var(--surface-mint); }
#results { list-style: none; padding: 0; margin: 1.5rem 0; }
#results li { padding: 0.8rem 1rem; margin-bottom: 0.5rem; background: var(--surface); border-radius: var(--radius-sm); }
#results .k { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-left: 0.5rem; }

/* ---- FOOTER ---- */
footer.site-foot {
  background: var(--text);
  color: rgba(255,255,255,0.72);
  padding: 48px 24px 36px;
  font-size: 13.5px;
  margin-top: 0;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .logo-wordmark { color: var(--white); font-size: 17px; }
.footer-brand .logo-wordmark span { color: #5fcfb2; }
.medical-disclaimer {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}
.medical-disclaimer strong { color: rgba(255,255,255,0.7); }
.ftc {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
}
.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 10px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12.5px;
  color: rgba(255,255,255,0.38);
  flex-wrap: wrap;
  gap: 12px;
}
.copy { color: rgba(255,255,255,0.38); margin: 0; }
.grids-family {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.grids-family span { color: rgba(255,255,255,0.5); }
.grids-family a { color: rgba(255,255,255,0.5); text-decoration: none; }
.grids-family a:hover { color: rgba(255,255,255,0.8); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .grades-grid { grid-template-columns: repeat(3, 1fr); }
  .compounds-grid { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; gap: 14px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  nav { display: none; }
  .header-right .btn-primary { display: none; }
  .pill-search { min-width: 140px; }
}
@media (max-width: 600px) {
  .grades-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 56px 20px 64px; }
  .hero h1 { letter-spacing: -1px; }
  .hero-search-wrap { flex-direction: column; border-radius: var(--radius-lg); padding: 12px 14px; }
  .hero-search-wrap button { width: 100%; justify-content: center; }
  .compound-card-header { flex-direction: column; gap: 12px; }
  .directory-header-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .clinic dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .clinic dd { margin-bottom: 0.6rem; }
  .structure { float: none; margin: 0 0 1.25rem; max-width: 100%; }
}

/* ---- CONSENT BANNER ---- */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(14,124,102,0.10);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.consent-banner p { margin: 0; flex: 1 1 280px; }
.consent-banner a { color: var(--green-primary); }
.consent-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-accept {
  background: var(--green-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.consent-accept:hover { background: var(--green-dark); }
.consent-decline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}
.consent-decline:hover { color: var(--text); border-color: var(--text-muted); }

/* ---- COMPOUND DISCLAIMER ---- */
.compound-disclaimer {
  background: var(--surface-mint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 1.25rem 0;
  line-height: 1.5;
}
.compound-disclaimer a { color: var(--green-primary); }

/* ---- FOOTER NON-AFFILIATION ---- */
.footer-nonaffil {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
  line-height: 1.4;
}

/* ---- contact form ---- */
.contact-form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 32rem; margin: 1.25rem 0; }
.contact-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form textarea { font-family: var(--sans); font-size: 0.95rem; color: var(--text); padding: 0.6rem 0.8rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px var(--surface-mint); }
.contact-form .btn-primary { align-self: flex-start; padding: 0.6rem 1.4rem; }
.contact-note { font-size: 0.85rem; color: var(--text-muted); }

/* ---- COMPARISON PAGES ---- */
.compare-table-wrapper {
  overflow-x: auto;
  margin: 1.75rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}
.compare-table th, .compare-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.compare-table thead th {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green-primary);
  background: var(--surface-mint);
}
.compare-table tbody th[scope="row"] {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--surface);
  min-width: 120px;
}
.compare-table td small { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: 0.2rem; }
.compare-table td.safety-cell { font-size: 0.83rem; color: var(--text); line-height: 1.5; }
.compare-intro { color: var(--text-muted); margin-bottom: 0.5rem; }

/* ---- STACK PAGES ---- */
.stack-summary { font-size: 1.05rem; margin-bottom: 1.5rem; line-height: 1.65; }
.stack-components { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.stack-components h2 { margin-top: 0; font-size: 0.78rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green-primary); }
.stack-components ul { margin: 0.5rem 0 0; padding-left: 1.3rem; }
.stack-components li { margin: 0.4rem 0; font-size: 0.95rem; }
.stack-not-catalogued { font-size: 0.78rem; color: var(--text-muted); font-family: var(--mono); }

/* ---- STUDY / RESEARCH PAGE ---- */
.study-finding { margin: 0 0 1rem; line-height: 1.65; }
.study-grade-table { max-width: 420px; }
.study-count, .study-pct {
  font-family: var(--mono);
  font-size: 0.88rem;
  text-align: right;
  white-space: nowrap;
}
.study-total-row th, .study-total-row td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  font-family: var(--mono);
}

/* ---- FDA action tracker ---- */
.track-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.track-item { display: grid; grid-template-columns: 6.5rem 9rem 1fr; gap: 0.8rem; align-items: start; padding: 0.9rem 0; border-bottom: 1px solid var(--border-light); }
.track-date { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); }
.track-tag { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; background: var(--text-muted); padding: 0.15rem 0.5rem; border-radius: 999px; height: fit-content; white-space: nowrap; }
.track-tag.grade-A { background: var(--grade-a); } .track-tag.grade-B { background: var(--grade-b); }
.track-tag.grade-C { background: var(--grade-c); } .track-tag.grade-D { background: var(--grade-d); }
.track-body strong { font-weight: 600; } .track-body p { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--text-muted); }
@media (max-width: 640px){ .track-item { grid-template-columns: 1fr; gap: 0.3rem; } }

/* Federal compounding status: per-compound block + index page */
.federal { background: var(--surface, #f6faf8); border: 1px solid var(--border-light); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.federal h2 { margin-top: 0; font-size: 1.1rem; }
.federal p { margin: 0.4rem 0; }
.federal-note { font-size: 0.78rem; color: var(--text-muted); }
.federal-index h2 .count { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }
.federal-index .track-item { grid-template-columns: 6.5rem 1fr; }
@media (max-width: 640px){ .federal-index .track-item { grid-template-columns: 1fr; } }
