:root {
    color-scheme: light;
    --ink: #16201c;
    --muted: #66756d;
    --line: #dfe7e2;
    --paper: #fbfcf9;
    --surface: #ffffff;
    --brand: #1f6f53;
    --brand-dark: #134f3a;
    --accent: #d97830;
    --soft: #eef6f1;
    --warning: #fff7dc;
    --shadow: 0 16px 40px rgba(27, 44, 37, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a:hover {
    text-decoration: underline;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    background: rgba(22, 32, 28, 0.96);
    color: #fff;
}

.brand {
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.site-nav a {
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    padding: 7px 11px;
    font-size: 0.94rem;
}

.site-nav a.is-active,
.site-nav a:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    text-decoration: none;
}

main {
    min-height: 70vh;
}

.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px);
}

.page-intro {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
    text-align: center;
}

.page-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

.page-intro p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.05rem;
}

.tag-strip,
.term-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-strip {
    justify-content: center;
}

.term {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 700;
}

.term--category {
    border-color: transparent;
    background: var(--brand);
    color: #fff;
}

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

.story-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.story-card__image {
    display: grid;
    aspect-ratio: 16 / 10;
    place-items: center;
    overflow: hidden;
    background: var(--soft);
    color: var(--brand-dark);
    font-weight: 800;
}

.story-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.story-card:hover .story-card__image img {
    transform: scale(1.025);
}

.story-card__body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.story-card h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
}

.story-card p {
    margin: 0;
}

.story-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.story-card blockquote {
    margin: 0;
    border-left: 4px solid var(--accent);
    background: var(--warning);
    padding: 10px 12px;
    color: #5d4a13;
    font-size: 0.9rem;
}

.story-card blockquote span {
    font-weight: 700;
}

.load-state {
    min-height: 52px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.content-page {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 28px);
}

.content-page h1 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
}

.content-page h2 {
    margin: 28px 0 8px;
    font-size: 1.1rem;
}

.content-page p {
    color: #34433d;
}

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

.tag-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
}

.tag-group h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.tag-group a {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 10px 0;
    color: #26352f;
}

.mailchimp-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 20px;
}

.mailchimp-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.mailchimp-form input[type="email"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr));
    gap: 28px;
    border-top: 1px solid var(--line);
    padding: 36px clamp(18px, 4vw, 56px);
    background: #fff;
}

.site-footer h2 {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
}

.site-footer nav {
    display: grid;
    align-content: start;
    gap: 6px;
}

.brand--footer {
    color: var(--ink);
}

.notice {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    color: var(--muted);
}

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

    .story-grid,
    .tag-directory,
    .site-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .site-nav a {
        white-space: nowrap;
    }
}
