/* ============================================================
   ALPHA TIDES — Research Article & Hub Styles
   research-article.css
   ============================================================ */

/* ── Global link colors for research pages ─────────────────── */
.research-page a               { color: #9b7bff; text-decoration: none; }
.research-page a:hover         { color: #c6b4ff; text-decoration: underline; }
.research-page .breadcrumb a   { color: #9b7bff; }
.research-page .citation-link  { color: #9b7bff; font-size: 14px; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb a { color: #9b7bff; text-decoration: none; }
.breadcrumb a:hover { color: #c6b4ff; text-decoration: underline; }
.breadcrumb-sep { opacity: 0.35; }

/* ── Article layout ──────────────────────────────────────────── */
.research-layout {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 100px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  box-sizing: border-box;
  overflow-x: hidden;
}
@media (max-width: 900px) {
  .research-layout {
    grid-template-columns: 1fr;
    padding: 32px 16px 80px;
    overflow-x: hidden;
  }
}

/* ── Prevent all child content from overflowing on mobile ── */
.research-layout article,
.research-layout > div {
  min-width: 0;
  overflow-x: hidden;
  max-width: 100%;
}
.research-section p,
.research-section li,
.research-section h2,
.research-section h3 {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}
@media (max-width: 600px) {
  .research-layout { padding: 24px 14px 60px; }
  .research-article-title { font-size: clamp(22px, 6vw, 32px); }
  .research-section p,
  .research-section li { font-size: 14.5px; }
}

/* ── Sidebar TOC ─────────────────────────────────────────────── */
.research-toc {
  position: sticky;
  top: 88px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(123,77,255,0.18);
  border-radius: 14px;
  padding: 22px 20px;
}
.research-toc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9b7bff;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.research-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.research-toc-nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}
.research-toc-nav a:hover,
.research-toc-nav a.active {
  background: rgba(123,77,255,0.12);
  color: #c4b0ff;
  text-decoration: none;
}
@media (max-width: 900px) {
  .research-toc {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 16px;
  }
  .research-toc-label { width: 100%; margin-bottom: 6px; }
  .research-toc-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .research-toc-nav a {
    font-size: 12px;
    padding: 5px 10px;
    background: rgba(123,77,255,0.08);
    border-radius: 99px;
  }
}

/* ── Article header ──────────────────────────────────────────── */
.research-article-header { margin-bottom: 36px; }

.research-article-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9b7bff;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.research-article-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 16px;
}
.research-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}
.research-article-meta span { display: flex; align-items: center; gap: 6px; }
.research-article-meta svg {
  width: 13px; height: 13px;
  stroke: rgba(255,255,255,0.35); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* Tag pills */
.research-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.research-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid;
}
.research-tag--compound { color: #c4b0ff; border-color: rgba(196,176,255,0.35); background: rgba(196,176,255,0.07); }
.research-tag--guide    { color: #7dd8ff; border-color: rgba(125,216,255,0.35); background: rgba(125,216,255,0.07); }
.research-tag--study    { color: #7de8b0; border-color: rgba(125,232,176,0.35); background: rgba(125,232,176,0.07); }
.research-tag--reference{ color: #ffd580; border-color: rgba(255,213,128,0.35); background: rgba(255,213,128,0.07); }
.research-tag--safety   { color: #ff9090; border-color: rgba(255,144,144,0.35); background: rgba(255,144,144,0.07); }

/* ── Article divider ─────────────────────────────────────────── */
.research-divider {
  border: none;
  border-top: 1px solid rgba(123,77,255,0.12);
  margin: 36px 0;
}

/* ── Section headings ────────────────────────────────────────── */
.research-section { margin-bottom: 48px; scroll-margin-top: 100px; }

.research-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.research-section h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 22px;
  background: linear-gradient(180deg, #7b4dff, #c4b0ff);
  border-radius: 2px;
  flex-shrink: 0;
}
.research-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #e8e0ff;
  margin: 24px 0 10px;
}

/* ── Body text ───────────────────────────────────────────────── */
.research-section p {
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.72);
  margin: 0 0 16px;
}
.research-section ul,
.research-section ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.research-section li {
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.72);
  margin-bottom: 6px;
}

/* ── Callout / highlight box ─────────────────────────────────── */
.research-callout {
  background: rgba(123,77,255,0.07);
  border: 1px solid rgba(123,77,255,0.25);
  border-left: 3px solid #7b4dff;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.research-callout p {
  margin: 0;
  font-size: 14.5px;
  color: rgba(255,255,255,0.75);
}
.research-callout strong { color: #c4b0ff; }

/* ── Data table ──────────────────────────────────────────────── */
.research-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid rgba(123,77,255,0.2);
  max-width: 100%;
}
.research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 480px;
}
.research-table th {
  background: rgba(123,77,255,0.12);
  color: #c4b0ff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(123,77,255,0.2);
  white-space: nowrap;
}
.research-table td {
  padding: 11px 16px;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 320px;
}
.research-table tr:last-child td { border-bottom: none; }
.research-table tr:hover td { background: rgba(123,77,255,0.05); }
@media (max-width: 600px) {
  .research-table { font-size: 13px; }
  .research-table th, .research-table td { padding: 10px 12px; }
}

/* ── Study card grid ─────────────────────────────────────────── */
.research-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ── Study card ──────────────────────────────────────────────── */
a.research-study-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
a.research-study-card:hover {
  border-color: rgba(123,77,255,0.45);
  background: rgba(123,77,255,0.07);
}
.research-study-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(123,77,255,0.18);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 0;
}
.research-study-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9b7bff;
  margin-bottom: 8px;
}
.research-study-card-title {
  font-weight: 700;
  font-size: 15px;
  color: #e8e0ff;
  margin-bottom: 6px;
}
.research-study-card-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
}
.research-study-card-desc {
  font-size: 13.5px;
  color: rgba(220,210,255,0.7);
  line-height: 1.55;
  margin-bottom: 14px;
}
.research-study-card p {
  font-size: 14.5px;
  margin: 0;
}
.research-study-card-cta {
  font-size: 12.5px;
  font-weight: 600;
  color: #9b7bff;
}
.research-study-card-finding {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #7de8b0;
  background: rgba(125,232,176,0.08);
  border: 1px solid rgba(125,232,176,0.2);
  border-radius: 99px;
  padding: 4px 12px;
  margin-top: 12px;
}

