/* MOOMEAN theme v1.0.0 — generated from assets/css/screen.css */
:root {
    --bg: #0b0f17;
    --bg-soft: #111827;
    --panel: rgba(255, 255, 255, 0.065);
    --panel-strong: rgba(255, 255, 255, 0.09);
    --panel-dark: rgba(0, 0, 0, 0.16);
    --border: rgba(255, 255, 255, 0.11);
    --border-hover: rgba(158, 231, 255, 0.30);
    --text: rgba(255, 255, 255, 0.94);
    --muted: rgba(255, 255, 255, 0.70);
    --muted-2: rgba(255, 255, 255, 0.48);
    --accent: #9ee7ff;
    --accent-2: #b9a6ff;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
    --radius: 24px;
    --radius-small: 16px;
    --max: 1440px;
    --reading: 760px;
    --header-height: 76px;
    --font: var(--gh-font-body, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    --heading-font: var(--gh-font-heading, var(--font));
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    overflow-wrap: anywhere;
    color: var(--text);
    background:
        radial-gradient(1000px 520px at 8% 5%, rgba(158, 231, 255, 0.12), transparent 60%),
        radial-gradient(900px 560px at 93% 7%, rgba(185, 166, 255, 0.11), transparent 58%),
        radial-gradient(800px 680px at 50% 110%, rgba(255, 255, 255, 0.045), transparent 62%),
        var(--bg);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); }

img, picture, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

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

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #071017;
    background: var(--accent);
    font-weight: 750;
    transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-page { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
    position: relative;
    z-index: 100;
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 14px 6px;
}

.site-brand {
    flex: 0 0 auto;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.site-navigation { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.site-navigation a {
    position: relative;
    padding: 10px 0;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    transition: color 150ms ease;
}
.site-navigation a:hover, .site-navigation a.is-current { color: var(--text); }
.site-navigation a.is-current::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 1px;
    background: var(--accent);
}
.nav-toggle { display: none; }

.blog-shell, .archive-shell, .page-shell, .article-shell, .error-shell {
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    box-shadow: var(--shadow);
    overflow: clip;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.blog-shell { padding: 38px 44px 42px; }
.blog-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 52px;
    align-items: center;
    padding: 4px 24px 28px;
}
.blog-hero::before {
    content: "";
    position: absolute;
    inset: -40px -44px 0;
    z-index: -1;
    background:
        radial-gradient(600px 180px at 18% 0, rgba(158, 231, 255, 0.13), transparent 64%),
        radial-gradient(520px 180px at 88% 0, rgba(185, 166, 255, 0.12), transparent 64%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 780;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 25px; height: 1px; background: currentColor; opacity: 0.78; }
.eyebrow.plain { margin: 0 0 8px; }
.eyebrow.plain::before { display: none; }

.blog-hero h1, .archive-header h1, .page-header h1, .error-card h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(40px, 5vw, 70px);
    font-weight: 680;
    letter-spacing: -0.045em;
    line-height: 1.02;
}
.blog-hero-copy > p, .archive-header > p, .archive-header > div > p, .page-header > p, .error-card > p {
    max-width: 650px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 1.7vw, 21px);
    line-height: 1.5;
}

.blog-hero-image, .blog-hero-art {
    width: 100%;
    aspect-ratio: 2 / 0.95;
    padding: 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(158, 231, 255, 0.17), rgba(185, 166, 255, 0.11), rgba(255, 255, 255, 0.03));
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}
.blog-hero-image img { width: 100%; height: 100%; border-radius: 17px; object-fit: cover; }
.blog-hero-art { display: grid; place-items: center; }
.blog-hero-art span {
    color: rgba(255, 255, 255, 0.48);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 1.02;
    text-align: center;
}

.topic-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}
.topic-nav { display: flex; min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; gap: 9px; padding: 2px 0 6px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--border-hover) transparent; scrollbar-width: thin; }
.topic-nav::-webkit-scrollbar { height: 5px; }
.topic-nav::-webkit-scrollbar-track { background: transparent; }
.topic-nav::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--border-hover); }
.topic-nav a, .tag-list a {
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.14);
    font-size: 13px;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.topic-nav a { flex: 0 0 auto; }
