:root {
    --bg-color: #0a0a0a;
    --card-bg: #141414;
    --text-primary: #ededed;
    --text-secondary: #a1a1a1;
    --accent-green: #22c55e;
    --accent-yellow: #eab308;
    --border-color: #333;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Typography & Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

p strong {
    color: var(--text-primary);
}

.text-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

.text-link:hover {
    text-decoration-color: var(--accent-green);
    color: #fff;
}

/* Backstory */
.backstory {
    margin-bottom: 60px;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.story-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-green);
    padding-left: 15px;
}

.story-item p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: left;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #888);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 650px;
}

.vision-statement {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.hero-scroll-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.hero-scroll-link:hover {
    border-bottom-color: var(--text-primary);
    transform: translateY(2px);
}

.status-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.goal-pill {
    border-color: rgba(234, 179, 8, 0.5);
    color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.1);
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.2) var(--progress, 0%), rgba(255, 255, 255, 0.05) var(--progress, 0%));
}

.status-pill:hover,
.goal-pill:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.goal-pill:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.2);
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.25) var(--progress, 0%), rgba(255, 255, 255, 0.1) var(--progress, 0%));
}

.stream-pill {
    border-color: rgba(255, 0, 0, 0.6);
    color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.15);
}

.stream-pill:hover {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    background: rgba(255, 0, 0, 0.1);
}

/* Dividers */
.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 60px 0;
}

.section-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 40px 0;
}

/* ============================
   PILLAR SECTIONS
   ============================ */
.pillar {
    margin-bottom: 20px;
}

.pillar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.pillar-number {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--bg-color);
    background: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pillar-header h2 {
    font-size: 1.8rem;
    margin: 0;
}

.pillar-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.pillar-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-style: italic;
}

/* Mission Block */
.mission-block {
    margin-bottom: 30px;
}

.mission-block h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.mission-block p {
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Principle Section */
.principle-section h3,
.outputs-section h3,
.channels-section h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
}

.principle-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.principle-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.principle-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.pillar-quote {
    border-left: 3px solid var(--accent-green);
    padding: 12px 20px;
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-style: italic;
    background: rgba(34, 197, 94, 0.04);
    border-radius: 0 6px 6px 0;
}

.principle-footnote {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Outputs Grid */
.outputs-intro {
    margin-bottom: 20px;
}

.outputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.output-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s ease;
}

.output-card:hover {
    border-color: #555;
}

.output-card h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.output-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.output-card ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.output-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-green);
}

.output-footnote {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Channels */
.channel {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.channel:last-child {
    margin-bottom: 0;
}

.channel:hover {
    border-color: #555;
}

.channel-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.channel-content {
    flex: 1;
}

.channel-label {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.channel-purpose {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.channel-intent {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.link-btn:hover {
    color: #fff;
    border-color: #fff;
}

/* ============================
   ROADMAP
   ============================ */
.roadmap {
    margin: 60px 0;
}

.roadmap h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.levels {
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

.level {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.level.completed {
    opacity: 0.8;
    border-color: rgba(34, 197, 94, 0.3);
}

.level.active {
    opacity: 1;
    border-color: rgba(234, 179, 8, 0.3);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.05);
}

.level.locked {
    opacity: 0.6;
    filter: grayscale(1);
}

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

.level-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.level-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-yellow);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(234, 179, 8, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(234, 179, 8, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
    }
}

.hud-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--bg-color);
    background: var(--accent-yellow);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.range {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.progress-bar {
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    margin: 15px 0 10px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 3px;
}

.progress-bar .fill.success {
    background: var(--accent-green);
}

.progress-bar .fill.warning {
    background: var(--accent-yellow);
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.status-text {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* ============================
   FOOTER
   ============================ */
footer {
    text-align: center;
    padding: 40px 0 80px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-socials {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-socials a {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: var(--accent-green);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .pillar-header h2 {
        font-size: 1.4rem;
    }

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

    .channel {
        flex-direction: column;
        gap: 12px;
    }

    .channel-icon {
        width: 32px;
        height: 32px;
    }

    .footer-socials {
        gap: 15px;
    }
}

/* ============================
   HEALTH PAGE STYLES (shared)
   ============================ */
.health {
    margin: 60px 0;
}

.health h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

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

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

.card-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.protocol-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.protocol-item .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.protocol-item ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.protocol-item li {
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
    color: var(--text-primary);
}

.protocol-item li::before {
    content: "•";
    color: var(--accent-green);
    position: absolute;
    left: 0;
}

.diet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.diet-tags li {
    padding: 0 !important;
    margin: 0 !important;
}

.diet-tags li::before {
    display: none;
}

.diet-tags li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 10px !important;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary) !important;
}

/* Chart */
.chart-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.chart-container {
    flex-grow: 1;
    position: relative;
    width: 100%;
}

.metrics-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.green {
    background: var(--accent-green);
}

.dot.yellow {
    background: var(--accent-yellow);
}

.dot.blue {
    background: #3b82f6;
}

/* Biomarker Tables */
.biomarkers-container {
    margin-top: 40px;
}

.biomarker-period {
    margin-bottom: 30px;
}

.biomarker-period h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-left: 2px solid var(--accent-green);
    padding-left: 10px;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.biomarker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    background: var(--card-bg);
}

.biomarker-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.biomarker-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.biomarker-table tr:last-child td {
    border-bottom: none;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background: var(--accent-green);
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.5);
}

.status-dot.red {
    background: #ef4444;
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 20px;
}

.dashboard-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #888);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.current-stats {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.current-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-stats .highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.current-stats .divider {
    color: var(--border-color);
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.5;
    padding-bottom: 2px;
}

.back-link {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s, transform 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-2px);
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 15px;
}

.timeframe-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-stack);
}

.timeframe-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.timeframe-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.table-section-header {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-green);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.trend-tooltip {
    position: absolute;
    width: 300px;
    height: 150px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.note {
    margin-top: 20px;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-secondary);
}