:root {
    --bg: #f3efe7;
    --surface: #fffdf9;
    --surface-strong: #ffffff;
    --surface-muted: #ece4d5;
    --text: #171410;
    --text-soft: #62584c;
    --line: rgba(23, 20, 16, 0.1);
    --line-strong: rgba(23, 20, 16, 0.18);
    --brand: #0f766e;
    --brand-dark: #0a5a54;
    --accent: #bb7c35;
    --accent-soft: rgba(187, 124, 53, 0.12);
    --danger-soft: rgba(205, 43, 49, 0.08);
    --radius: 24px;
    --radius-sm: 16px;
    --shadow: 0 20px 50px rgba(30, 24, 16, 0.08);
    --shadow-soft: 0 10px 24px rgba(30, 24, 16, 0.05);
    --container: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Noto Sans SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(187, 124, 53, 0.08), transparent 30%),
        linear-gradient(180deg, #f8f4ec 0%, #f1ebe0 100%);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(248, 244, 236, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.site-header__inner,
.site-nav,
.site-header__actions,
.search-form,
.hero__actions,
.resource-card__meta,
.site-logo,
.utility-link,
.article-card__meta,
.article-card__footer {
    display: flex;
    align-items: center;
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 64px;
    padding: 12px 0;
}

.site-header__brand {
    min-width: 0;
}

.site-header__nav {
    min-width: 0;
}

.site-logo {
    flex: 0 0 auto;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.site-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.site-logo__text {
    letter-spacing: 0.01em;
}

.site-nav {
    justify-content: center;
    gap: 22px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.site-nav a {
    position: relative;
    padding: 6px 0;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: color 160ms ease, opacity 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--text);
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-header__actions {
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

.utility-link {
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 253, 249, 0.52);
    color: var(--text-soft);
    font-size: 13px;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.utility-link:hover,
.utility-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.2);
    background: var(--surface-strong);
}

.utility-link--accent {
    border-color: rgba(15, 118, 110, 0.16);
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-dark);
}

.utility-link__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.utility-link__icon svg {
    width: 100%;
    height: 100%;
}

.site-header__cta {
    min-width: 104px;
    min-height: 38px;
    padding: 0 16px;
}

.section {
    position: relative;
    padding: 104px 0;
}

.section--muted {
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.84) 0%, rgba(243, 236, 224, 0.72) 100%);
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-heading {
    display: grid;
    gap: 8px;
    max-width: 760px;
    margin-bottom: 42px;
}

.section-heading h2,
.hero h1 {
    margin: 0;
    letter-spacing: -0.03em;
}

.hero h1 {
    max-width: 11ch;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.02;
}

.section-heading h2 {
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.1;
}

.section-heading p:last-child {
    margin: 0;
    max-width: 660px;
    color: var(--text-soft);
    font-size: 16px;
}

.hero {
    padding-top: 10px;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
    gap: 36px;
    align-items: stretch;
    padding: 110px 0 48px;
}

.hero__content {
    max-width: 760px;
}

.hero__lead,
.resource-card p,
.site-footer p,
.category-card p,
.scenario-card p,
.article-card p,
.tool-card p {
    color: var(--text-soft);
}

.hero__lead {
    max-width: 680px;
    margin: 20px 0 0;
    font-size: 18px;
}

.hero__search {
    margin: 34px 0 18px;
}

.search-form,
.hero__actions {
    gap: 12px;
    flex-wrap: wrap;
}

.search-field {
    min-width: 360px;
    min-height: 58px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
}

.search-field:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button--primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.button--ghost {
    border-color: var(--line-strong);
    background: rgba(255, 253, 249, 0.68);
    color: var(--text);
}

.hero__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 28px 0 0;
    list-style: none;
}

.hero__signals li,
.hero-panel__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(23, 20, 16, 0.08);
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.78);
    color: var(--text-soft);
    font-size: 14px;
}

.hero__panel {
    display: flex;
    align-items: stretch;
}

