:root.light {
    --bg-main: #ffffff;
    --bg-card: #f8fafc;
    --bg-ad: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #0284c7;
    --accent-dark: #0369a1;
    --accent-light: #e0f2fe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --print-hide: block;
}

:root.dark {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-ad: #273449;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --accent-color: #38bdf8;
    --accent-dark: #0ea5e9;
    --accent-light: #0c4a6e;
    --print-hide: none;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
    --header-h: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    max-width: 100%;
    overflow-x: hidden;
}

.brand-viv {
    color: #0ea5e9;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-metric {
    color: #0369a1;
    font-weight: 700;
    letter-spacing: 0.2px;
}

:root.dark .brand-viv {
    color: #38bdf8;
}

:root.dark .brand-metric {
    color: #0ea5e9;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul,
ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

h1,
h2,
h3 {
    margin: 1.5rem 0 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

h1 {
    font-size: 2.2rem;
    line-height: 1.25;
}

h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
}

h3 {
    font-size: 1.25rem;
}

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

button,
select,
input,
textarea {
    font-family: inherit;
    cursor: pointer;
}

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

.site-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: var(--bg-main);
    z-index: 1500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: -0.3px;
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    gap: 0;
}

.site-logo-viv {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.site-logo-met {
    color: #0369a1;
    font-weight: 800;
    letter-spacing: -0.2px;
}

:root.dark .site-logo-viv {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root.dark .site-logo-met {
    color: #0ea5e9;
}

.site-logo-text:hover {
    text-decoration: none;
}

:root.dark .site-logo-text:hover .site-logo-viv {
    filter: brightness(1.05);
}

:root.dark .site-logo-text:hover .site-logo-met {
    color: #38bdf8;
}

.site-logo-text:hover .site-logo-met {
    color: #0ea5e9;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 1rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--accent-light);
}

.search-result-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.search-result-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.main-nav {
    display: flex;
    gap: 1.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #0284c7);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.main-nav a:hover::after {
    width: 100%;
}

.nav-dropdown-wrap {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    min-width: 240px;
    max-height: 450px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.nav-dropdown a {
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-weight: 400;
    display: block;
}

.nav-dropdown a:hover {
    background: var(--accent-light);
    color: var(--accent-color);
}

.nav-dropdown-wrap:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.dropdown-section:first-child {
    border-top: none;
}

.dropdown-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    padding-left: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.header-control-group {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.header-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 0.85rem;
}

.header-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

.ad-block {
    background: var(--bg-ad);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin: 1.8rem 0;
}

.ad-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.ad-top-banner {
    width: 100%;
    min-height: 90px;
}

.ad-in-content {
    margin: 2.5rem 0;
    min-height: 250px;
}

.page-content {
    padding: calc(2rem + var(--header-h, 80px)) 0 2rem;
}

.hero-section {
    position: relative;
    padding: 4rem 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(2, 132, 199, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 10% 10%, rgba(125, 211, 252, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.06) 0%, transparent 40%),
        var(--bg-main);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(2, 132, 199, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--border-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.home-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.home-header h1 {
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
    line-height: 1.2;
}

.home-header h1 .brand-viv {
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
    font-weight: 900;
}

.home-header h1 .brand-metric {
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #0369a1 !important;
    color: #0369a1 !important;
    font-weight: 900;
}

:root.dark .home-header h1 .brand-viv {
    -webkit-text-fill-color: #38bdf8 !important;
    color: #38bdf8 !important;
}

:root.dark .home-header h1 .brand-metric {
    -webkit-text-fill-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
}

@media (max-width: 768px) {
    .home-header h1 {
        word-break: keep-all;
    }

    .home-header h1 .brand-viv,
    .home-header h1 .brand-metric {
        display: inline-block;
    }
}

.slogan-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.slogan-track {
    position: relative;
    height: 3.4rem;
    overflow: visible;
}

.slogan-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.slogan-item.active {
    opacity: 1;
    transform: translateY(0);
}

.slogan-item p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
    font-weight: 400;
}

.slogan-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.slogan-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slogan-dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: var(--accent-color);
}

.slogan-dot:hover {
    background-color: var(--accent-color);
}

.category-section {
    margin-bottom: 4rem;
}

.category-title {
    margin-bottom: 1.2rem;
    padding-left: 0.6rem;
    border-left: 4px solid var(--accent-color);
    font-size: 1.5rem;
}

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

.tool-card {
    display: block;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.tool-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8, #0ea5e9, #0284c7);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.55s ease;
}

.tool-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(2, 132, 199, 0.15);
    text-decoration: none;
    border-color: transparent;
}

.tool-card:hover::after {
    opacity: 1;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
    animation: floatIcon 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.tool-grid .tool-card:nth-child(1) .tool-icon {
    animation-delay: 0s;
}

.tool-grid .tool-card:nth-child(2) .tool-icon {
    animation-delay: 0.3s;
}

.tool-grid .tool-card:nth-child(3) .tool-icon {
    animation-delay: 0.6s;
}

.tool-grid .tool-card:nth-child(4) .tool-icon {
    animation-delay: 0.9s;
}

.tool-grid .tool-card:nth-child(5) .tool-icon {
    animation-delay: 1.2s;
}

.tool-grid .tool-card:nth-child(6) .tool-icon {
    animation-delay: 1.5s;
}

.tool-grid .tool-card:nth-child(7) .tool-icon {
    animation-delay: 0.2s;
}

.tool-grid .tool-card:nth-child(8) .tool-icon {
    animation-delay: 0.5s;
}

.tool-grid .tool-card:nth-child(9) .tool-icon {
    animation-delay: 0.8s;
}

.tool-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}

.tool-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.calculator-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.calculator-form h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
    font-size: 1.35rem;
    color: var(--accent-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
}

.calculate-btn:hover::before {
    left: 150%;
}

.result-section {
    background: var(--accent-light);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.result-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-dark);
    font-weight: 600;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.result-value.small {
    font-size: 1.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.result-breakdown {
    margin-top: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

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

.result-row strong {
    color: var(--text-primary);
    font-weight: 500;
}

.result-row .val {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.bmi-category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.bmi-underweight {
    background: #fef3c7;
    color: #92400e;
}

.bmi-normal {
    background: #d1fae5;
    color: #065f46;
}

.bmi-overweight {
    background: #ffedd5;
    color: #9a3412;
}

.bmi-obese {
    background: #fee2e2;
    color: #991b1b;
}

.example-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.example-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.example-box {
    background: var(--bg-main);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border-color);
}

.example-box:last-child {
    margin-bottom: 0;
}

.example-name {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.example-details {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.chart-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.chart-container h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-wrapper {
        height: 250px;
    }

    .chart-container {
        padding: 1rem;
    }
}

.source-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-top: 2rem;
}

.source-info h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.source-meta-item {
    font-size: 0.9rem;
}

.source-meta-item strong {
    color: var(--text-primary);
    margin-right: 0.3rem;
}

.source-meta-item span {
    color: var(--text-secondary);
}

.source-meta-item a {
    color: var(--accent-color);
}

.references-list {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0;
}

.references-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

.source-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--accent-light);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.key-takeaways {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
}

.key-takeaways h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.takeaways-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.takeaways-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.takeaways-list li:last-child {
    border-bottom: none;
}

.takeaway-icon {
    color: var(--accent-color);
    font-weight: 600;
    margin-right: 0.8rem;
    font-size: 0.85rem;
}

.faq-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-top: 2rem;
}

.faq-section h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.faq-list {
    margin: 0;
    list-style: none;
    padding-left: 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    padding: 0.9rem 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-primary);
}

.faq-question:hover {
    color: var(--accent-color);
}

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent-light);
    color: var(--accent-color);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.faq-answer {
    padding: 0 0 0.9rem 2rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: none;
    line-height: 1.7;
}