.topic-nav a:hover, .tag-list a:hover { color: var(--text); border-color: var(--border-hover); }
.topic-nav a.is-active { color: var(--text); border-color: var(--border-hover); background: linear-gradient(135deg, rgba(158, 231, 255, 0.15), rgba(185, 166, 255, 0.12)); }

.blog-context { min-width: 0; }
.blog-context .topic-nav { width: 100%; }
.tag-shell { padding-top: 28px; }
.tag-blog-context { margin-bottom: 34px; }
.article-blog-context { margin: 0 0 22px; padding: 2px 8px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.075); }
.blog-breadcrumbs { min-width: 0; margin-top: 11px; color: var(--muted-2); font-size: 12px; }
.blog-breadcrumbs ol { display: flex; min-width: 0; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.blog-breadcrumbs li { display: flex; min-width: 0; align-items: center; }
.blog-breadcrumbs li:last-child { flex: 1 1 auto; }
.blog-breadcrumbs li + li::before { margin: 0 8px; color: rgba(255, 255, 255, 0.26); content: "/"; }
.blog-breadcrumbs a { color: var(--muted); }
.blog-breadcrumbs a:hover { color: var(--accent); }
.breadcrumb-current { display: block; min-width: 0; overflow: hidden; color: var(--muted-2); text-overflow: ellipsis; white-space: nowrap; }

.search-button {
    display: flex;
    min-width: 248px;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--muted-2);
    background: rgba(0, 0, 0, 0.13);
    cursor: pointer;
}
.search-button:hover { color: var(--text); border-color: var(--border-hover); }
.search-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.search-button span { flex: 1; text-align: left; }
.search-button kbd { color: var(--muted-2); font-size: 10px; }

.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 24px; padding-top: 28px; }
.blog-layout.without-sidebar { grid-template-columns: minmax(0, 1fr); }
.blog-feed { min-width: 0; }

.featured-card, .post-card, .sidebar-card, .toc-card, .share-card, .article-related, .error-card {
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
}
.featured-card { overflow: hidden; border-radius: 19px; }
.featured-card-link { display: grid; grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.25fr); min-height: 340px; }
.featured-media { min-height: 100%; overflow: hidden; background: var(--bg-soft); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.featured-card:hover .featured-media img { transform: scale(1.018); }
.featured-copy { display: flex; flex-direction: column; justify-content: center; padding: 36px; }
.featured-copy h2 { margin: 0; font-size: clamp(24px, 2.8vw, 40px); letter-spacing: -0.035em; line-height: 1.08; }
.featured-copy > p { margin: 15px 0 20px; color: var(--muted); font-size: 16px; }

.post-card-placeholder {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 25% 25%, rgba(158, 231, 255, 0.18), transparent 38%),
        radial-gradient(circle at 75% 70%, rgba(185, 166, 255, 0.17), transparent 40%),
        #111722;
}
.post-card-placeholder span { color: rgba(255, 255, 255, 0.23); font-size: 12px; font-weight: 750; letter-spacing: 0.18em; }

.recent-section { margin-top: 30px; }
.section-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.section-heading > span { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.post-grid, .archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.post-card { min-width: 0; overflow: hidden; border-radius: 18px; transition: transform 150ms ease, border-color 150ms ease, background 150ms ease; }
.post-card:hover { transform: translateY(-2px); border-color: var(--border-hover); background: rgba(0, 0, 0, 0.22); }
.post-card-link { display: flex; height: 100%; flex-direction: column; }
.post-card-media { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.post-card:hover .post-card-media img { transform: scale(1.022); }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.post-card-body h3 { margin: 0; font-size: 19px; letter-spacing: -0.025em; line-height: 1.18; }
.post-card-body > p { display: -webkit-box; margin: 10px 0 16px; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; color: var(--muted-2); font-size: 12px; }

.blog-sidebar { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card { border-radius: 18px; padding: 23px; }
.sidebar-card h2 { margin: 0 0 12px; font-size: 19px; letter-spacing: -0.02em; }
.sidebar-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.button-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.13);
    font-size: 13px;
    font-weight: 680;
    cursor: pointer;
}
.button-link:hover, .button-link.primary { border-color: var(--border-hover); background: linear-gradient(135deg, rgba(158, 231, 255, 0.14), rgba(185, 166, 255, 0.11)); }
.topic-counts { display: grid; gap: 7px; }
.topic-counts a { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); font-size: 13px; }
.topic-counts a:hover { color: var(--text); border-color: var(--border-hover); }
.topic-counts a span:last-child { color: var(--muted-2); font-variant-numeric: tabular-nums; }

.pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; margin-top: 30px; }
.pagination > div:last-child { text-align: right; }
.page-number { color: var(--muted-2); font-size: 12px; }

.archive-shell, .page-shell, .error-shell { padding: clamp(34px, 6vw, 76px); }
.archive-header, .page-header { position: relative; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.archive-header.has-tag-image { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr); gap: clamp(34px, 5vw, 72px); align-items: center; }
.archive-header-copy { min-width: 0; }
.archive-header h1, .page-header h1 { font-size: clamp(38px, 5vw, 64px); }
.archive-count { display: inline-block; margin-top: 20px; color: var(--muted-2); font-size: 13px; }
.tag-header-image { width: 100%; margin: 0; padding: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px; aspect-ratio: 16 / 9; background: linear-gradient(145deg, rgba(158, 231, 255, 0.12), rgba(185, 166, 255, 0.08), rgba(255, 255, 255, 0.025)); box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26); }
.tag-header-image picture, .tag-header-image img { width: 100%; height: 100%; }
.tag-header-image img { border-radius: 14px; object-fit: cover; }
.archive-grid { margin-top: 34px; }
.author-header { display: flex; align-items: center; gap: 26px; }
.author-image { width: 128px; height: 128px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 28px; object-fit: cover; }

.article-shell { padding: 22px; }
.article-layout { display: grid; grid-template-columns: 210px minmax(0, var(--reading)) 230px; justify-content: center; gap: 32px; align-items: start; }
.article-left, .article-related { position: sticky; top: 20px; }
.article-left { display: grid; gap: 14px; }
.toc-card, .share-card, .article-related { border-radius: 16px; padding: 18px; }
.toc-card[hidden] { display: none; }
.toc-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 11px;
    border: 0;
    color: var(--muted-2);
    background: none;
    font-size: 10px;
    font-weight: 780;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}
.toc-toggle span { transition: transform 150ms ease; }
.toc-toggle[aria-expanded="false"] span { transform: rotate(-90deg); }
#article-toc ol { margin: 0; padding: 0; list-style: none; }
#article-toc li { border-left: 1px solid var(--border); }
#article-toc li.is-nested a { padding-left: 20px; font-size: 11px; }
#article-toc a { display: block; padding: 5px 8px 5px 12px; color: var(--muted); font-size: 12px; line-height: 1.35; }
#article-toc a:hover, #article-toc a.is-active { margin-left: -1px; color: var(--text); border-left: 2px solid var(--accent); }
.share-card h2, .article-related > h2, .article-tags h2 { margin: 0 0 12px; color: var(--muted-2); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.share-actions { display: flex; gap: 4px; }
.share-actions a, .share-actions button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: var(--panel); cursor: pointer; }
.share-actions a:hover, .share-actions button:hover, .share-actions button.is-copied { color: var(--accent); border-color: var(--border-hover); }
.share-actions svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.copy-status { min-height: 1.4em; margin: 8px 0 0; color: var(--accent); font-size: 11px; }
.share-popover {
    position: fixed;
    z-index: 1300;
    display: grid;
    width: min(220px, calc(100vw - 24px));
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    background: rgba(11, 15, 23, 0.985);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.share-popover[hidden] { display: none; }
.share-popover > strong { padding: 5px 9px 8px; color: var(--muted-2); font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; }
.share-popover a, .share-popover button { display: flex; min-height: 38px; align-items: center; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 13px; text-align: left; cursor: pointer; }
.share-popover a:hover, .share-popover button:hover, .share-popover a:focus-visible, .share-popover button:focus-visible { color: var(--text); background: var(--panel); }
.share-popover [data-native-share] { margin-top: 5px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }

.article-main { min-width: 0; }
.article-header { padding: 18px 0 24px; }
.article-header h1 { margin: 0; font-size: clamp(42px, 5.1vw, 72px); font-weight: 690; letter-spacing: -0.048em; line-height: 1.015; }
.article-excerpt { margin: 18px 0 22px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.48; }
.article-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.article-author { display: flex; align-items: center; gap: 11px; }
.article-author img, .author-fallback { width: 44px; height: 44px; border: 1px solid var(--border-hover); border-radius: 50%; object-fit: cover; }
.author-fallback { display: grid; overflow: hidden; place-items: center; color: var(--accent); background: var(--panel); font-size: 0; }
.author-fallback::before { content: "M"; font-size: 16px; font-weight: 750; }
.article-author strong, .article-author small { display: block; }
.article-author strong { font-size: 13px; }
.article-author small, .article-dates { color: var(--muted-2); font-size: 11px; }
.article-dates { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 13px; }
.article-feature { margin: 0 0 36px; }
.article-feature picture, .article-feature > img { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--bg-soft); }
.article-feature img { width: 100%; max-height: 640px; object-fit: cover; }
.article-feature figcaption { margin-top: 8px; color: var(--muted-2); font-size: 11px; text-align: center; }
.article-feature figcaption a { color: var(--accent); text-decoration: underline; }

