/* ==========================================================================
   Margin — v3 · modern reading destination
   Glass nav · gradient cover art · soft depth · rich dark mode
   ========================================================================== */

:root {
    --bg: #FAFAF7;
    --surface: #FFFFFF;
    --surface-2: #F2F2EC;
    --ink: #16181A;
    --ink-soft: #3F4347;
    --muted: #71767B;
    --line: rgba(20, 22, 24, 0.09);
    --accent: #059669;
    --accent-2: #0D9488;
    --accent-ink: #047857;
    --shadow-card: 0 1px 2px rgba(18, 20, 22, 0.04), 0 8px 24px -12px rgba(18, 20, 22, 0.18);
    --shadow-lift: 0 2px 4px rgba(18, 20, 22, 0.05), 0 20px 44px -16px rgba(18, 20, 22, 0.28);

    --c-tech: #3B82F6;
    --c-biz: #F59E0B;
    --c-money: #10B981;

    --serif: "Fraunces", Georgia, serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, monospace;

    --r-s: 12px;
    --r-m: 18px;
    --r-l: 26px;

    --wrap: 1152px;
    --narrow: 704px;
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --t: 220ms;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F1110;
        --surface: #17191A;
        --surface-2: #1D2021;
        --ink: #F0F1EE;
        --ink-soft: #C7CAC6;
        --muted: #8E938E;
        --line: rgba(240, 241, 238, 0.08);
        --accent: #34D399;
        --accent-2: #2DD4BF;
        --accent-ink: #34D399;
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -12px rgba(0, 0, 0, 0.55);
        --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.45), 0 24px 48px -16px rgba(0, 0, 0, 0.65);

        --c-tech: #60A5FA;
        --c-biz: #FBBF24;
        --c-money: #34D399;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

/* Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease);
}

.btn--solid {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn--solid:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 80%, transparent); }

.btn--ghost { border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--muted); color: var(--ink); }

.btn--inverse { background: rgba(255, 255, 255, 0.94); color: #14161a; }
.btn--inverse:hover { transform: translateY(-1px); background: #fff; }

.btn--lg { padding: 14px 26px; font-size: 0.95rem; }

/* Top bar
   ========================================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    height: 68px;
}

.topbar .site-nav { justify-self: center; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.icon-btn:hover { color: var(--ink); background: var(--surface-2); }

/* Mobile overlay menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: var(--bg);
    overflow-y: auto;
    padding: 24px 0 48px;
}

.mobile-menu.is-open { display: block; }
body.menu-open { overflow: hidden; }

.mobile-nav .nav { list-style: none; }

.mobile-nav .nav a {
    display: block;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.mobile-menu-label {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.mobile-topics { display: flex; flex-wrap: wrap; gap: 8px; }

.mobile-topics a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--surface-2);
    border-radius: 999px;
    padding: 8px 15px;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 32px;
}

.mobile-menu-actions .btn { justify-content: center; }

.nav-toggle .ic-close { display: none; }
.nav-toggle.is-open .ic-menu { display: none; }
.nav-toggle.is-open .ic-close { display: block; }

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
}

.brand-mark {
    display: block;
    flex: none;
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 45%, transparent));
}
.footer-brand .brand-mark { width: 20px; height: 20px; }

.site-nav .nav { list-style: none; display: flex; align-items: center; gap: 4px; }

.site-nav .nav a {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 999px;
    transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

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

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; background: none; border: none; color: var(--ink); cursor: pointer; padding: 8px; border-radius: 10px; }

/* Hero feature
   ========================================================================== */

.hero {
    padding-top: 64px;
    padding-bottom: 44px;
    background:
        radial-gradient(48rem 26rem at 18% -30%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.feature-body { max-width: 100%; }

.hero-rail {
    border-left: 1px solid var(--line);
    padding-left: 40px;
    display: flex;
    flex-direction: column;
}

.hero-rail-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.hero-rail-item { display: block; padding: 20px 0; border-bottom: 1px solid var(--line); }
.hero-rail-item:last-child { border-bottom: none; }

.hero-rail-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.hero-rail-tag.topic--technology { color: var(--c-tech); }
.hero-rail-tag.topic--business { color: color-mix(in srgb, var(--c-biz) 80%, var(--ink)); }

.hero-rail-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.28;
    letter-spacing: -0.014em;
    margin: 7px 0;
    transition: color var(--t) var(--ease);
}

.hero-rail-item:hover .hero-rail-title { color: var(--accent-ink); }
.hero-rail-meta { font-size: 0.8rem; font-weight: 500; color: var(--muted); }

/* Promise strip */
.promise {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 32px 0;
}

.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.promise-item { display: flex; gap: 14px; align-items: flex-start; }

.promise-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.promise-item h3 { font-size: 0.98rem; font-weight: 650; }
.promise-item p { margin-top: 4px; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }

/* Section bands */
.section-band { padding: 56px 24px 8px; }
.section-band[data-topic="technology"] { --tc: var(--c-tech); }
.section-band[data-topic="business"] { --tc: var(--c-biz); }
.section-band[data-topic="money"] { --tc: var(--c-money); }

.section-band-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    border-top: 3px solid var(--tc, var(--accent));
    padding-top: 18px;
    margin-bottom: 28px;
}