.faq-answer.open {
    display: block;
}

.content-wrapper {
    display: flex;
    gap: 2rem;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.sidebar-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 0.45rem;
}

.sidebar-links li a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sidebar-links li a:hover {
    color: var(--accent-color);
}

.blog-section {
    padding: 3rem 0;
    background-color: var(--bg-card);
    margin-top: 2rem;
}

.blog-section .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-section .section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.blog-section .section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background-color: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.1);
    text-decoration: none;
}

.blog-card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.blog-card h3 {
    font-size: 1rem;
    margin: 0 0 0.4rem 0;
    font-weight: 600;
    line-height: 1.35;
}

.blog-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.blog-section-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
    text-decoration: none;
    color: white;
}

.btn-primary:hover::before {
    left: 150%;
}

.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
    margin-top: 5rem;
    background: var(--bg-card);
}

.footer-col-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: none;
    padding-bottom: 0;
}

.footer-col a {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

.copyright-line {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

.disclaimer-box {
    margin-top: 2rem;
    padding: 1.1rem 1.3rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #991b1b;
    line-height: 1.7;
}

:root.dark .disclaimer-box {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

.core-conclusion {
    background: var(--accent-light);
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.core-conclusion h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.1rem;
    color: var(--accent-dark);
}

.core-conclusion p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.toast-container {
    position: fixed;
    top: calc(var(--header-h, 80px) + 20px);
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    max-width: 420px;
    padding: 14px 18px 14px 46px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.55;
    position: relative;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.22, .9, .32, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.toast-error {
    background: rgba(254, 226, 226, 0.96);
    border: 1px solid #fecaca;
    color: #991b1b;
}

:root.dark .toast-error {
    background: rgba(127, 29, 29, 0.92);
    border-color: rgba(252, 165, 165, 0.3);
    color: #fecaca;
}

.toast-error::before {
    content: '!';
    background: #ef4444;
    color: white;
}

.toast-warning {
    background: rgba(255, 237, 213, 0.96);
    border: 1px solid #fed7aa;
    color: #92400e;
}

:root.dark .toast-warning {
    background: rgba(120, 53, 15, 0.92);
    border-color: rgba(253, 186, 116, 0.3);
    color: #fed7aa;
}

.toast-warning::before {
    content: '⚠';
    background: #f59e0b;
    color: white;
}

.toast-success {
    background: rgba(209, 250, 229, 0.96);
    border: 1px solid #a7f3d0;
    color: #065f46;
}

:root.dark .toast-success {
    background: rgba(6, 78, 59, 0.92);
    border-color: rgba(110, 231, 183, 0.3);
    color: #a7f3d0;
}

.toast-success::before {
    content: '✓';
    background: #10b981;
    color: white;
}

.toast-info {
    background: rgba(219, 234, 254, 0.96);
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

:root.dark .toast-info {
    background: rgba(30, 58, 138, 0.92);
    border-color: rgba(147, 197, 253, 0.3);
    color: #bfdbfe;
}

.toast-info::before {
    content: 'i';
    background: #3b82f6;
    color: white;
}

.toast-close {
    position: absolute;
    right: 10px;
    top: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.55;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.assessment-progress {
    margin: 1.5rem 0 2rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.assessment-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-circle {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 0 4px var(--accent-light);
}

.step-indicator.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.step-label {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.step-indicator.active .step-label {
    color: var(--accent-color);
    font-weight: 600;
}

.step-line {
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step-indicator:last-child .step-line {
    display: none;
}

.step-indicator.completed .step-line {
    background: var(--success);
}

.assessment-step-panel {
    display: none;
    animation: fadeSlide 0.4s cubic-bezier(.22, .9, .32, 1);
}

.assessment-step-panel.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-block {
    margin-bottom: 1.8rem;
}

.question-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

.question-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.22s ease;
    background: var(--bg-main);
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.option-card:hover {
    border-color: var(--accent-color);
    background: var(--accent-light);
    transform: translateX(3px);
}

.option-card.selected {
    border-color: var(--accent-color);
    background: var(--accent-light);
    color: var(--text-primary);
    font-weight: 500;
}

.option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.option-card.selected .option-radio {
    border-color: var(--accent-color);
}

.option-card.selected .option-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--accent-color);
}

.assessment-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.assessment-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assessment-btn-primary {
    background: var(--accent-color);
    color: white;
}

.assessment-btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25);
}

.assessment-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.assessment-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.assessment-btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.assessment-btn-secondary:disabled {
    visibility: hidden;
}

.assessment-result {
    display: none;
    animation: fadeSlide 0.5s ease;
}

.assessment-result.active {
    display: block;
}

.result-score-card {
    padding: 2rem;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
    margin-bottom: 1.8rem;
}

.score-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-label {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.score-label.score-good {
    background: #d1fae5;
    color: #065f46;
}

.score-label.score-fair {
    background: #fef3c7;
    color: #92400e;
}

.score-label.score-poor {
    background: #fee2e2;
    color: #991b1b;
}

:root.dark .score-label.score-good {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

:root.dark .score-label.score-fair {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
}

:root.dark .score-label.score-poor {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.score-scale {
    margin: 1rem 0 0;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, var(--success) 0%, var(--warning) 50%, var(--danger) 100%);
    position: relative;
}

.score-marker {
    position: absolute;
    top: -6px;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid var(--accent-dark);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.component-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 1.5rem 0;
}

.component-item {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.component-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.component-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    overflow: hidden;
}

.component-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(.22, .9, .32, 1);
}

.result-summary {
    padding: 1.3rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
}

.result-summary h3 {
    margin-top: 0;
    font-size: 1.05rem;
}

.result-summary p {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 600px) {
    .step-label {
        display: none;
    }

    .step-circle {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .score-number {
        font-size: 3rem;
    }

    .result-score-card {
        padding: 1.5rem;
    }
}

.partner-sites-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
}

.partner-sites-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.partner-sites-section>p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.partner-sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.partner-site-card {
    display: block;
    padding: 1.4rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.partner-site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.1);
    border-color: var(--accent-color);
    text-decoration: none;
}

.partner-site-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.partner-site-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
}

.partner-site-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.article-author {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.article-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: auto;
}

.article-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    display: table;
    table-layout: auto;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chart-wrapper,
canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

.chart-container {
    max-width: 100%;
    overflow: hidden;
}

.header-inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.search-wrapper {
    min-width: 0;
}

.main-nav {
    min-width: 0;
}

.hero-section {
    max-width: 100%;
    overflow: hidden;
}

.tool-card,
.blog-card,
.partner-site-card,
.related-article-card,
.calculator-form,
.result-section,
.ad-block,
.sidebar-section,
.article-meta,
.source-info,
.example-section,
.faq-section,
.related-articles,
.partner-sites-section,
.core-conclusion {
    max-width: 100%;
}

input,
select,
textarea {
    max-width: 100%;
}

th,
td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

th {
    background: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 600;
}

tr:hover td {
    background: var(--accent-light);
}

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

.ref-tag {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--accent-light);
    color: var(--accent-dark);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: super;
    margin-left: 2px;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--success));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.sleep-cycle-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sleep-cycle-card .cycles {
    font-weight: 600;
    color: var(--accent-color);
}

.water-tip {
    display: flex;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.water-tip:last-child {
    border-bottom: none;
}

.water-tip .wt-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.water-tip .wt-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
}

/* ============ Pregnancy Toolkit Styles ============ */

.pregnancy-progress-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.25rem 0.8rem;
    margin: 1rem 0;
}

.pregnancy-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.5rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.pregnancy-progress-meta .ppm-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pregnancy-progress-meta .ppm-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.pregnancy-progress-meta .ppm-value {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 1.02rem;
}

.pregnancy-progress-bar {
    position: relative;
    height: 16px;
    background: var(--bg-tinted, #f3f4f6);
    border-radius: 999px;
    overflow: visible;
    margin-bottom: 1.3rem;
}

.pregnancy-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #f472b6 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.pregnancy-trimester-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.pregnancy-trimester-markers .t-marker {
    position: absolute;
    top: -4px;
    height: 24px;
    width: 2px;
    background: rgba(17, 24, 39, 0.35);
}

.pregnancy-progress-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.8rem 0 0;
    font-size: 0.78rem;
}

