* {
    box-sizing: border-box;
}

:root {
    --accent: #146b52;
    --accent-dark: #0c4b3a;
    --accent-soft: #e5f3ee;
    --secondary: #2f6fa5;
    --secondary-soft: #eaf2f8;
    --surface: #f7f9f8;
    --ink: #17211e;
    --muted: #5a6863;
    --line: #dce4e1;
    --white: #ffffff;
    --container: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, Helvetica, sans-serif;
    line-height: 1.72;
    letter-spacing: 0;
}

body.theme-library {
    --accent: #2856a8;
    --accent-dark: #193a75;
    --accent-soft: #e8eef9;
    --secondary: #9a5a0b;
    --secondary-soft: #fbf0dc;
    --surface: #f5f7fb;
}

body.theme-journal {
    --accent: #8a3047;
    --accent-dark: #5f1e30;
    --accent-soft: #f7e9ed;
    --secondary: #22766c;
    --secondary-soft: #e4f1ef;
    --surface: #faf8f8;
}

body.theme-source_map {
    --accent: #176c89;
    --accent-dark: #104b60;
    --accent-soft: #e1f1f6;
    --secondary: #5e7f38;
    --secondary-soft: #edf3e5;
    --surface: #f6f9fa;
}

body.theme-handbook {
    --accent: #b24b24;
    --accent-dark: #783019;
    --accent-soft: #faece6;
    --secondary: #1d756f;
    --secondary-soft: #e3f1ef;
    --surface: #faf8f6;
}

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

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.container,
.header-inner,
.hero-inner,
.footer-inner {
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(220, 228, 225, 0.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
}

.brand img,
.footer-brand img {
    border-radius: 8px;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.site-nav a {
    padding: 8px 13px;
    border-radius: 6px;
    color: #40504a;
    font-size: 15px;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 700;
    line-height: 1.2;
    transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

.hero {
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.88fr);
    align-items: center;
    min-height: 650px;
    padding-block: 48px 42px;
    gap: 78px;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 800;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 20px;
    font-size: 50px;
    line-height: 1.18;
    letter-spacing: 0;
}

.hero-copy > p {
    max-width: 620px;
    margin-bottom: 26px;
    color: #45534e;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
}

.text-link {
    color: var(--accent-dark);
    font-weight: 750;
}

.text-link:hover {
    text-decoration: underline;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.hero-facts li {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #53615c;
    background: #ffffff;
    font-size: 13px;
}

.hero-media {
    position: relative;
    min-height: 540px;
}

.hero-screen {
    position: absolute;
    overflow: hidden;
    width: 230px;
    border: 8px solid #ffffff;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 53, 46, 0.16);
}

.hero-screen img,
.screen-frame img {
    width: 100%;
    height: auto;
    max-width: 400px;
}

.hero-screen-main {
    z-index: 2;
    top: 0;
    left: 40px;
}

.hero-screen-side {
    z-index: 1;
    right: 12px;
    bottom: 48px;
    width: 210px;
}

.hero-index {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(31, 53, 46, 0.08);
    font-size: 12px;
}

.hero-index span {
    color: var(--accent);
    font-weight: 900;
}

.hero-library .hero-screen-main,
.hero-source-map .hero-screen-main {
    left: 0;
}

.hero-library .hero-screen-side {
    right: 0;
    bottom: 60px;
}

.hero-journal .hero-screen-main {
    left: 80px;
}

.hero-journal .hero-screen-side {
    right: 0;
    bottom: 74px;
}

.hero-handbook .hero-screen-main {
    left: 22px;
    transform: rotate(-1.5deg);
}

.hero-handbook .hero-screen-side {
    right: 5px;
    transform: rotate(1.5deg);
}

.section {
    padding-block: 76px;
}

.section:nth-of-type(even) {
    background: var(--surface);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: 34px;
    line-height: 1.25;
}

.step-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    list-style: none;
}

.step-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 28px 26px;
    border-right: 1px solid var(--line);
}

.step-list li:last-child {
    border-right: 0;
}

.step-list span,
.feature-card > span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.step-list h3,
.feature-card h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.step-list p,
.feature-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.screen-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 30px;
}

.screen-card {
    margin: 0;
}

.screen-frame {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    min-height: 410px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
}

.screen-frame img {
    width: auto;
    max-height: 470px;
    object-fit: contain;
}

.screen-card figcaption {
    display: grid;
    margin-top: 14px;
    gap: 4px;
}

.screen-card figcaption span {
    color: var(--muted);
    font-size: 14px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.feature-card {
    min-height: 220px;
    padding: 26px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.faq-preview-grid {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 60px;
}

.faq-preview-grid > div:first-child > p {
    color: var(--muted);
}

.preview-links {
    display: grid;
    gap: 12px;
}

.preview-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
}

.preview-links span {
    color: var(--muted);
    font-size: 14px;
}

.download-band {
    color: #ffffff;
    background: var(--accent-dark);
}

.download-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 220px;
    gap: 32px;
}

.download-band h2 {
    margin-bottom: 8px;
    font-size: 30px;
}

