:root {
    --bg: #f8faf7;
    --surface: #ffffff;
    --surface-soft: #eef4ef;
    --text: #17211b;
    --muted: #5d6d63;
    --line: #dbe5dc;
    --accent: #0f8f72;
    --accent-dark: #0a5f50;
    --gold: #bf8f2e;
    --shadow: 0 16px 50px rgba(23, 33, 27, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

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

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

img {
    height: auto;
    max-width: 100%;
}

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

.container--narrow {
    width: min(820px, calc(100% - 40px));
}

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

.site-header__inner,
.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--text);
    color: white;
    font-weight: 800;
}

.brand small {
    display: block;
    color: var(--muted);
    line-height: 1.1;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-weight: 650;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a:hover {
    color: var(--accent-dark);
}

.hero {
    padding: 82px 0 54px;
    background:
        linear-gradient(135deg, rgba(15, 143, 114, 0.10), rgba(191, 143, 46, 0.10)),
        var(--bg);
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
    gap: 44px;
    align-items: center;
}

.hero h1,
.page-hero h1,
.article-header h1 {
    max-width: 900px;
    margin: 12px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.96;
    letter-spacing: 0;
}

.hero p,
.page-hero p,
.section-header p {
    max-width: 680px;
    color: var(--muted);
    font-size: 20px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-weight: 760;
    cursor: pointer;
}

.button--primary,
button[type="submit"],
input[type="submit"] {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.hero-panel {
    display: grid;
    gap: 12px;
}

.hero-panel div,
.post-card,
.topic-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.hero-panel div {
    padding: 20px;
}

.hero-panel strong,
.hero-panel span {
    display: block;
}

.hero-panel span {
    color: var(--muted);
}

.section {
    padding: 64px 0;
}

.section--muted {
    background: var(--surface-soft);
}

.section-header {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

.section-header h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.02;
}

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

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

.post-card {
    min-height: 240px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 60px rgba(23, 33, 27, 0.12);
}

.post-card__link,
.topic-card {
    display: grid;
    align-content: start;
    gap: 10px;
    height: 100%;
    padding: 22px;
}

.post-card h3,
.topic-card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.16;
}

.post-card p,
.topic-card p,
.post-meta {
    color: var(--muted);
}

.post-card--empty {
    grid-column: span 2;
    padding: 24px;
}

.page-hero,
.article-header {
    padding: 72px 0 42px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.article-body {
    padding: 48px 0 72px;
    font-size: 18px;
}

.article-body h2 {
    margin-top: 42px;
    font-size: 30px;
    line-height: 1.15;
}

.article-body blockquote {
    margin: 30px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--accent);
    background: var(--surface-soft);
}

.article-body a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
}

.tag-list a {
    padding: 6px 10px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    text-decoration: none;
}

.pagination {
    margin-top: 30px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--text);
    color: white;
}

.site-footer p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.footer-search {
    display: flex;
    gap: 8px;
}

input[type="search"],
input[type="text"],
input[type="email"],
textarea {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}

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

@media (max-width: 900px) {
    .hero__inner,
    .card-grid,
    .topic-grid {
        grid-template-columns: 1fr;
    }

    .site-header__inner,
    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .site-nav,
    .site-nav ul {
        flex-wrap: wrap;
    }

    .post-card--empty {
        grid-column: auto;
    }
}
