/* NutraTested - "Soft Modern Wellness" brand system (locked 2026-06-02).
   Ported from the approved mockup direction-2-soft-wellness.html.
   Warm near-white base, sage primary, coral accent. Bricolage Grotesque display +
   Hanken Grotesk body + Spline Sans Mono data. Rounded cards, soft sage shadows.
   Logo: verified-seal mark (dashed ring + check). We aggregate; we do not test. */

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

:root {
  --white: #fffdfa;            /* warm near-white base */
  --surface: #eef6f0;          /* sage-wash */
  --surface-mint: #f4faf5;     /* sage-wash2 */
  --green-primary: #2f8f6b;    /* sage */
  --green-dark: #236f53;       /* sage-dark */
  --green-text: #1b4f3b;
  --coral: #e8746b;            /* secondary accent */
  --coral-dark: #d65a50;
  --text: #243029;             /* ink */
  --text-soft: #516056;        /* ink-soft */
  --text-muted: #8a978d;       /* muted */
  --border: #e7efe8;           /* rule */
  --border-light: #eef3ee;
  --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 2px 10px rgba(47,143,107,0.06);
  --shadow-md: 0 8px 26px rgba(47,143,107,0.10);
  --shadow-lg: 0 18px 44px rgba(47,143,107,0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

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

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

body {
  font-family: var(--sans);
  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; }

/* ---- 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); }
/* Letter is injected ONLY for the standalone .grade pill component.
   Scoped with .grade so it never leaks onto other badges that carry a
   grade-X class and already render the letter as text (was causing "AA"). */
.grade.grade-A::before { background: var(--grade-a); content: "A"; }
.grade.grade-B::before { background: var(--grade-b); content: "B"; }
.grade.grade-C::before { background: var(--grade-c); content: "C"; }
.grade.grade-D::before { background: var(--grade-d); content: "D"; }
.grade.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; } }

/* =======================================================================
   INGREDIENT PAGE — card-based redesign (Task A)
   ======================================================================= */

/* ---- Page-level container ---- */
.ingredient-page { background: var(--white); }

/* ---- Section wrapper (full width then max-width inner) ---- */
.ip-section {
  padding: 56px 24px;
}
.ip-section + .ip-section {
  padding-top: 0;
}
.ip-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- Section header ---- */
.ip-sec-eye {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: 8px;
}
.ip-sec-h {
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.ip-sec-p {
  font-size: 15px;
  color: var(--text-soft);
  max-width: 560px;
  line-height: 1.6;
}

/* ---- HERO section ---- */
.ip-hero {
  padding: 56px 24px 48px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-mint) 40%, var(--white) 80%);
  position: relative;
  overflow: hidden;
}
.ip-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 55%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(47,143,107,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.ip-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Category eyebrow pill */
.ip-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

/* Ingredient name */
.ip-h1 {
  font-family: var(--display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 8px;
}

/* Aliases */
.ip-aliases {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* "Best for" chip */
.ip-best-for {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.ip-best-for-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}
.ip-best-for-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

/* Bottom line card */
.ip-bottom-line {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}
.ip-bottom-line-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ip-bottom-line-label::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-primary);
  flex-shrink: 0;
}
.ip-bottom-line-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* Risk mini-card (hero sidebar) */
.ip-risk-mini {
  background: #fff8f7;
  border: 1.5px solid rgba(207,59,45,0.22);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.ip-risk-mini-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--grade-d);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.ip-risk-mini-text {
  font-size: 13.5px;
  color: #6b3030;
  line-height: 1.55;
  margin: 0 0 10px;
}
.ip-risk-mini-link {
  font-size: 12px;
  color: var(--grade-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Right column sidebar */
.ip-hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Ribbon */
.ip-ribbon {
  background: var(--surface-mint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 11px 24px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
}
.ip-ribbon b { color: var(--text); }

/* ---- EVIDENCE GRID (Task A §2) ---- */
.ip-evidence-section {
  padding: 56px 24px;
  background: var(--surface);
}
.ip-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.ip-evidence-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ip-evidence-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ip-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}
.ip-grade-badge.grade-A { background: var(--grade-a); }
.ip-grade-badge.grade-B { background: var(--grade-b); }
.ip-grade-badge.grade-C { background: var(--grade-c); }
.ip-grade-badge.grade-D { background: var(--grade-d); }
.ip-grade-badge.grade-NE { background: var(--grade-ne); font-size: 15px; }
/* Evidence card header: big use emoji on the left, single-letter grade chip on the right */
.ip-ev-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ip-ev-emoji {
  font-size: 30px;
  line-height: 1;
}
.ip-ev-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
  flex-shrink: 0;
}
.ip-evidence-use {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.ip-evidence-note {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0;
}

/* ---- SAFETY CARD (Task A §3) ---- */
.ip-safety-section {
  padding: 56px 24px 0;
}
.ip-safety-card {
  background: #fff8f7;
  border: 1.5px solid rgba(207,59,45,0.2);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  max-width: 1100px;
  margin: 32px auto 0;
}
.ip-safety-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--grade-d);
  margin-bottom: 14px;
}
.ip-safety-text {
  font-size: 15.5px;
  color: #5a2e2e;
  line-height: 1.7;
  margin: 0 0 16px;
}
.ip-review-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--mono);
  border-top: 1px solid rgba(207,59,45,0.15);
  padding-top: 14px;
  margin: 0;
}