.section-band-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: -0.02em;
    color: var(--tc, var(--ink));
}

.section-band-blurb { margin-top: 6px; font-size: 0.95rem; color: var(--muted); max-width: 46ch; }

.section-band-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0 32px;
}

.band-card { border-top: 1px solid var(--line); padding: 20px 0; }
.band-card:first-child {
    grid-row: 1 / 3;
    grid-column: 1;
    border-top: none;
    padding-top: 0;
    padding-right: 32px;
    border-right: 1px solid var(--line);
}
.band-card:nth-child(2), .band-card:nth-child(3), .band-card:nth-child(4) { grid-column: 2 / 4; }

.band-lead-flag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tc, var(--accent-ink));
    margin-bottom: 10px;
}

.band-card-tags {
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 7px;
}

.band-card-title {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: -0.015em;
    transition: color var(--t) var(--ease);
}

.band-card:first-child .band-card-title { font-size: 1.55rem; }
.band-card:not(:first-child) .band-card-title { font-size: 1.1rem; }
.band-card:hover .band-card-title { color: var(--tc, var(--accent-ink)); }

.band-card-excerpt { margin-top: 12px; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }
.band-card-meta { margin-top: 12px; font-size: 0.8rem; font-weight: 500; color: var(--muted); }

.chip {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.feature-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.3rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.feature-title a { transition: color var(--t) var(--ease); }
.feature-title a:hover { color: var(--accent-ink); }

.feature-excerpt {
    margin-top: 20px;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--muted);
    max-width: 50ch;
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    flex-shrink: 0;
}

.byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.byline-name { font-size: 0.92rem; font-weight: 600; }
.byline-meta { font-size: 0.85rem; color: var(--muted); }

.feature .btn--lg { margin-top: 28px; }

/* Browse + card grid
   ========================================================================== */

.browse { padding-top: 56px; padding-bottom: 32px; }
.browse--paged { padding-top: 64px; padding-bottom: 96px; }

.browse-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.browse-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.browse-page { color: var(--muted); font-family: var(--sans); font-weight: 500; font-size: 1.05rem; }

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

.pill {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

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

.pill--tech { color: var(--c-tech); background: color-mix(in srgb, var(--c-tech) 12%, transparent); }
.pill--biz { color: color-mix(in srgb, var(--c-biz) 80%, var(--ink)); background: color-mix(in srgb, var(--c-biz) 14%, transparent); }
.pill--money { color: var(--accent-ink); background: color-mix(in srgb, var(--c-money) 13%, transparent); }

/* Toolbar: filters, search, sort
   ========================================================================== */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.pill.is-active { box-shadow: inset 0 0 0 1.5px currentColor; }

.pill:not(.pill--tech):not(.pill--biz):not(.pill--money) {
    color: var(--ink-soft);
    background: var(--surface-2);
}

.toolbar-tools { display: flex; align-items: center; gap: 10px; }

.pills--domains { margin: -10px 0 24px; }

.pill--domain {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 13px;
    color: var(--muted);
    background: var(--surface-2);
    transition: color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}

.pill--domain:hover { color: var(--ink); transform: translateY(-1px); }
.pill--domain.is-active { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1.5px currentColor; }

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 18px;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.search-btn:hover { transform: translateY(-1px); border-color: var(--muted); color: var(--ink); }

.seg {
    display: inline-flex;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
}

.seg-btn {
    font-family: var(--sans);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: none;
    border-radius: 999px;
    padding: 7px 15px;
    cursor: pointer;
    transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.seg-btn.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-card);
}

/* Rows — compact article list
   ========================================================================== */

.rows { display: flex; flex-direction: column; gap: 14px; }

.row {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.row-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 22px 26px;
}

