/* Coolship Club — Ghost theme
   A calm independent record-club editorial site: bright yellow masthead,
   warm-white reading canvas, cobalt typography, restrained black metadata.

   Pairing rules (load-bearing):
   - Blue content on yellow or white. White content on blue. Black on white.
   - Never yellow text on blue, yellow text on white, or white text on yellow.
   - Yellow is reserved for the masthead, one featured surface, buttons,
     and focus treatments. */

/* ---------------------------------------------------------------- fonts */

@font-face {
    font-family: "Lexend";
    src: url("../fonts/lexend-latin-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Reddit Mono";
    src: url("../fonts/reddit-mono-latin-var.woff2") format("woff2");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Lexend Giga";
    src: url("../fonts/lexend-giga-latin-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------- tokens */

:root {
    --yellow: #f4d93b;
    --yellow-deep: #e9c714;
    --cobalt: #1646b8;
    --cobalt-deep: #10358f;
    --paper: #f3efe5;
    --surface: #fffdf6;
    --ink: #171713;
    --muted: #68665f;
    --line: #ddd6c4;
    --on-cobalt: #fffdf6;
    --on-cobalt-soft: rgba(255, 253, 246, 0.82);
    --cobalt-line: rgba(255, 253, 246, 0.28);

    /* Ghost design settings can override these; the theme defaults stay Lexend/Reddit Mono */
    --sans: var(--gh-font-body, "Lexend"), ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: var(--gh-font-heading, "Reddit Mono"), ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --wordmark: "Lexend Giga", "Lexend", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;

    --shell: min(1140px, 100% - 40px);
    --narrow: min(760px, 100% - 40px);
    --content: min(700px, 100% - 40px);
}

/* ----------------------------------------------------------------- base */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

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

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-deep); }

::selection { background: var(--cobalt); color: var(--on-cobalt); }

button { font: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--mono);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--cobalt);
    overflow-wrap: break-word;
}

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

.shell { width: var(--shell); margin-inline: auto; }
.shell-narrow { width: var(--narrow); margin-inline: auto; }
.shell-content { width: var(--content); margin-inline: auto; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -90px;
    z-index: 200;
    background: var(--cobalt);
    color: var(--on-cobalt);
    font: 700 0.8rem var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    padding: 12px 16px;
}
.skip-link:focus { top: 16px; color: var(--on-cobalt); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Catalog-style label */
.eyebrow {
    margin: 0 0 12px;
    font: 700 0.68rem/1.4 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cobalt);
    text-decoration: none;
}
a.eyebrow:hover { text-decoration: underline; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    background: var(--cobalt);
    border: 1px solid var(--cobalt);
    color: var(--on-cobalt);
    font: 700 0.78rem/1.2 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); color: var(--on-cobalt); }

/* Yellow button: cobalt text on yellow (small high-impact surface) */
.button-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--cobalt); }
.button-yellow:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); color: var(--cobalt-deep); }

.text-link {
    font: 700 0.78rem/1.4 var(--mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cobalt);
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

/* ------------------------------------------------------------- masthead */

.site-head { position: relative; z-index: 30; }

.masthead { background: var(--yellow); position: relative; }

.masthead-inner {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 9px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--cobalt);
    text-decoration: none;
}
.brand img { max-height: 30px; width: auto; }
.brand-wordmark {
    font-family: var(--wordmark);
    font-weight: 700;
    font-size: clamp(0.72rem, 0.42rem + 1.2vw, 0.98rem);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
}
.brand:hover { color: var(--cobalt-deep); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav .nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: 12px; }

.site-nav a,
.site-nav .text-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 10px;
    color: var(--cobalt);
    font: 600 0.92rem/1.2 var(--sans);
    text-decoration: none;
}
/* Current section and hover: the brand wave scaled down (2/3), static */
.site-nav a:not(.button),
.site-nav .text-button { position: relative; }
.site-nav a:not(.button):hover,
.site-nav .text-button:hover { text-decoration: none; }
.site-nav .nav-current > a::after,
.site-nav a:not(.button):hover::after,
.site-nav .text-button:hover::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 7px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath d='M-12 3 Q-9 0.73 -6 3 T0 3 T6 3 T12 3 T18 3 T24 3' fill='none' stroke='%231646b8' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    background-size: 12px 6px;
    pointer-events: none;
}

