:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #172033;
    --muted: #657086;
    --line: #dfe4ec;
    --primary: #126a5f;
    --primary-dark: #0b4f47;
    --accent: #9f3f1f;
    --soft: #f1f8f6;
    --warning-bg: #fff7ed;
    --warning-line: #fed7aa;
    --warning-text: #7c2d12;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.site-header {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.site-header a:first-child {
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

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

.nav a {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.nav a:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
}

.nav a:last-child:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

main.container {
    padding: 34px 0 56px;
}

.hero {
    max-width: 920px;
    padding: 18px 0 12px;
}

.hero h1,
.article h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: 0;
}

.hero p,
.lead {
    max-width: 780px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0 10px;
}

.card {
    min-height: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(23, 32, 51, .04);
}

.card h2 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.25;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.article {
    max-width: 920px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(22px, 4vw, 44px);
    box-shadow: 0 1px 2px rgba(23, 32, 51, .04);
}

.article h2 {
    margin: 34px 0 12px;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.18;
}

.article p,
.article li {
    font-size: 18px;
}

.article p {
    margin: 0 0 18px;
}

.article strong {
    color: var(--text);
}

.article code {
    border-radius: 6px;
    background: #eef2f6;
    padding: 2px 5px;
    font-size: .92em;
}

.article p a,
.article li a,
.card h2 a {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.meta {
    margin: -4px 0 24px;
    color: var(--muted);
    font-size: 14px;
}

.featured {
    margin: 26px 0 30px;
}

.featured img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.caption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.cta,
.notice {
    border-radius: 8px;
    margin: 34px 0;
    padding: 22px;
}

.cta {
    background: var(--soft);
    border: 1px solid #b7ddd5;
}

.cta h2 {
    margin-top: 0;
}

.notice {
    background: var(--warning-bg);
    border: 1px solid var(--warning-line);
    color: var(--warning-text);
}

.links-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    list-style: none;
}

.links-list li {
    min-height: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 14px;
}

footer {
    border-top: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
}

footer .container {
    display: flex;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
    text-align: center;
}

footer p {
    max-width: 780px;
    margin: 0;
}

@media (max-width: 900px) {
    .site-header .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }

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

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

    main.container {
        padding-top: 24px;
        padding-bottom: 38px;
    }

    .nav {
        width: 100%;
        gap: 8px;
    }

    .nav a {
        font-size: 14px;
    }

    .nav a:last-child {
        width: 100%;
    }

    .grid,
    .links-list {
        grid-template-columns: 1fr;
    }

    .article p,
    .article li {
        font-size: 17px;
    }
}
