:root {
    --bg: #fbf8f3;
    --surface: #ffffff;
    --text: #23201c;
    --muted: #6b645b;
    --line: #e7e0d5;
    --accent: #8a4b2a;
    --accent-soft: #f3e6dc;
    --leaf: #4f6b3a;
    --measure: 68ch;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

h1,
h2,
h3,
.brand {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-thickness: 2px;
}

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */

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

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

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand svg {
    flex: none;
}

.nav {
    display: flex;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 15px;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--text);
}

/* Home */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 56px 0 40px;
}

.kicker {
    margin: 0 0 8px;
    color: var(--leaf);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.hero p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 20px;
}

.illustration {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
}

.section-title {
    margin: 24px 0 20px;
    font-size: 26px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 56px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-body {
    padding: 18px 20px 22px;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.3;
}

.card h3 a {
    color: var(--text);
    text-decoration: none;
}

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

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.meta {
    margin: 0 0 6px;
    color: var(--muted);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
}

/* Article and policy pages */

.article {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 48px 0 64px;
}

.article h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4.5vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.article h2 {
    margin: 36px 0 10px;
    font-size: 24px;
}

.article .illustration {
    margin: 28px 0;
}

.article ul,
.article ol {
    padding-left: 22px;
}

.article li {
    margin-bottom: 6px;
}

.note {
    margin: 28px 0;
    padding: 16px 18px;
    background: var(--accent-soft);
    border-radius: 10px;
    font-size: 16px;
}

/* Debug page */

.debug {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 15px;
}

.debug table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.debug th,
.debug td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.debug th {
    width: 32%;
    color: var(--muted);
    font-weight: 600;
}

.debug code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    padding-bottom: 32px;
}

.site-footer nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

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

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 36px;
    }

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