.row-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 6px;
}

.row-topic {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.row-tag {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.row-tag::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--line);
    margin-right: 12px;
    vertical-align: middle;
}

.topic--technology { color: var(--c-tech); }
.topic--business { color: color-mix(in srgb, var(--c-biz) 80%, var(--ink)); }
.topic--money { color: var(--accent-ink); }

.row-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.28rem;
    line-height: 1.22;
    letter-spacing: -0.018em;
    text-wrap: balance;
    transition: color var(--t) var(--ease);
}

.row:hover .row-title { color: var(--accent-ink); }
.row.tag-technology:hover .row-title { color: var(--c-tech); }
.row.tag-business:hover .row-title { color: color-mix(in srgb, var(--c-biz) 80%, var(--ink)); }

.row-excerpt {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.row-meta { margin-top: 10px; font-size: 0.82rem; font-weight: 500; color: var(--muted); }

.row-arrow {
    color: var(--muted);
    padding-right: 12px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), color var(--t) var(--ease);
}

.row:hover .row-arrow { opacity: 1; transform: translateX(0); color: var(--accent-ink); }

/* Pager
   ========================================================================== */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 20px;
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}

a.pager-btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent-ink); }

.pager-btn.is-disabled { opacity: 0.4; box-shadow: none; }

.pager-status { font-size: 0.86rem; color: var(--muted); }
.pager-status strong { color: var(--ink); font-weight: 600; }

/* CTA cards
   ========================================================================== */

.cta { padding-top: 48px; padding-bottom: 96px; }

.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.cta-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-l);
    padding: 44px 40px;
    color: #fff;
}

.cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    opacity: 0.12;
    mix-blend-mode: overlay;
}

.cta-card--join { background: linear-gradient(130deg, #047857, #0D9488 55%, #10B981); }
.cta-card--write { background: linear-gradient(130deg, #1D4ED8, #6D28D9 60%, #8B5CF6); }

.cta-card h3 {
    position: relative;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.65rem;
    letter-spacing: -0.02em;
}

.cta-card p {
    position: relative;
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    max-width: 44ch;
}

.cta-card .btn { position: relative; margin-top: 24px; }

/* Tag / author heroes
   ========================================================================== */

.hero--archive { padding: 64px 24px 8px; }

.hero-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.hero-sub { margin-top: 14px; font-size: 1.1rem; color: var(--muted); max-width: 52ch; }

.post-feed { padding-top: 32px; padding-bottom: 96px; }

/* Article
   ========================================================================== */

.article { padding: 64px 0 48px; }

.article-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.tag-technology .article-tag { color: var(--c-tech); background: color-mix(in srgb, var(--c-tech) 12%, transparent); }
.tag-business .article-tag { color: color-mix(in srgb, var(--c-biz) 80%, var(--ink)); background: color-mix(in srgb, var(--c-biz) 14%, transparent); }

.article-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 1.3rem + 3vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.article-standfirst { margin-top: 20px; font-size: 1.18rem; line-height: 1.55; color: var(--muted); }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

.article-author { font-weight: 600; color: var(--ink-soft); }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); display: inline-block; }

.article-feature { max-width: 960px; margin: 48px auto 0; padding: 0 24px; }
.article-feature img { border-radius: var(--r-m); width: 100%; }
.article-feature figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); text-align: center; }

.article-content { padding-top: 44px; }

.gh-content > * + * { margin-top: 1.5em; }

.gh-content h2, .gh-content h3, .gh-content h4 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.22;
    margin-top: 2.1em;
}

.gh-content h2 { font-size: 1.75rem; }
.gh-content h3 { font-size: 1.4rem; }
.gh-content h4 { font-size: 1.15rem; }

.gh-content a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
    transition: text-decoration-color var(--t) var(--ease);
}

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

.gh-content blockquote {
    background: var(--surface-2);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--r-s) var(--r-s) 0;
    padding: 20px 24px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li { margin-top: 0.5em; }
.gh-content li::marker { color: var(--accent); }

.gh-content hr { border: none; height: 1px; background: var(--line); margin: 3em 0; }

.gh-content code {
    font-family: var(--mono);
    font-size: 0.85em;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.15em 0.4em;
}

.gh-content pre {
    background: #17191C;
    color: #E8EAED;
    border-radius: var(--r-m);
    padding: 20px 24px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.gh-content pre code { background: none; border: none; padding: 0; font-size: inherit; }

.gh-content figure figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); text-align: center; }
.gh-content img { border-radius: var(--r-m); }