.download-band p,
.download-band .band-note {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
}

.button-light {
    border-color: #ffffff;
    color: var(--accent-dark);
    background: #ffffff;
}

.site-footer {
    padding-block: 38px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-inner {
    display: grid;
    justify-items: center;
    text-align: center;
}

.footer-inner p {
    max-width: 820px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.footer-inner .copyright {
    margin-top: 6px;
}

.inner-main {
    background: #ffffff;
}

.inner-hero {
    padding-block: 72px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.inner-hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.55fr;
    align-items: end;
    gap: 70px;
}

.inner-hero h1 {
    margin-bottom: 18px;
    font-size: 46px;
}

.inner-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.inner-summary {
    display: grid;
    padding: 22px;
    border-left: 4px solid var(--accent);
    background: #ffffff;
    gap: 5px;
}

.inner-summary span {
    color: var(--muted);
    font-size: 13px;
}

.guide-list {
    max-width: 940px;
}

.guide-step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 24px;
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}

.guide-step > span {
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.guide-step h2 {
    margin-bottom: 10px;
    font-size: 25px;
}

.guide-step p {
    margin-bottom: 0;
    color: #485650;
}

.guide-callout,
.faq-next {
    margin-top: 34px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.guide-callout h2,
.faq-next h2 {
    font-size: 24px;
}

.faq-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 48px;
}

.faq-layout aside {
    position: sticky;
    top: 104px;
    display: grid;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    gap: 10px;
}

.faq-layout aside strong {
    margin-bottom: 6px;
}

.faq-layout aside a {
    color: var(--muted);
    font-size: 14px;
}

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

.faq-item h2 {
    margin: 0;
}

.faq-item button {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    padding: 24px 0;
    border: 0;
    color: var(--ink);
    background: transparent;
    gap: 15px;
    font: inherit;
    font-size: 18px;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.faq-item button span {
    color: var(--accent);
    font-size: 12px;
}

.faq-item button b {
    font-size: 24px;
    font-weight: 400;
    transition: transform 160ms ease;
}

.faq-item button[aria-expanded="true"] b {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 42px 22px;
}

.faq-answer p {
    margin-bottom: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .menu-toggle {
        display: block;
    }

    .header-download {
        display: none;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        right: 16px;
        left: 16px;
        display: none;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: #ffffff;
        box-shadow: 0 16px 38px rgba(31, 53, 46, 0.14);
    }

    .site-nav.is-open {
        display: grid;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-block: 54px 44px;
        gap: 42px;
    }

    .hero-media {
        min-height: 500px;
    }

    .hero-screen-main {
        left: 12%;
    }

    .hero-screen-side {
        right: 12%;
    }

    .step-list,
    .screen-grid,
    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .step-list li:last-child {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
    }

    .faq-preview-grid,
    .inner-hero-grid,
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-layout aside {
        position: static;
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 620px) {
    .container,
    .header-inner,
    .hero-inner,
    .footer-inner {
        width: min(100% - 32px, var(--container));
    }

    .header-inner {
        min-height: 66px;
    }

    .site-nav {
        top: 66px;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .hero-inner {
        padding-block: 38px 34px;
        gap: 28px;
    }

    h1,
    .inner-hero h1 {
        font-size: 36px;
    }

    .hero-copy > p,
    .inner-hero p {
        font-size: 16px;
    }

    .hero-media {
        min-height: 260px;
    }

    .hero-screen {
        width: 94px;
        border-width: 5px;
        border-radius: 12px;
    }

    .hero-screen-main,
    .hero-library .hero-screen-main,
    .hero-source-map .hero-screen-main,
    .hero-journal .hero-screen-main,
    .hero-handbook .hero-screen-main {
        top: 0;
        left: 3%;
    }

    .hero-screen-side,
    .hero-library .hero-screen-side,
    .hero-journal .hero-screen-side,
    .hero-handbook .hero-screen-side {
        right: 3%;
        bottom: 60px;
        width: 88px;
    }

    .hero-index {
        grid-template-columns: auto 1fr auto 1fr auto 1fr;
        gap: 5px;
        padding: 9px;
        font-size: 10px;
    }

    .section {
        padding-block: 54px;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .step-list,
    .screen-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .step-list li,
    .step-list li:last-child {
        grid-column: auto;
        border-top: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .step-list li:last-child {
        border-bottom: 0;
    }

    .feature-card {
        min-height: 0;
    }

    .screen-frame {
        min-height: 0;
    }

    .faq-preview-grid {
        gap: 24px;
    }

    .preview-links a {
        display: grid;
    }

    .download-band-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        min-height: 250px;
    }

    .download-band h2 {
        font-size: 25px;
    }

    .inner-hero {
        padding-block: 50px;
    }

    .inner-hero-grid {
        gap: 28px;
    }

    .guide-step {
        grid-template-columns: 42px 1fr;
        gap: 12px;
    }

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

    .faq-item button {
        font-size: 16px;
    }

    .faq-answer {
        padding-left: 28px;
    }
}
