:root {
    --primary-color: #3a7afe;
    --primary-gradient: linear-gradient(135deg, #5b9cff, #2f6df6);
    --text-dark: #1d1d1f;
    --text-light: #6e6e73;
    --surface-color: rgba(255, 255, 255, 0.94);
    --border-color: #e7edf7;
    --bg-light: #f5f7fb;
    --card-shadow: 0 18px 48px rgba(17, 24, 39, 0.06);
    --hover-shadow: 0 18px 36px rgba(17, 24, 39, 0.1);
}

body.health-page {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background:
        radial-gradient(circle at top right, rgba(126, 164, 255, 0.2), transparent 22%),
        radial-gradient(circle at left center, rgba(255, 255, 255, 0.84), transparent 28%),
        linear-gradient(180deg, #f3f7fd 0%, #fbfdff 36%, #f4f7fb 100%);
    margin: 0;
}

.health-main {
    padding: 36px 0 64px;
}

.health-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 24px;
}

.health-hero-copy,
.health-hero-card,
.health-module-panel,
.health-preview-card,
.health-form-card,
.health-results-card {
    background: var(--surface-color);
    border: 1px solid rgba(231, 237, 247, 0.95);
    border-radius: 28px;
    box-shadow: var(--card-shadow);
}

.health-hero-copy {
    padding: 30px 34px;
    background:
        radial-gradient(circle at top right, rgba(93, 156, 255, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 254, 0.96));
}

.health-badge {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #2f6df6;
    background: rgba(58, 122, 254, 0.09);
}

.health-hero-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.health-hero-copy p {
    margin: 0;
    max-width: 720px;
    font-size: 18px;
    color: #748093;
}

.health-hero-card {
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(94, 193, 166, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 252, 250, 0.96));
}

.hero-card-icon {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8ce0cf, #4cb89d);
    color: white;
    font-size: 34px;
    box-shadow: 0 16px 30px rgba(76, 184, 157, 0.22);
}

.hero-card-content h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.hero-card-content p {
    margin: 0;
    color: #6f7b8b;
    font-size: 15px;
}

.health-shell {
    display: grid;
    gap: 18px;
    --module-accent: #3a7afe;
    --module-accent-soft: rgba(58, 122, 254, 0.1);
    --module-gradient: linear-gradient(135deg, #5b9cff, #2f6df6);
}

.health-module-panel {
    padding: 20px;
}

.health-section-title {
    margin: 0 0 14px;
    font-size: 18px;
    color: #3e4a5d;
}

.health-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 12px;
}

.health-module-card {
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 22px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.health-module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.health-module-card.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.98));
    border-color: rgba(58, 122, 254, 0.26);
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.08);
}

.health-module-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--module-accent);
    background: var(--module-accent-soft);
}

.health-module-card.active .health-module-icon {
    color: white;
    background: var(--module-gradient);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

.health-module-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
}

.health-module-subtitle {
    font-size: 12px;
    color: var(--text-light);
}

.health-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 18px;
}

.health-preview-card,
.health-form-card,
.health-results-card {
    padding: 22px;
}

.health-preview-card {
    text-align: center;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.84), transparent 36%),
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.95));
}

.health-preview-art {
    min-height: 144px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.health-preview-badge {
    width: 110px;
    height: 110px;
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: white;
    background: var(--module-gradient);
    box-shadow: 0 18px 32px rgba(17, 24, 39, 0.12);
}

.health-preview-title {
    margin: 0 0 10px;
    font-size: 24px;
}

.health-preview-formula {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--module-accent);
}

.health-preview-note {
    margin: 0;
    font-size: 14px;
    color: #6f7b8b;
}

.health-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.health-auto-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(58, 122, 254, 0.06);
    color: #667489;
    font-size: 13px;
    max-width: 420px;
}

.health-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.health-field {
    display: grid;
    gap: 8px;
}

.health-field[hidden] {
    display: none;
}

.health-field.full-width {
    grid-column: 1 / -1;
}

.health-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.health-input,
.health-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 15px;
    color: var(--text-dark);
    background: white;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.health-input:focus,
.health-select:focus {
    outline: none;
    border-color: var(--module-accent);
    box-shadow: 0 0 0 4px var(--module-accent-soft);
}

.health-field-hint {
    margin: -2px 0 0;
    font-size: 12px;
    color: #8b95a5;
}

.health-results-card {
    background: linear-gradient(180deg, rgba(248, 250, 254, 0.96), rgba(255, 255, 255, 0.96));
}

