@font-face {
    font-family: Montserrat;
    src: url("/fonts/montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: Montserrat;
    src: url("/fonts/montserrat/Montserrat-Italic-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Bebas Neue";
    src: url("/fonts/bebas/BebasNeue-Regular.woff2") format("woff2");
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --accent: #15171a;
    --accent-contrast: #fff;
    --bg: #fff;
    --surface: #f6f6f4;
    --surface-strong: #ececea;
    --text: #15171a;
    --text-secondary: #5f6b72;
    --border: #e3e3e0;
    --link: #15171a;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --max-width: 1200px;
    --content-width: 720px;
    --page-width: 860px;
    --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
    --font-body: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --accent: #f2f2ef;
        --accent-contrast: #111214;
        --bg: #111214;
        --surface: #1b1c1f;
        --surface-strong: #26282c;
        --text: #ecece8;
        --text-secondary: #a3acb2;
        --border: #2d2f33;
        --link: #ecece8;
        --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
        color-scheme: dark;
    }

    .site-logo img,
    .footer-logo,
    .post-card-placeholder {
        filter: invert(1);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 200;
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 8px 16px;
    border-radius: 6px;
}

.skip-link:focus {
    left: 16px;
}

/* ── Buttons & tags ── */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-contrast) !important;
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-decoration: none !important;
    transition: transform 0.15s, background 0.15s, color 0.15s;
}

.button:hover {
    transform: translateY(-1px);
}

.button-secondary {
    background: transparent;
    color: var(--text) !important;
}

.button-secondary:hover {
    background: var(--accent);
    color: var(--accent-contrast) !important;
}

.button-small {
    padding: 7px 16px;
    font-size: 16px;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1.5em 0;
}

.buttons p {
    display: contents;
}

.tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--accent-contrast);
    background: var(--accent);
    padding: 3px 9px 2px;
    border-radius: 4px;
}

a.tag:hover {
    opacity: 0.8;
}

/* ── Header ── */

.site-header {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.site-logo img {
    display: block;
    width: 110px;
    height: auto;
}

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

.nav-item {
    position: relative;
    padding: 6px 12px;
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: 0.04em;
    color: var(--text);
    border-radius: 6px;
    transition: background 0.15s;
}

.nav-item:hover {
    background: var(--surface);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    background: currentColor;
}

.nav-cta {
    margin-left: 8px;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: 999px;
    padding: 6px 18px;
}

.nav-cta:hover {
    background: var(--accent);
    opacity: 0.85;
}

.nav-cta.active::after {
    display: none;
}

.nav-toggle,
.nav-toggle-label {
    display: none;
}

/* ── Main ── */

.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 64px;
    min-height: 60vh;
}

/* ── Hero (homepage) ── */

.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 48px;
    padding: 40px 44px;
    margin-bottom: 40px;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: calc(var(--radius) * 1.6);
}

.hero-text {
    flex: 1 1 420px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: clamp(56px, 9vw, 96px);
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
}

.hero-lead {
    font-size: 18px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0;
    opacity: 0.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero .button {
    background: var(--accent-contrast);
    color: var(--accent) !important;
    border-color: var(--accent-contrast);
}

.hero .button-secondary {
    background: transparent;
    color: var(--accent-contrast) !important;
}

.hero .button-secondary:hover {
    background: var(--accent-contrast);
    color: var(--accent) !important;
}

/* ── Post feed ── */

.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-image img.post-card-placeholder {
    width: 40%;
    height: auto;
    object-fit: contain;
    opacity: 0.25;
}

.post-card-content {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.post-card-title {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 25px;
    letter-spacing: 0.01em;
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--text);
}

.post-card-excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    margin-top: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.post-card-meta span {
    margin-left: 4px;
}

@media (min-width: 900px) {
    .post-card-featured {
        grid-column: 1 / -1;
    }

    .post-card-featured .post-card-link {
        flex-direction: row;
    }

    .post-card-featured .post-card-image {
        flex: 0 0 58%;
        aspect-ratio: auto;
        min-height: 360px;
    }

    .post-card-featured .post-card-content {
        padding: 36px 40px;
        justify-content: center;
    }

    .post-card-featured .post-card-title {
        font-size: 42px;
        margin-bottom: 16px;
    }

    .post-card-featured .post-card-excerpt {
        font-size: 16px;
        -webkit-line-clamp: 5;
        line-clamp: 5;
    }

    .post-card-featured .post-card-meta {
        margin-top: 0;
    }
}

/* ── Pagination ── */

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 15px;
}

