/* ==========================================================================
   Gazette — SamaDesign
   1. Tokens   2. Base   3. Layout   4. Header   5. Buttons & forms
   6. Cards    7. Home   8. Archives 9. Article  10. Content (Koenig)
   11. Newsletter 12. Footer 13. Misc
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */

:root {
    --gz-accent: var(--ghost-accent-color, #163dd0);
    --gz-accent-text: var(--gz-accent);
    --gz-bg: #f5f7fb;
    --gz-surface: #ffffff;
    --gz-chip: #e3e8ef;
    --gz-text: #0f172a;
    --gz-muted: #556074;
    --gz-border: #e3e8ef;
    --gz-on-accent: #ffffff;

    --gz-font-heading: var(--gh-font-heading, "Golos Text", system-ui, sans-serif);
    --gz-font-body: var(--gh-font-body, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);

    --gz-radius: 14px;
    --gz-radius-lg: 20px;
    --gz-gutter: 16px;
    --gz-container: 1240px;
    --gz-content: 720px;
    --gz-wide: 960px;
    --gz-header-h: 68px;
    --gz-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px rgb(15 23 42 / 0.06);

    color-scheme: light;
}

:root[data-scheme="dark"] {
    --gz-accent-text: color-mix(in srgb, var(--gz-accent) 55%, #ffffff);
    --gz-bg: #0f1115;
    --gz-surface: #1a1d24;
    --gz-chip: #2c3140;
    --gz-text: #e6eaf2;
    --gz-muted: #9aa3b5;
    --gz-border: #2c3140;
    --gz-shadow: none;

    color-scheme: dark;
}

@media (min-width: 640px) {
    :root { --gz-gutter: 24px; }
}

@media (min-width: 1024px) {
    :root { --gz-gutter: 32px; --gz-header-h: 76px; }
}

/* 2. Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--gz-header-h) + 16px);
}

body {
    margin: 0;
    background: var(--gz-bg);
    color: var(--gz-text);
    font-family: var(--gz-font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--gz-font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
}

p { margin: 0; }

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

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

button { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--gz-accent-text);
    outline-offset: 3px;
    border-radius: 4px;
}

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

.gz-skip {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--gz-accent);
    color: var(--gz-on-accent);
    font-weight: 600;
}

.gz-skip:focus { top: 12px; }

.gz-icon { flex-shrink: 0; }

.gz-muted { color: var(--gz-muted); }

/* 3. Layout
   ========================================================================== */

.gz-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.gz-main { flex-grow: 1; }

.gz-container {
    width: 100%;
    max-width: calc(var(--gz-container) + 2 * var(--gz-gutter));
    margin-inline: auto;
    padding-inline: var(--gz-gutter);
}

.gz-narrow,
.gz-wide,
.gz-full {
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gz-gutter);
}

.gz-narrow { max-width: calc(var(--gz-content) + 2 * var(--gz-gutter)); }
.gz-wide { max-width: calc(var(--gz-wide) + 240px + 2 * var(--gz-gutter)); }
.gz-full { padding-inline: 0; }

.gz-center { text-align: center; }

.gz-section { padding-block: 40px; }

@media (min-width: 1024px) {
    .gz-section { padding-block: 56px; }
}

.gz-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--gz-text);
}

.gz-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.gz-section-title a:hover { color: var(--gz-accent-text); }

.gz-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gz-accent-text);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.gz-more .gz-icon { transition: transform 0.2s ease; }
.gz-more:hover .gz-icon { transform: translateX(3px); }

.gz-label {
    display: block;
    margin-bottom: 14px;
    color: var(--gz-muted);
    font-family: var(--gz-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* 4. Header
   ========================================================================== */

.gz-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--gz-surface);
    border-bottom: 1px solid var(--gz-border);
}

/* backdrop-filter makes the header the containing block of fixed children,
   so it is only enabled on desktop where the nav is not a fixed panel */
@media (min-width: 960px) {
    .gz-header {
        background: color-mix(in srgb, var(--gz-surface) 92%, transparent);
        backdrop-filter: saturate(180%) blur(12px);
        -webkit-backdrop-filter: saturate(180%) blur(12px);
    }
}

.gz-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--gz-header-h);
}

.gz-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.gz-logo { max-height: 36px; width: auto; }
.gz-logo-dark { display: none; }
[data-scheme="dark"] .gz-logo-light { display: none; }
[data-scheme="dark"] .gz-logo-dark { display: block; }