.gh-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.gh-content th, .gh-content td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.gh-content th { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

.article-footer { padding-top: 40px; }
.article-footer-rule { height: 1px; background: var(--line); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }

.article-tags a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface-2);
    border-radius: 999px;
    padding: 7px 15px;
    transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

.article-tags a:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }

.read-next { padding: 24px 24px 64px; }

.read-next-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    max-width: var(--narrow);
    margin: 0 auto 14px;
}

.read-next-card {
    display: block;
    max-width: var(--narrow);
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 26px 30px;
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.read-next-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.read-next-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; }
.read-next-card p { margin-top: 8px; font-size: 0.92rem; color: var(--muted); }

/* Comments
   ========================================================================== */

.article-comments { padding: 8px 24px 96px; }
.article-comments-inner { max-width: var(--narrow); margin: 0 auto; }

.article-comments-head {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.018em;
    border-top: 1px solid var(--line);
    padding-top: 32px;
}

.article-comments-sub { margin: 8px 0 24px; font-size: 0.92rem; color: var(--muted); }

/* Footer
   ========================================================================== */

.footer { border-top: 1px solid var(--line); background: var(--surface); }

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
    gap: 64px;
    padding: 64px 0 48px;
}

.footer-cols {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr 1fr;
    gap: 40px;
}

.footer-tagline { margin-top: 16px; font-size: 0.92rem; line-height: 1.6; color: var(--muted); max-width: 38ch; }

.footer-follow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.follow-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 14px;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}

a.follow-pill:hover { color: var(--accent-ink); border-color: var(--accent); }
.follow-pill--static { cursor: default; color: var(--muted); font-weight: 500; }

.footer-topics { columns: 2; column-gap: 24px; }
.footer-topics .footer-link { break-inside: avoid; }

.footer-head {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-col .nav { list-style: none; }
.footer-col .nav li { margin-bottom: 10px; }

.footer-col .nav a, .footer-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color var(--t) var(--ease);
}

.footer-col .nav a:hover, .footer-link:hover { color: var(--accent-ink); }
.footer-link { display: block; margin-bottom: 10px; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    border-top: 1px solid var(--line);
    padding: 20px 0 32px;
    font-size: 0.82rem;
    color: var(--muted);
}

.footer-legal a { transition: color var(--t) var(--ease); }
.footer-legal a:hover { color: var(--accent-ink); }

/* Auth pages (join / signin)
   ========================================================================== */

.auth { padding-top: 56px; padding-bottom: 96px; }

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
    max-width: 1024px;
    margin: 0 auto;
}

.auth-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.7rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.auth-points { list-style: none; margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }

.auth-points li { display: flex; gap: 12px; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }
.auth-points strong { font-weight: 650; color: var(--ink); }

.auth-point-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    border-radius: 50%;
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.auth-quote {
    margin-top: 32px;
    padding-left: 18px;
    border-left: 3px solid var(--accent);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--muted);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--shadow-lift);
    padding: 40px;
}

.auth-card-title { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.018em; }
.auth-card-sub { margin-top: 10px; font-size: 0.92rem; line-height: 1.6; color: var(--muted); }

.auth-form { margin-top: 24px; }

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.auth-submit { width: 100%; justify-content: center; margin-top: 14px; }

.auth-form .btn-loading { display: none; }
.auth-form.loading .btn-default { display: none; }
.auth-form.loading .btn-loading { display: inline; }

.auth-error { display: none; margin-top: 12px; font-size: 0.88rem; color: #DC2626; }
.auth-form.error .auth-error { display: block; }

.auth-form .form-success { display: none; text-align: center; padding: 12px 0 4px; }
.auth-form.success .form-body { display: none; }
.auth-form.success .form-success { display: block; }

.auth-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    margin-bottom: 14px;
}

.auth-form .form-success h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.auth-form .form-success p { margin-top: 8px; font-size: 0.92rem; line-height: 1.6; color: var(--muted); }

.auth-alt { margin-top: 22px; font-size: 0.92rem; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--accent-ink); font-weight: 600; }

.auth-fine { margin-top: 12px; font-size: 0.78rem; color: var(--muted); text-align: center; }
.auth-fine a { text-decoration: underline; text-underline-offset: 2px; }

/* Homepage discovery: starters + explore
   ========================================================================== */

.section-kicker {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 8px;
}

.section-title { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; letter-spacing: -0.02em; }
.section-sub { margin-top: 8px; font-size: 0.95rem; color: var(--muted); max-width: 50ch; }

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

