*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
    outline-offset: 3px;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow {
    width: min(820px, calc(100% - 40px));
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    background: white;
    color: #111;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    height: 76px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    min-width: 180px;
    align-items: center;
    gap: 11px;
}

.brand img,
.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
}

.brand-mark {
    display: grid;
    place-items: center;
    background: var(--accent);
    color: white;
    font-size: 21px;
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.25;
}

.brand strong {
    font-size: 19px;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-nav a {
    position: relative;
    padding: 25px 0 22px;
    font-size: 14px;
    font-weight: 600;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    height: 2px;
    background: var(--accent);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: var(--primary);
}

.hero::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: rgba(10, 22, 34, 0.22);
    content: "";
    pointer-events: none;
}

.hero-grid {
    display: flex;
    min-height: 610px;
    align-items: center;
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(590px, 52%);
    padding: 86px 0 92px;
    color: white;
}

.hero-copy h1 {
    max-width: 11em;
    margin: 12px 0 22px;
    font-size: 54px;
    font-weight: 800;
    line-height: 1.18;
    text-wrap: balance;
}

.hero-lead {
    max-width: 590px;
    margin: 0;
    color: rgba(255, 255, 255, 0.83);
    font-size: 18px;
    line-height: 1.85;
}

.hero-media {
    position: absolute;
    inset: 0;
    margin: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow,
.closing-cta .eyebrow {
    color: #f2b5c2;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.button-primary:hover {
    background: color-mix(in srgb, var(--accent) 84%, #111);
}

.button-secondary {
    border-color: currentColor;
    background: transparent;
    color: inherit;
}

.hero .button-secondary {
    border-color: rgba(255, 255, 255, 0.72);
    color: white;
}

.section {
    padding: 92px 0;
}

.section-tint {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.section-heading {
    max-width: 700px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading h2,
.split-heading h2,
.closing-inner h2,
.page-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.35;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    min-height: 226px;
    padding: 28px 26px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
}

.feature-index {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.feature-card h3 {
    margin: 38px 0 10px;
    font-size: 20px;
}

.feature-card p,
.article-card p,
.content-row p,
.side-panel p,
.page-hero p {
    color: var(--muted);
}

.feature-card p {
    margin: 0;
    font-size: 14px;
}

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
}

.text-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.article-card {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    padding: 27px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
}

.article-date {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.article-card h3 {
    margin: 28px 0 10px;
    font-size: 20px;
    line-height: 1.45;
}

.article-card p {
    margin: 0 0 18px;
    font-size: 14px;
}

.article-card .text-link {
    margin-top: auto;
}

.faq-list {
    border-top: 1px solid var(--border);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item h3 {
    margin: 0;
}

.faq-item button {
    display: flex;
    width: 100%;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-size: 17px;
    font-weight: 700;
}

.faq-item button span:last-child {
    color: var(--accent);
    font-size: 24px;
    transition: transform 160ms ease;
}

.faq-answer {
    display: none;
    padding: 0 44px 22px 0;
    color: var(--muted);
}

.faq-answer p {
    margin: 0 0 8px;
}

.faq-answer a {
    color: var(--accent);
    font-weight: 700;
}

.faq-item.is-open .faq-answer {
    display: block;
}

.faq-item.is-open button span:last-child {
    transform: rotate(45deg);
}

.closing-cta {
    padding: 68px 0;
    background: var(--primary);
    color: white;
}

.closing-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.closing-inner h2 {
    max-width: 660px;
}

.closing-inner .cta-row {
    margin: 0;
}

.closing-inner .button-secondary {
    border-color: rgba(255, 255, 255, 0.75);
    color: white;
}

.page-hero {
    padding: 84px 0 74px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.page-hero p {
    max-width: 720px;
    margin: 15px 0 0;
}

.detail-heading h1 {
    max-width: 20em;
    font-size: 40px;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 820px) 280px;
    gap: 48px;
    align-items: start;
}

.content-list {
    border-top: 1px solid var(--border);
}

.content-row {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 24px;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
}

.content-row time {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.content-row h2 {
    margin: 0 0 8px;
    font-size: 23px;
    line-height: 1.45;
}

.content-row p {
    margin: 0;
}

.side-panel {
    padding: 26px 0 26px 24px;
    border-left: 3px solid var(--accent);
}

.side-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.side-panel > a {
    display: block;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
}

.side-panel .cta-row {
    flex-direction: column;
}

.side-panel .button {
    width: 100%;
}

.prose {
    min-width: 0;
    font-size: 17px;
    line-height: 1.95;
}

.prose h2 {
    margin: 42px 0 14px;
    font-size: 27px;
    line-height: 1.45;
}

.prose h3 {
    margin: 32px 0 12px;
    font-size: 21px;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
    margin: 0 0 20px;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* CTA 按钮在 .prose 内时，颜色/下划线不能被 .prose a 覆盖 */
.prose .button {
    color: white;
    text-decoration: none;
}

.prose .button-primary {
    color: white;
}

.prose .button-secondary {
    color: inherit;
}

.prose img {
    height: auto;
    margin: 28px auto;
}

.related-guides {
    margin-top: 56px;
}

.related-guides h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.related-guides ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.related-guides a {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.related-guides a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.empty-state {
    padding: 42px 0;
    color: var(--muted);
}

.not-found {
    display: grid;
    min-height: 62vh;
    place-items: center;
    padding: 70px 0;
    text-align: center;
}

.not-found h1 {
    margin: 0 0 12px;
    font-size: 38px;
}

.not-found p:not(.eyebrow) {
    margin: 0 0 28px;
    color: var(--muted);
}

.site-footer {
    padding: 58px 0 22px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--text) 95%, #000);
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 50px;
}

.footer-grid strong {
    font-size: 20px;
}

.footer-grid p {
    max-width: 620px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.67);
}

.footer-grid nav {
    display: flex;
    align-items: start;
    gap: 24px;
    font-size: 14px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 38px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.54);
    font-size: 12px;
}

.theme-warm-story .hero,
.theme-warm-story .closing-cta {
    background: #24443d;
}

.theme-warm-story .section-tint,
.theme-warm-story .page-hero {
    background: #f3f7f5;
}

.theme-clean-studio .hero,
.theme-clean-studio .closing-cta {
    background: #172126;
}

@media (max-width: 980px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .side-panel {
        padding-left: 20px;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    .container,
    .narrow {
        width: min(100% - 28px, 720px);
    }

    .site-header,
    .header-inner {
        height: 66px;
        min-height: 66px;
    }

    .brand {
        min-width: 0;
    }

    .brand img,
    .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .brand strong {
        font-size: 17px;
    }

    .brand small {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        z-index: 49;
        top: 66px;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - 66px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        min-height: 54px;
        padding: 15px 20px;
        border-top: 1px solid var(--border);
    }

    .site-nav a::after {
        display: none;
    }

    .hero,
    .hero-grid {
        min-height: 620px;
    }

    .hero::after {
        background: rgba(10, 22, 34, 0.42);
    }

    .hero-media img {
        object-position: 63% center;
    }

    .hero-copy {
        width: 100%;
        padding: 80px 0 72px;
    }

    .hero-copy h1 {
        max-width: 9em;
        font-size: 39px;
    }

    .hero-lead {
        max-width: 32em;
        font-size: 16px;
    }

    .section {
        padding: 64px 0;
    }

    .section-heading h2,
    .split-heading h2,
    .closing-inner h2,
    .page-hero h1,
    .detail-heading h1 {
        font-size: 28px;
    }

    .feature-grid,
    .article-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-card,
    .article-card {
        min-height: 0;
    }

    .feature-card h3 {
        margin-top: 22px;
    }

    .split-heading,
    .closing-inner,
    .footer-grid,
    .footer-bottom {
        align-items: start;
        flex-direction: column;
    }

    .split-heading,
    .closing-inner {
        display: flex;
    }

    .closing-inner .cta-row {
        width: 100%;
    }

    .closing-inner .button {
        flex: 1 1 140px;
    }

    .page-hero {
        padding: 58px 0 52px;
    }

    .content-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 24px 0;
    }

    .content-row h2 {
        font-size: 21px;
    }

    .prose {
        font-size: 16px;
        line-height: 1.85;
    }

    .footer-grid {
        display: flex;
    }

    .footer-grid nav {
        flex-wrap: wrap;
    }

    .footer-bottom {
        display: flex;
    }
}

@media (max-width: 420px) {
    .hero-copy h1 {
        font-size: 36px;
    }

    .cta-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