.article-related { display: grid; gap: 9px; }
.related-card { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; align-items: center; }
.related-card:not(:has(img)) { grid-template-columns: 1fr; }
.related-card img { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; }
.related-card strong, .related-card small { display: block; }
.related-card strong { font-size: 12px; line-height: 1.25; }
.related-card small { margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.related-card:hover strong { color: var(--accent); }
.related-empty { margin: 0; color: var(--muted-2); font-size: 12px; }
.article-tags { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list a { min-height: 30px; padding: 5px 9px; font-size: 11px; }

.post-content { font-size: 18px; line-height: 1.78; }
.post-content > * { max-width: 100%; }
.post-content > :first-child { margin-top: 0; }
.post-content > :last-child { margin-bottom: 0; }
.post-content p, .post-content ul, .post-content ol { margin: 0 0 1.35em; color: rgba(255, 255, 255, 0.80); }
.post-content h2, .post-content h3, .post-content h4 { color: var(--text); letter-spacing: -0.025em; line-height: 1.18; text-wrap: balance; }
.post-content h2 { margin: 2.1em 0 0.7em; font-size: clamp(28px, 3.2vw, 40px); }
.post-content h3 { margin: 1.8em 0 0.65em; font-size: clamp(23px, 2.5vw, 31px); }
.post-content h4 { margin: 1.6em 0 0.6em; font-size: 21px; }
.post-content ul, .post-content ol { padding-left: 1.35em; }
.post-content li { margin: 0.3em 0; padding-left: 0.25em; }
.post-content li::marker { color: var(--accent); }
.post-content a:not(.kg-btn):not(.kg-bookmark-container) { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(158, 231, 255, 0.45); text-underline-offset: 0.18em; }
.post-content a:hover { text-decoration-color: currentColor; }
.post-content strong { color: var(--text); }
.post-content hr { height: 1px; margin: 2.8em 0; border: 0; background: var(--border); }
.post-content blockquote { margin: 1.8em 0; padding: 0.4em 0 0.4em 1.3em; border-left: 2px solid var(--accent); color: var(--text); font-size: 1.12em; font-style: italic; }
.post-content blockquote p { color: inherit; }
.post-content :not(pre) > code { padding: 0.15em 0.38em; border: 1px solid rgba(101, 255, 128, 0.18); border-radius: 6px; color: #bdeec8; background: rgba(5, 10, 6, 0.72); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 0.86em; overflow-wrap: anywhere; }
.post-content pre { position: relative; isolation: isolate; max-width: 100%; margin: 1.8em 0; padding: 18px 20px; overflow-x: auto; overflow-y: hidden; border: 1px solid rgba(101, 255, 128, 0.34); border-radius: 14px; color: #72f58a; background: #050a06; box-shadow: 0 0 18px rgba(70, 255, 110, 0.065), inset 0 0 18px rgba(70, 255, 110, 0.045); font-size: 14px; line-height: 1.65; text-shadow: 0 0 3px rgba(100, 255, 130, 0.30); tab-size: 4; white-space: pre; overscroll-behavior-inline: contain; scrollbar-color: rgba(101, 255, 128, 0.42) #050a06; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.post-content pre::before { position: absolute; z-index: 0; inset: 0; border-radius: inherit; background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(70, 255, 105, 0.025) 3px), linear-gradient(90deg, rgba(255, 50, 50, 0.012), rgba(70, 255, 105, 0.009), rgba(80, 110, 255, 0.012)); content: ""; pointer-events: none; }
.post-content pre code { position: relative; z-index: 1; padding: 0; border: 0; color: inherit; background: none; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; text-shadow: inherit; }
.post-content pre code::after { display: inline-block; width: 0.56em; height: 1.05em; margin-left: 0.32em; background: currentColor; box-shadow: 0 0 5px rgba(101, 255, 128, 0.38); content: ""; vertical-align: -0.14em; animation: terminal-cursor-blink 1.05s steps(1, end) infinite; }
.post-content pre code::selection, .post-content pre::selection { color: #effff2; background: rgba(114, 255, 140, 0.28); text-shadow: none; }
.post-content pre::-webkit-scrollbar { height: 9px; }
.post-content pre::-webkit-scrollbar-track { background: #050a06; }
.post-content pre::-webkit-scrollbar-thumb { border: 2px solid #050a06; border-radius: 999px; background: rgba(101, 255, 128, 0.42); }
.post-content pre::-webkit-scrollbar-thumb:hover { background: rgba(101, 255, 128, 0.60); }

@keyframes terminal-cursor-blink {
    0%, 48% { opacity: 0.9; }
    49%, 100% { opacity: 0.12; }
}
.post-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.post-content th, .post-content td { min-width: 130px; padding: 11px 13px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.post-content th { color: var(--text); background: rgba(158, 231, 255, 0.08); }
.post-content td { color: var(--muted); background: rgba(0, 0, 0, 0.13); }
.table-scroll { width: 100%; margin: 1.8em 0; overflow-x: auto; border-radius: 12px; overscroll-behavior-inline: contain; }
.table-scroll:focus-visible { outline-offset: 2px; }

.post-content figure { margin: 1.8em 0; }
.post-content figcaption { margin-top: 8px; color: var(--muted-2); font-size: 12px; line-height: 1.5; text-align: center; }
.post-content .kg-image, .post-content figure > img { width: 100%; border-radius: 13px; }
.post-content .kg-width-wide { width: min(960px, calc(100vw - 76px)); max-width: none; margin-right: 50%; margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-width-full { width: min(1260px, calc(100vw - 40px)); max-width: none; margin-right: 50%; margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-gallery-card { width: 100%; max-width: 100%; margin-right: 0; margin-left: 0; transform: none; }
.post-content .kg-gallery-container { display: flex; min-width: 0; max-width: 100%; flex-direction: column; gap: 8px; }
.post-content .kg-gallery-row { display: flex; min-width: 0; max-width: 100%; gap: 8px; }
.post-content .kg-gallery-image { min-width: 0; flex: 1; }
.post-content .kg-gallery-image img { width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }
.post-content .kg-gallery-image img[role="button"] { cursor: zoom-in; }
.post-content .kg-embed-card iframe, .post-content .kg-video-card video { width: 100%; border: 0; border-radius: 13px; }
.post-content .kg-embed-card > div, .post-content .kg-embed-card iframe { max-width: 100%; }
.post-content .kg-bookmark-card, .post-content .kg-file-card, .post-content .kg-audio-card, .post-content .kg-callout-card, .post-content .kg-toggle-card, .post-content .kg-product-card { color: var(--text); }
.post-content .kg-bookmark-container, .post-content .kg-file-card-container { border-color: var(--border); border-radius: 14px; background: rgba(255, 255, 255, 0.045); }
.post-content .kg-bookmark-description, .post-content .kg-bookmark-metadata, .post-content .kg-file-card-caption, .post-content .kg-audio-title, .post-content .kg-audio-duration { color: var(--muted); }
.post-content .kg-callout-card, .post-content .kg-toggle-card { border-radius: 14px; }
.post-content .kg-btn { min-height: 44px; border: 1px solid var(--border-hover); border-radius: 12px; color: #071017; background: var(--accent); font-weight: 750; }
.post-content .kg-header-card { width: min(1120px, calc(100vw - 40px)); max-width: none; margin-right: 50%; margin-left: 50%; transform: translateX(-50%); border-radius: 20px; overflow: hidden; }

.page-article { width: min(var(--reading), 100%); margin: 0 auto; }
.page-header { margin-bottom: 34px; }
.page-header .eyebrow { margin-bottom: 12px; }
.error-shell { display: grid; min-height: 62vh; place-items: center; }
.error-card { width: min(680px, 100%); padding: clamp(28px, 5vw, 54px); border-radius: 24px; text-align: center; }
.error-card .eyebrow { justify-content: center; }
.error-card h1 { margin-inline: auto; font-size: clamp(38px, 6vw, 68px); }
.error-card > p { margin-inline: auto; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 8px 28px; align-items: center; padding: 30px 8px 42px; color: var(--muted-2); font-size: 12px; }
.site-footer > div > p { margin: 7px 0 0; }
.site-footer nav, .site-footer .nav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin: 0; padding: 0; list-style: none; }
.site-footer nav a:hover { color: var(--text); }
.site-footer-meta { grid-column: 1 / -1; margin: 10px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.07); }

.lightbox-open { overflow: hidden; }
.gallery-lightbox {
    position: fixed;
    z-index: 2000;
    inset: 0;
    padding: clamp(14px, 3vw, 42px);
    color: var(--text);
    background: rgba(3, 6, 10, 0.94);
    opacity: 0;
    transition: opacity 160ms ease;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox.is-open { opacity: 1; }
.gallery-lightbox-dialog { position: relative; display: grid; width: 100%; height: 100%; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: clamp(8px, 2vw, 24px); align-items: center; }
.gallery-lightbox-figure { display: grid; min-width: 0; max-height: 100%; justify-items: center; margin: 0; }
.gallery-lightbox-figure img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 112px); border: 1px solid var(--border); border-radius: 12px; object-fit: contain; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58); user-select: none; -webkit-user-select: none; }
.gallery-lightbox-figure figcaption { max-width: min(760px, 100%); margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }
.gallery-lightbox-close, .gallery-lightbox-nav { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: rgba(11, 15, 23, 0.88); cursor: pointer; }
.gallery-lightbox-close:hover, .gallery-lightbox-nav:hover { color: var(--accent); border-color: var(--border-hover); }
.gallery-lightbox-close { position: absolute; z-index: 2; top: 0; right: 0; }
.gallery-lightbox-nav.is-previous { grid-column: 1; }
.gallery-lightbox-figure { grid-column: 2; }
.gallery-lightbox-nav.is-next { grid-column: 3; }
.gallery-lightbox-close svg, .gallery-lightbox-nav svg, .back-to-top svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.back-to-top {
    position: fixed;
    z-index: 800;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    color: var(--accent);
    background: rgba(11, 15, 23, 0.91);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transform: translateY(10px);
    transition: opacity 150ms ease, transform 150ms ease, border-color 150ms ease, background 150ms ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.back-to-top[hidden] { display: none; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { border-color: var(--accent); background: rgba(20, 31, 43, 0.96); }

@media (max-width: 1260px) {
    .article-layout { grid-template-columns: 190px minmax(0, 760px); }
    .article-related { position: static; grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-related > h2, .article-tags { grid-column: 1 / -1; }
    .article-tags { margin-top: 4px; }
}

@media (max-width: 1080px) {
    .blog-shell { padding: 34px 30px 38px; }
    .blog-hero { gap: 32px; padding-inline: 10px; }
    .topic-toolbar { align-items: flex-start; flex-direction: column; }
    .search-button { width: 100%; }
    .blog-layout { grid-template-columns: minmax(0, 1fr) 260px; }
    .post-grid, .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-grid .post-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .post-grid .post-card:last-child:nth-child(odd) .post-card-link { display: grid; grid-template-columns: 42% 1fr; }
    .post-grid .post-card:last-child:nth-child(odd) .post-card-media { aspect-ratio: auto; border-right: 1px solid var(--border); border-bottom: 0; }
}

@media (max-width: 900px) {
    :root { --header-height: 68px; }
    .site-page { width: min(100% - 26px, var(--max)); }
    .site-header { min-height: var(--header-height); padding-inline: 4px; }
    .nav-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        gap: 9px;
        padding: 8px 10px;
        border: 1px solid var(--border);
        border-radius: 11px;
        color: var(--muted);
        background: rgba(0, 0, 0, 0.16);
        cursor: pointer;
    }
    .nav-toggle-label { font-size: 12px; }
    .nav-toggle-lines, .nav-toggle-lines::before, .nav-toggle-lines::after { width: 16px; height: 1px; background: currentColor; }
    .nav-toggle-lines { position: relative; }
    .nav-toggle-lines::before, .nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-lines::before { top: -5px; }
    .nav-toggle-lines::after { top: 5px; }
    .site-navigation {
        position: absolute;
        top: calc(100% - 5px);
        right: 0;
        display: none;
        width: min(310px, calc(100vw - 26px));
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: rgba(11, 15, 23, 0.97);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
    }
    .site-navigation.is-open { display: flex; }
    .site-navigation a { min-height: 42px; padding: 10px 12px; border-radius: 9px; }
    .site-navigation a:hover, .site-navigation a.is-current { background: var(--panel); }
    .site-navigation a.is-current::after { display: none; }
    .blog-hero { grid-template-columns: 1fr; }
    .blog-hero-image, .blog-hero-art { max-width: 680px; }
    .archive-header.has-tag-image { grid-template-columns: 1fr; gap: 28px; }
    .tag-header-image { width: min(100%, 680px); }
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-card-link { grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr); }
    .article-shell { padding: 18px; }
    .article-layout { grid-template-columns: minmax(0, 760px); }
    .article-left { position: static; grid-row: 1; }
    .article-main { grid-row: 2; }
    .article-related { grid-column: 1; grid-row: 3; }
    .toc-card { padding: 15px; }
    .toc-toggle { padding-bottom: 0; }
    .toc-toggle[aria-expanded="true"] { padding-bottom: 10px; }
    #article-toc { columns: 2; column-gap: 24px; }
    #article-toc li { break-inside: avoid; }
    .share-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .share-card h2 { margin: 0; }
    .copy-status { margin-left: auto; }
}

@media (max-width: 700px) {
    .site-page { width: min(100% - 20px, var(--max)); }
    .blog-shell, .archive-shell, .page-shell, .article-shell, .error-shell { border-radius: 23px; }
    .blog-shell { padding: 26px 18px 30px; }
    .blog-hero { padding: 2px 0 22px; }
    .blog-hero h1 { font-size: clamp(39px, 12vw, 56px); }
    .blog-hero-copy > p { font-size: 17px; }
    .blog-hero-image, .blog-hero-art { aspect-ratio: 16 / 8.5; border-radius: 19px; }
    .blog-hero-image img { border-radius: 13px; }
    .topic-toolbar { padding-top: 12px; }
    .topic-toolbar .topic-nav { width: calc(100% + 18px); padding-right: 18px; }
    .tag-blog-context { margin-bottom: 28px; }
    .article-blog-context { margin-bottom: 18px; padding-right: 3px; padding-left: 3px; }
    .blog-breadcrumbs { overflow: hidden; font-size: 11px; }
    .blog-breadcrumbs ol { flex-wrap: nowrap; overflow: hidden; }
    .blog-breadcrumbs li { min-width: 0; flex: 0 0 auto; overflow-wrap: normal; white-space: nowrap; word-break: normal; }
    .blog-breadcrumbs li:last-child { min-width: 0; flex: 1 1 auto; overflow: hidden; }
    .blog-breadcrumbs li + li::before { flex: 0 0 auto; }
    .blog-breadcrumbs a, .blog-breadcrumbs .breadcrumb-current { overflow-wrap: normal; white-space: nowrap; word-break: normal; }
    .blog-breadcrumbs li:last-child .breadcrumb-current { overflow: hidden; text-overflow: ellipsis; }
    .search-button kbd { display: none; }
    .featured-card-link { grid-template-columns: 1fr; }
    .featured-media { aspect-ratio: 16 / 10; }
    .featured-copy { padding: 24px 21px; }
    .featured-copy h2 { font-size: 27px; }
    .post-grid, .archive-grid { grid-template-columns: 1fr; }
    .post-grid .post-card:last-child:nth-child(odd) { grid-column: auto; }
    .post-grid .post-card:last-child:nth-child(odd) .post-card-link { display: flex; }
    .post-grid .post-card:last-child:nth-child(odd) .post-card-media { aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--border); }
    .blog-sidebar { grid-template-columns: 1fr; }
    .pagination { grid-template-columns: 1fr 1fr; }
    .page-number { grid-column: 1 / -1; grid-row: 2; text-align: center; }
    .archive-shell, .page-shell, .error-shell { padding: 30px 20px; }
    .author-header { align-items: flex-start; flex-direction: column; }
    .author-image { width: 96px; height: 96px; border-radius: 22px; }
    .article-shell { padding: 18px 14px 26px; }
    .article-header h1 { font-size: clamp(38px, 11vw, 56px); }
    .article-meta { align-items: flex-start; flex-direction: column; }
    .article-dates { justify-content: flex-start; }
    .article-feature { margin-right: -6px; margin-left: -6px; }
    .post-content { font-size: 17px; line-height: 1.74; }
    .post-content pre { padding: 16px; font-size: 13px; box-shadow: 0 0 12px rgba(70, 255, 110, 0.05), inset 0 0 14px rgba(70, 255, 110, 0.04); }
    .post-content .kg-width-wide, .post-content .kg-width-full, .post-content .kg-header-card { width: calc(100vw - 20px); }
    .post-content .kg-gallery-card { width: 100%; }
    #article-toc { columns: 1; }
    .article-related { grid-template-columns: 1fr; }
    .article-related > h2, .article-tags { grid-column: auto; }
    .share-card { align-items: flex-start; flex-direction: column; }
    .copy-status { margin: 0; }
    .gallery-lightbox { padding: 12px; }
    .gallery-lightbox-dialog { grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 4px; }
    .gallery-lightbox-close, .gallery-lightbox-nav { width: 40px; height: 40px; }
    .gallery-lightbox-figure img { max-height: calc(100vh - 104px); border-radius: 9px; }
    .back-to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px)); width: 44px; height: 44px; }
    .site-footer { grid-template-columns: 1fr; }
    .site-footer nav, .site-footer .nav-list { justify-content: flex-start; }
}

@media (max-width: 390px) {
    .blog-shell { padding-inline: 14px; }
    .blog-hero h1, .article-header h1 { font-size: 38px; }
    .featured-copy { padding: 21px 17px; }
    .post-card-body { padding: 16px; }
    .archive-shell, .page-shell, .error-shell { padding-inline: 17px; }
    .article-shell { padding-inline: 11px; }
    .post-content { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
    .post-content pre code::after { animation: terminal-cursor-blink 1.05s steps(1, end) infinite !important; }
}

@media print {
    @page { margin: 18mm; }
    :root { color-scheme: light; }
    html, body { overflow: visible; color: #111; background: #fff; font-size: 11pt; }
    .site-header, .site-footer, .article-blog-context, .article-left, .article-related, .gallery-lightbox, .back-to-top, .share-popover { display: none !important; }
    .site-page, .article-main { width: 100%; max-width: none; margin: 0; }
    .article-shell { padding: 0; border: 0; background: #fff; box-shadow: none; backdrop-filter: none; }
    .article-layout { display: block; }
    .article-header { padding-top: 0; }
    .article-header h1 { font-size: 30pt; }
    .article-excerpt, .article-author strong { color: #222; }
    .article-author small, .article-dates, .article-feature figcaption, .post-content figcaption { color: #555; }
    .article-feature picture, .article-feature > img, .post-content img { border-color: #ccc; box-shadow: none; }
    .post-content p, .post-content ul, .post-content ol { color: #222; }
    .post-content h2, .post-content h3, .post-content h4, .article-header h1 { color: #000; }
    .post-content a { color: #111 !important; text-decoration: underline; }
    .post-content figure, .post-content .kg-gallery-row, .post-content table, .post-content pre { break-inside: avoid-page; }
    .post-content pre { overflow: visible; border: 1px solid #bbb; color: #111; background: #f4f4f4; box-shadow: none; text-shadow: none; white-space: pre-wrap; }
    .post-content pre::before, .post-content pre code::after { display: none; }
    .post-content :not(pre) > code { border-color: #ccc; color: #111; background: #f2f2f2; }
    .post-content th, .post-content td { border-color: #bbb; color: #111; background: #fff; }
    .table-scroll { overflow: visible; }
}