.section-more:hover { text-decoration: underline; text-underline-offset: 4px; }

.starters {
    margin-top: 24px;
    padding: 64px 0;
    background:
        radial-gradient(44rem 22rem at 85% -20%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
        var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.starters-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.starters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.starter-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.starter-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.starter-num {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--accent-ink);
    opacity: 0.85;
    min-width: 30px;
}

.starter-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3;
    letter-spacing: -0.012em;
    transition: color var(--t) var(--ease);
}

.starter-card:hover .starter-title { color: var(--accent-ink); }
.starter-meta { margin-top: 6px; font-size: 0.8rem; font-weight: 500; color: var(--muted); }

.disc {
    margin-top: 24px;
    padding: 64px 0;
    background:
        radial-gradient(46rem 22rem at 15% -30%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
        var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.disc-head { margin-bottom: 28px; }

.disc-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.disc-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 26px 26px 22px;
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.disc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.disc-quote {
    position: relative;
    font-family: var(--serif);
    font-size: 1.06rem;
    line-height: 1.5;
    letter-spacing: -0.006em;
    color: var(--ink);
    padding-top: 18px;
}

.disc-quote::before {
    content: "\201C";
    position: absolute;
    top: -6px;
    left: -2px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 2.6rem;
    line-height: 1;
    color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.disc-card .disc-quote { transition: color var(--t) var(--ease); }
.disc-card:hover .disc-quote { color: var(--accent-ink); }

.disc-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
}

.disc-arrow {
    margin-left: auto;
    color: var(--muted);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), color var(--t) var(--ease);
}
.disc-card:hover .disc-arrow { opacity: 1; transform: translateX(0); color: var(--accent-ink); }

.disc-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(140deg, hsl(var(--h, 160) 55% 42%), hsl(calc(var(--h, 160) + 26) 60% 38%));
}

.disc-who { display: flex; flex-direction: column; min-width: 0; }
.disc-name { font-size: 0.92rem; font-weight: 650; color: var(--ink); }
.disc-on {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color var(--t) var(--ease);
}
.disc-on:hover { color: var(--accent-ink); }

@media (max-width: 960px) { .disc-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .disc-cards { grid-template-columns: 1fr; } .disc { padding: 44px 0; } }

.explore { padding-top: 64px; padding-bottom: 24px; }

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.topic-panel {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 24px 26px;
    box-shadow: var(--shadow-card);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.topic-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.topic-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.topic-panel-name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.014em; }
.topic-panel-name a:hover { color: var(--accent-ink); }
.topic-panel-count { font-size: 0.78rem; font-weight: 500; color: var(--muted); white-space: nowrap; }

.topic-panel-list { list-style: none; margin-top: 14px; flex: 1; }

.topic-panel-list li { border-top: 1px solid var(--line); }

.topic-panel-list a {
    display: block;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink-soft);
    transition: color var(--t) var(--ease);
}

.topic-panel-list a:hover { color: var(--accent-ink); }

.topic-panel-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-ink);
}

