:root {
    --font-sans: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: "Newsreader", Georgia, serif;
    --font-serif-alt: "Source Serif 4", Georgia, serif;
    --font-body: var(--gh-font-body, var(--font-sans));
    --font-heading: var(--gh-font-heading, var(--font-serif));

    /* Pearl (default) palette */
    --bg: #f5efe5;
    --surface: #fdf8f0;
    --surface-strong: #ffffff;
    --surface-hover: #f0e9dd;
    --ink: #1a1d1b;
    --ink-2: #2e3330;
    --muted: #62706a;
    --muted-2: #8a9490;
    --line: rgba(30, 33, 31, 0.10);
    --line-strong: rgba(30, 33, 31, 0.18);
    --accent: var(--ghost-accent, #c94f2e);
    --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
    --accent-ink: #ffffff;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(30, 33, 31, 0.08);
    --shadow-sm: 0 4px 16px rgba(30, 33, 31, 0.08);
    --shadow: 0 12px 40px rgba(30, 33, 31, 0.10);
    --shadow-lg: 0 24px 70px rgba(30, 33, 31, 0.14);

    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Layout */
    --inner: min(1180px, calc(100vw - 48px));

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 140ms;
    --t-med: 220ms;
    --t-slow: 360ms;
}

/* ── Dark / Midnight ─────────────────────────────── */
.tone-midnight {
    --bg: #0f1214;
    --surface: #161b1e;
    --surface-strong: #1e2428;
    --surface-hover: #1c2226;
    --ink: #eceae3;
    --ink-2: #d4d0c8;
    --muted: #8fa09a;
    --muted-2: #6a7b76;
    --line: rgba(236, 234, 227, 0.10);
    --line-strong: rgba(236, 234, 227, 0.18);
    --accent-ink: #0f1214;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.36);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.48);
}

/* ── Sage ─────────────────────────────────────────── */
.tone-sage {
    --bg: #e8ede1;
    --surface: #f4f7ef;
    --surface-strong: #ffffff;
    --surface-hover: #e0e8d8;
    --ink: #1c2218;
    --ink-2: #2e3829;
    --muted: #5a6b55;
    --muted-2: #7d9077;
    --line: rgba(28, 34, 24, 0.10);
    --line-strong: rgba(28, 34, 24, 0.18);
}

/* ── Paper ────────────────────────────────────────── */
.tone-paper {
    --bg: #f2ede4;
    --surface: #faf7f2;
    --surface-strong: #ffffff;
    --surface-hover: #eae4d8;
    --ink: #221e17;
    --ink-2: #332d24;
    --muted: #6b6259;
    --muted-2: #8a8078;
    --line: rgba(34, 30, 23, 0.10);
    --line-strong: rgba(34, 30, 23, 0.18);
}

/* ── Reset & Base ────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 34%, transparent), transparent 460px),
        var(--bg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    transition: background var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}

.type-editorial-serif {
    --font-sans: "Source Serif 4", Georgia, serif;
    --font-serif: "Newsreader", Georgia, serif;
}

.type-modern-sans {
    --font-serif: "Instrument Sans", system-ui, sans-serif;
}

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

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

/* ── Layout Utils ─────────────────────────────────── */
.inner {
    width: var(--inner);
    margin: 0 auto;
}

.site-width-narrow {
    --inner: min(980px, calc(100vw - 48px));
}

.site-width-wide {
    --inner: min(1380px, calc(100vw - 48px));
}

.site-width-full {
    --inner: min(1680px, calc(100vw - 48px));
}

.narrow {
    max-width: 760px;
}

.site-shell {
    min-height: 100vh;
    overflow: hidden;
}

::selection {
    color: var(--accent-ink);
    background: var(--accent);
}

/* ── Reading Progress Bar ─────────────────────────── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #f8a07a));
    border-radius: 0 2px 2px 0;
    transition: width 80ms linear;
    pointer-events: none;
}

/* ── Header ──────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-sm);
    border-color: var(--line-strong);
}

/* ── Nav ─────────────────────────────────────────── */
.nav-inner,
.site-nav ul,
.nav-actions,
.hero-actions,
.post-card-meta,
.post-card-footer,
.byline,
.author-links {
    display: flex;
    align-items: center;
}

.nav-inner {
    min-height: 72px;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.brand-text {
    position: relative;
    display: inline-block;
    max-width: min(320px, 48vw);
    overflow-wrap: anywhere;
}

.brand-text::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -0.22em;
    left: 0;
    height: 0.14em;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0.28);
    transform-origin: left;
    transition: transform var(--t-med) var(--ease-spring);
    opacity: 0.75;
}

