/* 首页容器与阅读层级；只影响首页，不改变内页导航布局。 */
body.home-page {
    --home-content-inset: clamp(20px, 4.2vw, 70px);
    --home-body-size: clamp(16px, 1.15vw, 18px);
    --home-section-space: clamp(36px, 4vw, 64px);
    --home-muted: color-mix(in srgb, var(--home-ink) 74%, white);
}
body.home-page main,
body.home-page:has(.dev-sidebar:not(.hidden)) main {
    width: 100%; margin: 0 auto; padding: 0;
}
body.home-page .site-header,
body.home-page:has(.dev-sidebar:not(.hidden)) .site-header {
    padding: 0 var(--site-stage-gutter);
}
body.home-page .site-header .home-nav-inner {
    box-sizing: border-box; width: 100%; max-width: var(--site-stage-max);
    padding-inline: var(--home-content-inset);
}
body.home-page .site-header .home-brand > span { font-size: 13px; }
.bazi-form { box-sizing: border-box; }
.form-heading { flex-wrap: wrap; gap: 6px 12px; }
.form-heading p { font-size: 12px; white-space: normal; line-height: 1.6; }
.bazi-form .form-group label { font-size: 12px; }
.bazi-form .combo-wrapper input { font-size: 14px; }
.gender-options span, .unit { font-size: 12px; }
.form-caption { font-size: 12px; line-height: 1.6; letter-spacing: 0; }
.bazi-submit { font-size: 15px; }
body.home-page .site-header .home-nav-links a { font-size: 15px; }
.home-features, .home-interpretation, .home-topic-links, .home-faq {
    scroll-margin-top: 112px;
    box-sizing: border-box; padding: var(--home-section-space) var(--home-content-inset);
    background: var(--home-paper); border-bottom: 1px solid color-mix(in srgb, var(--home-ink) 10%, transparent);
}
.home-features {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
}
.feature-item { min-width: 0; }
.feature-icon {
    display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
    border: 1px solid color-mix(in srgb, var(--home-accent) 45%, transparent);
    border-radius: 50%; color: var(--home-accent);
}
.feature-icon svg {
    width: 22px; height: 22px; fill: none; stroke: currentColor;
    stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5;
}
.feature-item h2, .home-interpretation-card h3, .home-topic-links a strong {
    margin: 0 0 12px; color: var(--home-ink); font-family: var(--font-family-display);
    font-size: 21px; font-weight: 600; line-height: 1.5;
}
.feature-item p, .home-content-heading > p:last-child,
.home-interpretation-card p, .home-topic-links a span, .home-faq-list p {
    margin: 0; color: var(--home-muted); font-size: var(--home-body-size); line-height: 1.9;
    overflow-wrap: anywhere;
}
body.home-page .home-content-heading,
body.home-page:has(.dev-sidebar:not(.hidden)) .home-content-heading { box-sizing: border-box; padding: 0; background: transparent; box-shadow: none; max-width: 900px; margin: 0 0 32px; text-align: left; }
.home-content-heading .hero-kicker { margin-bottom: 16px; }
.home-content-heading h2, .home-topic-links h2 {
    margin: 0 0 18px; color: var(--home-ink); font-family: var(--font-family-display);
    font-size: clamp(26px, 2.3vw, 36px); font-weight: 600; line-height: 1.4;
}
.home-interpretation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.home-interpretation-card, .home-topic-links a {
    min-width: 0; padding: clamp(22px, 2vw, 32px);
    border: 1px solid color-mix(in srgb, var(--home-ink) 12%, transparent);
    border-radius: 12px; background: color-mix(in srgb, var(--home-paper) 40%, white);
}
.home-topic-links { margin: 0; }
.home-topic-links > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home-topic-links a { display: flex; flex-direction: column; color: var(--home-ink); text-decoration: none; }
.home-topic-links a:hover { border-color: var(--home-accent); }
.home-faq-list { width: 100%; margin: 0; }
.home-faq-list details { border-bottom: 1px solid color-mix(in srgb, var(--home-ink) 13%, transparent); }
.home-faq-list details:first-child { border-top: 1px solid color-mix(in srgb, var(--home-ink) 13%, transparent); }
.home-faq-list summary {
    padding: 24px 0; color: var(--home-ink); font-size: clamp(18px, 1.3vw, 21px);
    font-weight: 600; line-height: 1.7; cursor: pointer; overflow-wrap: anywhere;
}
.home-faq-list summary::marker { color: var(--home-accent); }
.home-faq-list details[open] summary { padding-bottom: 14px; color: var(--home-accent); }
.home-faq-list details p { max-width: 80ch; padding: 0 0 28px; }
.home-signature {
    display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0;
    padding: 28px var(--home-content-inset); background: var(--home-paper);
    color: var(--home-muted); font-size: 13px; line-height: 1.8; text-align: center;
}
.home-signature span { flex: 0 0 20px; height: 1px; background: var(--home-accent); }
body.home-page footer,
body.home-page:has(.dev-sidebar:not(.hidden)) footer {
    width: min(calc(100% - (var(--site-stage-gutter) * 2)), var(--site-stage-max));
    margin: 0 auto; padding: 24px var(--home-content-inset); background: var(--home-paper);
}
body.home-page .home-footer { flex-wrap: wrap; gap: 20px; }
.home-footer .footer-brand { font-size: 20px; }
.home-footer .footer-brand span, .home-footer nav a, .home-footer small { font-size: 12px; line-height: 1.8; }
.home-footer small { white-space: normal; overflow-wrap: anywhere; }
.home-footer nav { margin: 0; flex-wrap: wrap; gap: 12px 20px; }
@media (max-width: 1000px) {
    .form-container { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .bazi-form .form-group:nth-child(-n+3) { grid-column: span 4; }
    .bazi-form .form-group:nth-child(4), .bazi-form .form-group:nth-child(5) { grid-column: span 6; }
    .bazi-form .form-group:nth-child(6) { grid-column: span 4; }
    .bazi-form .form-group:nth-child(7) { grid-column: span 8; }
    .bazi-form .form-group:nth-child(8) { grid-column: span 12; }
    .bazi-form .trigger-area.full-click { width: 100%; }
    .home-stage { min-height: 1200px; }
    .bazi-form { top: 46%; }

    .home-features, .home-topic-links > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.home-page .site-header .home-brand > span { display: none; }
}
@media (min-width: 701px) and (max-width: 1000px) {
    .home-stage:has(.form-hint[open]) { min-height: 1400px; }
}
@media (max-width: 700px) {
    body.home-page { --home-content-inset: 20px; }
    .home-stage { min-height: 0; }
    .bazi-form { top: auto; }
    body.home-page .site-header .home-nav-inner { padding-inline: 0; }
    .home-features { gap: 28px 20px; }
    .home-interpretation-grid, .home-topic-links > div { grid-template-columns: 1fr; gap: 20px; }
    .home-content-heading { margin-bottom: 24px; }
    .feature-item h2, .home-interpretation-card h3, .home-topic-links a strong { font-size: 20px; }
    .home-faq-list summary { padding-block: 20px; }
    body.home-page .home-footer { padding-inline: var(--home-content-inset); }
}
@media (max-width: 390px) {
    body.home-page { --home-content-inset: 16px; }
    .home-features { grid-template-columns: 1fr; }
}