.text-button {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
}

.nav-cta { margin-left: 6px; }

/* Nav link rules outrank .button; restore the button treatment */
.site-nav a.button {
    padding: 10px 20px;
    color: var(--on-cobalt);
    font: 700 0.78rem/1.2 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-nav a.button:hover {
    color: var(--on-cobalt);
    text-decoration: none;
    background: var(--cobalt-deep);
}

.nav-toggle {
    display: none;
    min-height: 44px;
    align-items: center;
    border: 2px solid var(--cobalt);
    background: transparent;
    color: var(--cobalt);
    font: 700 0.72rem/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 14px;
    cursor: pointer;
}

/* The wave: one modest, static cobalt signature beneath the masthead.
   The tile is yellow above the curve so the masthead flows into the wave;
   below the curve the page canvas shows through. */
.brand-wave {
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12' viewBox='0 0 18 12'%3E%3Cpath d='M-18 6 Q-13.5 2.6 -9 6 T0 6 T9 6 T18 6 T27 6 T36 6 V0 H-18 Z' fill='%23f4d93b'/%3E%3Cpath d='M-18 6 Q-13.5 2.6 -9 6 T0 6 T9 6 T18 6 T27 6 T36 6' fill='none' stroke='%231646b8' stroke-width='3'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    background-size: 18px 12px;
}

/* ----------------------------------------------------------------- hero */

.hero { padding-block: clamp(44px, 7vw, 92px) clamp(36px, 5vw, 64px); }

.hero h1 {
    margin: 0;
    max-width: 880px;
    font-size: clamp(1.65rem, 1.02rem + 2.7vw, 2.9rem);
    line-height: 1.14;
}

.hero-intro {
    max-width: 58ch;
    margin: 20px 0 0;
    font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--ink);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 28px;
}

/* ------------------------------------------------------------- sections */

.section { padding-block: clamp(36px, 6vw, 64px); }

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: clamp(20px, 3vw, 32px);
}
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
}
.section-heading .eyebrow { margin-bottom: 8px; }

.empty-note { margin: 0; color: var(--muted); font-size: 1rem; max-width: 60ch; }

/* --------------------------------------------------------------- events */

/* Now / next: contained cobalt feature panel */
.event-feature {
    background: var(--cobalt);
    color: var(--on-cobalt);
    padding: clamp(22px, 4vw, 44px);
}
.event-feature .eyebrow { color: var(--on-cobalt); }
.event-feature-date {
    display: block;
    margin: 0 0 10px;
    font: 700 0.8rem/1.4 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-cobalt-soft);
}
.event-feature h3 {
    margin: 0;
    color: var(--on-cobalt);
    font-size: clamp(1.35rem, 1.05rem + 1.6vw, 2.15rem);
    line-height: 1.15;
}
.event-feature h3 a { color: inherit; text-decoration: none; }
.event-feature h3 a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.event-feature p { margin: 14px 0 0; max-width: 62ch; color: var(--on-cobalt-soft); }
.event-feature-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 22px;
}
.event-feature .text-link { color: var(--on-cobalt); }
.event-feature :focus-visible { outline-color: var(--on-cobalt); }

/* Upcoming rows */
.event-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 16px 24px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.event-feature + .event-row {
    margin-top: clamp(18px, 3vw, 28px);
    border-top: 1px solid var(--line);
}
.event-listing-page .event-row:first-child { border-top: 1px solid var(--line); }
.event-row > time {
    display: flex;
    flex-direction: column;
    text-align: center;
    color: var(--cobalt);
    font-family: var(--mono);
    text-transform: uppercase;
}
.event-row > time span { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; }
.event-row > time strong { font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.event-row h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.event-row h3 a { color: var(--cobalt); text-decoration: none; }
.event-row h3 a:hover { text-decoration: underline; }
.event-row-excerpt { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; }
.event-row .text-link { white-space: nowrap; }

/* ------------------------------------------------------------- featured */

.story-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
}
.story-feature + .post-grid { margin-top: clamp(28px, 4vw, 44px); }
.story-feature-image {
    display: block;
    min-height: 100%;
    background: #e8e2d2;
}
.story-feature-image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.story-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(22px, 3.5vw, 44px);
    min-width: 0;
}
.story-feature h3 {
    margin: 0;
    font-size: clamp(1.3rem, 1.05rem + 1.2vw, 1.9rem);
}
.story-feature h3 a { color: var(--cobalt); text-decoration: none; }
.story-feature h3 a:hover { text-decoration: underline; }
.story-feature p { margin: 14px 0 0; color: var(--ink); max-width: 58ch; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 16px;
    color: var(--muted);
    font: 600 0.7rem/1.5 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------- post cards */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 44px) 28px;
}