.brand:hover .brand-text::after,
.footer-brand:hover .brand-text::after {
    transform: scaleX(1);
    opacity: 1;
}

.brand img {
    max-height: 40px;
    width: auto;
}

.site-nav ul,
.footer-nav ul {
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a,
.nav-link {
    display: inline-block;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.site-nav a:hover,
.nav-link:hover {
    color: var(--ink);
    background: var(--surface-hover);
}

.footer-nav a,
.footer-links a,
.footer-social a,
.footer-meta a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color var(--t-fast) var(--ease);
}

.footer-nav a:hover,
.footer-links a:hover,
.footer-social a:hover,
.footer-meta a:hover {
    color: var(--ink);
}

.nav-actions {
    gap: 10px;
}

/* ── Buttons ─────────────────────────────────────── */
.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 0 18px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease),
                background var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.button:active {
    transform: translateY(0);
    box-shadow: none;
}

.button-primary {
    border-color: var(--accent);
    color: var(--accent-ink);
    background: var(--accent);
}

.button-primary:hover {
    background: color-mix(in srgb, var(--accent) 88%, #000);
    border-color: color-mix(in srgb, var(--accent) 88%, #000);
}

.button-small {
    min-height: 36px;
    padding-inline: 14px;
    font-size: 0.84rem;
    border-color: var(--accent);
    color: var(--accent-ink);
    background: var(--accent);
}

.button-small:hover {
    background: color-mix(in srgb, var(--accent) 88%, #000);
    border-color: color-mix(in srgb, var(--accent) 88%, #000);
}

.button-ghost {
    background: var(--surface);
    color: var(--ink);
}

.button-ghost:hover {
    background: var(--surface-hover);
}

/* ── Mobile toggle ───────────────────────────────── */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: background var(--t-fast) var(--ease);
}

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

.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}

/* ── Hero ─────────────────────────────────────────── */
.home-hero,
.simple-hero,
.archive-header,
.post-hero {
    padding: 80px 0 52px;
}

.simple-hero {
    position: relative;
}

.simple-hero::after {
    content: "";
    display: block;
    width: var(--inner);
    height: 1px;
    margin: 52px auto 0;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.home-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1fr);
    gap: 48px;
    align-items: center;
}

.hero-editorial-rail .home-hero-inner {
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    gap: 40px;
    align-items: stretch;
}

.hero-editorial-rail .home-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 540px;
    padding: 32px 0;
    border-block: 1px solid var(--line-strong);
}

.hero-editorial-rail .home-hero-copy h1 {
    font-size: clamp(3rem, 6.2vw, 5.2rem);
}

.hero-editorial-rail .home-hero-copy p:not(.kicker) {
    font-size: 1.02rem;
}

.hero-editorial-rail .hero-actions {
    margin-top: 24px;
}

.hero-gallery-lead {
    padding-top: 64px;
}

.hero-gallery-lead .home-hero-inner {
    position: relative;
    grid-template-columns: minmax(300px, 0.58fr) minmax(0, 1fr);
    gap: 0;
    align-items: end;
}

