@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    --article-bg: #f7f4ee;
    --article-surface: #ffffff;
    --article-surface-soft: #f1ece3;
    --article-text: #1f1b16;
    --article-muted: #6d655c;
    --article-line: #ddd4c7;
    --article-line-strong: #c8bcab;
    --article-accent: #9d4b26;
    --article-accent-deep: #23352e;
    --article-max: 1120px;
    --article-prose: 720px;
    --article-radius-lg: 22px;
    --article-radius-md: 16px;
}

html {
    scroll-behavior: smooth;
}

body.article-shell-page {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    background: var(--article-bg);
    color: var(--article-text);
    font-family: "Manrope", sans-serif;
    line-height: 1.75;
}

.article-shell-page *,
.article-shell-page *::before,
.article-shell-page *::after {
    box-sizing: border-box;
}

.article-shell-page img {
    display: block;
    max-width: 100%;
}

.article-shell-page a {
    color: inherit;
    text-decoration: none;
}

.article-shell-page p,
.article-shell-page li,
.article-shell-page td,
.article-shell-page figcaption,
.article-shell-page blockquote {
    color: var(--article-muted);
}

.article-shell-page h1,
.article-shell-page h2,
.article-shell-page h3,
.article-shell-page h4 {
    margin: 0;
    color: var(--article-text);
    font-family: "Fraunces", serif;
    font-weight: 700;
    line-height: 1.1;
}

.article-shell-page .legacy-hidden,
.article-shell-page .hamburger,
.article-shell-page .navbar,
.article-shell-page .inline-navbar,
.article-shell-page #myBtn,
.article-shell-page > nav,
.article-shell-page script[src*="hamburger"],
.article-shell-page script[src*="top.js"] {
    display: none !important;
}

.article-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--article-max);
    margin: 0 auto 24px;
    padding: 18px 0 16px;
    background: var(--article-bg);
    border-bottom: 1px solid var(--article-line);
}

.article-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-weight: 800;
}

.article-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--article-text);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
}

.article-brand-text {
    font-size: 0.94rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-topbar nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-topbar nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--article-muted);
    font-weight: 700;
}

.article-topbar nav a:hover,
.article-topbar nav a:focus-visible {
    background: var(--article-surface-soft);
    color: var(--article-text);
}

.article-shell {
    display: grid;
    gap: 24px;
    max-width: var(--article-max);
    margin: 0 auto;
}

.article-panel {
    padding: 32px;
    background: var(--article-surface);
    border: 1px solid var(--article-line);
    border-radius: var(--article-radius-lg);
}

.article-hero,
.article-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.article-kicker,
.article-category-label {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 800;
}

.article-kicker {
    color: var(--article-accent);
}

.article-hero h1 {
    margin-top: 10px;
    max-width: 12ch;
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    letter-spacing: -0.06em;
}

.article-category-label {
    margin-top: 14px;
    color: var(--article-accent-deep);
}

.article-hero .article-dek {
    margin-top: 18px;
    max-width: 62ch;
    font-size: clamp(1.02rem, 1.9vw, 1.18rem);
}

.article-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.article-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--article-line);
    border-radius: 999px;
    background: #fff;
    color: var(--article-muted);
    font-weight: 700;
}

.article-hero-figure {
    display: grid;
    gap: 12px;
}

.article-hero-figure img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--article-radius-md);
}

.article-hero-figure figcaption {
    font-size: 0.94rem;
}

.article-prose {
    width: 100%;
    max-width: var(--article-prose);
}

.article-prose > *:first-child {
    margin-top: 0 !important;
}

.article-prose p,
.article-prose ul,
.article-prose ol,
.article-prose blockquote,
.article-prose table,
.article-prose details,
.article-prose .iframe-container,
.article-prose iframe,
.article-prose img,
.article-prose figure {
    margin-top: 18px;
}

.article-prose h2,
.article-prose h3,
.article-prose h4 {
    margin-top: 32px;
    letter-spacing: -0.03em;
}

.article-prose h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.article-prose h3 {
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}

.article-prose h4 {
    font-size: 1.16rem;
}

.article-prose a,
.article-aside-card a {
    color: var(--article-accent-deep);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

.article-prose ul,
.article-prose ol,
.article-aside-card ul {
    padding-left: 20px;
}

.article-prose li + li {
    margin-top: 8px;
}

.article-prose blockquote {
    margin-left: 0;
    padding: 16px 18px;
    border-left: 3px solid var(--article-accent);
    background: var(--article-surface-soft);
    border-radius: 0 12px 12px 0;
}

.article-prose table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.article-prose th,
.article-prose td {
    padding: 12px 14px;
    border: 1px solid var(--article-line);
    text-align: left;
}

.article-prose details {
    overflow: hidden;
    border: 1px solid var(--article-line);
    border-radius: 12px;
    background: #fff;
}

.article-prose summary {
    cursor: pointer;
    padding: 14px 16px;
    color: var(--article-text);
    font-weight: 800;
}

.article-prose details > *:not(summary) {
    padding-left: 16px;
    padding-right: 16px;
}

.article-prose details > *:last-child {
    padding-bottom: 16px;
}

.article-prose iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
}

.article-prose .iframe-container {
    overflow: hidden;
    border-radius: 12px;
}

.article-prose .iframe-container iframe {
    display: block;
    margin-top: 0;
}

.article-prose .article-link-note {
    max-width: 64ch !important;
    padding: 14px 16px;
    background: var(--article-surface-soft);
    border: 1px solid var(--article-line);
    border-radius: 12px;
    font-size: 0.95rem;
}

.article-prose .score,
.article-prose #tags ul,
.article-prose .blog-tag,
.article-prose .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-prose .score i,
.article-prose .glow-link {
    color: var(--article-accent);
}

.article-sidebar {
    display: grid;
    gap: 16px;
}

.article-aside-card {
    padding: 20px;
    background: #fcfbf8;
    border: 1px solid var(--article-line);
    border-radius: var(--article-radius-md);
}

.article-aside-card h2 {
    font-size: 1.16rem;
    letter-spacing: -0.02em;
}

.article-aside-card p,
.article-aside-card li,
.article-aside-card strong {
    font-size: 0.98rem;
}

.article-aside-card strong {
    color: var(--article-text);
}

.article-aside-card p + p,
.article-aside-card ul,
.article-meta-nav {
    margin-top: 12px;
}

.article-meta-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none !important;
}

.article-button.primary {
    background: var(--article-text);
    color: #fff;
}

.article-button.secondary {
    background: #fff;
    color: var(--article-text);
    border: 1px solid var(--article-line-strong);
}

@media (max-width: 980px) {
    .article-topbar,
    .article-hero,
    .article-body-grid {
        grid-template-columns: 1fr;
    }

    .article-topbar {
        position: static;
        padding-top: 0;
    }

    .article-hero h1 {
        max-width: none;
    }

    .article-prose {
        max-width: none;
    }
}

@media (max-width: 720px) {
    body.article-shell-page {
        padding: 16px 16px 96px;
    }

    .article-topbar {
        gap: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .article-brand {
        width: 100%;
        justify-content: center;
    }

    .article-topbar nav ul {
        justify-content: space-between;
        gap: 6px;
    }

    .article-topbar nav a {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 10px;
        font-size: 0.76rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .article-panel {
        padding: 20px;
    }

    .article-sidebar {
        display: none;
    }
}