.pregnancy-progress-labels .ppl {
    text-align: center;
    padding: 0.45rem 0.3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tinted, #f8fafc);
}

.pregnancy-progress-labels .ppl.active {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(244, 114, 182, 0.12));
    border-color: var(--accent-color);
    font-weight: 600;
}

.ppl-label {
    color: var(--accent-dark);
    font-weight: 700;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
}

.ppl-range {
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* Pregnancy week calendar grid */
.preg-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.3rem;
    margin: 1rem 0;
}

.preg-week-cell {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    font-size: 0.72rem;
    position: relative;
}

.preg-week-cell.pwc-current {
    background: linear-gradient(135deg, var(--accent-color), #f472b6);
    color: white;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.25);
}

.preg-week-cell.pwc-t1 {
    background: rgba(14, 165, 233, 0.07);
}

.preg-week-cell.pwc-t2 {
    background: rgba(34, 197, 94, 0.06);
}

.preg-week-cell.pwc-t3 {
    background: rgba(244, 114, 182, 0.06);
}

.pwc-week {
    font-weight: 700;
    font-size: 0.82rem;
}

.pwc-sub {
    font-size: 0.62rem;
    color: var(--text-muted);
}

.preg-week-cell.pwc-current .pwc-sub {
    color: rgba(255, 255, 255, 0.88);
}