.gz-brand-title {
    font-family: var(--gz-font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.gz-nav { flex-grow: 1; }

.gz-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gz-menu > li { position: relative; }

.gz-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gz-menu a:hover,
.gz-menu .is-current > a { color: var(--gz-accent-text); }

/* Dropdowns built by main.js from "-" prefixed items */
.gz-sub-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.gz-sub-toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.gz-sub-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }

.gz-submenu {
    margin: 0;
    padding: 6px;
    list-style: none;
}

.gz-nav-members { display: none; }

.gz-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.gz-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.gz-icon-btn:hover { background: var(--gz-chip); }

.gz-icon-sun { display: none; }
[data-scheme="dark"] .gz-icon-sun { display: block; }
[data-scheme="dark"] .gz-icon-moon { display: none; }

.gz-burger { display: none; flex-direction: column; gap: 6px; }

.gz-burger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.gz-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.gz-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (min-width: 960px) {
    .gz-submenu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 200px;
        border: 1px solid var(--gz-border);
        border-radius: 12px;
        background: var(--gz-surface);
        box-shadow: var(--gz-shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    }

    .gz-submenu.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .gz-submenu a:hover { background: var(--gz-chip); color: var(--gz-text); }
}

@media (max-width: 959px) {
    .gz-burger { display: inline-flex; }
    .gz-actions .gz-hide-sm { display: none; } /* must beat .gz-btn display, declared later */

    .gz-nav {
        position: fixed;
        inset: var(--gz-header-h) 0 0 0;
        z-index: 49;
        padding: 16px var(--gz-gutter) 32px;
        overflow-y: auto;
        background: var(--gz-surface);
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.2s ease, visibility 0.2s;
    }

    .gz-nav.is-open { visibility: visible; opacity: 1; }

    .gz-menu { flex-direction: column; align-items: stretch; gap: 0; }

    .gz-menu > li { border-bottom: 1px solid var(--gz-border); }

    .gz-menu a,
    .gz-sub-toggle {
        width: 100%;
        padding: 14px 4px;
        font-family: var(--gz-font-heading);
        font-size: 1.25rem;
        font-weight: 600;
        justify-content: space-between;
    }

    .gz-submenu { display: none; padding: 0 0 12px 12px; }
    .gz-submenu.is-open { display: block; }
    .gz-submenu a { padding: 8px 4px; font-size: 1.05rem; font-weight: 500; }

    .gz-nav-members {
        display: flex;
        gap: 10px;
        margin-top: 24px;
    }

    .gz-nav-members .gz-btn { flex: 1; }

    body.gz-nav-open { overflow: hidden; }
}

/* 5. Buttons & forms
   ========================================================================== */

.gz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.gz-btn-primary {
    background: var(--gz-accent);
    color: var(--gz-on-accent);
}

.gz-btn-primary:hover { opacity: 0.9; }

.gz-btn-ghost {
    border-color: var(--gz-border);
    background: transparent;
}

.gz-btn-ghost:hover { background: var(--gz-chip); }

.gz-form-row {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: var(--gz-surface);
}

.gz-form-row input {
    flex-grow: 1;
    min-width: 0;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: var(--gz-text);
    font: inherit;
}

.gz-form-row input:focus { outline: none; }
.gz-form-row:focus-within { outline: 2px solid var(--gz-on-accent); outline-offset: 2px; }

.gz-form-loading,
.gz-form-success,
.gz-form-error { display: none; }

.gz-form.loading .gz-form-label { visibility: hidden; }

.gz-form.loading .gz-form-loading {
    display: block;
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: gz-spin 0.7s linear infinite;
}

.gz-form .gz-btn { position: relative; }

.gz-form.success .gz-form-row { display: none; }
.gz-form.success .gz-form-success { display: block; font-weight: 600; }
.gz-form.error .gz-form-error { display: block; margin-top: 10px; font-size: 0.9rem; }

@keyframes gz-spin { to { transform: rotate(360deg); } }

/* 6. Cards
   ========================================================================== */

.gz-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--gz-radius);
    background: var(--gz-surface);
    box-shadow: var(--gz-shadow);
}

.gz-card-media {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: var(--gz-chip);
}

.gz-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gz-card:hover .gz-card-media img { transform: scale(1.04); }

.gz-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 10px;
    padding: 18px 20px 20px;
}

.gz-card-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gz-tag {
    position: relative;
    z-index: 1;
    color: var(--gz-accent-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gz-tag:hover { text-decoration: underline; text-underline-offset: 3px; }

.gz-tag-soft {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--gz-chip);
    color: var(--gz-text);
    letter-spacing: 0.04em;
}

.gz-tag-soft:hover { text-decoration: none; background: var(--gz-border); }

.gz-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--gz-chip);
    font-size: 0.7rem;
    font-weight: 600;
}

.gz-card-title {
    font-size: 1.25rem;
    line-height: 1.25;
}

/* Whole card clickable through the title link */
.gz-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.gz-card-title a:hover { color: var(--gz-accent-text); }

.gz-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gz-muted);
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.gz-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-top: auto;
    color: var(--gz-muted);
    font-size: 0.82rem;
}

.gz-meta > * { white-space: nowrap; }

.gz-meta > * + *::before {
    content: "·";
    margin-inline: 8px;
}

.gz-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    font-size: 0.82rem;
}

