/* ===========================
   DESIGN SYSTEM & VARIABLES
   =========================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-elevated: #1e1e2a;
    --border: #2a2a3a;
    --border-light: #333346;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-tertiary: #6b6b82;
    --text-muted: #4a4a60;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);

    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --green-border: rgba(16, 185, 129, 0.2);

    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --yellow-border: rgba(245, 158, 11, 0.2);

    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);

    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

    --transition: 0.2s ease;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon svg {
    width: 18px;
    height: 18px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    width: 240px;
    transition: var(--transition);
}

.nav-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    width: 300px;
}

.nav-search svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 100%;
    font-family: inherit;
}

.nav-search input::placeholder {
    color: var(--text-tertiary);
}

/* ===========================
   HERO
   =========================== */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    max-width: 700px;
    margin: 0 auto 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light), #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto 48px;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px 6px 6px 20px;
    transition: var(--transition);
}

.hero-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-lg);
}

.search-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
}

.hero-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    padding: 12px 16px;
    font-family: inherit;
}

.hero-search input::placeholder {
    color: var(--text-tertiary);
}

.search-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.search-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ===========================
   SEARCH DROPDOWN
   =========================== */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
}

.search-dropdown.visible {
    display: block;
    animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.search-item:hover,
.search-item.active {
    background: var(--bg-card-hover);
}

.search-item + .search-item {
    border-top: 1px solid var(--border);
}

.search-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-item.supplement .search-item-icon {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.search-item.goal .search-item-icon {
    background: var(--green-bg);
    color: var(--green);
}

.search-item-text {
    flex: 1;
    min-width: 0;
}

.search-item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.search-item-name mark {
    background: rgba(99, 102, 241, 0.3);
    color: var(--accent-light);
    border-radius: 2px;
    padding: 0 1px;
}

.search-item-detail {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.search-item-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 100px;
    flex-shrink: 0;
}

.search-item.supplement .search-item-type {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.search-item.goal .search-item-type {
    background: var(--green-bg);
    color: var(--green);
}

/* ===========================
   BROWSE SECTION
   =========================== */
.browse-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.browse-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 40px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.tab-btn.active {
    background: var(--accent);
    color: white;
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   FILTER BAR
   =========================== */
/* ===========================
   HOMEPAGE FILTER BAR
   =========================== */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.filter-btn svg {
    transition: transform 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-glow);
}

.filter-btn.active svg {
    transform: rotate(180deg);
}

.filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 6px;
    z-index: 200;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.filter-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border-light);
    border-top: 1px solid var(--border-light);
}

.filter-panel.open {
    display: block;
    animation: filterSlideIn 0.15s ease;
}

@keyframes filterSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    margin: 1px 0;
    user-select: none;
}

.filter-option:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.filter-clear {
    padding: 8px 18px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 100px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-clear:hover {
    color: var(--red);
    border-color: var(--red);
    background: var(--red-bg);
}

.filter-active-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.filter-active-tags:empty {
    display: none;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-light);
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--accent-light);
    cursor: pointer;
    padding: 0 0 0 2px;
    font-size: 15px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.filter-tag button:hover {
    opacity: 1;
}

.no-results-msg {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 16px;
}

/* ===========================
   SUPPLEMENT CARDS
   =========================== */
.supplement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.supplement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.supplement-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.supplement-card.featured {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.05));
}

.card-evidence {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.evidence-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.evidence-fill {
    height: 100%;
    width: var(--evidence);
    background: linear-gradient(90deg, var(--green), var(--accent-light));
    border-radius: 3px;
    transition: width 1s ease;
}

.evidence-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    white-space: nowrap;
}

