:root {
  --bg: #121218;
  --panel: #111216;
  --panel-2: #17191f;
  --panel-3: #0f1014;
  --text: #f3eee7;
  --muted: #b9afa2;
  --soft: #8f857a;
  --gold: #c9a04b;
  --gold-2: #e3c56e;
  --gold-border: rgba(214, 177, 96, 0.34);
  --line: rgba(214, 177, 96, 0.16);
  --success: #7bc08d;
  --warn: #d1aa57;
  --danger: #c97c6f;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
  --content-edge-x: clamp(24px, 5vw, 72px);
  --shell: min(1180px, calc(100vw - (var(--content-edge-x) * 2)));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse 115% 85% at 50% -18%, rgba(227, 197, 110, 0.14) 0%, rgba(201, 160, 75, 0.05) 32%, rgba(201, 160, 75, 0) 52%),
    radial-gradient(ellipse 90% 55% at 50% 108%, rgba(55, 52, 68, 0.22) 0%, rgba(18, 18, 24, 0) 48%),
    linear-gradient(180deg, #18181f 0%, #14141a 42%, #101014 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

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

body,
a,
p,
h1,
h2,
h3 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
}

.research-page {
  background: none;
}

.site-header {
  position: relative;
  z-index: 3;
  padding: 18px var(--content-edge-x) 16px;
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 24px;
  flex-wrap: wrap;
}