.post-card { min-width: 0; }
.post-card-image {
    display: block;
    background: #e8e2d2;
    border: 1px solid var(--line);
}
.post-card-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card-body { padding-top: 14px; }
.post-card .eyebrow { margin-bottom: 8px; }
.post-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.post-card h3 a { color: var(--cobalt); text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card-excerpt { margin: 8px 0 0; color: var(--muted); font-size: 0.94rem; }
.post-card .post-meta { margin-top: 10px; }

/* ----------------------------------------------------------- newsletter */

.newsletter {
    background: var(--yellow);
    padding: clamp(26px, 5vw, 52px);
}
.newsletter .eyebrow,
.newsletter h2,
.newsletter p,
.newsletter .text-link { color: var(--cobalt); }
.newsletter h2 {
    margin: 0;
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
}
.newsletter p { margin: 14px 0 0; max-width: 58ch; }
.newsletter :focus-visible { outline-color: var(--cobalt); }

/* Native Ghost members signup form; Portal toggles .loading/.success/.error */
.newsletter-form { margin-top: 20px; }
.newsletter-label {
    display: block;
    margin-bottom: 8px;
    font: 700 0.68rem/1.4 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cobalt);
}
.newsletter-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 520px;
}
.newsletter-input {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    border: 2px solid var(--cobalt);
    background: var(--surface);
    color: var(--ink);
    font: 400 1rem/1.4 var(--sans);
}
.newsletter-input::placeholder { color: var(--muted); }
.newsletter-form .message-success,
.newsletter-form .message-error {
    display: none;
    margin: 12px 0 0;
    max-width: 58ch;
    font-weight: 600;
    color: var(--cobalt);
}
.newsletter-form.success .newsletter-label,
.newsletter-form.success .newsletter-fields { display: none; }
.newsletter-form.success .message-success { display: block; }
.newsletter-form.error .message-error { display: block; }
.newsletter-form.loading button { opacity: 0.6; pointer-events: none; }

/* ----------------------------------------------------- archive headers */

.archive-header { margin-bottom: clamp(24px, 4vw, 40px); }
.archive-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 1.15rem + 2vw, 2.6rem);
}
.archive-header .archive-description {
    max-width: 60ch;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}
.author-header img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border: 1px solid var(--line);
    margin-bottom: 20px;
}

/* -------------------------------------------------------------- article */

.article-header { padding-top: clamp(40px, 6vw, 72px); }
.article-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 1.15rem + 2.1vw, 2.7rem);
    line-height: 1.15;
}
.article-deck {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
    line-height: 1.55;
    max-width: 60ch;
}
.article-header .post-meta { margin-top: 18px; }

.article-image { margin: clamp(28px, 5vw, 48px) auto 0; }
.article-image img { width: 100%; max-height: 720px; object-fit: cover; border: 1px solid var(--line); }
.article-image figcaption {
    margin-top: 8px;
    color: var(--muted);
    font: 500 0.74rem/1.5 var(--mono);
}

.gh-content { padding-block: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 40px); }
.gh-content > * { margin-top: 0; margin-bottom: 1.5em; }
.gh-content h2 { font-size: 1.5rem; margin-top: 1.8em; }
.gh-content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.gh-content h4 { font-size: 1.05rem; margin-top: 1.5em; }
.gh-content p, .gh-content li { font-size: 1.0625rem; line-height: 1.7; }
.gh-content li { margin-bottom: 0.4em; }
.gh-content strong { color: var(--ink); }

