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

:root {
    --bg: #f4f8ff;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --primary: #2563eb;
    --primary-dark: #1746a2;
    --accent: #14b8a6;
    --text: #162033;
    --text-soft: #5f6b7c;
    --border: #dbe6f4;
    --shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-shell {
    padding: 0 0 56px;
}

.page-sub {
    padding-top: 18px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(219, 230, 244, 0.9);
}

.header-inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--text);
}

.site-brand img {
    height: 44px;
    width: auto;
}

.site-brand-text {
    font-size: 1.25rem;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    transition: all 0.25s ease;
}

.nav a:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.site-tip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.lang-switch select {
    min-width: 116px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.hero-section {
    padding: 64px 0 30px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.hero-copy,
.tool-card,
.panel,
.info-card {
    background: var(--surface);
    border: 1px solid rgba(219, 230, 244, 0.9);
    box-shadow: var(--shadow);
}

.hero-copy {
    border-radius: 32px;
    padding: 42px;
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 35%), linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.hero-copy h1,
.section-heading h2,
.sub-hero h1,
.article-title,
.single-panel h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-desc,
.section-heading p,
.sub-hero p,
.article-card p,
.page-content,
.tip-card p,
.formula-card p {
    color: var(--text-soft);
}

.hero-actions,
.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-points,
.category-list,
.footer-links,
.footer-contact,
.related-list,
.bullet-list {
    list-style: none;
}

.hero-points {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.hero-stat-card {
    padding: 18px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(219, 230, 244, 0.9);
}

.hero-stat-card strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text);
}

.hero-stat-card span {
    display: block;
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.hero-points li,
.bullet-list li {
    position: relative;
    padding-left: 20px;
    color: var(--text-soft);
}

.hero-points li::before,
.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.tool-card,
.panel,
.info-card {
    border-radius: var(--radius-lg);
    padding: 30px;
}

.section-heading.compact h2 {
    font-size: 1.8rem;
}

.section-heading.center {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 30px;
}

.unit-switch {
    display: inline-flex;
    gap: 10px;
    padding: 6px;
    background: var(--surface-soft);
    border-radius: 999px;
    margin: 24px 0 20px;
}

.unit-btn,
.btn {
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.unit-btn {
    padding: 10px 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font-weight: 700;
}

.unit-btn.is-active {
    background: var(--primary);
    color: #fff;
}

.bmi-form {
    display: grid;
    gap: 18px;
}

.field-grid {
    display: grid;
    gap: 14px;
}

.field-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-label {
    display: grid;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.field-label input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    outline: none;
    font-size: 1rem;
}

.field-label input:focus,
.lang-switch select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.tool-note,
.empty-state {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.btn-secondary,
.btn-light {
    background: var(--surface-soft);
    color: var(--text);
}

.btn-secondary:hover,
.btn-light:hover {
    background: #e8f1ff;
}

.btn-block {
    width: 100%;
}

.result-card {
    margin-top: 22px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
}

.result-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.result-tag {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: #0f766e;
    font-weight: 700;
}

.result-list {
    display: grid;
    gap: 14px;
    margin: 20px 0 12px;
}

.result-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(22, 32, 51, 0.12);
}

.result-list dt {
    color: var(--text-soft);
}

.result-list dd {
    font-weight: 700;
}

.result-suggestion {
    color: var(--text-soft);
}

.insight-section,
.content-section {
    padding-top: 26px;
}

.quick-guide-section,
.advice-section,
.faq-section {
    padding-top: 26px;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.standard-card {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.standard-row {
    display: grid;
    grid-template-columns: 180px 180px 1fr;
    gap: 18px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

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

.standard-head {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
    font-weight: 700;
    color: var(--text);
}

.advice-grid,
.faq-list {
    display: grid;
    gap: 18px;
}

.advice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.advice-card,
.faq-item {
    padding: 24px;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.advice-card h3,
.faq-item h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.advice-card p,
.faq-item p {
    color: var(--text-soft);
}

.info-card h3,
.formula-card h3,
.tip-card h3,
.related-panel h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.content-grid,
.detail-layout,
.footer-grid {
    display: grid;
    gap: 24px;
}

.content-grid {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
}

.detail-layout {
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
}

.article-list {
    display: grid;
    gap: 18px;
}

.article-card {
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.article-card h2,
.article-card h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.article-card a:hover,
.category-list a:hover,
.related-list a:hover,
.article-nav a:hover,
.footer-links a:hover {
    color: var(--primary);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.category-list,
.related-list,
.footer-links,
.footer-contact {
    display: grid;
    gap: 10px;
}

.category-list a,
.related-list a,
.footer-links a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text-soft);
}

.formula-card,
.tip-card {
    margin-top: 24px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #edf7ff 100%);
    border: 1px solid var(--border);
}

.sub-hero {
    padding: 20px 0 8px;
}

.sub-hero-compact {
    padding-bottom: 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary);
}

.article-detail-panel {
    padding: 34px;
}

.article-title {
    font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.article-meta-detail {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.article-content {
    color: var(--text);
    line-height: 1.85;
}

.article-content > * + * {
    margin-top: 16px;
}

.article-content img {
    border-radius: 16px;
}

.article-nav {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.single-panel {
    min-height: 320px;
}

.pagination-wrap {
    margin-top: 26px;
}

.pagination-wrap .pagination,
.pagination-wrap div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.site-footer {
    background: #0f172a;
    color: #d7e3ff;
    padding-top: 48px;
}

.footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
    align-items: start;
}

.site-footer h3,
.site-footer h4 {
    color: #fff;
    margin-bottom: 14px;
}

.site-footer p,
.site-footer li {
    color: #b2c1df;
}

.footer-bottom {
    padding: 20px 0 28px;
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.is-hidden[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .hero-layout,
    .content-grid,
    .detail-layout,
    .footer-grid,
    .insight-grid,
    .advice-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-layout {
        grid-template-columns: 1fr;
    }

    .detail-layout,
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .standard-row {
        grid-template-columns: 140px 140px 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        grid-template-columns: auto auto;
        gap: 14px;
        padding: 14px 0;
    }

    .mobile-menu-btn {
        display: inline-flex;
        justify-self: end;
    }

    .nav {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
    }

    .nav.is-open {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }

    .nav a {
        justify-content: center;
        background: var(--surface-soft);
    }

    .header-tools {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .lang-switch,
    .lang-switch select {
        width: 100%;
    }

    .hero-copy,
    .tool-card,
    .panel,
    .article-detail-panel,
    .info-card {
        padding: 22px;
        border-radius: 22px;
    }

    .hero-copy h1,
    .section-heading h2,
    .sub-hero h1,
    .article-title {
        font-size: 1.9rem;
    }

    .field-grid-3,
    .insight-grid,
    .advice-grid,
    .hero-stat-grid {
        grid-template-columns: 1fr;
    }

    .tool-actions,
    .hero-actions {
        flex-direction: column;
    }

    .btn,
    .btn-block {
        width: 100%;
    }

    .article-meta,
    .result-list div,
    .breadcrumb {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .site-tip {
        width: 100%;
        justify-content: center;
    }
}