/* ── Internal links box ──────────────────────────────────────── */
.research-links {
  border: 1px solid rgba(155,123,255,0.2);
  background: rgba(10,10,25,0.4);
  padding: 25px 28px;
  border-radius: 12px;
  margin-top: 48px;
}
.research-links-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9b7bff;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.research-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.research-links-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #9b7bff;
  background: rgba(123,77,255,0.07);
  border: 1px solid rgba(123,77,255,0.18);
  border-radius: 9px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.research-links-grid a:hover {
  background: rgba(123,77,255,0.14);
  color: #c6b4ff;
  border-color: rgba(123,77,255,0.35);
  text-decoration: none;
}
.research-links-grid a svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Related articles ────────────────────────────────────────── */
.research-related {
  margin-top: 48px;
}
.research-related-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9b7bff;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.research-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.research-related-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(123,77,255,0.18);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: block;
}
.research-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(123,77,255,0.18);
  border-color: rgba(123,77,255,0.4);
  text-decoration: none;
}
.research-related-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9b7bff;
  margin-bottom: 8px;
}
.research-related-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #e8e0ff;
  margin-bottom: 6px;
  line-height: 1.35;
}
.research-related-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

/* ── References ──────────────────────────────────────────────── */
.research-references {
  margin-top: 16px;
}
.research-references ol {
  padding-left: 22px;
  margin: 0;
}
.research-references li {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.research-references a {
  color: #9b7bff;
  text-decoration: none;
  word-break: break-all;
}
.research-references a:hover { color: #c6b4ff; text-decoration: underline; }

/* ── Disclaimer ──────────────────────────────────────────────── */
.research-disclaimer {
  background: rgba(255,100,100,0.04);
  border: 1px solid rgba(255,100,100,0.15);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin-top: 48px;
}
.research-disclaimer strong { color: rgba(255,144,144,0.8); }

/* ── Hub page ─────────────────────────────────────────────────── */
.rh-hero {
  padding: 80px 24px 60px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.rh-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #9b7bff;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.rh-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 18px;
}
.rh-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin: 0 0 32px;
}
.rh-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.rh-stat {
  text-align: center;
}
.rh-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #c4b0ff;
}
.rh-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.rh-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(123,77,255,0.3);
  align-self: center;
}

/* Hub search */
.rh-search-wrap {
  max-width: 560px;
  margin: 0 auto 48px;
  position: relative;
}
.rh-search-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(123,77,255,0.3);
  border-radius: 12px;
  padding: 14px 48px 14px 48px;
  font-size: 15px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.rh-search-input:focus { border-color: rgba(123,77,255,0.65); }
.rh-search-input::placeholder { color: rgba(255,255,255,0.3); }
.rh-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: rgba(255,255,255,0.3);
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}

/* Hub sections */
.rh-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 72px;
}
.rh-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
}
.rh-section-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9b7bff;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rh-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.rh-section-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin: 6px 0 0;
}
.rh-view-all {
  font-size: 13px;
  font-weight: 600;
  color: #9b7bff;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rh-view-all:hover { color: #c6b4ff; text-decoration: underline; }

/* Hub cards */
.rh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.rh-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(123,77,255,0.18);
  border-radius: 16px;
  padding: 22px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.rh-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(123,77,255,0.2);
  border-color: rgba(123,77,255,0.4);
  text-decoration: none;
}
.rh-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rh-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid;
}
.rh-card-arrow {
  width: 16px; height: 16px;
  stroke: rgba(255,255,255,0.25); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.rh-card:hover .rh-card-arrow { stroke: #9b7bff; transform: translate(2px,-2px); }
.rh-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #e8e0ff;
  margin-bottom: 8px;
  line-height: 1.3;
}
.rh-card-desc {
  font-size: 13.5px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  flex: 1;
}

/* Hub silo nav */
.rh-silo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
  max-width: 1100px;
  padding: 0 24px;
  margin-left: auto;
  margin-right: auto;
}
.rh-silo-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid rgba(123,77,255,0.3);
  background: rgba(123,77,255,0.07);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.rh-silo-btn:hover,
.rh-silo-btn.active {
  background: rgba(123,77,255,0.18);
  border-color: rgba(123,77,255,0.5);
  color: #c4b0ff;
  text-decoration: none;
}
.rh-silo-btn svg {
  width: 13px; height: 13px; stroke: currentColor;
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