.site-header-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-header-links a {
  color: rgba(241, 223, 191, 0.9);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-header-links a:hover {
  color: #f7e6be;
  border-bottom-color: rgba(227, 197, 110, 0.82);
}

.site-header-links a[aria-current="page"] {
  color: #f7e6be;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom-color: rgba(227, 197, 110, 0.95);
  cursor: default;
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.brand a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 75px;
  overflow: hidden;
}

.brand img {
  width: 360px;
  max-width: 100%;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
}

.research-shell {
  width: var(--shell);
  margin: 0 auto;
}

.research-hero {
  padding: 48px 0 18px;
}

.research-kicker,
.section-label {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.research-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.6rem, 4.2vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.research-intro {
  margin: 22px 0 0;
  max-width: 900px;
  font-size: clamp(1.05rem, 1.1vw, 1.24rem);
  line-height: 1.72;
  color: var(--muted);
}

.hero-note {
  margin-top: 22px;
  max-width: 860px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(214, 177, 96, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.hero-note p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.research-section {
  padding: 26px 0 0;
}

.research-section--last {
  padding-bottom: 72px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.research-disclaimer h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-meta {
  margin: 0;
  color: var(--soft);
  font-size: 0.96rem;
}

.formula-grid,
.article-list,
.info-grid {
  display: grid;
  gap: 18px;
}

.formula-grid,
.info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.formula-item,
.research-card,
.research-disclaimer,
.info-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 21, 27, 0.96) 0%, rgba(13, 14, 18, 0.98) 100%);
  box-shadow: var(--shadow);
}

.formula-item,
.info-card,
.research-card {
  padding: 24px;
  border-radius: 24px;
}

.formula-item {
  min-height: 220px;
}

.formula-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(201, 160, 75, 0.12);
  border: 1px solid rgba(214, 177, 96, 0.22);
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.formula-item h3,
.research-card h3,
.info-card h3 {
  margin: 18px 0 10px;
  font-size: 1.26rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.formula-item p,
.research-card p,
.research-disclaimer p,
.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.info-card a {
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-weight: 600;
}

.info-card a:hover {
  color: #f7e6be;
}

.formula-item strong {
  display: inline-block;
  margin-top: 18px;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.research-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.research-pill,
.research-layer {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.research-pill--strong {
  background: rgba(123, 192, 141, 0.12);
  color: var(--success);
  border: 1px solid rgba(123, 192, 141, 0.22);
}

.research-pill--partial {
  background: rgba(209, 170, 87, 0.12);
  color: var(--warn);
  border: 1px solid rgba(209, 170, 87, 0.22);
}

.research-layer {
  background: rgba(255, 255, 255, 0.03);
  color: #ddd2c4;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.claims-table {
  width: 100%;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

/* Claims table layout optimization */
.claims-table tr {
  border-bottom: 1px solid var(--line);
}

.claims-table th,
.claims-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.claims-table th:first-child,
.claims-table td:first-child {
  width: 36%;
}

.claims-table tbody th {
  color: var(--text);
  font-weight: 600;
}

/* Make links clearly look like links */
.claims-table a {
  display: inline;
  margin-left: 6px;
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.claims-table a:hover {
  color: #f7e6be;
  opacity: 0.9;
}

/* Remove forced line breaks */
.claims-table br {
  display: none;
}

.claims-table tbody tr:last-child th,
.claims-table tbody tr:last-child td {
  border-bottom: none;
}

.claims-table thead th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold-2);
}

/* Mobile stacking */
@media (max-width: 768px) {
  .claims-table,
  .claims-table tbody,
  .claims-table tr,
  .claims-table th,
  .claims-table td {
    display: block;
  }

  .claims-table tbody th,
  .claims-table tbody td {
    width: 100%;
    border-bottom: none;
  }

  .claims-table tbody th:first-child,
  .claims-table tbody td:first-child {
    width: 100%;
  }
}

.supported {
  color: var(--success);
  font-weight: 600;
}

.partial {
  color: var(--warn);
  font-weight: 600;
}

.weak {
  color: #d6c08a;
  font-weight: 600;
}

.unsupported {
  color: var(--danger);
  font-weight: 600;
}

.dose-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dose-box span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.dose-box strong {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
}

.link-row {
  margin-top: 18px;
}

.research-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(214, 177, 96, 0.28);
  background: rgba(201, 160, 75, 0.1);
  color: #f6dfaa;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.research-link:hover {
  transform: translateY(-1px);
  background: rgba(201, 160, 75, 0.14);
  border-color: rgba(227, 197, 110, 0.48);
}

.research-disclaimer {
  margin-top: 18px;
  padding: 26px;
  border-radius: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 7, 9, 0.88);
  padding: 24px var(--content-edge-x) 40px;
  color: rgba(239, 229, 215, 0.88);
}

@media (max-width: 860px) {
  .site-footer {
    padding-bottom: 36px;
  }
}

.site-footer-inner {
  width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}

.site-footer-disclaimer {
  margin: 0;
  font-size: clamp(0.78rem, 0.25vw + 0.7rem, 0.92rem);
  line-height: 1.45;
  color: rgba(239, 229, 215, 0.76);
  max-width: 780px;
  text-align: center;
}

.site-footer-tagline {
  margin: -8px 0 0;
  color: rgba(241, 223, 191, 0.92);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-footer-links a {
  color: rgba(241, 223, 191, 0.9);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer-links a:hover {
  color: #f7e6be;
  border-bottom-color: rgba(227, 197, 110, 0.82);
}

.site-footer-links a[aria-current="page"] {
  color: #f7e6be;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom-color: rgba(227, 197, 110, 0.95);
  cursor: default;
}

.back-to-top {
  position: fixed;
  z-index: 40;
  right: max(16px, var(--content-edge-x));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f7e6be;
  background: linear-gradient(180deg, rgba(28, 28, 34, 0.96) 0%, rgba(14, 14, 18, 0.98) 100%);
  border: 1px solid rgba(214, 177, 96, 0.42);
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.2s ease, color 0.2s ease, visibility 0.22s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  color: #fff5e0;
  border-color: rgba(227, 197, 110, 0.65);
}

.back-to-top:focus {
  outline: none;
}

.back-to-top:focus-visible {
  outline: 2px solid rgba(227, 197, 110, 0.85);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .formula-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --content-edge-x: 20px;
  }

  .site-header {
    padding-top: 22px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }

  .site-header-inner {
    flex-direction: column;
    align-items: center;
  }

  .site-header-links {
    justify-content: center;
    font-size: 0.9rem;
    gap: 14px 16px;
  }

  .brand a {
    height: 52px;
  }

  .brand img {
    width: 220px;
  }

  .research-hero {
    padding: 28px 0 12px;
  }

  .research-intro {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.66;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .formula-grid,
  .info-grid,
  .article-list,
  .dose-box {
    grid-template-columns: 1fr;
  }

  .formula-item,
  .research-card,
  .research-disclaimer,
  .info-card,
  .hero-note {
    border-radius: 20px;
  }

  .formula-item,
  .research-card,
  .research-disclaimer,
  .info-card {
    padding: 20px;
  }

  .research-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    padding-top: 20px;
    padding-bottom: 36px;
  }

  .site-footer-links {
    font-size: 0.9rem;
    gap: 14px 16px;
  }
}