/* Highlighter links: yellow marker over cobalt text in running prose */
.gh-content a,
.article-deck a,
.archive-description a,
.hero-intro a,
.empty-note a,
.footer-brand p a {
    color: var(--cobalt);
    background: var(--yellow);
    text-decoration: none;
    padding: 0.02em 0.18em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.gh-content a:hover,
.article-deck a:hover,
.archive-description a:hover,
.hero-intro a:hover,
.empty-note a:hover,
.footer-brand p a:hover {
    background: var(--yellow-deep);
    color: var(--cobalt-deep);
}
.gh-content blockquote {
    margin: 2em 0;
    padding-left: 22px;
    border-left: 3px solid var(--cobalt);
    color: var(--ink);
    font-style: italic;
}
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.gh-content pre {
    overflow-x: auto;
    padding: 18px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 0.9rem;
}
.gh-content code { font-family: var(--mono); font-size: 0.92em; }
.gh-content :not(pre) > code { background: rgba(23, 23, 19, 0.07); padding: 0.1em 0.35em; }
.gh-content figure, .gh-content .kg-card { margin: 2.2em 0; }
.gh-content figcaption {
    margin-top: 8px;
    color: var(--muted);
    font: 500 0.74rem/1.5 var(--mono);
    text-align: left;
}
.gh-content table { border-collapse: collapse; width: 100%; }
.gh-content th, .gh-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.gh-content th { font: 700 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }

.kg-width-wide { width: min(1000px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

.article-footer { padding-bottom: clamp(32px, 5vw, 56px); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 4px 12px;
    color: var(--cobalt);
    font: 600 0.72rem/1.4 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}
.tag-list a:hover { border-color: var(--cobalt); }

.comments { margin-top: clamp(28px, 5vw, 44px); }

.post-related { padding-block: 0 clamp(36px, 6vw, 64px); }
.post-subscribe { padding-block: 0 clamp(36px, 6vw, 64px); }

/* ----------------------------------------------------------- pagination */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: clamp(28px, 4vw, 44px);
}
.pagination a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--cobalt);
    color: var(--cobalt);
    font: 700 0.74rem/1.2 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}
.pagination a:hover { background: var(--cobalt); color: var(--on-cobalt); }
.pagination-info { color: var(--muted); font: 600 0.74rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------------------------------------------------------------- error */

.error-page { min-height: 50vh; padding-block: clamp(60px, 10vw, 120px); }
.error-page h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); }
.error-page p { max-width: 55ch; color: var(--muted); }
.error-page .button { margin-top: 20px; }

/* --------------------------------------------------------------- footer */

.site-footer {
    margin-top: clamp(28px, 5vw, 48px);
    border-top: 1px solid var(--line);
    padding-block: clamp(28px, 5vw, 44px) 24px;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px 40px;
    flex-wrap: wrap;
}
.footer-brand .brand-wordmark { font-size: 0.78rem; }
.footer-brand p { margin: 10px 0 0; max-width: 44ch; color: var(--muted); font-size: 0.94rem; }
.footer-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.footer-nav .nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 10px;
    color: var(--cobalt);
    font: 600 0.88rem/1.3 var(--sans);
    text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; }
.footer-nav svg { display: block; flex: none; }
.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 24px;
    color: var(--muted);
    font: 500 0.76rem/1.6 var(--mono);
}
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--cobalt); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 40;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--yellow);
        border-bottom: 3px solid var(--cobalt);
        padding: 6px 20px 18px;
    }
    .site-nav.is-open { display: flex; }
    .site-nav .nav { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-actions { flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; }
    .site-nav a, .site-nav .text-button { padding: 10px 4px; font-size: 1rem; justify-content: flex-start; }
    .site-nav .nav-current > a::after,
    .site-nav a:not(.button):hover::after,
    .site-nav .text-button:hover::after { left: 4px; right: auto; width: 36px; bottom: 5px; }
    .nav-cta { margin: 10px 4px 0; justify-content: center; }
}

@media (max-width: 860px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .story-feature { grid-template-columns: 1fr; }
    .story-feature-image img { height: auto; }
}

@media (max-width: 560px) {
    body { font-size: 1rem; }
    .post-grid { grid-template-columns: 1fr; }
    .event-row { grid-template-columns: 60px minmax(0, 1fr); }
    .event-row > .text-link { grid-column: 2; justify-self: start; }
    .event-row > time strong { font-size: 1.3rem; }
    .pagination { flex-wrap: wrap; }
    .kg-width-wide { width: calc(100vw - 24px); }
}

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