/* ---- EXPERT CARDS (Task A §4 + Task B + Task C) ---- */
.ip-experts-section {
  padding: 56px 24px;
}
.ip-experts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.ip-expert-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.ip-expert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Expert photo / avatar */
.expert-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.expert-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(232,116,107,0.12) 100%);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--green-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.expert-photo-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.photo-credit {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  max-width: 160px;
  line-height: 1.3;
}
.photo-credit a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 1px;
}
/* Photo credits page */
.pc-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}
.pc-row {
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.pc-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.pc-credit {
  font-size: 14px;
  color: var(--text-soft);
}

.ip-expert-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.ip-expert-name a {
  color: inherit;
  text-decoration: none;
}
.ip-expert-name a:hover { color: var(--green-primary); }

.ip-dose-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--green-primary);
  background: rgba(47,143,107,0.08);
  border: 1px solid rgba(47,143,107,0.2);
  padding: 3px 12px;
  border-radius: 999px;
}
.ip-expert-rationale {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0;
}
.ip-expert-source {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--coral);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ip-expert-source:hover { color: var(--coral-dark); }
.ip-expert-noendorse {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* Sponsorship disclosure pill */
.ip-sponsor-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--coral-dark);
  background: rgba(232,116,107,0.1);
  border: 1.5px solid rgba(232,116,107,0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

/* For the inline disclosure on expert detail pages */
.sponsor-disclosure {
  font-size: 12.5px;
  color: var(--coral-dark);
  background: rgba(232,116,107,0.07);
  border: 1px solid rgba(232,116,107,0.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  line-height: 1.5;
  margin-top: 6px;
  width: 100%;
  text-align: left;
}

/* ---- CERTIFIED PICKS (Task A §5) ---- */
.ip-picks-section {
  padding: 56px 24px;
  background: var(--surface);
}
.ip-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.ip-pick-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ip-pick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ip-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--grade-a);
  background: rgba(31,138,76,0.08);
  border: 1.5px solid rgba(31,138,76,0.22);
  padding: 4px 11px;
  border-radius: 999px;
  align-self: flex-start;
}
/* Brand is the headline of a buying-guide card; certification is a small trust chip. */
.ip-pick-brand {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.ip-pick-name {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.ip-pick-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.ip-cert-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--grade-a);
  background: rgba(31,138,76,0.08);
  border: 1px solid rgba(31,138,76,0.2);
  padding: 3px 9px;
  border-radius: 999px;
}
.ip-pick-find {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  white-space: nowrap;
}
.ip-pick-find:hover { text-decoration: underline; }
.ip-pick-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--green-primary);
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
}
.ip-pick-flag {
  font-size: 12px;
  color: var(--grade-d);
  background: rgba(207,59,45,0.06);
  border: 1px solid rgba(207,59,45,0.18);
  border-radius: 8px;
  padding: 6px 10px;
}
.ip-pick-flag a { color: var(--grade-d); }
.ip-pick-form {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.ip-pick-great, .ip-pick-con {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.ip-pick-label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 5px;
  margin-right: 5px;
  vertical-align: 1px;
}
.ip-pick-label.good { color: var(--green-primary); background: rgba(47,143,107,0.1); }
.ip-pick-label.bad { color: var(--grade-d); background: rgba(207,59,45,0.08); }
/* Inline source link sitting on each claim (the "source of truth") */
.ip-pick-src {
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.ip-pick-src:hover { color: var(--green-primary); }
.ip-test-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  align-self: flex-start;
}
.ip-test-chip.pass {
  color: var(--grade-a);
  background: rgba(31,138,76,0.08);
  border: 1.5px solid rgba(31,138,76,0.2);
}
.ip-test-chip.fail {
  color: var(--grade-d);
  background: rgba(207,59,45,0.07);
  border: 1.5px solid rgba(207,59,45,0.2);
}
.ip-test-src {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.ip-test-src a { color: var(--green-primary); }

.ip-pick-cta {
  display: block;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--white);
  background: var(--green-primary);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  margin-top: auto;
  transition: background 0.15s;
}
.ip-pick-cta:hover { background: var(--green-dark); color: var(--white); }
.ip-pick-aff {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-muted);
  text-align: center;
}
.ip-pick-no-link {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: auto;
  padding-top: 6px;
}
.ip-picks-overflow {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-soft);
}