.pagination a,
.pagination .disabled {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: background 0.15s;
}

.pagination a:hover {
    background: var(--surface);
}

.pagination .disabled {
    opacity: 0.35;
}

.pagination-info {
    color: var(--text-secondary);
}

.back-link {
    margin-top: 32px;
    font-size: 15px;
    color: var(--text-secondary);
}

.back-link a:hover {
    color: var(--text);
}

/* ── Page header (pages, taxonomies) ── */

.page {
    max-width: var(--page-width);
    margin: 0 auto;
}

.page-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.page-header-wide {
    margin-bottom: 36px;
}

.page-eyebrow {
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 4px;
    text-transform: uppercase;
}

.page-title,
.post-title {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: clamp(38px, 6vw, 60px);
    letter-spacing: 0.01em;
    line-height: 1.02;
    margin: 0 0 14px;
    color: var(--text);
}

.page-lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: 680px;
}

/* ── Single post ── */

.post {
    max-width: var(--content-width);
    margin: 0 auto;
}

.post-header {
    margin-bottom: 32px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.post-meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.post-meta span {
    margin-left: 4px;
}

.post-image {
    margin: 0 0 40px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.post-image img {
    width: 100%;
    display: block;
}

/* ── Rich content (posts + pages) ── */

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
    overflow-wrap: break-word;
}

.post-content > :first-child {
    margin-top: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: var(--font-display);
    font-weight: normal;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin: 2em 0 0.6em;
}

.post-content h2 {
    font-size: 34px;
}

.post-content h3 {
    font-size: 26px;
}

.post-content h4 {
    font-size: 21px;
}

.post-content p {
    margin: 0 0 1.4em;
}

.post-content ul,
.post-content ol {
    padding-left: 1.4em;
    margin: 0 0 1.4em;
}

.post-content li {
    margin-bottom: 0.4em;
}

.post-content li::marker {
    color: var(--text-secondary);
}

.post-content img {
    display: block;
    border-radius: 8px;
    margin: 1.5em auto;
}

.post-content a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

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

.post-content strong {
    font-weight: 700;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1.5em 0;
    padding: 0.5em 1.2em;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5em 0;
}

.post-content pre {
    background: var(--surface);
    border-radius: 8px;
    padding: 1em;
    overflow-x: auto;
    font-size: 15px;
}

/* Tables */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 1.5em 0 2em;
    -webkit-overflow-scrolling: touch;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15.5px;
    line-height: 1.5;
}

.post-content th,
.post-content td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.post-content th {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 17px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--text);
    white-space: nowrap;
}