.supplement-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-latin {
    font-size: 13px;
    color: var(--text-tertiary);
    font-style: italic;
    margin-bottom: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tag {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.tag-anxiety { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.tag-stress { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tag-sleep { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.tag-performance { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.tag-muscle { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.tag-cognition { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.tag-immune { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.tag-bone { background: rgba(209, 213, 219, 0.15); color: #d1d5db; }
.tag-mood { background: rgba(244, 114, 182, 0.15); color: #f472b6; }
.tag-heart { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.tag-inflammation { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.tag-energy { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.tag-default { background: rgba(160, 160, 184, 0.12); color: var(--text-secondary); }

.card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ===========================
   GOALS GRID
   =========================== */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    cursor: pointer;
}

.goal-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.goal-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.goal-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-light);
}

.goal-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.goal-card p {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.goal-supplements {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.goal-pill {
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ===========================
   SUPPLEMENT DETAIL PAGE
   =========================== */
.supplement-page {
    display: none;
    padding: 100px 0 80px;
}

.supplement-page.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 32px;
    font-family: inherit;
}

.back-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

/* Supplement Header */
.supp-header {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.supp-header-text {
    flex: 1;
}

.supp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.supp-header h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.supp-latin {
    font-size: 16px;
    color: var(--text-tertiary);
    font-style: italic;
    margin-bottom: 16px;
}

.supp-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}

.supp-header-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.quick-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    text-align: center;
    min-width: 120px;
}

.quick-stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.quick-stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 4px;
}

/* ===========================
   EVIDENCE METERS
   =========================== */
.evidence-overview {
    margin-bottom: 60px;
}

.evidence-overview h2,
.viz-section h2,
.findings-section h2,
.studies-section h2,
.dosage-section h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 32px;
}

.evidence-overall {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: fit-content;
}

.evidence-overall-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.evidence-overall-badge {
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.evidence-very-strong {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.evidence-strong {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.evidence-moderate {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}

.evidence-weak {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.evidence-meters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.meter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.meter-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.meter-verdict {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.verdict-strong {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.verdict-moderate {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}

.verdict-weak {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.meter-bar-track {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.meter-bar-fill {
    height: 100%;
    width: var(--fill);
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--green));
    transition: width 1.5s ease;
}

.meter-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.meter-plain-english {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* ===========================
   DATA VISUALISATIONS
   =========================== */
.viz-section {
    margin-bottom: 60px;
}

.viz-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.viz-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.viz-card.viz-wide {
    grid-column: span 2;
}

.viz-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.viz-description {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

/* Dosage Chart */
.dosage-chart {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    height: 220px;
    padding-top: 20px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: right;
    width: 40px;
    flex-shrink: 0;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 100%;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0 16px 0 16px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 60px;
    height: var(--height);
    border-radius: 6px 6px 0 0;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.chart-bar:hover {
    transform: scaleY(1.02);
}

.chart-bar:hover .bar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

.bar-fill {
    width: 100%;
    height: 100%;
    border-radius: 6px 6px 0 0;
}

.bar-positive {
    background: linear-gradient(180deg, var(--green), rgba(16, 185, 129, 0.4));
}

.bar-moderate {
    background: linear-gradient(180deg, var(--accent-light), rgba(99, 102, 241, 0.4));
}

.bar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.bar-tooltip strong {
    color: var(--text-primary);
}

.bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.bar-sub {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    flex-shrink: 0;
}

.timeline-year {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    width: 50px;
}

.timeline-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.timeline-connector {
    width: 2px;
    height: 16px;
    background: var(--border);
    margin-left: 5px;
}

/* Quality Rings */
.quality-rings {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    padding: 16px 0;
}

.ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ring {
    width: 80px;
    height: 80px;
    position: relative;
}

.ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--bg-elevated);
    stroke-width: 3;
}

.ring-fill {
    fill: none;
    stroke: var(--color);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease;
}

.ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.ring-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Participant Bars */
.participant-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p-bar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.p-bar-label {
    font-size: 13px;
    color: var(--text-secondary);
    width: 140px;
    flex-shrink: 0;
}

.p-bar-track {
    flex: 1;
    height: 28px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.p-bar-fill {
    height: 100%;
    width: var(--width);
    min-width: 52px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 1s ease;
}

.p-bar-value {
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.p-bar-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Timeline Bar Chart */
.timeline-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding: 16px 0;
}

.timeline-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.timeline-bar-col {
    width: 100%;
    max-width: 48px;
    height: var(--height);
    background: linear-gradient(180deg, var(--accent-light), rgba(99, 102, 241, 0.3));
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
    min-height: 24px;
    transition: height 1s ease;
}

.timeline-bar-count {
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.timeline-bar-year {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
}

/* Study Type Filters */
.studies-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.study-type-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.study-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.study-type-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.study-type-btn.active {
    background: var(--accent-glow);
    border-color: var(--accent-light);
    color: var(--accent-light);
}

.study-type-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.study-type-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 11px;
}

.study-type-btn.active .study-type-count {
    background: rgba(255, 255, 255, 0.12);
}

/* Study Bucket Badges */
.badge-bucket {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-bucket svg {
    width: 12px;
    height: 12px;
}

.badge-human {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-animal {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.badge-invitro {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

/* Category Heading */
.category-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-light);
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.category-heading:first-of-type {
    margin-top: 0;
}

/* Study Detail Wide */
.study-detail-wide {
    grid-column: span 2;
}

/* ===========================
   KEY FINDINGS
   =========================== */
.findings-section {
    margin-bottom: 60px;
}

.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.finding-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid;
}

.finding-positive {
    background: var(--green-bg);
    border-color: var(--green-border);
}

.finding-neutral {
    background: var(--blue-bg);
    border-color: rgba(59, 130, 246, 0.2);
}

.finding-caution {
    background: var(--yellow-bg);
    border-color: var(--yellow-border);
}

.finding-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.finding-positive .finding-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.finding-neutral .finding-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.finding-caution .finding-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--yellow);
}

.finding-icon svg {
    width: 20px;
    height: 20px;
}

.finding-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.finding-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   STUDY CARDS
   =========================== */
.studies-section {
    margin-bottom: 60px;
}

.study-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.studies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.study-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.study-card:hover {
    border-color: var(--border-light);
}

.study-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.study-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-light);
    flex-shrink: 0;
}

.study-card-info {
    flex: 1;
    min-width: 0;
}

.study-card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.study-meta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.study-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.study-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.badge-rct {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-blind {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.badge-positive {
    background: var(--green-bg);
    color: var(--green);
}

.badge-mixed {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.badge-placebo {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.study-expand-icon {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: var(--transition);
}

.study-expand-icon svg {
    width: 20px;
    height: 20px;
}

.study-card.expanded .study-expand-icon {
    transform: rotate(180deg);
}

/* Study Card Body (expandable) */
.study-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 24px;
}

.study-card.expanded .study-card-body {
    max-height: 2000px;
    padding: 0 24px 24px;
    border-top: 1px solid var(--border);
}

.study-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.study-detail h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.study-detail p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.study-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.study-link:hover {
    background: rgba(99, 102, 241, 0.25);
}

/* ===========================
   DOSAGE TABLE
   =========================== */
.dosage-section {
    margin-bottom: 60px;
}

.dosage-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dosage-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
    padding: 16px 24px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

.dosage-row:last-child {
    border-bottom: none;
}

.dosage-header {
    background: var(--bg-elevated);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: 12px 24px;
}

.dosage-row.highlight {
    background: var(--accent-glow);
    border-color: rgba(99, 102, 241, 0.15);
}

.dose-value {
    font-weight: 600;
    color: var(--text-primary);
}

.dose-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.confidence-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
}

.dot.filled {
    background: var(--green);
    border-color: var(--green);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.7;
    max-width: 400px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.footer-links a {
    display: block;
    font-size: 14px;
    color: var(--text-tertiary);
    padding: 4px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* ===========================
   METHODOLOGY PAGE
   =========================== */
.methodology-page {
    display: none;
    padding: 100px 0 80px;
}

.methodology-page.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

.methodology-container {
    max-width: 900px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-light);
}

.methodology-hero {
    text-align: center;
    margin-bottom: 64px;
}

.methodology-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--accent-glow);
    color: var(--accent-light);
    margin-bottom: 24px;
}

.methodology-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.methodology-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.method-section {
    margin-bottom: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.method-section-final {
    border-bottom: none;
}

.method-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.method-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.method-desc {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Pipeline flow */
.pipeline-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 32px 0;
}

.pipeline-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
    min-width: 140px;
    flex: 1;
}

.pipeline-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.pipeline-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
}

.pipeline-detail {
    font-size: 12px;
    color: var(--text-tertiary);
}

.pipeline-arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* Weight chart (horizontal bars) */
.weight-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
}

.weight-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weight-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 220px;
    text-align: right;
    flex-shrink: 0;
}

.weight-bar-wrap {
    flex: 1;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.weight-bar {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 0.6s ease;
}

.weight-bar span {
    font-size: 13px;
    font-weight: 700;
    color: white;
}

/* Method callout */
.method-callout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-top: 24px;
}

.method-callout strong {
    color: var(--text-primary);
}

/* Type comparison cards */
.type-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.type-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0 4px;
}

.type-icon {
    color: var(--accent-light);
}

.type-multiplier {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    margin: 8px 0;
}

.type-card p {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.type-human { border-top: 3px solid #22c55e; }
.type-human .type-multiplier { color: #22c55e; }
.type-animal { border-top: 3px solid #f59e0b; }
.type-animal .type-multiplier { color: #f59e0b; }
.type-invitro { border-top: 3px solid #64748b; }
.type-invitro .type-multiplier { color: #64748b; }

/* Sample size viz */
.sample-bar-group {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
}

.sample-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sample-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 60px;
}

.sample-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.sample-n {
    font-size: 12px;
    color: var(--text-tertiary);
}

.sample-weight {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-light);
}

/* Outcome cards */
.outcome-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.outcome-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.outcome-score {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.outcome-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.outcome-card p {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.outcome-positive .outcome-score { color: #22c55e; }
.outcome-positive { border-top: 3px solid #22c55e; }
.outcome-mixed .outcome-score { color: #f59e0b; }
.outcome-mixed { border-top: 3px solid #f59e0b; }
.outcome-neutral .outcome-score { color: #64748b; }
.outcome-neutral { border-top: 3px solid #64748b; }
.outcome-negative .outcome-score { color: #ef4444; }
.outcome-negative { border-top: 3px solid #ef4444; }

/* Formula box */
.formula-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin: 24px 0;
}

.formula-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.formula-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.formula-step:first-child {
    padding-top: 0;
}

.formula-label {
    font-size: 13px;
    color: var(--text-tertiary);
    min-width: 200px;
    flex-shrink: 0;
}

.formula-eq {
    font-family: 'Inter', monospace;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.formula-final {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-light);
}

/* Threshold visualization */
.threshold-viz {
    margin: 32px 0 24px;
}

.threshold-bar {
    display: flex;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    gap: 2px;
}

.threshold-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.threshold-weak { background: linear-gradient(135deg, #374151, #4b5563); }
.threshold-moderate { background: linear-gradient(135deg, #92400e, #b45309); }
.threshold-strong { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.threshold-vstrong { background: linear-gradient(135deg, #065f46, #10b981); }

.threshold-label {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.threshold-range {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.threshold-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.threshold-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.threshold-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.threshold-badge.weak { background: #374151; color: #9ca3af; }
.threshold-badge.moderate { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.threshold-badge.strong { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.threshold-badge.very-strong { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.threshold-detail p {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* Transparency grid */
.transparency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.transparency-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.transparency-icon {
    color: var(--accent-light);
    margin-bottom: 12px;
}

.transparency-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.transparency-card p {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ===========================
   BLOG & RUNDOWN PAGES
   =========================== */

/* Page visibility */
.blog-page,
.blog-post-page {
    display: none;
    padding: 100px 0 80px;
}
.blog-page.visible,
.blog-post-page.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Blog Index */
.blog-hero {
    text-align: center;
    margin-bottom: 48px;
}
.blog-hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.blog-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.blog-post-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.blog-post-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.blog-post-card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 12px 0 8px;
    color: var(--text-primary);
}
.blog-post-card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}
.blog-post-card-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.blog-post-card-stat {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.blog-post-card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Rundown Hero */
.rundown-hero {
    margin-bottom: 48px;
}
.rundown-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}
.rundown-hero h1 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.1;
}
.rundown-sci-name {
    font-size: 16px;
    color: var(--text-tertiary);
    font-style: italic;
    margin-bottom: 12px;
}
.rundown-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 750px;
}
.rundown-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.rundown-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.rundown-hero-stats .quick-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

/* TL;DR Callout */
.rundown-tldr {
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 48px;
}
.rundown-tldr-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rundown-tldr p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* Table of Contents */
.rundown-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 48px;
}
.rundown-toc h2 {
    font-size: 18px;
    margin-bottom: 16px;
}
.rundown-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.rundown-toc-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rundown-toc-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}
.rundown-toc-item a:hover {
    color: var(--accent-light);
}
.rundown-toc-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
}

/* Evidence Overview */
.rundown-evidence-overview {
    margin-bottom: 48px;
}
.rundown-evidence-overview h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.rundown-viz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}
.rundown-viz-grid .viz-wide {
    grid-column: 1 / -1;
}

/* Category Strength Chart */
.category-strength-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.strength-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.strength-label {
    width: 180px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.strength-bar-track {
    flex: 1;
    height: 22px;
    background: var(--bg-elevated);
    border-radius: 6px;
    overflow: hidden;
}
.strength-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
    min-width: 4px;
}
.strength-bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    min-width: 140px;
    flex-shrink: 0;
}

/* Outcome Chart */
.outcome-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.outcome-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.outcome-label {
    width: 160px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.outcome-bar-stack {
    flex: 1;
    height: 18px;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    gap: 1px;
}
.outcome-positive {
    background: var(--green);
}
.outcome-mixed {
    background: var(--yellow);
}
.outcome-neutral {
    background: rgba(148, 163, 184, 0.4);
}
.outcome-info {
    font-size: 12px;
    color: var(--text-tertiary);
    min-width: 80px;
    flex-shrink: 0;
}

/* Rundown Category Section */
.rundown-category {
    margin-bottom: 56px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}
.rundown-category:last-of-type {
    border-bottom: none;
}
.rundown-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.rundown-category h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}
.rundown-category-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}
.rundown-category-summary {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 800px;
}

/* Compact Study Cards */
.rundown-study-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 12px;
    transition: var(--transition);
}
.rundown-study-card:hover {
    border-color: var(--border-light);
}
.rundown-study-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.rundown-study-year {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-light);
}
.rundown-study-type {
    font-size: 12px;
    color: var(--text-muted);
}
.rundown-study-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.rundown-study-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}
.rundown-study-meta span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.rundown-study-meta span:first-child::before {
    display: none;
}
.rundown-study-finding {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}
.rundown-study-link {
    font-size: 13px;
    color: var(--accent-light);
    text-decoration: none;
}
.rundown-study-link:hover {
    text-decoration: underline;
}

/* Dosage Guide */
.rundown-dosage {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 48px;
}
.rundown-dosage h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
}
.dosage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.dosage-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}
.dosage-card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 4px;
}
.dosage-card-label {
    font-size: 12px;
    color: var(--text-tertiary);
}
.dosage-notes {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 16px;
}

/* Safety Section */
.rundown-safety {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 48px;
}
.rundown-safety h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}
.rundown-safety p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Conclusion */
.rundown-conclusion {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 48px;
}
.rundown-conclusion h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
}
.rundown-conclusion p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 24px;
}
.rundown-cta-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.rundown-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.rundown-cta-primary {
    background: var(--accent);
    color: white;
}
.rundown-cta-primary:hover {
    opacity: 0.9;
}
.rundown-cta-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.rundown-cta-secondary:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

/* References */
.rundown-references {
    margin-bottom: 48px;
}
.rundown-references h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}
.rundown-ref-category {
    margin-bottom: 20px;
}
.rundown-ref-category h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.rundown-ref-item {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
}
.rundown-ref-item a {
    color: var(--accent-light);
    text-decoration: none;
}
.rundown-ref-item a:hover {
    text-decoration: underline;
}

/* Back link (shared) */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 32px;
    transition: var(--transition);
}
.back-link:hover {
    color: var(--accent-light);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .supp-header {
        flex-direction: column;
    }

    .supp-header-stats {
        flex-wrap: wrap;
    }

    .viz-grid {
        grid-template-columns: 1fr;
    }

    .viz-card.viz-wide {
        grid-column: span 1;
    }

    .study-card-header {
        flex-wrap: wrap;
        padding: 16px;
        gap: 10px;
    }

    .study-badges {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }

    .study-card-body {
        padding: 0 16px;
    }

    .study-card.expanded .study-card-body {
        padding: 0 16px 20px;
    }

    .study-detail-grid {
        grid-template-columns: 1fr;
    }

    .study-detail-wide {
        grid-column: span 1;
    }

    .study-detail p {
        font-size: 13px;
        word-break: break-word;
    }

    .study-link {
        margin-top: 8px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        padding: 80px 0 48px;
    }

    .hero-badge {
        margin-bottom: 16px;
        font-size: 12px;
        padding: 5px 12px;
    }

    .hero h1 {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .hero-search {
        margin-bottom: 32px;
        padding: 4px 4px 4px 14px;
    }

    .hero-search input {
        font-size: 14px;
        padding: 10px 8px;
    }

    .search-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .search-icon svg {
        width: 18px;
        height: 18px;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 24px;
    }

    .stat-divider {
        display: none;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    /* --- Charts: contain within mobile width --- */
    .timeline-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 4px;
    }

    .timeline-bar-item {
        min-width: 32px;
    }

    .timeline-bar-year {
        font-size: 10px;
    }

    .p-bar-label {
        width: 100px;
        font-size: 11px;
    }

    .p-bar-track {
        height: 24px;
    }

    .p-bar-row {
        gap: 8px;
    }

    .participant-bars {
        gap: 8px;
    }

    .p-bar-value {
        font-size: 11px;
    }

    .viz-card {
        padding: 16px;
        overflow-x: hidden;
    }

    .viz-card h3 {
        font-size: 18px;
    }

    .viz-description {
        font-size: 13px;
    }

    .quality-rings {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ring {
        width: 70px;
        height: 70px;
    }

    .ring-value {
        font-size: 13px;
    }

    .ring-label {
        font-size: 11px;
    }

    .supplement-page {
        overflow-x: hidden;
    }

    .evidence-overview {
        margin-bottom: 32px;
    }

    .evidence-overview h2 {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .section-subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .evidence-overall {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        margin-bottom: 12px;
    }

    .evidence-meters {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .meter-card {
        padding: 12px 14px;
    }

    .meter-header {
        margin-bottom: 8px;
    }

    .meter-header h3 {
        font-size: 14px;
    }

    .meter-bar-track {
        height: 6px;
        margin-bottom: 6px;
    }

    .meter-details {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 10px;
        font-size: 11px;
        margin-bottom: 0;
    }

    .meter-plain-english {
        display: none;
    }

    .dosage-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px 16px;
    }

    .dosage-header {
        padding: 10px 16px;
    }

    .category-heading {
        padding: 0 4px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .supplement-grid {
        grid-template-columns: 1fr;
    }

    .browse-tabs {
        width: 100%;
        justify-content: center;
    }

    .supp-badge {
        font-size: 12px;
    }

    .supp-header h1 {
        font-size: 28px;
    }

    .quick-stat {
        padding: 12px 16px;
    }

    .quick-stat-value {
        font-size: 22px;
    }

    .studies-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .study-type-filters {
        width: 100%;
        overflow-x: auto;
    }

    .browse-section {
        padding: 48px 0;
    }

    .section-header {
        margin-bottom: 24px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .section-header p {
        font-size: 14px;
    }

    .browse-tabs {
        margin-bottom: 24px;
    }

    /* Methodology mobile */
    .methodology-hero h1 {
        font-size: 28px;
    }

    .methodology-subtitle {
        font-size: 15px;
    }

    .pipeline-flow {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }

    .pipeline-step {
        width: 100%;
    }

    .weight-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .weight-label {
        text-align: left;
        min-width: unset;
    }

    .weight-bar-wrap {
        width: 100%;
    }

    .type-comparison {
        grid-template-columns: 1fr;
    }

    .outcome-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .formula-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .formula-label {
        min-width: unset;
    }

    .threshold-bar {
        height: auto;
        flex-direction: column;
    }

    .threshold-segment {
        padding: 12px;
    }

    .threshold-cards {
        grid-template-columns: 1fr 1fr;
    }

    .transparency-grid {
        grid-template-columns: 1fr;
    }

    /* Blog responsive */
    .blog-hero h1 { font-size: 28px; }
    .blog-posts-grid { grid-template-columns: 1fr; }

    .rundown-hero h1 { font-size: 28px; }
    .rundown-hero-stats { grid-template-columns: repeat(2, 1fr); }
    .rundown-category-header { flex-direction: column; }
    .rundown-viz-grid { grid-template-columns: 1fr; }
    .strength-label { width: 110px; font-size: 12px; }
    .strength-bar-info { font-size: 11px; min-width: 100px; }
    .outcome-label { width: 110px; font-size: 12px; }
    .rundown-toc-list { grid-template-columns: 1fr; }
    .dosage-cards { grid-template-columns: 1fr 1fr; }
    .rundown-cta-links { flex-direction: column; }
}