.hero-panel {
    width: 100%;
    display: grid;
    align-content: start;
    gap: 0;
    padding: 30px;
    border: 1px solid rgba(23, 20, 16, 0.08);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 253, 249, 0.97) 0%, rgba(242, 233, 218, 0.93) 100%);
    box-shadow: var(--shadow);
}

.hero-panel__eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-panel h2 {
    margin: 0;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.18;
}

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

.hero-panel__stats div,
.article-card,
.category-card,
.scenario-card,
.tool-card,
.resource-card,
.article-shell {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 249, 0.92);
    box-shadow: var(--shadow);
}

.hero-panel__stats div {
    padding: 18px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none;
}

.hero-panel__stats strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.hero-panel__stats span {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 13px;
}

.hero-panel__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-panel__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-panel__links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.82);
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 14px;
}

.category-grid,
.card-grid,
.split-grid,
.scenario-grid,
.tool-grid,
.site-footer__grid,
.article-grid {
    display: grid;
    gap: 22px;
}

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

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

.split-grid,
.site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scenario-grid,
.tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.article-card::before,
.category-card::before,
.scenario-card::before,
.resource-card::before,
.tool-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.2), rgba(187, 124, 53, 0.25), transparent);
}

.category-card__index {
    display: inline-flex;
    margin-bottom: 16px;
    color: rgba(23, 20, 16, 0.35);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.category-card h3,
.scenario-card h3,
.resource-card h3,
.article-card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.18;
}

.category-card p,
.scenario-card p,
.tool-card p,
.article-card p {
    margin: 12px 0 0;
}

.resource-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.resource-card__meta,
.article-card__meta {
    justify-content: space-between;
    gap: 12px;
    color: var(--text-soft);
    font-size: 14px;
}

.resource-card__badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.resource-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.resource-card__hint {
    max-width: 12em;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}

.article-card__footer {
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    color: var(--text-soft);
    font-size: 14px;
}

.article-card__footer a {
    color: var(--brand-dark);
    font-weight: 600;
}

.tool-card {
    display: flex;
    align-items: flex-end;
    min-height: 150px;
    font-weight: 600;
    font-size: 18px;
}

.tool-card:hover,
.tool-card:focus-visible,
.scenario-card:hover,
.scenario-card:focus-within,
.category-card:hover,
.category-card:focus-within,
.resource-card:hover,
.resource-card:focus-within,
.article-card:hover,
.article-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.18);
}

.site-footer {
    padding: 70px 0 82px;
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.78);
}

.site-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr 1.1fr;
    align-items: start;
}

.site-footer__title,
.site-footer h3 {
    margin-top: 0;
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__links li + li {
    margin-top: 10px;
}

.site-footer__external {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 1180px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .scenario-grid,
    .tool-grid,
    .category-grid,
    .article-grid,
    .site-footer__grid,
    .split-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .site-header__inner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 14px 0 16px;
    }

    .site-header__nav,
    .site-header__actions {
        width: 100%;
    }

    .site-nav {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-header__actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 24px));
    }

    .section {
        padding: 78px 0;
    }

    .site-header__actions,
    .search-form,
    .hero__actions {
        display: grid;
    }

    .site-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        justify-content: stretch;
        gap: 10px 14px;
        overflow: visible;
        white-space: normal;
    }

    .site-nav a,
    .utility-link {
        justify-content: center;
        text-align: center;
    }

    .site-nav a {
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255, 253, 249, 0.62);
    }

    .site-nav a::after {
        display: none;
    }

    .site-header__actions {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .utility-link--accent,
    .site-header__cta {
        grid-column: span 2;
    }

    .card-grid,
    .scenario-grid,
    .tool-grid,
    .category-grid,
    .article-grid,
    .site-footer__grid,
    .split-grid,
    .hero-panel__stats {
        grid-template-columns: 1fr;
    }

    .search-field {
        min-width: 0;
        width: 100%;
    }

    .hero__signals,
    .hero-panel__links,
    .site-footer__external {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 24px;
    }

    .resource-card__footer,
    .article-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .button,
    .search-form .button {
        width: 100%;
    }
}