.hero-gallery-lead .home-hero-copy {
    position: relative;
    z-index: 2;
    display: block;
    margin-right: -96px;
    margin-bottom: 46px;
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: clamp(28px, 4vw, 46px);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.hero-gallery-lead .home-hero-copy p:not(.kicker) {
    max-width: 460px;
}

.hero-gallery-lead .hero-actions {
    margin-top: 28px;
}

.hero-gallery-lead .featured-panel {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.hero-gallery-lead .featured-panel,
.hero-gallery-lead .featured-panel img {
    min-height: 620px;
}

.hero-gallery-lead .featured-panel-copy {
    padding-left: 128px;
}

/* Kicker / Eyebrow */
.kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.kicker::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    flex-shrink: 0;
}

/* Headings */
.home-hero h1,
.simple-hero h1,
.archive-header h1,
.post-hero h1 {
    max-width: 900px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(3.2rem, 7.5vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
}

.post-hero h1 {
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: -0.03em;
}

.home-hero-copy p:not(.kicker),
.simple-hero p,
.archive-header p,
.post-excerpt {
    max-width: 580px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* ── Featured Panel ──────────────────────────────── */
.featured-panel {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface));
    box-shadow: var(--shadow-lg);
    transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.featured-panel:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 32px 80px rgba(30, 33, 31, 0.18);
}

.featured-panel img {
    width: 100%;
    height: 100%;
    min-height: 540px;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease);
}

.featured-panel:hover img {
    transform: scale(1.04);
}

.featured-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.20) 55%, rgba(0, 0, 0, 0.80));
}

.featured-panel-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    padding: 32px;
    color: #fff;
}

.featured-panel-copy span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.featured-panel-copy h2 {
    max-width: 580px;
    margin: 12px 0 8px;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    line-height: 0.97;
    letter-spacing: -0.02em;
}

.featured-panel-copy p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* ── Topic Bar ───────────────────────────────────── */
.topic-bar {
    border-block: 1px solid var(--line);
    background: var(--surface);
}

.topic-bar-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    min-height: 68px;
}

.topic-bar > .topic-bar-inner > span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.topic-bar-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-block: 4px;
}

.topic-bar-scroll::-webkit-scrollbar {
    display: none;
}

.topic-bar a {
    flex: 0 0 auto;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--bg);
    color: var(--ink-2);
    font-size: 0.86rem;
    font-weight: 700;
    transition: background var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease-spring);
}

.topic-bar a:hover {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ── Content Band ────────────────────────────────── */
.content-band {
    padding: 80px 0;
}

/* ── Section Heading ─────────────────────────────── */
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4.5vw, 4.6rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
}

.section-heading a {
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    transition: opacity var(--t-fast) var(--ease);
}

.section-heading a:hover {
    opacity: 0.75;
}

/* ── Post Feed ───────────────────────────────────── */
.post-feed {
    display: grid;
    gap: 24px;
}

.feed-magazine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feed-magazine .post-card:first-child {
    grid-column: span 2;
}

.feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feed-list {
    grid-template-columns: 1fr;
}

/* ── Post Card ───────────────────────────────────── */
.post-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform var(--t-med) var(--ease),
                box-shadow var(--t-med) var(--ease),
                border-color var(--t-med) var(--ease);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    border-color: var(--line-strong);
}

.post-card-media {
    display: block;
    aspect-ratio: 1.22;
    overflow: hidden;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface-hover));
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease), filter var(--t-slow) var(--ease);
}

.post-card:hover .post-card-media img {
    transform: scale(1.035);
    filter: saturate(1.04) contrast(1.02);
}

.post-card-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 22px;
    color: var(--muted-2);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    text-align: center;
    letter-spacing: -0.01em;
}

.post-card-content {
    padding: 22px 24px 24px;
}

.post-card-meta,
.post-card-footer {
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.post-card-meta a {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background var(--t-fast) var(--ease);
}

.post-card-meta a:hover {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.post-card h3 {
    margin: 12px 0 10px;
    font-family: var(--font-heading);
    font-size: 1.65rem;
    line-height: 1.05;
    letter-spacing: -0.015em;
    transition: color var(--t-fast) var(--ease);
}

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

.post-card h3 a {
    display: block;
}

.post-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

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

.post-card-footer a {
    font-weight: 700;
    color: var(--ink-2);
    transition: color var(--t-fast) var(--ease);
}

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

/* Magazine first card */
.feed-magazine .post-card:first-child .post-card-media {
    aspect-ratio: 1.6;
}

.feed-magazine .post-card:first-child h3 {
    font-size: 2rem;
}

/* List layout */
.feed-list .post-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    align-items: start;
    border-radius: var(--radius);
}

.feed-list .post-card-media {
    width: 320px;
    height: 220px;
    aspect-ratio: auto;
    border-radius: 0;
}

/* ── Pagination ──────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    color: var(--muted);
    font-weight: 800;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.88rem;
    font-weight: 800;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-spring);
}

.pagination a:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

/* ── Filter Panel ─────────────────────────────────── */
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.filter-panel label {
    display: grid;
    gap: 6px;
}

.filter-panel span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-panel select {
    width: 100%;
    min-height: 42px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 36px 0 12px;
    color: var(--ink);
    background: var(--surface-strong);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    appearance: none;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease);
}