/* ---- HEADS-UP CALLOUT (plain-language cert+failed-test warning) ---- */
.ip-cross-section { padding: 0 24px 56px; }
.headsup-callout {
  background: #fff8f7;
  border: 1.5px solid rgba(232,116,107,0.35);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  max-width: 800px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.headsup-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--coral-dark);
  font-family: var(--display);
  letter-spacing: -0.2px;
}
.headsup-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}
.headsup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid rgba(232,116,107,0.18);
  padding-top: 10px;
  margin-top: 2px;
}
.headsup-links a { color: var(--green-primary); }

/* ---- REGISTRY LINK (secondary CTA on product card) ---- */
.ip-pick-registry-link {
  font-size: 12.5px;
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
  padding-top: 6px;
  display: block;
}
.ip-pick-registry-link:hover { color: var(--green-dark); text-decoration: underline; }

.ip-pick-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-pick-tests { display: flex; flex-direction: column; gap: 4px; }

/* Legacy timeline classes (keep for any existing references) */
.cross {
  background: #fff8f7;
  border: 1.5px solid #f6d6d1;
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.cross .ct {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tl { display: flex; gap: 12px; padding-bottom: 14px; }
.tl:last-child { padding-bottom: 0; }
.tl .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.tl.fail .dot { background: var(--grade-d); }
.tl.cert .dot { background: var(--grade-b); }
.tl.ok .dot { background: var(--grade-a); }
.tl .d { font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); }
.tl .h { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tl p { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin: 0 0 4px; }
.srcline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(207,59,45,0.12);
  padding-top: 10px;
  margin-top: 6px;
}
.srcline a { color: var(--green-primary); }

/* ---- INGREDIENT TESTS ---- */
.ip-ingtests-section { padding: 0 24px 56px; }
.ip-ing-test-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.ip-ing-test-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ip-ing-test-finding {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}

/* Pass/fail badge reuse */
.badge-pass {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--grade-a);
  background: rgba(31,138,76,0.08);
  border: 1.5px solid rgba(31,138,76,0.2);
  padding: 3px 10px;
  border-radius: 999px;
}
.badge-fail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--grade-d);
  background: rgba(207,59,45,0.07);
  border: 1.5px solid rgba(207,59,45,0.2);
  padding: 3px 10px;
  border-radius: 999px;
}

/* =======================================================================
   EXPERT PAGES — card-based redesign (Task B)
   ======================================================================= */

/* ---- Experts index ---- */
.experts-index { background: var(--white); }
.ei-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.ei-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 26px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ei-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.ei-name {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.ei-descriptor {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0;
}
.ei-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}
.ei-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-primary);
  background: rgba(47,143,107,0.07);
  border: 1.5px solid rgba(47,143,107,0.18);
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.ei-chip:hover {
  background: rgba(47,143,107,0.15);
  color: var(--green-dark);
}
.ei-view-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 7px 18px;
  background: var(--surface-mint);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  transition: background 0.15s;
}
.ei-view-link:hover { background: rgba(47,143,107,0.1); color: var(--green-dark); }
.ei-disclaimer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 32px auto 0;
  padding: 16px 20px;
  background: var(--surface-mint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
/* Top-of-page non-affiliation ribbon: constrain width so the line is readable */
.ribbon {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 24px 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---- Expert detail page ---- */
.expert-page { background: var(--white); }
.ep-hero {
  padding: 56px 24px 48px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-mint) 40%, var(--white) 80%);
}
.ep-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.ep-h1 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text);
  line-height: 1.15;
}
.ep-lead {
  font-size: 16.5px;
  color: var(--text-soft);
  line-height: 1.65;
  max-width: 560px;
  margin: 0;
}

/* Expert supplement cards on detail page */
.ep-picks-section {
  padding: 56px 24px;
}
.ep-picks-inner {
  max-width: 900px;
  margin: 0 auto;
}
.ep-pick-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ep-pick-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.ep-pick-supplement {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: 6px;
}
.ep-pick-supplement a {
  color: inherit;
  text-decoration: none;
}
.ep-pick-supplement a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ep-pick-rationale {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 6px 0 8px;
}
.ep-pick-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ep-pick-source {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.ep-pick-source a {
  color: var(--green-primary);
  text-decoration: none;
}
.ep-pick-source a:hover { text-decoration: underline; }
.ep-pick-dose-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--green-primary);
  background: rgba(47,143,107,0.09);
  border: 1.5px solid rgba(47,143,107,0.22);
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
  align-self: flex-start;
  flex-shrink: 0;
}

/* ---- Responsive adjustments ---- */
@media (max-width: 900px) {
  .ip-hero-inner { grid-template-columns: 1fr; }
  .ip-hero-side { display: contents; }
  .ip-bottom-line { order: -1; }
  .ep-pick-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ip-evidence-grid { grid-template-columns: repeat(2, 1fr); }
  .ip-picks-grid { grid-template-columns: 1fr; }
  .ip-experts-grid { grid-template-columns: 1fr 1fr; }
  .ei-grid { grid-template-columns: 1fr; }
  .ip-safety-card { padding: 22px 20px; }
}