.health-primary-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.9)),
        var(--module-gradient);
    box-shadow: 0 18px 36px var(--module-accent-soft);
}

.health-primary-meta {
    display: grid;
    gap: 4px;
}

.health-primary-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--module-accent);
}

.health-primary-title {
    margin: 0;
    font-size: 20px;
}

.health-primary-note {
    margin: 0;
    font-size: 13px;
    color: #708094;
}

.health-primary-value {
    flex-shrink: 0;
    padding: 14px 18px;
    border-radius: 18px;
    background: var(--module-gradient);
    color: white;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    box-shadow: 0 14px 28px var(--module-accent-soft);
}

.health-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.health-result-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: white;
    display: grid;
    gap: 6px;
}

.health-result-label {
    font-size: 13px;
    color: #6c7789;
    font-weight: 600;
}

.health-result-value {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 800;
}

.health-result-note {
    font-size: 12px;
    color: #98a1af;
}

.health-disclaimer {
    margin: 16px 0 0;
    font-size: 12px;
    color: #9099a8;
}

.health-shell[data-accent="age"] {
    --module-accent: #ff7d73;
    --module-accent-soft: rgba(255, 125, 115, 0.12);
    --module-gradient: linear-gradient(135deg, #ff9a8f, #ff6b5f);
}

.health-shell[data-accent="bmi"] {
    --module-accent: #3a7afe;
    --module-accent-soft: rgba(58, 122, 254, 0.12);
    --module-gradient: linear-gradient(135deg, #5b9cff, #2f6df6);
}

.health-shell[data-accent="calorie"] {
    --module-accent: #ff8f38;
    --module-accent-soft: rgba(255, 143, 56, 0.12);
    --module-gradient: linear-gradient(135deg, #ffb15e, #ff7f2f);
}

.health-shell[data-accent="bodyfat"] {
    --module-accent: #c76dff;
    --module-accent-soft: rgba(199, 109, 255, 0.12);
    --module-gradient: linear-gradient(135deg, #db9cff, #b954ff);
}

.health-shell[data-accent="bmr"] {
    --module-accent: #00a389;
    --module-accent-soft: rgba(0, 163, 137, 0.12);
    --module-gradient: linear-gradient(135deg, #39c8ab, #009e85);
}

.health-shell[data-accent="idealweight"] {
    --module-accent: #7e8cf3;
    --module-accent-soft: rgba(126, 140, 243, 0.12);
    --module-gradient: linear-gradient(135deg, #9ca7ff, #6d7df3);
}

.health-shell[data-accent="pace"] {
    --module-accent: #26a17b;
    --module-accent-soft: rgba(38, 161, 123, 0.12);
    --module-gradient: linear-gradient(135deg, #54cc9b, #1e9a74);
}

.health-shell[data-accent="pregnancy"] {
    --module-accent: #ff6ca6;
    --module-accent-soft: rgba(255, 108, 166, 0.12);
    --module-gradient: linear-gradient(135deg, #ff98c1, #ff5b98);
}

.health-shell[data-accent="conception"] {
    --module-accent: #f19b38;
    --module-accent-soft: rgba(241, 155, 56, 0.12);
    --module-gradient: linear-gradient(135deg, #ffc06a, #ec9030);
}

.health-shell[data-accent="duedate"] {
    --module-accent: #5a8cff;
    --module-accent-soft: rgba(90, 140, 255, 0.12);
    --module-gradient: linear-gradient(135deg, #8db0ff, #4f7eff);
}

@media (max-width: 1024px) {
    .health-hero,
    .health-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .health-main {
        padding: 24px 0 48px;
    }

    .health-hero-copy,
    .health-hero-card,
    .health-module-panel,
    .health-preview-card,
    .health-form-card,
    .health-results-card {
        padding: 18px;
        border-radius: 22px;
    }

    .health-hero-copy h1 {
        font-size: 38px;
    }

    .health-hero-copy p {
        font-size: 16px;
    }

    .health-form-header,
    .health-primary-result {
        flex-direction: column;
        align-items: flex-start;
    }

    .health-primary-value {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .health-module-grid,
    .health-form-grid,
    .health-results-grid {
        grid-template-columns: 1fr;
    }

    .health-preview-badge {
        width: 92px;
        height: 92px;
        border-radius: 24px;
        font-size: 36px;
    }

    .health-preview-art {
        min-height: 116px;
    }
}