.gz-card-meta .gz-meta { margin-top: 0; font-size: inherit; }

.gz-meta-author {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    color: var(--gz-text);
    font-weight: 600;
}

.gz-meta-author:hover { color: var(--gz-accent-text); }

/* Large */
.gz-card-large .gz-card-media { aspect-ratio: 16 / 10; }
.gz-card-large .gz-card-body { padding: 22px 24px 26px; gap: 12px; }
.gz-card-large .gz-card-title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.1; }
.gz-card-large .gz-card-excerpt { font-size: 1.05rem; -webkit-line-clamp: 3; }

/* Compact: horizontal, no background */
.gz-card-compact {
    flex-direction: row;
    gap: 16px;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}

.gz-card-compact .gz-card-media {
    flex: 0 0 104px;
    aspect-ratio: 1;
    border-radius: 10px;
}

.gz-card-compact .gz-card-body { padding: 0; gap: 6px; }
.gz-card-compact .gz-card-title { font-size: 1.05rem; }

/* Feeds */
.gz-feed,
.gz-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .gz-feed,
    .gz-row { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .gz-feed { grid-template-columns: repeat(3, 1fr); gap: 28px; }
    .gz-row { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

.gz-feed-lead .gz-card-large { grid-column: 1 / -1; }

@media (min-width: 1024px) {
    .gz-feed-lead .gz-card-large { flex-direction: row; }
    .gz-feed-lead .gz-card-large .gz-card-media { flex: 0 0 60%; aspect-ratio: 16 / 10; }
    .gz-feed-lead .gz-card-large .gz-card-body { justify-content: center; padding: 40px; }
}

/* 7. Home
   ========================================================================== */

/* Hero slider */
.gz-hero { padding-top: 24px; padding-bottom: 8px; }

@media (min-width: 1024px) {
    .gz-hero { padding-top: 40px; }
}

.gz-hero-viewport {
    position: relative;
    overflow: hidden;
    border-radius: var(--gz-radius-lg);
    background: #0f172a;
}

.gz-hero-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.gz-hero-track::-webkit-scrollbar { display: none; }
.gz-hero-track:focus-visible { outline-offset: -3px; }

.gz-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 520px;
    scroll-snap-align: start;
    color: #ffffff;
}

@media (min-width: 640px) {
    .gz-slide { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (min-width: 1024px) {
    .gz-slide { aspect-ratio: auto; height: min(640px, 52vw); }
}

.gz-slide-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The body covers the whole slide: it carries the gradient and anchors the title link overlay */
.gz-slide-body {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    padding: 28px 22px;
    background: linear-gradient(to top, rgb(10 12 18 / 0.88) 0%, rgb(10 12 18 / 0.45) 45%, rgb(10 12 18 / 0) 75%);
}

.gz-slide-body > * { max-width: 780px; }

@media (min-width: 1024px) {
    .gz-slide-body { padding: 48px 56px; }
}

.gz-slide-title {
    font-size: clamp(1.75rem, 4.6vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.gz-slide-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.gz-slide-excerpt {
    display: -webkit-box;
    overflow: hidden;
    max-width: 620px;
    font-size: 1.05rem;
    opacity: 0.88;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 639px) {
    .gz-slide-excerpt { display: none; }
}

.gz-slide .gz-meta { margin-top: 0; color: rgb(255 255 255 / 0.8); }
.gz-slide .gz-meta-author { color: #ffffff; }
.gz-slide .gz-badge { background: rgb(255 255 255 / 0.18); color: #ffffff; }

.gz-tag-solid {
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--gz-accent);
    color: var(--gz-on-accent);
}

.gz-tag-solid:hover { text-decoration: none; opacity: 0.9; }

.gz-hero-arrows {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.gz-hero-arrows[hidden] { display: none; }

.gz-hero-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.92);
    color: #0f172a;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.gz-hero-arrow:hover { background: #ffffff; transform: scale(1.05); }
.gz-hero-arrow[data-dir="-1"] .gz-icon { transform: rotate(180deg); }

@media (max-width: 639px) {
    .gz-hero-arrows { top: 14px; right: 14px; }
    .gz-hero-arrow { width: 38px; height: 38px; }
}

/* Tabs: progress bars (+ titles on desktop) */
.gz-hero-tabs {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 8px;
    margin-top: 14px;
}

.gz-hero-tab {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    min-height: 32px; /* touch target */
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--gz-muted);
    text-align: left;
    cursor: pointer;
}

.gz-hero-tab:hover,
.gz-hero-tab.is-active { color: var(--gz-text); }

.gz-hero-bar {
    display: block;
    overflow: hidden;
    height: 3px;
    border-radius: 3px;
    background: var(--gz-chip);
}

.gz-hero-bar span {
    display: block;
    height: 100%;
    background: var(--gz-accent);
    transform: scaleX(0);
    transform-origin: left;
}

.gz-hero-tab.is-active .gz-hero-bar span { transform: scaleX(1); }

/* Autoplay: the active bar fills over the slide duration (main.js listens for animationend) */
.gz-hero.is-autoplay .gz-hero-tab.is-active .gz-hero-bar span {
    animation: gz-fill var(--gz-hero-duration, 7s) linear forwards;
}

.gz-hero.is-paused .gz-hero-tab.is-active .gz-hero-bar span { animation-play-state: paused; }

@keyframes gz-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.gz-hero-tab-num,
.gz-hero-tab-title { display: none; }

@media (min-width: 1024px) {
    .gz-hero-tabs { gap: 24px; margin-top: 18px; }

    .gz-hero-tab-num {
        display: block;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: var(--gz-accent-text);
    }

    .gz-hero-tab-title {
        display: -webkit-box;
        overflow: hidden;
        font-family: var(--gz-font-heading);
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

/* Homepage sidebar */
.gz-with-sidebar {
    display: grid;
    gap: 40px;
}

@media (min-width: 1024px) {
    .gz-with-sidebar { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}

.gz-main-col { min-width: 0; }

@media (min-width: 640px) {
    .gz-feed.gz-feed-2 { grid-template-columns: repeat(2, 1fr); }
}

.gz-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.gz-widget {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 24px;
    border-radius: var(--gz-radius-lg);
    background: var(--gz-surface);
}

.gz-widget-plain { display: flex; flex-direction: column; gap: 14px; }
.gz-widget-title { font-size: 1.35rem; }
.gz-widget-text { color: var(--gz-muted); font-size: 0.95rem; }

.gz-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.gz-chip {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gz-chip:hover { background: var(--gz-accent); color: var(--gz-on-accent); }
.gz-chip-soft { background: var(--gz-chip); color: var(--gz-text); }

/* Featured posts widget: one slide at a time, posts tagged #picks */
.gz-featured-viewport {
    position: relative;
    overflow: hidden;
    border-radius: var(--gz-radius-lg);
    background: #0f172a;
}

.gz-featured-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.gz-featured-track::-webkit-scrollbar { display: none; }

.gz-featured-slide {
    position: relative;
    flex: 0 0 100%;
    aspect-ratio: 7 / 8;
    scroll-snap-align: start;
    color: #ffffff;
}

@media (min-width: 640px) and (max-width: 1023px) {
    .gz-featured-slide { aspect-ratio: 16 / 10; }
}

.gz-featured-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gz-featured-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 22px 46px;
    background: linear-gradient(to top, rgb(10 12 18 / 0.85) 0%, rgb(10 12 18 / 0.25) 45%, rgb(10 12 18 / 0) 65%);
}

.gz-featured-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gz-featured-bottom { display: flex; flex-direction: column; gap: 10px; }
.gz-featured-title { font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.02em; }
.gz-featured-title a::after { content: ""; position: absolute; inset: 0; }
.gz-featured-date { font-size: 0.85rem; font-weight: 600; opacity: 0.9; }

.gz-featured-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 2;
    display: flex;
    transform: translateX(-50%);
}

.gz-featured-dots[hidden] { display: none; }

/* 24px touch target around a small dot */
.gz-featured-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.gz-featured-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.5);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.gz-featured-dot.is-active::before { width: 18px; background: #ffffff; }

/* Quote of the week (latest post tagged #quote) */
.gz-quote-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 56px 24px 44px;
    overflow: hidden;
    border-radius: var(--gz-radius-lg);
    background: var(--gz-surface);
    text-align: center;
}

@media (min-width: 1024px) {
    .gz-quote-inner { padding: 80px 96px 64px; }
}

.gz-quote-mark {
    position: absolute;
    top: 4px;
    left: 50%;
    color: var(--gz-accent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10rem;
    line-height: 1;
    opacity: 0.14;
    transform: translateX(-50%);
    pointer-events: none;
}

.gz-quote-inner .gz-label { position: relative; margin-bottom: 8px; color: var(--gz-accent-text); }

.gz-quote-text {
    position: relative;
    max-width: 860px;
    margin: 0;
    font-family: var(--gz-font-heading);
    font-size: clamp(1.5rem, 3.4vw, 2.4rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.gz-quote-text p::before { content: "\201C"; }
.gz-quote-text p::after { content: "\201D"; }

.gz-quote-cite {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin-top: 28px;
    color: var(--gz-muted);
    font-size: 0.95rem;
}

.gz-quote-author { color: var(--gz-text); font-weight: 700; }
.gz-quote-source a { color: var(--gz-accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Meet our writers */
.gz-authors-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .gz-authors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .gz-authors-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.gz-author-tile {
    position: relative;
    display: flex;
    gap: 18px;
    padding: 24px;
    border-radius: var(--gz-radius-lg);
    background: var(--gz-surface);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gz-author-tile:hover { box-shadow: var(--gz-shadow); transform: translateY(-2px); }

.gz-author-tile .gz-avatar-tile { width: 72px; height: 72px; font-size: 1.6rem; } /* beats .gz-avatar, declared later */

.gz-author-tile-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gz-author-tile-name { font-size: 1.2rem; }
.gz-author-tile-name a::after { content: ""; position: absolute; inset: 0; }
.gz-author-tile-name a:hover { color: var(--gz-accent-text); }
.gz-author-tile .gz-meta { margin-top: 0; }

.gz-author-tile-bio {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gz-muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.gz-author-tile .gz-social { position: relative; z-index: 1; margin-top: 4px; }
.gz-author-tile .gz-social:empty { display: none; }

/* Pagination & load more */
.gz-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.gz-page-number { color: var(--gz-muted); font-size: 0.9rem; }

.gz-load-more-wrap { display: flex; justify-content: center; margin-top: 40px; }
.gz-load-more[hidden] { display: none; }
.gz-load-more.is-loading { opacity: 0.6; pointer-events: none; }

.gz-empty { grid-column: 1 / -1; color: var(--gz-muted); }

/* 8. Archives
   ========================================================================== */

.gz-archive-head {
    display: grid;
    align-items: center;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 8px;
}

.gz-archive-title {
    margin-bottom: 12px;
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    letter-spacing: -0.03em;
}

.gz-archive-desc {
    max-width: 640px;
    margin-bottom: 12px;
    color: var(--gz-muted);
    font-size: 1.15rem;
}

.gz-archive-image {
    margin: 0;
    overflow: hidden;
    border-radius: var(--gz-radius-lg);
    aspect-ratio: 16 / 10;
}

.gz-archive-image img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 1024px) {
    .gz-archive-head.has-image { grid-template-columns: 1fr 480px; }
}

.gz-archive-author { grid-template-columns: auto; }

@media (min-width: 640px) {
    .gz-archive-author { grid-template-columns: 120px 1fr; }
}

.gz-archive-author .gz-meta { margin-bottom: 14px; }

.gz-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    width: 44px;
    height: 44px;
    border: 2px solid var(--gz-bg);
    border-radius: 50%;
    background: var(--gz-chip);
}

.gz-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Initial-only placeholder when there is no profile image */
.gz-avatar span {
    width: 1ch;
    overflow: hidden;
    font-weight: 700;
    white-space: nowrap;
}

.gz-avatar-lg { width: 64px; height: 64px; }
.gz-avatar-xl { width: 120px; height: 120px; font-size: 2.5rem; }

.gz-social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gz-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gz-chip);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gz-social a:hover { background: var(--gz-accent); color: var(--gz-on-accent); }
.gz-social .gz-icon { width: 16px; height: 16px; }
.gz-social-sm a { width: 32px; height: 32px; }
.gz-social-sm .gz-icon { width: 14px; height: 14px; }
.gz-social-fallback { font-size: 0.65rem; font-weight: 700; }

/* Tag page: editorial cover */
.gz-cover { padding-top: 24px; }

@media (min-width: 1024px) {
    .gz-cover { padding-top: 40px; }
}

.gz-cover-inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 340px;
    overflow: hidden;
    border-radius: var(--gz-radius-lg);
    background:
        radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, #ffffff 22%, transparent) 0%, transparent 55%),
        var(--gz-accent);
    color: #ffffff;
    isolation: isolate;
}

@media (min-width: 640px) {
    .gz-cover-inner { min-height: 380px; }
}

@media (min-width: 1024px) {
    .gz-cover-inner { min-height: 460px; }
}

.gz-cover-inner:not(.has-image) { min-height: 300px; }

@media (min-width: 1024px) {
    .gz-cover-inner:not(.has-image) { min-height: 380px; }
}

.gz-cover-watermark {
    position: absolute;
    right: -0.04em;
    bottom: -0.22em;
    z-index: -1;
    font-family: var(--gz-font-heading);
    font-size: clamp(7rem, 22vw, 19rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 2px rgb(255 255 255 / 0.2);
    pointer-events: none;
    user-select: none;
}

.gz-cover-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Legibility: darken bottom and left, where the text sits */
.gz-cover-inner.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, rgb(10 12 18 / 0.82) 0%, rgb(10 12 18 / 0.35) 45%, rgb(10 12 18 / 0.05) 75%),
        linear-gradient(to right, rgb(10 12 18 / 0.45) 0%, rgb(10 12 18 / 0) 60%);
}

.gz-cover-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    max-width: 720px;
    padding: 28px 22px;
}

@media (min-width: 1024px) {
    .gz-cover-body { padding: 56px; }
}

.gz-cover-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.9;
}

.gz-cover-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    background: currentColor;
}

.gz-cover-title {
    font-size: clamp(2.75rem, 8vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.gz-cover-desc {
    max-width: 560px;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    line-height: 1.5;
    opacity: 0.9;
}

.gz-cover-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 6px;
    font-size: 0.88rem;
}

.gz-cover-meta > span:not(.gz-cover-pill) { opacity: 0.85; white-space: nowrap; }

.gz-cover-pill {
    padding: 6px 12px;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.14);
    font-weight: 600;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Topic switcher under the cover */
.gz-topics {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}

.gz-topics::-webkit-scrollbar { display: none; }

.gz-topic {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    min-height: 38px;
    padding: 6px 8px 6px 14px;
    border: 1px solid var(--gz-border);
    border-radius: 999px;
    background: var(--gz-surface);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.gz-topic:hover { border-color: var(--gz-accent); color: var(--gz-accent-text); }

.gz-topic-count {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--gz-chip);
    color: var(--gz-muted);
    font-size: 0.75rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.gz-topic.nav-current {
    border-color: var(--gz-text);
    background: var(--gz-text);
    color: var(--gz-bg);
}

.gz-topic.nav-current .gz-topic-count { background: rgb(255 255 255 / 0.18); color: inherit; }

[data-scheme="dark"] .gz-topic.nav-current .gz-topic-count { background: rgb(0 0 0 / 0.12); }

/* Author page cover */
.gz-cover .gz-cover-avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 6px;
    border: 3px solid rgb(255 255 255 / 0.9);
    background: rgb(255 255 255 / 0.2);
    color: #ffffff;
    font-size: 2rem;
}

@media (min-width: 1024px) {
    .gz-cover .gz-cover-avatar { width: 104px; height: 104px; }
}

.gz-cover-author .gz-cover-title { font-size: clamp(2.4rem, 6.5vw, 4.5rem); }

.gz-cover-link {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gz-cover-social { display: flex; flex-wrap: wrap; gap: 6px; }
.gz-cover-social:empty { display: none; }

.gz-cover-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 50%;
    background: rgb(255 255 255 / 0.14);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gz-cover-social a:hover { background: #ffffff; color: #0f172a; }
.gz-cover-social .gz-icon { width: 16px; height: 16px; }

/* Author switcher chips */
.gz-topic-author { padding-left: 5px; }

.gz-topics .gz-topic-avatar {
    width: 28px;
    height: 28px;
    border: 0;
    font-size: 0.8rem;
}

/* 9. Article
   ========================================================================== */

.gz-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: 3px;
    pointer-events: none;
}

.gz-progress-bar {
    display: block;
    height: 100%;
    background: var(--gz-accent);
    transform: scaleX(0);
    transform-origin: left;
}

.gz-article-head {
    padding-top: 48px;
    padding-bottom: 32px;
}

@media (min-width: 1024px) {
    .gz-article-head { padding-top: 72px; }
}

.gz-article-head .gz-tag { display: inline-block; margin-bottom: 18px; }

.gz-article-title {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.gz-article-excerpt {
    margin-top: 18px;
    color: var(--gz-muted);
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    line-height: 1.5;
}

.gz-byline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.gz-avatars { display: flex; }
.gz-avatars .gz-avatar + .gz-avatar { margin-left: -12px; }

.gz-byline-names { font-weight: 600; }
.gz-byline-names a:hover { color: var(--gz-accent-text); }
.gz-byline .gz-meta { margin-top: 2px; }
.gz-meta-comments:hover { color: var(--gz-accent-text); }
/* The count is filled by Ghost JS and stays empty at 0: only show the separator when it has text */
.gz-meta > .gz-meta-comments::before { content: none; }
.gz-count:not(:empty)::before { content: "·"; margin-inline: 8px; }

.gz-article-image { margin: 0 auto 8px; }

.gz-article-image img {
    width: 100%;
    border-radius: var(--gz-radius-lg);
}

.gz-full.gz-article-image img { border-radius: 0; }

.gz-article-image figcaption,
.gz-content figcaption {
    margin-top: 12px;
    padding-inline: var(--gz-gutter);
    color: var(--gz-muted);
    font-size: 0.85rem;
    text-align: center;
}

.gz-article-image figcaption a,
.gz-content figcaption a { text-decoration: underline; }

.gz-article-body {
    position: relative;
    padding-top: 40px;
}

/* Table of contents: collapsible box, moved to the left margin on large screens */
.gz-toc {
    width: 100%;
    max-width: calc(var(--gz-content) + 2 * var(--gz-gutter));
    margin: 0 auto 32px;
    padding-inline: var(--gz-gutter);
}

.gz-toc-box {
    border: 1px solid var(--gz-border);
    border-radius: var(--gz-radius);
    background: var(--gz-surface);
}

.gz-toc-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.gz-toc-summary::-webkit-details-marker { display: none; }

/* Chevron */
.gz-toc-summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid var(--gz-muted);
    border-bottom: 2px solid var(--gz-muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.gz-toc-box[open] .gz-toc-summary::after { transform: translateY(2px) rotate(-135deg); }

.gz-toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gz-toc-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gz-chip);
    color: var(--gz-muted);
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gz-toc-box nav { padding: 0 20px 16px; }

/* Each entry sits on a vertical rail: read sections and the current one are colored */
.gz-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.gz-toc-list li { counter-increment: toc; }

.gz-toc-list a {
    display: flex;
    gap: 10px;
    padding: 7px 0 7px 14px;
    border-left: 2px solid var(--gz-border);
    color: var(--gz-muted);
    font-size: 0.92rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.2s ease;
}

.gz-toc-list a::before {
    content: counter(toc, decimal-leading-zero);
    flex-shrink: 0;
    color: var(--gz-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1.6;
}

.gz-toc-list a:hover { color: var(--gz-text); }

.gz-toc-list a.is-read { border-left-color: color-mix(in srgb, var(--gz-accent) 35%, transparent); }
.gz-toc-list a.is-read::before { color: var(--gz-accent-text); }

.gz-toc-list a.is-active {
    border-left-color: var(--gz-accent);
    color: var(--gz-text);
    font-weight: 600;
}

.gz-toc-list a.is-active::before { color: var(--gz-accent-text); }

@media (min-width: 1500px) {
    .gz-toc {
        position: absolute;
        top: 40px;
        bottom: 0;
        left: calc(50% - var(--gz-content) / 2 - 120px - 240px);
        width: 210px;
        margin: 0;
        padding: 0;
    }

    /* In the margin the box is always open and follows the reader */
    .gz-toc-box {
        position: sticky;
        top: calc(var(--gz-header-h) + 32px);
        border: 0;
        background: none;
    }

    .gz-toc-summary { padding: 0 0 14px; cursor: default; pointer-events: none; }
    .gz-toc-summary::after { display: none; }
    .gz-toc-box nav { padding: 0; }
}

.gz-article-foot {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 40px;
    padding-bottom: 24px;
}

.gz-article-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.gz-share {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-block: 16px;
    border-block: 1px solid var(--gz-border);
}

.gz-share .gz-label { margin: 0 8px 0 0; }
.gz-share .gz-icon { width: 18px; height: 18px; }
.gz-copy.is-copied { background: var(--gz-accent); color: var(--gz-on-accent); }

.gz-author-card {
    display: flex;
    gap: 18px;
    padding: 22px;
    border-radius: var(--gz-radius);
    background: var(--gz-surface);
}

.gz-author-card-body { display: flex; flex-direction: column; gap: 8px; }
.gz-author-card-name { font-family: var(--gz-font-heading); font-size: 1.15rem; font-weight: 700; }
.gz-author-card-name a:hover { color: var(--gz-accent-text); }
.gz-author-card-bio { color: var(--gz-muted); font-size: 0.95rem; }

.gz-comments { padding-block: 32px; }

.gz-related { border-top: 1px solid var(--gz-border); margin-top: 32px; }

/* 10. Content (Koenig editor)
   ========================================================================== */

.gz-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--gz-gutter), 1fr)
        [wide-start] minmax(0, 120px)
        [main-start] min(var(--gz-content), calc(100% - 2 * var(--gz-gutter)))
        [main-end] minmax(0, 120px)
        [wide-end] minmax(var(--gz-gutter), 1fr)
        [full-end];
    font-size: 1.125rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.gz-content-wide {
    grid-template-columns:
        [full-start] minmax(var(--gz-gutter), 1fr)
        [wide-start main-start] min(calc(var(--gz-wide) + 240px), calc(100% - 2 * var(--gz-gutter)))
        [main-end wide-end] minmax(var(--gz-gutter), 1fr)
        [full-end];
}

.gz-content > * { grid-column: main; }
.gz-content > .kg-width-wide { grid-column: wide; }
.gz-content > .kg-width-full { grid-column: full; }
/* Ghost's toggle card icon is 20px: give it a 24px hit area */
.gz-content .kg-toggle-card-icon { min-width: 24px; min-height: 24px; }

.gz-content > * + * { margin-top: 1.5em; margin-bottom: 0; }
.gz-content > :first-child { margin-top: 0; }

.gz-content > h2 { margin-top: 2em; font-size: 1.85rem; }
.gz-content > h3 { margin-top: 1.75em; font-size: 1.45rem; }
.gz-content > h4 { margin-top: 1.5em; font-size: 1.2rem; }
.gz-content > h2 + *,
.gz-content > h3 + *,
.gz-content > h4 + * { margin-top: 0.75em; }

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

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

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

.gz-content ul,
.gz-content ol { padding-left: 1.4em; }
.gz-content li + li { margin-top: 0.4em; }
.gz-content li::marker { color: var(--gz-accent-text); }

.gz-content blockquote:not([class]) {
    margin-inline: 0;
    padding-left: 24px;
    border-left: 3px solid var(--gz-accent);
    font-size: 1.2rem;
    font-style: italic;
}

.gz-content blockquote.kg-blockquote-alt {
    margin-inline: 0;
    padding: 0.5em 1em;
    font-family: var(--gz-font-heading);
    font-size: 1.6rem;
    font-style: normal;
    line-height: 1.35;
    text-align: center;
}

.gz-content hr {
    width: 80px;
    height: 0;
    margin-block: 3em;
    border: 0;
    border-top: 2px solid var(--gz-border);
    justify-self: center;
}

.gz-content code:not(pre code) {
    padding: 0.15em 0.4em;
    border-radius: 6px;
    background: var(--gz-chip);
    font-size: 0.88em;
}

.gz-content pre {
    overflow-x: auto;
    padding: 20px;
    border-radius: var(--gz-radius);
    background: #0f172a;
    color: #e6eaf2;
    font-size: 0.9rem;
    line-height: 1.6;
}

.gz-content table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.gz-content th,
.gz-content td { padding: 10px 14px; border-bottom: 1px solid var(--gz-border); text-align: left; }
.gz-content th { font-weight: 700; }

.gz-content figure { margin-inline: 0; }
.gz-content .kg-image-card img { border-radius: 12px; }
.gz-content .kg-width-full img { border-radius: 0; }
.gz-content .kg-gallery-image img { border-radius: 10px; }

.gz-content .kg-callout-card,
.gz-content .kg-toggle-card,
.gz-content .kg-product-card-container { border-radius: var(--gz-radius); }

.gz-content .kg-bookmark-container { border-radius: var(--gz-radius); color: var(--gz-text); text-decoration: none; }

/* Members-only CTA injected by {{content}} */
.gz-content .gh-post-upgrade-cta-content { border-radius: var(--gz-radius-lg); }

/* Full-width card spacing (see @page docs) */
.gz-content > .kg-width-full + .kg-width-full:not(.kg-card-hascaption + .kg-width-full) { margin-top: 0; }
.gz-page .gz-content > .kg-width-full:first-child { margin-top: calc(-1 * 40px); }
.gz-page:not(:has(.gz-article-head)) .gz-content > .kg-width-full:first-child { margin-top: 0; }
.gz-page .gz-content > .kg-width-full:last-child:not(.kg-card-hascaption) { margin-bottom: -64px; }

.gz-page .gz-content { padding-bottom: 64px; }
.gz-page .gz-article-image { margin-bottom: 40px; }

/* 11. Newsletter
   ========================================================================== */

.gz-newsletter {
    width: 100%;
    max-width: calc(var(--gz-container) + 2 * var(--gz-gutter));
    margin: 56px auto 0;
    padding-inline: var(--gz-gutter);
}

.gz-newsletter-inner {
    display: grid;
    align-items: center;
    gap: 24px;
    padding: 36px 28px;
    border-radius: var(--gz-radius-lg);
    background: var(--gz-accent);
    color: var(--gz-on-accent);
}

/* Grid items default to min-width: auto, which let the form widen the block on mobile */
.gz-newsletter-inner > * { min-width: 0; }

@media (min-width: 1024px) {
    .gz-newsletter-inner { grid-template-columns: 1fr 1fr; gap: 48px; padding: 56px; }
}

.gz-newsletter-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.025em; }
.gz-newsletter-text { margin-top: 12px; font-size: 1.05rem; opacity: 0.9; }

.gz-newsletter .gz-form-row input { color: #0f172a; }
.gz-newsletter .gz-form-row { background: #ffffff; }
.gz-newsletter .gz-form-row input::placeholder { color: #556074; }


/* 12. Footer
   ========================================================================== */

.gz-footer {
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid var(--gz-border);
    background: var(--gz-surface);
}

.gz-footer-top {
    display: grid;
    gap: 40px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .gz-footer-top { grid-template-columns: 2fr 1fr 1fr; }
}

.gz-footer-about { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.gz-footer-text { max-width: 380px; color: var(--gz-muted); }

.gz-footer-heading {
    margin-bottom: 16px;
    font-family: var(--gz-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gz-muted);
}

.gz-footer-menu { margin: 0; padding: 0; list-style: none; }
.gz-footer-menu li + li { margin-top: 10px; }
.gz-footer-menu a { font-weight: 500; }
.gz-footer-menu a:hover { color: var(--gz-accent-text); }

.gz-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 24px;
    border-top: 1px solid var(--gz-border);
    color: var(--gz-muted);
    font-size: 0.85rem;
}

.gz-footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }

/* 13. Misc
   ========================================================================== */

.gz-error {
    padding-block: 80px 40px;
    text-align: center;
}

.gz-error-code {
    color: var(--gz-accent-text);
    font-family: var(--gz-font-heading);
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
}

.gz-error-title { margin: 16px 0 12px; font-size: clamp(1.5rem, 4vw, 2.25rem); }
.gz-error .gz-btn { margin-top: 28px; }

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

.gz-pagination[hidden] { display: none; }

@media (max-width: 639px) {
    .gz-slide .gz-meta > :last-child { display: none; }
}