/* Milestone timeline */
.preg-milestone-timeline {
    position: relative;
    padding-left: 1.6rem;
    margin: 1rem 0;
}

.preg-milestone-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color) 0%, #f472b6 50%, #f59e0b 100%);
    border-radius: 2px;
}

.preg-milestone {
    position: relative;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.preg-milestone::before {
    content: "";
    position: absolute;
    left: -1.22rem;
    top: 1.05rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--bg-page);
    box-sizing: content-box;
}

.preg-milestone.pm-current::before {
    background: #f472b6;
    box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.18);
}

.preg-milestone.pm-past::before {
    background: #22c55e;
}

.pm-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.pm-title {
    font-weight: 700;
    color: var(--text-primary);
}

.pm-week {
    font-size: 0.76rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--bg-tinted, #f3f4f6);
    color: var(--accent-dark);
    font-weight: 600;
}

.pm-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Prenatal visit schedule table */
.visits-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.88rem;
    margin: 1rem 0;
    background: var(--bg-card);
}

.visits-table th,
.visits-table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.visits-table th {
    background: var(--bg-tinted, #f3f4f6);
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

.visits-table .vt-visit {
    font-weight: 700;
    color: var(--text-primary);
}

.visits-table .vt-week {
    font-variant-numeric: tabular-nums;
    color: var(--accent-dark);
    font-weight: 600;
    white-space: nowrap;
}

.visits-table .vt-tests {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* EDD result card */
.edd-result-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(244, 114, 182, 0.08));
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 14px;
    padding: 1.3rem 1.4rem;
    margin: 1rem 0;
}

.edd-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.8rem;
}