.filter-panel select:hover,
.filter-panel select:focus {
    border-color: var(--line-strong);
    outline: none;
}

.filter-status {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.empty-filter-message {
    margin: 36px 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    color: var(--muted);
    background: var(--surface);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

/* ── Newsletter CTA ──────────────────────────────── */
.newsletter-cta {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    background: var(--ink);
    color: var(--surface-strong);
    isolation: isolate;
}

.newsletter-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 60% at 10% 50%,
        color-mix(in srgb, var(--accent) 30%, transparent),
        transparent 70%
    );
    z-index: 0;
    opacity: 0.6;
}

.newsletter-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    z-index: 0;
}

.newsletter-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.newsletter-inner .kicker {
    color: color-mix(in srgb, var(--accent) 80%, #f0c0a0);
}

.newsletter-inner .kicker::before {
    background: currentColor;
}

.newsletter-inner h2 {
    max-width: 780px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 5.5vw, 5.4rem);
    line-height: 0.94;
    letter-spacing: -0.025em;
}

.newsletter-inner .button-primary {
    white-space: nowrap;
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    padding: 0 28px;
    min-height: 52px;
    font-size: 0.92rem;
}

/* ── Post Hero ───────────────────────────────────── */
.post-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
    gap: 48px;
    align-items: end;
}

.byline {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.byline img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--line-strong);
}

.byline-sep {
    color: var(--line-strong);
}

/* ── Post Hero Media ─────────────────────────────── */
.post-hero-media {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 1.22;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface-hover));
    box-shadow: var(--shadow-lg);
}

.post-hero-media img,
.page-feature {
    width: 100%;
    border-radius: var(--radius-lg);
}

.post-hero-media img {
    height: 100%;
    object-fit: cover;
}

.page-feature {
    aspect-ratio: 1.45;
    height: auto;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: italic;
    text-align: center;
}

/* ── Article Layout ──────────────────────────────── */
.article-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 760px);
    gap: 56px;
    align-items: start;
    padding-bottom: 80px;
}

.article-layout-single {
    display: block;
    max-width: 820px;
}

.article-sidebar {
    position: sticky;
    top: 96px;
}

/* ── Sidebar Widgets ─────────────────────────────── */
.author-mini,
.share-box,
.sidebar-comments {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.author-mini {
    text-align: center;
}

.author-mini img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 14px;
    border: 3px solid var(--surface-strong);
    box-shadow: var(--shadow-xs);
}

.author-mini strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.author-mini p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.share-box {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.share-box > span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.share-box a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 0.88rem;
    font-weight: 700;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.share-box a:hover {
    background: var(--surface-hover);
    color: var(--accent);
}

.sidebar-comments {
    margin-top: 14px;
}

/* ── Article Content ─────────────────────────────── */
.gh-content {
    font-family: var(--font-serif-alt);
    font-size: 1.18rem;
    line-height: 1.85;
    color: var(--ink-2);
}

.gh-content > * {
    margin-top: 0;
    margin-bottom: 28px;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    margin-top: 52px;
    margin-bottom: 16px;
    font-family: var(--font-heading);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.gh-content h2 {
    font-size: 2.4rem;
}

.gh-content h3 {
    font-size: 1.8rem;
}

.gh-content h4 {
    font-size: 1.35rem;
}

.gh-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
    text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
    transition: text-decoration-color var(--t-fast);
}

.gh-content a:hover {
    text-decoration-color: var(--accent);
}

.gh-content blockquote {
    margin-inline: 0;
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 24px;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.38;
    font-style: normal;
    letter-spacing: -0.01em;
}

.gh-content blockquote p {
    margin: 0;
}

.gh-content code {
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--surface-hover);
    color: var(--accent);
    font-size: 0.9em;
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

.gh-content pre {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--surface);
    overflow-x: auto;
}

