:root {
    --ink: #171717;
    --muted: #666f7a;
    --line: #d9dde3;
    --paper: #ffffff;
    --wash: #f3f5f7;
    --brand: #1a6424;
    --brand-dark: #073e1f;
    --accent: #b51f2a;
    --accent-soft: #f6e8ea;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--wash);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

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

a:hover {
    color: var(--accent);
}

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

.shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: var(--brand-dark);
    color: #e2eee5;
    font-size: 0.78rem;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
}

.brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0 22px;
    background: var(--paper);
}

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

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 7px;
    width: min(390px, 45vw);
}

.brand__logo {
    width: 100%;
    height: auto;
}

.brand__tagline {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.header-search {
    display: flex;
    min-width: min(360px, 100%);
    border: 1px solid var(--line);
    background: var(--paper);
}

.header-search input {
    flex: 1;
    min-width: 0;
    width: auto;
    border: 0;
    padding: 11px 12px;
    font-size: 0.95rem;
}

.header-search button,
button {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
}

.main-nav {
    background: var(--brand);
    border-top: 3px solid var(--accent);
}

.main-nav__inner {
    display: flex;
    gap: 2px;
    overflow-x: auto;
}

.main-nav a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 13px;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-nav a:hover {
    background: var(--brand-dark);
    color: #fff;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    padding: 28px 0 44px;
}

.content,
.sidebar {
    min-width: 0;
}

.lead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.lead-story {
    background: var(--paper);
    border-top: 5px solid var(--accent);
    box-shadow: 0 10px 30px rgba(7, 62, 31, 0.08);
}

.lead-story img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e8ebef;
}

.lead-story__body {
    padding: 22px;
}

.lead-story h1 {
    margin: 8px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
}

.lead-story p {
    color: #414851;
    font-size: 1.08rem;
    margin: 0 0 12px;
}

.secondary-stack {
    display: grid;
    gap: 1px;
    background: var(--line);
    border-top: 5px solid var(--brand);
}

.secondary-story {
    background: var(--paper);
    padding: 17px;
}

.secondary-story h2 {
    margin: 6px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    line-height: 1.14;
}

.eyebrow,
.section-kicker {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.byline,
.story-meta,
.article__byline,
.category-block span {
    color: var(--muted);
    font-size: 0.82rem;
}

.news-section {
    margin-top: 32px;
}

.section-header {
    margin-bottom: 18px;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 9px;
}

.section-header h1,
.section-header h2 {
    margin: 2px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.1;
}

.section-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-header h2 {
    font-size: 1.65rem;
}

.news-list {
    display: grid;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.list-story {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 0;
    margin: 0 18px;
    border-bottom: 1px solid var(--line);
}

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

.list-story__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e8ebef;
}

.list-story h2 {
    margin: 5px 0 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    line-height: 1.12;
}

.list-story p {
    margin: 0;
    color: #4a515b;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.story-meta a {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.category-block {
    background: var(--paper);
    border-top: 4px solid var(--brand);
    padding: 18px;
}

.category-block h3 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.category-block article {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.category-block h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    line-height: 1.2;
}

.sidebar {
    display: grid;
    gap: 22px;
    align-content: start;
}

.widget {
    background: var(--paper);
    border-top: 4px solid var(--brand);
    padding: 18px;
}

.widget__title {
    margin: 0 0 14px;
    font-size: 1rem;
    text-transform: uppercase;
}

.ranked-list,
.link-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranked-list {
    counter-reset: ranked;
}

.ranked-list li {
    counter-increment: ranked;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.ranked-list li::before {
    content: counter(ranked);
    color: var(--accent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.link-list li {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.link-list a,
.ranked-list a {
    font-weight: 700;
    line-height: 1.2;
}

.link-list span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 4px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a,
.article__tags span {
    border: 1px solid var(--line);
    padding: 6px 9px;
    font-size: 0.82rem;
    font-weight: 700;
}

.ad-box + .ad-box {
    margin-top: 14px;
}

.ad-slot {
    display: grid;
    gap: 12px;
}

.ad-slot--below-nav,
.ad-slot--home-after-lead,
.ad-slot--home-between-sections,
.ad-slot--article-before-content,
.ad-slot--article-after-content {
    background: var(--paper);
    border: 1px solid var(--line);
    margin: 24px 0;
    padding: 12px;
    text-align: center;
}

.ad-slot--below-nav {
    width: min(var(--max), calc(100% - 32px));
    margin: 14px auto;
}

.ad-slot--footer {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 22px;
}

.ad-slot__item img {
    margin: 0 auto;
    max-height: 180px;
    object-fit: contain;
}

.article {
    background: var(--paper);
    padding: clamp(22px, 4vw, 42px);
}

.article__header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.article h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.02;
    margin: 10px 0 12px;
}

.article__summary {
    color: #414851;
    font-size: 1.2rem;
    margin: 0 0 14px;
}

.article__byline {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.article__image {
    margin: 0 0 26px;
}

.article__image img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.article__content {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.13rem;
    line-height: 1.75;
}

.article__content p {
    margin: 0 0 1.2em;
}

.article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.comments,
.empty-state {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 18px;
    margin-top: 24px;
}

.comments h2 {
    margin-top: 0;
    font-family: Georgia, "Times New Roman", serif;
}

.notice {
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    padding: 12px;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.comment-list {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.comment {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.comment header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.comment strong {
    color: var(--ink);
}

.comment p {
    margin: 8px 0 0;
}

.comment-form {
    border-top: 2px solid var(--ink);
    margin-top: 20px;
    padding-top: 18px;
}

.comment-form h3 {
    margin-top: 0;
}

.form-errors {
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 5px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 8px 11px;
    font-weight: 700;
}

.site-footer {
    background: var(--brand-dark);
    color: #fff;
    padding: 26px 0;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.page-card {
    background: var(--paper);
    padding: clamp(22px, 4vw, 36px);
}

.form-field {
    margin-bottom: 14px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    padding: 11px;
    font: inherit;
}

@media (max-width: 900px) {
    .brandbar,
    .topbar__inner,
    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-search {
        width: 100%;
    }

    .brand {
        width: min(390px, 100%);
    }

    .layout,
    .lead-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .shell {
        width: min(100% - 20px, var(--max));
    }

    .brand {
        width: min(330px, 100%);
    }

    .lead-story__body,
    .article,
    .page-card {
        padding: 18px;
    }

    .list-story {
        grid-template-columns: 1fr;
        margin: 0 14px;
    }

    .main-nav a {
        min-height: 38px;
        padding: 0 10px;
        font-size: 0.8rem;
    }
}