.edd-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.edd-ri-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.edd-ri-value {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.edd-big-date {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-dark);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.edd-sub-line {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Fixed YMYL site-wide disclaimer */
.ymyl-fixed-disclaimer {
    background: var(--bg-tinted, #f8fafc);
    border: 1px dashed rgba(239, 68, 68, 0.25);
    border-left: 4px solid var(--danger, #ef4444);
    border-radius: 10px;
    padding: 0.95rem 1.05rem;
    margin: 1.5rem 0 0.5rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.ymyl-fixed-disclaimer .ymyl-title {
    font-weight: 700;
    color: var(--danger, #ef4444);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.35rem;
}

.ymyl-fixed-disclaimer.ymyl-pregnancy {
    border-left-color: #f472b6;
}

.ymyl-fixed-disclaimer.ymyl-pregnancy .ymyl-title {
    color: #be185d;
}

/* Article page pregnancy card (used in articles index) */
.preg-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preg-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(244, 114, 182, 0.12);
    color: #be185d;
    font-weight: 600;
    font-size: 0.72rem;
}

@media (max-width: 640px) {
    .preg-week-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .edd-big-date {
        font-size: 1.55rem;
    }

    .pregnancy-progress-labels {
        font-size: 0.7rem;
    }

    .visits-table th,
    .visits-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
}

.exercise-btn {
    padding: 0.7rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
    text-align: center;
}

.exercise-btn:hover,
.exercise-btn.active {
    border-color: var(--accent-color);
    background: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 500;
}

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

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-color);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-articles h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.related-article-card {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
    border-color: var(--accent-color);
    text-decoration: none;
}

.related-article-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.related-article-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.related-article-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem
}

.cookie-banner-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, .25)
}

.cookie-banner-content {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem
}

.cookie-banner-icon {
    font-size: 2.5rem;
    flex-shrink: 0
}

.cookie-banner-text h3 {
    font-size: 1.15rem;
    margin: 0 0 .4rem;
    color: var(--text-primary);
    border-bottom: none;
    padding-bottom: 0
}

.cookie-banner-text p {
    font-size: .88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6
}

.cookie-banner-options {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1.2rem;
    padding: .8rem;
    background: var(--bg-main);
    border-radius: 8px
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: .7rem;
    cursor: pointer
}

.cookie-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color)
}