.gh-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 0.88rem;
}

.gh-content img,
.kg-image-card img,
.kg-gallery-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: var(--radius);
}

.kg-width-wide,
.kg-width-full {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
}

.kg-image-card img {
    aspect-ratio: 1.5;
    object-fit: cover;
}

.kg-gallery-image img {
    aspect-ratio: 1.2;
    object-fit: cover;
}

/* ── Archive Header ──────────────────────────────── */
.archive-header {
    border-bottom: 1px solid var(--line);
}

.archive-header-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
}

.archive-count {
    flex: 0 0 auto;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    background: var(--surface);
}

/* ── Author Archive ──────────────────────────────── */
.author-archive-card {
    display: flex;
    gap: 24px;
    align-items: center;
}

.author-archive-card > img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface-strong);
    box-shadow: var(--shadow-sm);
}

.author-links {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 800;
}

.author-links a {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
    background: var(--accent-soft);
    transition: background var(--t-fast), border-color var(--t-fast);
}

.author-links a:hover {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* ── Related Posts ───────────────────────────────── */
.related-band {
    border-top: 1px solid var(--line);
}

/* ── Footer ──────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 40px;
    background: var(--surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    font-size: 1.4rem;
}

.site-footer p {
    max-width: 340px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.footer-nav ul,
.footer-links,
.footer-social {
    display: grid;
    gap: 10px;
}

.footer-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-meta {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    text-align: right;
}

.footer-social {
    justify-items: end;
    gap: 8px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.84rem;
    font-weight: 800;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.footer-social a:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
    color: var(--ink);
}

.footer-divider {
    height: 1px;
    background: var(--line);
    margin: 40px 0 0;
}

.footer-bottom {
    padding: 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

/* ── Focus / Accessibility ───────────────────────── */
:focus-visible {
    outline: 2.5px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── Responsive: Tablet ──────────────────────────── */
@media (max-width: 980px) {
    :root {
        --inner: min(100% - 36px, 760px);
    }

    .site-width-narrow,
    .site-width-wide,
    .site-width-full {
        --inner: min(100% - 36px, 760px);
    }

    .site-nav,
    .nav-actions {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .menu-open .site-nav,
    .menu-open .nav-actions {
        display: flex;
    }

    .menu-open .nav-inner {
        flex-wrap: wrap;
        padding-bottom: 16px;
    }

    .menu-open .site-nav,
    .menu-open .nav-actions {
        flex: 1 0 100%;
    }

    .site-nav ul {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding-bottom: 4px;
    }

    .site-nav a {
        width: 100%;
        padding: 10px 12px;
    }

    .home-hero-inner,
    .hero-editorial-rail .home-hero-inner,
    .hero-gallery-lead .home-hero-copy,
    .post-hero-inner,
    .article-layout,
    .newsletter-inner,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-editorial-rail .home-hero-copy {
        min-height: 0;
        padding: 0 0 28px;
        border-top: 0;
    }

    .hero-gallery-lead .home-hero-inner {
        gap: 28px;
    }

    .hero-gallery-lead .home-hero-copy {
        margin: 0;
    }

    .hero-gallery-lead .featured-panel-copy {
        padding-left: 32px;
    }

    .featured-panel,
    .featured-panel img {
        min-height: 420px;
    }

    .feed-magazine,
    .feed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feed-magazine .post-card:first-child {
        grid-column: span 2;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .author-mini {
        text-align: left;
        display: flex;
        align-items: flex-start;
        gap: 14px;
    }

    .author-mini img {
        margin: 0;
        flex-shrink: 0;
    }

    .share-box {
        margin-top: 0;
    }

    .footer-meta {
        text-align: left;
    }

    .footer-social {
        justify-items: start;
    }

    .newsletter-inner {
        gap: 28px;
    }

    .newsletter-inner .button-primary {
        width: 100%;
    }
}

/* ── Responsive: Mobile ──────────────────────────── */
@media (max-width: 680px) {
    :root {
        --inner: min(100% - 28px, 520px);
    }

    .site-width-narrow,
    .site-width-wide,
    .site-width-full {
        --inner: min(100% - 28px, 520px);
    }

    .home-hero,
    .simple-hero,
    .archive-header,
    .post-hero,
    .content-band {
        padding-block: 52px;
    }

    .home-hero h1,
    .simple-hero h1,
    .archive-header h1,
    .post-hero h1 {
        font-size: clamp(2.8rem, 16vw, 5.2rem);
    }

    .featured-panel,
    .featured-panel img {
        min-height: 340px;
    }

    .featured-panel-copy {
        padding: 20px;
    }

    .topic-bar-inner,
    .section-heading,
    .archive-header-inner,
    .author-archive-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .feed-magazine,
    .feed-grid,
    .feed-list .post-card,
    .article-sidebar,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .feed-list .post-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 1.4;
    }

    .post-card h3 {
        font-size: 1.45rem;
    }

    .gh-content {
        font-size: 1.05rem;
    }

    .gh-content h2 {
        font-size: 1.9rem;
    }

    .gh-content h3 {
        font-size: 1.5rem;
    }

    .gh-content blockquote {
        font-size: 1.3rem;
        padding-left: 18px;
    }

    .newsletter-inner h2 {
        font-size: clamp(2.2rem, 11vw, 4rem);
    }

    .newsletter-cta {
        padding: 72px 0;
    }

    .footer-nav ul {
        display: grid;
        gap: 10px;
    }

    .feed-magazine .post-card:first-child {
        grid-column: span 1;
    }

    .feed-magazine .post-card:first-child h3 {
        font-size: 1.6rem;
    }
}

.nav-button,
.footer-link-button {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.footer-link-button {
    padding: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.post-card-meta a,
.eyebrow {
    background: var(--custom-post-badge-bg, var(--accent-soft));
}

.author-carousel {
    display: grid;
    grid-auto-columns: minmax(240px, 32%);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.author-slide,
.directory-card,
.tier-card,
.member-status-card,
.locked-content-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--custom-directory-card-bg, var(--surface));
    box-shadow: var(--shadow-xs);
}

.author-slide {
    min-height: 250px;
    padding: 24px;
    scroll-snap-align: start;
}

.author-slide img,
.author-directory-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
}

.author-slide span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.author-slide strong,
.directory-card h2,
.tier-card h2,
.member-status-card h2,
.locked-content-card h2 {
    display: block;
    margin: 8px 0 10px;
    font-family: var(--font-heading);
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.author-slide strong {
    font-size: 1.45rem;
}

.author-slide p,
.directory-card p,
.tier-card p,
.member-status-card p,
.locked-content-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.directory-card,
.tier-card,
.member-status-card,
.locked-content-card {
    padding: 26px;
}

.directory-card {
    transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.directory-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.directory-card > img {
    width: 100%;
    aspect-ratio: 1.7;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
}

.directory-card h2,
.tier-card h2,
.member-status-card h2,
.locked-content-card h2 {
    font-size: 1.8rem;
}

.tier-card {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.tier-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    color: var(--ink-2);
}

.member-status-card {
    margin-bottom: 24px;
}

.locked-content-card {
    margin: 42px 0;
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.member-sidebar-nav {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--surface);
}

.member-sidebar-nav a,
.member-sidebar-nav button {
    border: 0;
    padding: 0;
    color: var(--ink-2);
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.post-reaction-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 46px 0 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 42%);
    box-shadow: var(--shadow-xs);
}

.post-reaction-row button {
    display: grid;
    min-height: 86px;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    border-radius: var(--radius);
    padding: 0 10px;
    color: var(--ink-2);
    background: transparent;
    font: inherit;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.reaction-count {
    display: inline-grid;
    min-width: 28px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    padding: 0 8px;
    background: var(--surface-strong);
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 900;
}

.reaction-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.reaction-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.post-reaction-row button:hover,
.post-reaction-row button.is-active {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.post-reaction-row button.is-active .reaction-count {
    background: var(--accent);
    color: var(--accent-ink);
}

.post-reaction-row button:hover .reaction-icon,
.post-reaction-row button.is-active .reaction-icon {
    border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong));
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.modal-open {
    overflow: hidden;
}

.auth-modal,
.share-modal,
.comments-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-modal[hidden],
.share-modal[hidden],
.comments-modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(6px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    padding: 6px;
    background: var(--surface-hover);
}

.auth-tab {
    min-height: 40px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.auth-tab.is-active {
    color: var(--ink);
    background: var(--surface-strong);
}

.auth-pane {
    display: none;
}

.auth-pane.is-active {
    display: block;
}

.auth-pane h2,
.share-panel h2,
.comments-panel h2 {
    margin: 0 32px 10px 0;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.05;
}

.auth-pane p,
.comment-gate p,
.copy-status {
    color: var(--muted);
}

.members-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.members-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.members-form input {
    min-height: 48px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    color: var(--ink);
    background: var(--surface-strong);
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
}

.members-message {
    display: none;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
}

.members-form.success .members-success,
.members-form.error .members-error {
    display: block;
}

.share-preview {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: start;
}

.share-preview img {
    width: 100%;
    aspect-ratio: 1.2;
    object-fit: cover;
    border-radius: var(--radius);
}

.share-preview span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.recommendations-band .kg-card {
    margin-inline: auto;
}

/* Contact and recommendations pages */
.contact-hero-inner,
.recommendations-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    gap: 48px;
    align-items: end;
}

.contact-note,
.recommendations-mark {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: var(--shadow-xs);
}

.contact-note span,
.recommendations-mark span,
.contact-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-note strong,
.recommendations-mark strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    line-height: 1.05;
}

.contact-note p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(300px, 0.28fr);
    gap: 28px;
    align-items: start;
}

.contact-panel,
.recommendations-copy,
.recommendations-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(28px, 4vw, 46px);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.contact-panel {
    min-height: 420px;
}

.contact-panel > :first-child,
.recommendations-copy > :first-child {
    margin-top: 0;
}

.contact-panel a,
.recommendations-copy a {
    text-decoration-thickness: 1px;
}

.contact-panel input,
.contact-panel textarea,
.contact-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--ink);
    background: var(--surface-strong);
    font: inherit;
}

.contact-panel textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-aside {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 96px;
}

.contact-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: color-mix(in srgb, var(--surface) 82%, var(--bg));
}

