/* Jasmine for Ghost — screen.css */

/* ---------- Tokens ---------- */
:root {
    --bg: #F8FAF5;
    --surface: #FFFFFF;
    --surface-2: #EDF3EA;
    --ink: #10211A;
    --muted: #58695F;
    --line: #DCE5DB;
    --accent: var(--ghost-accent-color, #E9B824);
    --on-accent: #10211A;
    --shadow: 0 1px 2px rgba(16, 33, 26, .04), 0 18px 40px -22px rgba(16, 33, 26, .28);
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-head: var(--gh-font-heading, var(--font-serif));
    --font-body: var(--gh-font-body, var(--font-sans));
    --font-read: var(--gh-font-body, var(--font-serif));
    --r-card: 22px;
    --r-img: 16px;
    --pill: 999px;
    --wrap: 1200px;
    --header-h: 72px;
    color-scheme: light;
}
[data-theme="dark"] {
    --bg: #0B120F;
    --surface: #121C17;
    --surface-2: #18251E;
    --ink: #E9F1EB;
    --muted: #93A69A;
    --line: #24332B;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 1rem/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition: background-color .25s ease, color .25s ease;
}
body.menu-open { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.015em; margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: var(--pill); transition: top .2s; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--wrap) + 48px); margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: 792px; }
.container--wide { max-width: 1152px; }
.section { padding-block: 56px 88px; }
.section--tight { padding-block: 16px 24px; }
.section--first { padding-top: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-title { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.stack { display: grid; gap: 32px; }
.empty { text-align: center; padding: 64px 0; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }

/* ---------- Buttons & small UI ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 26px; border-radius: var(--pill);
    border: 1.5px solid transparent; background: transparent;
    font-weight: 600; font-size: .95rem; white-space: nowrap; cursor: pointer;
    transition: transform .15s ease, background-color .2s, color .2s, border-color .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { filter: brightness(1.15); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--outline-dark { border-color: var(--on-accent); color: var(--on-accent); }
.btn--sm { height: 40px; padding: 0 18px; font-size: .875rem; }
.btn .icon { width: 18px; height: 18px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
    transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.social { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.chip { display: inline-flex; align-items: center; padding: 0; background: none; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; transition: color .2s; }
.chip:hover { color: var(--ink); }
.icon-btn--plain { border: 0; background: transparent; border-radius: 10px; width: 40px; height: 40px; }
.icon-btn--plain:hover { background: var(--surface-2); }
[hidden] { display: none !important; }
.badge { font-size: .8125rem; font-weight: 600; color: var(--muted); }

.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 2px solid var(--surface); display: inline-grid; place-items: center; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 26px; height: 26px; border-width: 0; }
.avatar--fallback, .avatar .avatar--fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); }
.avatar--fallback .icon { width: 55%; height: 55%; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 8px; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand-logo { max-height: 34px; width: auto; max-width: 180px; object-fit: contain; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.primary-nav { margin-left: 28px; }
.primary-nav .nav-list { display: flex; gap: 2px; }
.nav-link { display: block; padding: 8px 12px; border-radius: var(--pill); font-weight: 500; font-size: .92rem; color: var(--muted); transition: color .2s, background-color .2s; }
.nav-link:hover, .nav-link.is-current { color: var(--ink); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.signin-link { padding: 8px 12px; font-size: .92rem; font-weight: 600; }
.signin-link:hover { text-decoration: underline; }
.header-actions .btn { margin-left: 4px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.menu-btn { display: none; }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

/* Header layouts (desktop) */
@media (min-width: 861px) {
    [data-nav="Logo on the right"] .primary-nav { order: 1; margin-left: 0; }
    [data-nav="Logo on the right"] .header-actions { order: 2; }
    [data-nav="Logo on the right"] .brand { order: 3; margin-left: 20px; }
    [data-nav="Stacked"] { --header-h: 108px; }
    [data-nav="Stacked"] .header-inner { flex-wrap: wrap; align-content: center; row-gap: 2px; }
    [data-nav="Stacked"] .brand { flex: 0 0 100%; justify-content: center; }
    [data-nav="Stacked"] .primary-nav { margin-left: -12px; }
    .mobile-menu { display: none !important; }
}

/* Mobile dropdown (instant, no animation) */
.mobile-menu { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 32px -24px rgba(0, 0, 0, .3); }
.mm-inner { padding-block: 4px 22px; }
.mm-nav .nav-list { display: grid; }
.mm-nav a { display: block; padding: 13px 2px; border-radius: 0; background: none; font-size: .95rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
.mm-nav a:hover { background: none; color: var(--muted); }
.mm-nav a.is-current { background: none; font-weight: 700; color: var(--ink); }
.mm-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0 4px; }
.mm-actions .signin-link { padding: 0; font-size: .9rem; color: var(--muted); }

/* Recommended tools */
.tools:not(:has(.tool)) { display: none; }
.tools-title { font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tools-list { display: grid; gap: 2px; }
.tool { display: grid; gap: 2px; padding: 10px 12px; margin-inline: -12px; border-radius: 12px; transition: background-color .2s; }
.tool:hover { background: var(--surface-2); }
.tool-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; }
.tool-name::after { content: "\2197"; font-size: .8em; opacity: .5; }
.tool-text { font-size: .85rem; line-height: 1.4; color: var(--muted); }
.tools--widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 22px 16px; }
.tools--menu { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.tools--menu .tool { margin-inline: 0; padding: 9px 0; }
.tools--menu .tool:hover { background: none; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 20px; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; max-width: 720px; }
.hero-title { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.hero-text { font-size: 1.05rem; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
.hero-form { width: 100%; max-width: 460px; margin-top: 6px; }

/* ---------- Subscribe form ---------- */
.sub-form { width: 100%; }
.sub-field { display: flex; gap: 8px; padding: 6px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.sub-field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.sub-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; height: 42px; outline: none; }
.sub-field input::placeholder { color: var(--muted); }
.sub-field .btn { height: 42px; padding: 0 22px; }
.sub-loading, .sub-msg { display: none; }
.sub-form.loading .sub-label { display: none; }
.sub-form.loading .sub-loading { display: inline; }
.sub-msg { margin-top: 12px; font-size: .9rem; text-align: left; padding-left: 16px; }
.sub-form.success .sub-msg--ok { display: block; color: #1f8a4c; }
.sub-form.error .sub-msg--err { display: block; color: #c0392b; }
[data-theme="dark"] .sub-form.success .sub-msg--ok { color: #6bd49b; }
[data-theme="dark"] .sub-form.error .sub-msg--err { color: #ff8b7e; }
.sub-member { color: var(--muted); font-size: .95rem; }
.hero .sub-member { font-size: 1rem; }

/* ---------- Categories ---------- */
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin-bottom: 18px; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: .9rem; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
.cat:hover { border-color: var(--ink); }
.cat.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-count { font-size: .75rem; opacity: .6; }

/* ---------- Cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 32px; }
.post-list { display: grid; gap: 36px; }
.card { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card-media { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: var(--r-img); overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--accent) 22%, var(--surface-2))); color: var(--ink); opacity: .9; }
.card-placeholder .icon { width: 44px; height: 44px; fill: currentColor; opacity: .35; }
.card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-top { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.card-title { font-size: 1.4rem; line-height: 1.22; text-wrap: balance; }
.card-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s; }
.card:hover .card-title a { background-size: 100% 1.5px; }
.card-excerpt { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.card-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.card-author:hover span { text-decoration: underline; }

.card--row { flex-direction: row; gap: 28px; align-items: center; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.card--row:last-child { border-bottom: 0; padding-bottom: 0; }
.card--row .card-media { width: 300px; flex: none; aspect-ratio: 4 / 3; }

.card--feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); align-items: stretch; }
.card--feature .card-media { aspect-ratio: auto; min-height: 340px; border-radius: 0; }
.card--feature .card-body { padding: 40px; justify-content: center; gap: 14px; }
.card--feature .card-title { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
.card--feature .card-excerpt { -webkit-line-clamp: 4; font-size: 1.05rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; }
.page-num { color: var(--muted); font-size: .9rem; }
.load-more { display: flex; justify-content: center; margin-top: 56px; }
.load-more .btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Post ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; opacity: .45; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); max-width: 38ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head { text-align: center; padding-top: 28px; max-width: 900px; }
.post-head .breadcrumbs ol { justify-content: center; }
.post-title { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.025em; margin-top: 22px; text-wrap: balance; }
.post-excerpt { margin: 18px auto 0; max-width: 62ch; font-size: 1.15rem; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.post-byline { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; max-width: 760px; margin: 28px auto 0; padding: 14px 0; border-block: 1px solid var(--line); text-align: left; }
.byline-author { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatars { display: flex; flex: none; }
.avatars .avatar { width: 42px; height: 42px; margin-left: -12px; border-color: var(--bg); }
.avatars .avatar:first-child { margin-left: 0; }
.byline-text { display: grid; gap: 1px; font-size: .84rem; color: var(--muted); min-width: 0; }
.author-name { font-weight: 700; font-size: .95rem; color: var(--ink); }
.author-name a:hover { text-decoration: underline; }
.share { display: flex; align-items: center; gap: 8px; flex: none; }
.share-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.share .icon-btn { width: 36px; height: 36px; }
.share .icon-btn .icon { width: 17px; height: 17px; }
.share .icon-check { display: none; }
.share .is-copied { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.share .is-copied .icon-link { display: none; }
.share .is-copied .icon-check { display: block; }
.post-cover { margin-top: 36px; }
.post-cover img { width: 100%; border-radius: 28px; max-height: 620px; object-fit: cover; }
.post-cover figcaption { text-align: center; color: var(--muted); font-size: .875rem; margin-top: 12px; }

/* One sidebar: table of contents, tools, CTA, subscribe, featured */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "toc" "main" "side"; gap: 28px; align-items: start; padding-block: 36px 80px; }
.post-main { grid-area: main; min-width: 0; }
.post-side { display: contents; }
.side-toc { grid-area: toc; }
.side-rest { grid-area: side; display: grid; gap: 20px; min-width: 0; }
.post-layout.no-toc { grid-template-areas: "main" "side"; }
@media (min-width: 1000px) {
    .post-layout, .post-layout.no-toc { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main side"; gap: 56px; }
    .post-side { display: grid; grid-area: side; gap: 20px; align-content: start; position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 2px; }
    .side-toc, .side-rest { grid-area: auto; }
}

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 20px; }
.toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc-title { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.toc-title .icon { width: 18px; height: 18px; }
.toc-pct { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -3px 4px 0 0; }
.toc[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.toc-list { position: relative; margin-top: 16px; padding-left: 18px; display: grid; gap: 2px; max-height: 38vh; overflow-y: auto; scrollbar-width: thin; }
.toc-list::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: var(--line); }
.toc-list a { display: block; padding: 7px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.4; color: var(--muted); transition: color .2s, background-color .2s; }
.toc-list a:hover { color: var(--ink); background: var(--surface-2); }
.toc-list a.is-active { color: var(--ink); font-weight: 600; background: color-mix(in srgb, var(--accent) 20%, transparent); box-shadow: -21px 0 0 -18px var(--accent); }
.toc-list .toc-sub a { padding-left: 26px; font-size: .85rem; }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-tags .chip { height: 32px; padding: 0 14px; border-radius: var(--pill); background: var(--surface-2); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .85rem; }
.post-tags .chip:hover { background: var(--line); }
.post-comments { margin-top: 56px; }

.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; position: relative; overflow: hidden; }
.widget-title { font-size: 1.2rem; margin-bottom: 8px; }
.widget p { color: var(--muted); font-size: .93rem; margin-bottom: 16px; }
.widget--cta { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.widget--cta p { color: inherit; opacity: .85; }
.widget--sub .sub-field { flex-direction: column; border-radius: 22px; }
.widget--sub .sub-field input { height: 44px; }
.widget--sub .sub-field .btn { width: 100%; }
.mini-list { display: grid; gap: 16px; }
.mini { display: flex; gap: 14px; align-items: center; }
.mini-media { flex: none; width: 68px; height: 68px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.mini-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-title { display: block; font-family: var(--font-head); font-weight: 600; line-height: 1.25; font-size: .96rem; }
.mini-title:hover { text-decoration: underline; }
.mini-date { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.related { border-top: 1px solid var(--line); padding-block: 56px 88px; }

/* ---------- Content (Koenig) ---------- */
.gh-content { font-family: var(--font-read); font-size: 1.1875rem; line-height: 1.75; word-wrap: break-word; }
.gh-content > * + * { margin-top: 1.5em; }
.gh-content h2, .gh-content h3, .gh-content h4 { margin-top: 2.2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.gh-content h2 + *, .gh-content h3 + * { margin-top: .8em; }
.gh-content h2 { font-size: 1.9rem; }
.gh-content h3 { font-size: 1.45rem; }
.gh-content h4 { font-size: 1.2rem; }
.gh-content a { color: color-mix(in srgb, var(--accent) 62%, var(--ink)); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: background-color .2s, text-decoration-color .2s; }
.gh-content a:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); text-decoration-color: currentColor; }
.gh-content a[class*="kg-"], .gh-content a[class*="kg-"]:hover { color: inherit; font-weight: inherit; text-decoration: none; background: none; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }
.gh-content li + li { margin-top: .4em; }
.gh-content blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--accent); font-size: 1.3rem; line-height: 1.55; font-style: italic; }
.gh-content hr { border: 0; height: 1px; background: var(--line); margin-block: 3em; }
.gh-content code { font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }
.gh-content pre { background: #0F1A15; color: #E6F0E9; padding: 20px 24px; border-radius: 16px; overflow-x: auto; line-height: 1.6; font-size: .9rem; }
.gh-content pre code { background: none; padding: 0; color: inherit; }
.gh-content img, .gh-content video { border-radius: var(--r-img); }
.gh-content figure { margin-inline: 0; }
.gh-content figcaption { text-align: center; color: var(--muted); font: .875rem var(--font-body); margin-top: 10px; }
.gh-content table { width: 100%; border-collapse: collapse; font: .95rem var(--font-body); display: block; overflow-x: auto; }
.gh-content th, .gh-content td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.gh-content .kg-width-wide, .gh-content .kg-width-full { width: 100%; max-width: 100%; margin-inline: 0; }
.gh-content .kg-image { margin-inline: auto; }
.gh-content .kg-card, .gh-content .kg-card * { font-family: var(--font-body); }
.gh-content .kg-button-card .kg-btn, .gh-content .kg-product-card-btn, .gh-content .kg-header-card-button { border-radius: var(--pill) !important; text-decoration: none; }
.gh-content .kg-callout-card { border-radius: 18px; }
.gh-content .kg-bookmark-container { border-radius: 18px; }

/* ---------- Archive (tag / author) ---------- */
.archive-head { padding-top: 28px; padding-bottom: 4px; }
.archive-title { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.02em; margin-top: 20px; }
.archive-desc { margin-top: 10px; max-width: 62ch; font-size: 1.05rem; color: var(--muted); text-wrap: pretty; }
.archive-count { margin-top: 10px; font-weight: 600; font-size: .85rem; color: var(--muted); }
.cat-bar--other { margin: 20px 0 0; padding-bottom: 4px; align-items: center; }
.cat-bar-label { font-size: .85rem; font-weight: 700; margin-right: 6px; white-space: nowrap; }

.author-hero { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 0 8px; }
.author-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--accent); }
.author-photo--fallback { display: grid; place-items: center; color: var(--muted); }
.author-photo--fallback .icon { width: 50%; height: 50%; }
.author-hero .archive-title { margin-top: 20px; font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.author-hero .archive-desc { margin-inline: auto; text-align: center; font-size: 1.1rem; }
.author-hero-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: center; font-size: .9rem; color: var(--muted); margin-top: 6px; }
.author-hero .social { justify-content: center; margin-top: 10px; }
.author-feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* ---------- Subscribe band ---------- */
.band { padding-bottom: 96px; }
.band-inner { background: var(--ink); color: var(--bg); border-radius: 36px; padding: clamp(36px, 6vw, 72px); text-align: center; display: grid; justify-items: center; gap: 16px; }
.band-title { font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 18ch; text-wrap: balance; }
.band-inner p { max-width: 52ch; opacity: .75; }
.band-inner .sub-form { max-width: 480px; margin-top: 12px; }
.band-inner .sub-field { background: color-mix(in srgb, var(--bg) 10%, transparent); border-color: color-mix(in srgb, var(--bg) 22%, transparent); }
.band-inner .sub-field input { color: var(--bg); }
.band-inner .sub-field input::placeholder { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.band-inner .sub-msg { color: var(--bg) !important; opacity: .85; }

/* ---------- 404 ---------- */
.nf { padding: 64px 0 24px; text-align: center; }
.nf-code { display: flex; justify-content: center; align-items: center; gap: clamp(4px, 1.5vw, 12px); font: 700 clamp(4rem, 13vw, 7.5rem)/.9 var(--font-head); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.nf-flower { display: inline-grid; place-items: center; width: .78em; height: .78em; color: var(--ink); animation: nf-spin 14s linear infinite; }
.nf-flower .icon { width: 100%; height: 100%; fill: currentColor; }
.nf-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-top: 22px; }
.nf-text { margin: 14px auto 0; max-width: 52ch; color: var(--muted); font-size: 1.1rem; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
@keyframes nf-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 48px; }
.footer-brand { display: grid; gap: 18px; align-content: start; }
.footer-desc { color: var(--muted); max-width: 38ch; }
.footer-title { font-family: var(--font-body); font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: 16px; }
.footer-list { display: grid; gap: 10px; color: var(--muted); }
.footer-list ul { display: grid; gap: 10px; }
.footer-list a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { color: var(--muted); margin-bottom: 16px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Carousel & overlay cards ---------- */
.featured .section-head { margin-bottom: 18px; }
.carousel-controls { display: flex; gap: 8px; }
.carousel-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.carousel-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.carousel-btn--prev .icon { transform: rotate(180deg); }
.carousel-track { position: relative; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 88%; min-width: 0; scroll-snap-align: start; display: flex; }
.carousel-slide .card { flex: 1; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: width .2s, background-color .2s; }
.carousel-dot.is-active { width: 24px; background: var(--ink); }
.featured.no-overflow .carousel-controls, .featured.no-overflow .carousel-dots { display: none; }
@media (min-width: 640px) { .carousel-slide { flex-basis: calc(62% - 10px); } }
@media (min-width: 1000px) { .carousel-slide { flex-basis: calc(50% - 10px); } }

.card--overlay { position: relative; justify-content: flex-end; gap: 0; min-height: 320px; border-radius: 24px; overflow: hidden; color: #fff; background: #16221c; isolation: isolate; }
.card--overlay .card-media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; z-index: -2; }
.card--overlay .card-placeholder { background: linear-gradient(135deg, #1b2a23, color-mix(in srgb, var(--accent) 40%, #1b2a23)); }
.card--overlay .card-placeholder .icon { color: #fff; }
.card--overlay::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6, 12, 9, .88) 0%, rgba(6, 12, 9, .45) 48%, rgba(6, 12, 9, 0) 78%); }
.card--overlay .card-body { padding: 24px; gap: 8px; }
.card--overlay .chip { position: relative; z-index: 2; color: rgba(255, 255, 255, .85); }
.card--overlay .chip:hover { color: #fff; }
.card--overlay .badge { display: none; }
.card--overlay .card-title { font-size: clamp(1.25rem, 2vw, 1.6rem); color: #fff; }
.card--overlay .card-title a { background: none; }
.card--overlay .card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card--overlay .card-excerpt { display: none; }
.card--overlay .card-meta { color: rgba(255, 255, 255, .78); margin-top: 2px; }
.card--overlay .card-author { color: #fff; position: relative; z-index: 2; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand, .footer-cta { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .primary-nav, .header-actions .btn, .header-actions .signin-link { display: none; }
    .menu-btn { display: inline-grid; }
    .author-feat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    :root { --header-h: 56px; }
    .container { padding-inline: 18px; }
    .brand { font-size: 1.15rem; }
    .brand-logo { max-height: 28px; max-width: 150px; }
    .icon-btn--plain { width: 38px; height: 38px; }
    .section { padding-block: 36px 60px; }
    .hero { padding: 32px 0 12px; }
    .post-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .card--row { flex-direction: column; align-items: stretch; gap: 18px; }
    .card--row .card-media { width: 100%; }
    .card--overlay { min-height: 280px; }
    .post-head { padding-top: 20px; }
    .share { width: 100%; }
    .gh-content { font-size: 1.125rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .pagination { flex-wrap: wrap; justify-content: center; }
    .nf { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .carousel-track { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
.page-body { padding-block: 56px 96px; }
.page-body--top { padding-top: 72px; }