.cookie-option span:first-of-type {
    font-size: .88rem;
    color: var(--text-primary);
    font-weight: 500
}

.cookie-option-desc {
    font-size: .75rem;
    color: var(--text-muted);
    margin-left: auto
}

.cookie-banner-actions {
    display: flex;
    gap: .7rem;
    margin-bottom: 1rem;
    flex-wrap: wrap
}

.cookie-btn {
    padding: .7rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 500;
    transition: all .2s;
    flex: 1;
    min-width: 100px;
    cursor: pointer
}

.cookie-btn-reject {
    background: var(--bg-ad);
    color: var(--text-secondary);
    border: 1px solid var(--border-color)
}

.cookie-btn-reject:hover {
    background: var(--border-color)
}

.cookie-btn-accept {
    background: var(--accent-color);
    color: #fff
}

.cookie-btn-accept:hover {
    filter: brightness(1.08)
}

.cookie-btn-accept-all {
    background: var(--accent-light);
    color: var(--accent-color);
    border: 1px solid var(--accent-color)
}

.cookie-btn-accept-all:hover {
    background: var(--accent-color);
    color: #fff
}

.cookie-banner-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: .8rem;
    flex-wrap: wrap
}

.cookie-banner-links a {
    color: var(--text-muted)
}

.cookie-banner-links a:hover {
    color: var(--accent-color)
}

.ccpa-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted)
}

.cookie-banner-overlay.fade-out {
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.7rem;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .search-wrapper {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    .main-nav {
        gap: 1rem;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.3rem;
    }

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

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .source-meta {
        flex-direction: column;
        gap: 0.7rem;
    }

    table {
        font-size: 0.82rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: normal;
        word-break: break-word;
    }

    th,
    td {
        padding: 0.6rem 0.7rem;
        min-width: 80px;
        word-break: break-word;
    }

    .hero-section {
        padding: 2.5rem 0;
    }

    .slogan-track {
        height: 5rem;
    }

    .result-value {
        font-size: 2rem;
    }

    .exercise-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media print {

    .site-header,
    .site-footer,
    .ad-block,
    .sidebar,
    .header-control-group,
    .back-to-top,
    .cookie-banner-overlay {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .content-wrapper {
        flex-direction: column;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}