.contact-card h2 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.08;
}

.contact-card p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-social a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--ink-2);
    background: var(--surface);
    font-size: 0.84rem;
    font-weight: 800;
}

.recommendations-layout {
    display: grid;
    gap: 24px;
}

.recommendations-copy {
    max-width: 820px;
    margin-inline: auto;
}

.recommendations-panel {
    max-width: 980px;
    margin-inline: auto;
}

.recommendations-panel .kg-card,
.recommendations-panel .kg-header-card,
.recommendations-panel .kg-bookmark-card {
    max-width: none;
}

.recommendations-panel :is(.recommendation, .gh-recommendation-card, .kg-card) {
    border-radius: var(--radius);
}

@media (max-width: 980px) {
    .directory-grid,
    .tier-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .author-carousel {
        grid-auto-columns: minmax(220px, 48%);
    }

    .contact-hero-inner,
    .recommendations-hero-inner,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-aside {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .directory-grid,
    .tier-grid,
    .share-preview {
        grid-template-columns: 1fr;
    }

    .author-carousel {
        grid-auto-columns: minmax(220px, 82%);
    }

    .modal-panel {
        padding: 22px;
    }

    .contact-aside {
        grid-template-columns: 1fr;
    }

    .contact-panel,
    .recommendations-copy,
    .recommendations-panel {
        padding: 24px;
    }

    .post-reaction-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 18px;
    }
}