.post-content tbody tr:nth-child(even) {
    background: var(--surface);
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content table:not(:has(tbody tr:first-child td:first-child > strong:only-child)) tr:has(td:first-child > strong:only-child):last-child {
    background: var(--surface-strong);
}

.post-content .align-right {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.post-content .align-center {
    text-align: center;
}

/* Footnotes */

.post-content .footnotes {
    margin-top: 3em;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.post-content .footnotes hr {
    margin: 0 0 1.5em;
}

.post-content .footnotes li {
    margin-bottom: 0.3em;
}

.post-content .footnotes p {
    margin: 0;
}

.post-content .footnote-ref,
.post-content sup a {
    text-decoration: none;
    font-size: 0.75em;
    font-weight: 600;
    padding: 0 1px;
}

.post-content .footnote-backref {
    text-decoration: none;
}

/* ── Page components (shortcodes) ── */

.page-content h2 {
    padding-top: 0.2em;
}

.callout {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 1.5em 0 2em;
}

.callout-title {
    margin-top: 0 !important;
}

.callout .table-wrap,
.card .table-wrap {
    margin: 0 0 14px;
}

.callout table {
    font-size: 16px;
}

.callout table tbody tr:nth-child(even),
.card table tbody tr:nth-child(even) {
    background: transparent;
}

.callout td:first-child {
    width: 40%;
    color: var(--text-secondary);
    padding-left: 0;
}

.callout td strong {
    font-weight: 600;
}

.callout td {
    font-variant-numeric: tabular-nums;
}

.note {
    border-left: 3px solid var(--border);
    padding: 4px 0 4px 18px;
    margin: 2em 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.note p {
    margin: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin: 1.5em 0 2em;
}

.page .cards {
    margin-left: min(0px, (var(--page-width) - 100vw) / 2 + 24px);
    margin-right: min(0px, (var(--page-width) - 100vw) / 2 + 24px);
}

@media (min-width: 1100px) {
    .page .cards {
        margin-left: -80px;
        margin-right: -80px;
    }
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px 8px;
    background: var(--bg);
    font-size: 16px;
    line-height: 1.65;
}

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid var(--text);
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.post-content .card-title {
    margin: 0;
    font-size: 26px;
}

.card-subtitle {
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    font-size: 17px;
    color: var(--text-secondary);
    text-align: right;
}

.card table {
    font-size: 15px;
}

.card thead {
    display: none;
}

.card td {
    padding: 8px 0;
}

.card td:first-child {
    font-weight: 600;
    padding-right: 12px;
}

.card td:last-child {
    color: var(--text-secondary);
    text-align: right;
}

.card ul {
    padding-left: 1.1em;
}

.card .button {
    margin-bottom: 16px;
}

/* People */

.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
    margin: 1em 0 2em;
}

.people-small {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px 16px;
}

.person {
    margin: 0;
    text-align: center;
}

.post-content .person img,
.person-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 0 12px;
    background: var(--surface);
}

.people:not(.people-small) .person img {
    border-radius: var(--radius);
    aspect-ratio: 4/5;
}

.person-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 56px;
    color: var(--text-secondary);
}

.person figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.person-name {
    font-weight: 700;
    font-size: 16px;
}

.person-role {
    font-size: 14px;
    color: var(--text-secondary);
}

.post-content .person-email {
    font-size: 13px;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
}

/* Principles */

.principles ol {
    list-style: none;
    counter-reset: principle;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.principles li {
    counter-increment: principle;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px 18px;
    background: var(--surface);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
}

.principles li::before {
    content: counter(principle);
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 36px;
    line-height: 1;
    color: var(--text-secondary);
}

.namelist ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.namelist li {
    margin: 0;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 16px;
}

/* Steps */

.steps {
    list-style: none;
    padding: 0 !important;
    margin: 1.5em 0 2em;
}

.steps .step {
    display: flex;
    gap: 22px;
    margin: 0;
    padding-bottom: 28px;
    position: relative;
}

.steps .step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 52px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.step-number {
    flex: 0 0 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1;
}

.step-body {
    flex: 1;
    min-width: 0;
}

.post-content .step-title {
    margin: 8px 0 8px;
}

.step-body p {
    margin-bottom: 0.8em;
}

/* Stats */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 0 0 2em;
}

.stat {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat:last-child {
    background: var(--accent);
    color: var(--accent-contrast);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 38px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 14px;
    opacity: 0.75;
}

/* Timeline */

.timeline {
    border-left: 2px solid var(--border);
    padding-left: 24px;
    margin: 1.5em 0 2em 6px;
}

.timeline-entry {
    position: relative;
    margin-bottom: 1.8em;
}

.timeline-entry::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
}

.post-content .timeline-date {
    margin: 0 0 6px;
    font-size: 22px;
}

.timeline-entry ul {
    margin-bottom: 0.6em;
}

.timeline-entry p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ── Categories index ── */

.terms {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.term {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.term:hover {
    background: var(--surface);
    border-color: var(--text-secondary);
}

.term-name {
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.3;
}

.term-count {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--surface);
    border-radius: 999px;
    padding: 2px 10px;
    font-variant-numeric: tabular-nums;
}

/* ── Post footer ── */

.post-footer {
    margin-top: 56px;
}

.post-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 24px 28px;
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 40px;
}

.post-cta p {
    margin: 0;
    flex: 1 1 280px;
    font-size: 16px;
    line-height: 1.5;
}

.post-cta .buttons {
    margin: 0;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.15s;
}

.post-nav a span {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.post-nav-next {
    grid-column: 2;
    text-align: right;
}

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

/* ── Program 2026 ── */

.post-content .program-toc {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    border-top: 1px solid var(--border);
}

.program-toc li {
    margin: 0;
    border-bottom: 1px solid var(--border);
}

.program-toc a {
    display: flex;
    gap: 16px;
    padding: 12px 4px;
    font-weight: 600;
    text-decoration: none;
}

.program-toc a:hover {
    background: var(--surface);
}

.program-num {
    flex: 0 0 3em;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.program-source {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

/* ── Lokalne volitve ── */

.obcine-map {
    margin: 0 0 48px;
}

.obcine-map svg {
    display: block;
    width: 100%;
    height: auto;
}

.obcina {
    fill: var(--surface-strong);
    fill-rule: evenodd;
    stroke: var(--bg);
    stroke-width: 0.8;
    stroke-linejoin: round;
}

.obcina-active {
    fill: var(--accent);
    transition: opacity 0.15s;
}

.obcine-map a:hover .obcina-active,
.obcine-map a:focus-visible .obcina-active {
    opacity: 0.7;
}

.obcine-map a:focus-visible {
    outline: none;
}

.obcine-map a:focus-visible .obcina-active {
    stroke: var(--text);
    stroke-width: 2;
}

.obcine-map figcaption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14.5px;
    color: var(--text-secondary);
}

.obcine-credit {
    margin-left: auto;
    font-size: 12.5px;
    white-space: nowrap;
}

.obcine-legend {
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--accent);
}

.post-content .obcina-card {
    display: block;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post-content .obcina-card:hover {
    border-color: var(--text);
    box-shadow: var(--shadow);
}

.obcina-card .card-body p {
    margin: 0 0 14px;
}

.obcina-card-mayor {
    font-size: 15px;
}

.mayor {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0 0 2em;
}

.mayor .person {
    flex: 0 0 180px;
}

.mayor-bio p {
    margin: 0 0 0.8em;
}

@media (max-width: 600px) {
    .mayor {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mayor .person {
        flex-basis: auto;
        width: 180px;
        margin: 0 auto;
    }
}

/* ── Footer ── */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 14.5px;
    color: var(--text-secondary);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    display: block;
    width: 100px;
    height: auto;
    margin-bottom: 14px;
}

.footer-about p {
    margin: 0;
    max-width: 340px;
    line-height: 1.6;
}

.footer-heading {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 20px;
    letter-spacing: 0.05em;
    color: var(--text);
    margin: 0 0 12px;
}

.site-footer address {
    font-style: normal;
    line-height: 1.8;
}

.site-footer a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.9;
}

.social-links {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.social-links a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.social-links a:hover {
    color: var(--text);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px 24px 28px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

/* ── 404 ── */

.page-404 {
    text-align: center;
    padding: 48px 0;
}

.page-404 .page-header {
    border: none;
}

.page-404 .page-lead {
    margin: 0 auto;
}

.page-404 .buttons {
    justify-content: center;
}

/* ── Responsive ── */

@media (max-width: 1000px) {
    .nav-toggle-label {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        cursor: pointer;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text);
        position: relative;
        transition: transform 0.2s, background 0.2s;
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: "";
        position: absolute;
    }

    .nav-toggle-label span::before {
        top: -7px;
    }

    .nav-toggle-label span::after {
        top: 7px;
    }

    .nav-toggle:checked + .nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked + .nav-toggle-label span::before {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-label span::after {
        transform: translateY(-7px) rotate(-45deg);
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 0;
    }

    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 18px;
    }

    .nav-toggle:checked ~ .site-nav {
        display: flex;
    }

    .nav-item {
        font-size: 22px;
        padding: 10px 4px;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-item.active::after {
        display: none;
    }

    .nav-item.active {
        padding-left: 12px;
        border-left: 3px solid var(--text);
    }

    .nav-cta {
        margin: 14px 0 0;
        text-align: center;
        border-radius: 999px;
        border-bottom: none;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header-inner {
        padding: 0 16px;
        min-height: 60px;
    }

    .site-logo img {
        width: 96px;
    }

    .site-main {
        padding: 24px 16px 48px;
    }

    .hero {
        padding: 28px 24px;
        margin-bottom: 28px;
    }

    .hero-lead {
        font-size: 16px;
    }

    .post-feed {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-content {
        font-size: 17px;
    }

    .post-content h2 {
        font-size: 29px;
    }

    .page-header {
        margin-bottom: 28px;
        padding-bottom: 24px;
    }

    .page-lead {
        font-size: 17px;
    }

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

    .callout {
        padding: 18px 18px;
    }

    .callout td:first-child {
        width: auto;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav-next {
        grid-column: 1;
    }

    .pagination-info {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        padding: 36px 16px 24px;
        gap: 28px;
    }

    .footer-bottom {
        padding: 16px;
    }
}