.topic-panel-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .explore-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .auth-grid { gap: 48px; }
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-rail { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
    .section-band-grid { grid-template-columns: 1fr 1fr; }
    .band-card:first-child { grid-row: auto; grid-column: 1 / 3; border-right: none; padding-right: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
    .band-card:nth-child(2), .band-card:nth-child(3), .band-card:nth-child(4) { grid-column: auto; }
}

@media (max-width: 900px) {
    .topbar .site-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .auth-grid { grid-template-columns: 1fr; gap: 40px; max-width: 560px; }
    .auth { padding-top: 40px; }
    .starters-grid { grid-template-columns: 1fr; }
    .promise-grid { grid-template-columns: 1fr; gap: 20px; }
    .feature-body { max-width: 100%; }
    .hero { padding-top: 48px; }
}

/* Phones */
@media (max-width: 700px) {
    .topbar-inner { height: 60px; gap: 12px; }
    .mobile-menu { top: 60px; }

    .row-link { grid-template-columns: minmax(0, 1fr); padding: 18px 20px; }
    .row-arrow { display: none; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-tools { justify-content: space-between; }
    .cta-grid { grid-template-columns: 1fr; }
    .cta-card { padding: 32px 26px; }
    .explore-grid { grid-template-columns: 1fr; }
    .section-band-grid { grid-template-columns: 1fr; }
    .band-card:first-child { grid-column: 1; }
    .starters { padding: 44px 0; }
    .starters-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-cols { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .auth-card { padding: 28px 22px; }
}

@media (max-width: 560px) {
    .topbar-signin { display: none; }
    .topbar-actions .btn--solid { padding: 9px 15px; font-size: 0.85rem; }
    .wordmark { font-size: 1.25rem; }
    .feature-title { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}

/* ── Advertising slots ─────────────────────────────────────────────
   Understated, labelled, height-reserved to avoid layout shift (CLS). */
.ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 3rem auto;
    max-width: 100%;
}
.ad__label {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.7;
}
.ad__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--ad-h, 90px);
    overflow: hidden;
}
.ad__frame > div { max-width: 100%; }

.ad--leader { --ad-h: 90px; }
.ad--box    { --ad-h: 250px; }
.ad--mobile { --ad-h: 50px; }
.ad--native { --ad-h: 0; gap: 10px; margin-top: 3.25rem; }
.ad--native .ad__frame { min-height: 0; }

/* In-article units sit tighter to the text and are set off by hairlines */
.ad--in {
    margin: 2.25rem auto;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.ad-leader-wrap { margin-top: 1.25rem; margin-bottom: -0.5rem; }
.ad-native-wrap {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

/* Explicit desktop / mobile switching (single breakpoint per the plan) */
.ad-desktop { display: block; }
.ad-mobile  { display: none; }
@media (max-width: 799px) {
    .ad-desktop { display: none; }
    .ad-mobile  { display: block; }
}

/* ── Partner / affiliate recommendations ───────────────────────────
   Fills its container (narrow in-article, full-width on home/tag/footer);
   responsive auto-fill grid; per-tool gradient monograms for identity. */
.recos {
    width: 100%;
    margin: 3rem 0 0;
    padding: 1.9rem 1.9rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    background:
        radial-gradient(120% 150% at 0% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 58%),
        radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--accent-2) 6%, transparent), transparent 55%),
        var(--surface);
    box-shadow: var(--shadow-card);
}
.recos-label {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 1.25rem;
}
.recos-label::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 3px 10px -3px color-mix(in srgb, var(--accent) 75%, transparent);
}
.recos-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.reco-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent) 4%, var(--surface)));
    box-shadow: 0 1px 2px rgba(18, 20, 22, 0.04);
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.reco-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity var(--t) var(--ease);
}
.reco-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    box-shadow: var(--shadow-lift);
}
.reco-card:hover::before { opacity: 1; }
.reco-top { display: flex; align-items: center; gap: 11px; }
.reco-avatar {
    flex: none;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35);
}
.reco-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.reco-blurb {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ink-soft);
}
.reco-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-ink);
}
.reco-arrow { transition: transform var(--t) var(--ease); }
.reco-card:hover .reco-arrow { transform: translateX(4px); }
.recos-disc {
    margin-top: 1.3rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--muted);
}

/* In-feed ad (listing pages): tidy framed row that sits among post cards */
.ad--feed {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: var(--surface);
}

/* Context recommendation blocks (tag pages, homepage) fill the page width */
.reco-context-wrap { display: block; }
.reco-context-wrap .recos { margin: 2.5rem 0; }

/* Inline mid-article recommendation — an editorial accent callout, not an ad */
.reco-inline {
    max-width: var(--narrow);
    margin: 2.5rem auto;
    padding: 1.4rem 1.6rem;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-left: 3px solid var(--accent);
    border-radius: var(--r-m);
    background:
        radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
        var(--surface);
    box-shadow: var(--shadow-card);
}
.reco-inline-kicker {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 0.7rem;
}
.reco-inline .reco-card {
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
    gap: 8px;
}
.reco-inline .reco-card::before { display: none; }
.reco-inline .reco-card:hover { transform: none; box-shadow: none; }

/* Site-wide footer affiliate strip — present on every content page */
.footer-recos { margin: 3.5rem 0 0; }

/* Sticky bottom anchor ad — persistent, highest viewability */
.ad-anchor {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 8px 46px 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 28px -14px rgba(0,0,0,0.45);
}
.ad-anchor.is-live { display: flex; }
.ad-anchor__inner { display: flex; justify-content: center; }
.ad-anchor .ad { margin: 0; }
.ad-anchor .ad__label { display: none; }
.ad-anchor .ad__frame { min-height: 0; }
.ad-anchor__x {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 17px; line-height: 1;
    cursor: pointer;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.ad-anchor__x:hover { color: var(--ink); border-color: var(--muted); }
body.has-anchor { padding-bottom: 104px; }
