:root {
    color-scheme: dark;
    --bg: #060918;
    --bg-elevated: #0a1022;
    --surface: #0e172b;
    --surface-strong: #131e35;
    --surface-soft: #0a1224;
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --muted: #7f8da8;
    --border: #1e2a42;
    --border-strong: #2b3a58;
    --header-bg: rgba(6, 9, 24, .9);
    --shadow: 0 24px 70px rgba(0, 0, 0, .28);
    --header-height: 88px;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-elevated: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #f1f5f9;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --header-bg: rgba(255, 255, 255, .9);
    --shadow: 0 24px 70px rgba(15, 23, 42, .1);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

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

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s ease, color .2s ease;
}

body.dialog-open,
body.menu-locked {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea,
select {
    color: inherit;
    font: inherit;
}

button,
summary {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb), .35);
    outline-offset: 3px;
}

.shell {
    width: min(1220px, calc(100% - 48px));
    margin-inline: auto;
}

.shell-wide {
    width: min(1580px, calc(100% - 64px));
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.nova-icon {
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(var(--accent-rgb), .25);
}

.button-primary:hover {
    box-shadow: 0 18px 42px rgba(var(--accent-rgb), .34);
}

.button-ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.button-ghost:hover {
    background: var(--surface);
    border-color: rgba(var(--accent-rgb), .45);
}

.button-light {
    background: var(--text);
    color: var(--bg);
}

.button-small {
    min-height: 40px;
    padding: 9px 20px;
}

.button-large {
    min-height: 56px;
    padding: 14px 25px;
    font-size: 16px;
}

.icon-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-soft);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.icon-button:hover {
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-1px);
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: var(--header-height);
    border-bottom: 1px solid transparent;
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.site-header.is-scrolled {
    border-color: var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}

.header-inner {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 850;
    line-height: 1;
}

.brand img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-image img {
    width: auto;
    max-width: 180px;
    height: 36px;
}

.desktop-nav {
    margin-left: auto;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 5px;
    padding: 8px 11px;
    border-radius: 6px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    background: rgba(var(--accent-rgb), .09);
    color: var(--accent);
}

.nav-chevron {
    width: 13px;
    height: 13px;
    transition: transform .2s ease;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
}

.nav-dropdown a {
    display: block;
    padding: 9px 11px;
    border-radius: 5px;
    color: var(--text-soft);
    font-size: 14px;
}

.nav-dropdown a:hover {
    background: var(--surface-strong);
    color: var(--text);
}

.has-children:hover > .nav-dropdown,
.has-children:focus-within > .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.has-children:hover .nav-chevron {
    transform: rotate(180deg);
}

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

.theme-icon {
    display: grid;
    place-items: center;
}

html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
    display: none;
}

.menu-toggle,
.mobile-nav {
    display: none;
}

.menu-close-icon {
    display: none;
}

.search-dialog {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: start center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.search-dialog.is-open {
    opacity: 1;
    pointer-events: auto;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(2, 6, 23, .76);
    backdrop-filter: blur(10px);
}

.search-panel {
    position: relative;
    width: min(720px, 100%);
    margin-top: 12vh;
    padding: 28px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    transition: transform .2s ease;
}

.search-dialog.is-open .search-panel {
    transform: translateY(0);
}

.search-panel-head,
.search-form,
.search-field,
.search-suggestions {
    display: flex;
    align-items: center;
}

.search-panel-head {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.search-panel h2 {
    margin: 4px 0 0;
    font-size: 28px;
    line-height: 1.25;
}

.search-form {
    gap: 10px;
}

.search-field {
    min-width: 0;
    flex: 1;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-elevated);
}

.search-field input {
    width: 100%;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-suggestions {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.search-suggestions > span {
    margin-right: 4px;
    color: var(--muted);
    font-size: 13px;
}

.search-suggestions a {
    max-width: 190px;
    overflow: hidden;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-soft);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-section {
    position: relative;
    display: grid;
    min-height: 690px;
    overflow: hidden;
    place-items: center;
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-grid::before,
.hero-grid::after {
    position: absolute;
    content: "";
    background: var(--border);
    opacity: .24;
}

.hero-grid::before {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.hero-grid::after {
    top: 55%;
    right: 0;
    left: 0;
    height: 1px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 88px 0 96px;
    text-align: center;
}

.announcement {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    padding: 6px 11px;
    border: 1px solid rgba(var(--accent-rgb), .28);
    border-radius: 999px;
    background: rgba(var(--accent-rgb), .08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
}

.announcement > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .12);
}

.hero-inner h1 {
    max-width: 1040px;
    margin: 0 auto 30px;
    font-size: 88px;
    font-weight: 900;
    line-height: 1.08;
}

.hero-inner h1 span,
.hero-inner h1 strong {
    display: block;
}

.hero-inner h1 strong {
    color: var(--accent);
}

.hero-inner > p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 38px;
}

.feature-section {
    padding: 78px 0 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.feature-card {
    min-height: 224px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}

.feature-card:hover {
    border-color: var(--border-strong);
    background: var(--surface);
    transform: translateY(-4px);
}

.feature-icon,
.doc-category-icon,
.category-group-head > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 8px;
    background: rgba(var(--accent-rgb), .13);
    color: var(--accent);
    font-size: 23px;
}

.feature-card[data-tone="violet"] .feature-icon { background: rgba(139, 92, 246, .13); color: #a78bfa; }
.feature-card[data-tone="emerald"] .feature-icon { background: rgba(16, 185, 129, .13); color: #34d399; }
.feature-card[data-tone="rose"] .feature-icon { background: rgba(244, 63, 94, .13); color: #fb7185; }
.feature-card[data-tone="amber"] .feature-icon { background: rgba(245, 158, 11, .13); color: #fbbf24; }
.feature-card[data-tone="cyan"] .feature-icon { background: rgba(6, 182, 212, .13); color: #22d3ee; }

.feature-card h3 {
    margin: 22px 0 8px;
    font-size: 21px;
    line-height: 1.35;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.logo-wall {
    padding: 70px 0 82px;
    text-align: center;
}

.logo-wall > p {
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 14px;
}

.logo-wall > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 28px;
}

.logo-wall span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 20px;
    font-weight: 800;
}

.logo-wall .nova-icon {
    color: var(--accent);
}

.metrics-section {
    padding: 92px 0;
    background: var(--accent);
    color: #ffffff;
}

.metrics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
    align-items: center;
    gap: 84px;
}

.metrics-section .eyebrow {
    color: rgba(255, 255, 255, .75);
}

.metrics-copy h2 {
    max-width: 650px;
    margin: 12px 0 22px;
    font-size: 48px;
    line-height: 1.2;
}

.metrics-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 18px;
}

.metrics-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, .3);
    border-bottom: 1px solid rgba(255, 255, 255, .3);
}

.metrics-stats > div {
    padding: 35px 28px;
}

.metrics-stats > div + div {
    border-left: 1px solid rgba(255, 255, 255, .3);
}

.metrics-stats strong,
.metrics-stats span {
    display: block;
}

.metrics-stats strong {
    font-size: 46px;
    line-height: 1.1;
}

.metrics-stats span {
    margin-top: 8px;
    color: rgba(255, 255, 255, .75);
}

.latest-section,
.faq-section {
    padding: 100px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 42px;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: 42px;
    line-height: 1.2;
}

.section-heading h3 {
    margin: 7px 0 0;
    font-size: 28px;
    line-height: 1.25;
}

.section-heading h3 span {
    color: var(--muted);
    font-weight: 600;
}

.section-heading.compact {
    margin-bottom: 28px;
}

.section-heading.compact h2 {
    font-size: 30px;
}

.section-heading.centered {
    justify-content: center;
    text-align: center;
}

.text-link,
.text-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 14px;
    font-weight: 750;
}

.post-grid {
    display: grid;
    gap: 24px;
}

.post-grid.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.post-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.post-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .14);
    transform: translateY(-5px);
}

.post-cover {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--surface-strong);
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.post-card:hover .post-cover img {
    transform: scale(1.035);
}

.cover-fallback {
    display: grid;
    place-items: center;
    color: var(--accent);
}

.cover-fallback::before,
.cover-fallback::after {
    position: absolute;
    content: "";
    background: rgba(var(--accent-rgb), .16);
}

.cover-fallback::before { width: 1px; height: 100%; }
.cover-fallback::after { width: 100%; height: 1px; }

.cover-fallback > span {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(var(--accent-rgb), .3);
    border-radius: 7px;
    background: var(--surface);
}

.cover-fallback > strong {
    position: relative;
    z-index: 1;
    font-size: 64px;
    font-weight: 900;
}

.post-card-body {
    display: flex;
    min-height: 255px;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.post-kicker,
.post-card-meta,
.article-meta {
    display: flex;
    align-items: center;
}

.post-kicker {
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.status-badge {
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent);
    font-weight: 700;
}

.meta-link {
    color: var(--accent);
}

.post-card h2,
.post-card h3 {
    margin: 13px 0 10px;
    font-size: 19px;
    line-height: 1.42;
}

.post-card h2 a,
.post-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-card-body > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.post-card-meta {
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.author-link,
.view-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.author-link img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

.faq-section {
    max-width: 940px;
}

.faq-list {
    border-top: 1px solid var(--border);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    list-style: none;
    font-size: 18px;
    font-weight: 750;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .nova-icon { transition: transform .2s ease; }
.faq-item[open] summary .nova-icon { transform: rotate(180deg); }

.faq-item > div {
    max-width: 760px;
    padding: 0 0 24px;
    color: var(--muted);
}

.faq-item p { margin: 0; }

.cta-section {
    width: 100%;
    padding: 84px 0;
    background: var(--accent);
    color: #ffffff;
}

.cta-band {
    text-align: center;
}

.cta-section .eyebrow { color: rgba(255, 255, 255, .75); }

.cta-band h2 {
    max-width: 900px;
    margin: 12px auto 28px;
    font-size: 48px;
    line-height: 1.18;
}

.cta-band .button-light {
    color: #0f172a;
}

.site-footer {
    padding: 76px 0 26px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 64px;
}

.footer-brand p,
.footer-follow p {
    max-width: 420px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.footer-column h4 {
    margin: 2px 0 20px;
    font-size: 14px;
}

.footer-column .nav-list,
.footer-column > ul {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column .nav-item,
.footer-column .nav-link {
    display: block;
    min-height: 0;
    padding: 0;
}

.footer-column .nav-link,
.footer-column > ul a {
    color: var(--muted);
    font-size: 14px;
}

.footer-column .nav-link:hover,
.footer-column > ul a:hover {
    background: transparent;
    color: var(--text);
}

.footer-column .nav-chevron,
.footer-column .nav-dropdown { display: none; }

.rss-link {
    display: grid;
    width: 40px;
    height: 40px;
    margin-top: 18px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 58px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.footer-bottom > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.back-to-top {
    position: fixed;
    z-index: 90;
    right: 24px;
    bottom: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) rotate(180deg);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) rotate(180deg);
}

.inner-main,
.article-main {
    min-height: calc(100vh - var(--header-height));
}

.page-intro {
    padding: 74px 0 42px;
}

.page-intro h1 {
    margin: 18px 0 12px;
    font-size: 48px;
    line-height: 1.15;
}

.page-intro > p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a:hover { color: var(--accent); }

.content-section {
    padding: 18px 0 100px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 52px;
}

.pagination a,
.pagination span {
    display: grid;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 13px;
}

.pagination span,
.pagination a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.empty-state {
    padding: 26px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.large-empty {
    display: grid;
    min-height: 360px;
    place-items: center;
    align-content: center;
    gap: 10px;
}

.large-empty > .nova-icon { width: 40px; height: 40px; color: var(--accent); }
.large-empty h2,
.large-empty p { margin: 0; }
.large-empty .button { margin-top: 12px; }

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 900px) 230px;
    justify-content: center;
    gap: 64px;
    padding: 58px 0 110px;
}

.article-layout.has-doc-sidebar {
    grid-template-columns: 240px minmax(0, 900px) 220px;
    justify-content: stretch;
    gap: 48px;
}

.article-panel {
    min-width: 0;
}

.article-header {
    padding: 30px 0 32px;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    margin: 0 0 18px;
    font-size: 50px;
    line-height: 1.18;
}

.article-meta {
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 13px;
}

.article-meta > span,
.article-meta > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-cover {
    overflow: hidden;
    margin: 34px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.article-cover img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.article-content {
    padding-top: 26px;
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--text);
    line-height: 1.35;
}

.article-content h1 { margin: 42px 0 20px; font-size: 36px; }
.article-content h2 { margin: 52px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 29px; }
.article-content h3 { margin: 38px 0 16px; font-size: 23px; }
.article-content h4 { margin: 28px 0 14px; font-size: 19px; }
.article-content p { margin: 0 0 22px; }
.article-content a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .35); text-underline-offset: 3px; }
.article-content strong { color: var(--text); }
.article-content ul,
.article-content ol { margin: 0 0 24px; padding-left: 24px; }
.article-content li { margin: 7px 0; }
.article-content hr { margin: 42px 0; border: 0; border-top: 1px solid var(--border); }
.article-content blockquote { margin: 28px 0; padding: 16px 20px; border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), .07); color: var(--text-soft); }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content img { height: auto; margin: 30px auto; border-radius: 8px; }
.article-content table { display: block; width: 100%; overflow-x: auto; margin: 28px 0; border-collapse: collapse; }
.article-content th,
.article-content td { min-width: 130px; padding: 12px 14px; border: 1px solid var(--border); text-align: left; }
.article-content th { background: var(--surface-strong); color: var(--text); }
.article-content code { padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-strong); color: #f472b6; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; }
.article-content pre { position: relative; overflow-x: auto; margin: 28px 0; padding: 22px; border: 1px solid var(--border); border-radius: 8px; background: #050816; color: #dbeafe; }
.article-content pre code { padding: 0; border: 0; background: transparent; color: inherit; }

.code-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border: 1px solid #263451;
    border-radius: 5px;
    background: #10182c;
    color: #cbd5e1;
    font-size: 12px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 42px 0;
}

.tag-chip {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--muted);
    font-size: 13px;
}

.tag-chip:hover { border-color: rgba(var(--accent-rgb), .4); color: var(--accent); }

.sticky-panel {
    position: sticky;
    top: calc(var(--header-height) + 28px);
}

.toc-sidebar h5,
.doc-sidebar h5 {
    margin: 8px 0 18px;
    font-size: 14px;
}

#article-toc {
    display: grid;
    gap: 4px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
}

#article-toc a {
    display: -webkit-box;
    overflow: hidden;
    padding: 5px 0 5px 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#article-toc a:hover,
#article-toc a.is-active { color: var(--accent); }
#article-toc a.is-active { box-shadow: -15px 0 0 -13px var(--accent); }
#article-toc .toc-subitem { padding-left: 22px; }
.toc-empty { color: var(--muted); font-size: 12px; }

.neighbor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 44px 0;
}

.neighbor-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
}

.neighbor-card span,
.neighbor-card strong { display: block; }
.neighbor-card span { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.neighbor-card strong { font-size: 14px; line-height: 1.5; }
.neighbor-next { text-align: right; }

.doc-tree,
.doc-tree ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.doc-tree > li { margin-bottom: 4px; }
.doc-tree ul { margin: 4px 0 9px 10px; padding-left: 10px; border-left: 1px solid var(--border); }

.doc-tree a {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 5px;
    color: var(--muted);
    font-size: 13px;
}

.doc-tree a:hover,
.doc-tree a.is-active { background: rgba(var(--accent-rgb), .08); color: var(--accent); }
.doc-tree a span { font-size: 11px; }

.comments-section,
.comments-list {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comment-form label,
.password-panel label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 13px;
}

.comment-form input,
.comment-form textarea,
.password-panel input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-soft);
    outline: 0;
}

.comment-form input,
.password-panel input { height: 46px; padding: 0 13px; }
.comment-form textarea { padding: 13px; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus,
.password-panel input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.captcha-row img { height: 38px; border-radius: 5px; }
.captcha-row input { width: 120px; }

.comment-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    margin: 0 0 18px calc(var(--comment-depth) * 24px);
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comment-head time { color: var(--muted); font-size: 12px; }
.comment-content { margin: 8px 0; color: var(--text-soft); font-size: 14px; overflow-wrap: anywhere; }

.doc-section,
.taxonomy-section {
    padding: 36px 0 82px;
}

.doc-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.doc-category-card {
    position: relative;
    min-height: 190px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    transition: transform .2s ease, border-color .2s ease;
}

.doc-category-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.doc-category-card h3 { margin: 19px 0 5px; font-size: 18px; }
.doc-category-card p { margin: 0; color: var(--muted); font-size: 13px; }
.doc-count { position: absolute; top: 25px; right: 24px; color: var(--muted); font-size: 12px; }

.document-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.document-link-grid > a {
    display: flex;
    min-width: 0;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
}

.document-link-grid > a > span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-link-grid > a:hover { border-color: rgba(var(--accent-rgb), .45); color: var(--accent); }
.page-lead-content { max-width: 800px; margin-top: 20px; color: var(--text-soft); }

.tag-cloud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tag-cloud a {
    display: flex;
    min-width: 0;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
}

.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-cloud strong { display: grid; min-width: 28px; height: 28px; padding: 0 6px; place-items: center; border-radius: 5px; background: rgba(var(--accent-rgb), .1); font-size: 12px; }

.archive-list {
    border-top: 1px solid var(--border);
}

.archive-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
}

.archive-list a:hover { color: var(--accent); }
.archive-list a > span { display: flex; align-items: center; gap: 12px; }
.archive-list em { color: var(--muted); font-size: 13px; font-style: normal; }

.category-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.category-group {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.category-group-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
}

.category-group h3 { margin: 0 0 4px; font-size: 19px; }
.category-group p { margin: 0; color: var(--muted); font-size: 13px; }
.category-group ul { display: grid; gap: 7px; margin: 22px 0; padding: 0; list-style: none; }
.category-group li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 13px; }
.category-group li em { color: var(--muted); font-style: normal; }

.standalone-page {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.standalone-panel {
    width: min(520px, 100%);
    padding: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow);
}

.standalone-panel h1 { margin: 12px 0; font-size: 32px; line-height: 1.25; }
.standalone-panel p { margin: 0 0 24px; color: var(--muted); }
.error-code { display: block; color: var(--accent); font-size: 78px; font-weight: 900; line-height: 1; }
.password-panel { display: grid; gap: 18px; text-align: left; }
.password-panel h1,
.password-panel p { margin: 0; }
.password-panel .text-link { justify-content: center; }

@media (max-width: 1320px) {
    .desktop-nav .nav-link { padding-inline: 8px; font-size: 13px; }
    .post-grid.columns-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .article-layout.has-doc-sidebar { grid-template-columns: 210px minmax(0, 1fr); }
    .article-layout.has-doc-sidebar .toc-sidebar { display: none; }
}

@media (max-width: 1100px) {
    :root { --header-height: 74px; }
    .desktop-nav,
    .login-link { display: none; }
    .header-actions { margin-left: auto; }
    .menu-toggle { display: inline-grid; }
    .site-header.menu-open .menu-open-icon { display: none; }
    .site-header.menu-open .menu-close-icon { display: grid; }
    .mobile-nav {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        display: block;
        max-height: 0;
        overflow: hidden;
        border-bottom: 1px solid transparent;
        background: var(--header-bg);
        backdrop-filter: blur(18px);
        transition: max-height .25s ease, border-color .2s ease;
    }
    .site-header.menu-open .mobile-nav { max-height: calc(100vh - var(--header-height)); border-color: var(--border); overflow-y: auto; }
    .mobile-nav-inner { padding-top: 12px; padding-bottom: 22px; }
    .mobile-nav .nav-list { display: grid; align-items: stretch; }
    .mobile-nav .nav-link { justify-content: space-between; min-height: 46px; padding: 10px 12px; }
    .mobile-nav .nav-dropdown { position: static; display: grid; gap: 2px; min-width: 0; margin: 0 0 4px 14px; padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; opacity: 1; pointer-events: auto; transform: none; }
    .mobile-nav .nav-dropdown a { padding: 8px 10px; }
    .hero-inner h1 { font-size: 68px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics-grid { grid-template-columns: 1fr; gap: 46px; }
    .footer-grid { grid-template-columns: 1.5fr repeat(2, 1fr); }
    .footer-follow { grid-column: 2 / -1; }
    .post-grid.columns-3,
    .post-grid.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-layout,
    .article-layout.has-doc-sidebar { grid-template-columns: minmax(0, 1fr); }
    .article-layout .toc-sidebar,
    .article-layout.has-doc-sidebar .toc-sidebar { display: none; }
    .article-layout.has-doc-sidebar .doc-sidebar { display: none; }
    .doc-category-grid,
    .tag-cloud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .shell,
    .shell-wide { width: min(100% - 32px, 100%); }
    .header-inner { gap: 12px; }
    .header-actions { gap: 7px; }
    .header-actions .icon-button { width: 39px; height: 39px; }
    .brand { font-size: 17px; }
    .brand img { width: 28px; height: 28px; }
    .hero-section { min-height: 610px; }
    .hero-inner { padding: 66px 0 72px; }
    .announcement { margin-bottom: 25px; }
    .hero-inner h1 { margin-bottom: 24px; font-size: 48px; }
    .hero-inner > p { font-size: 16px; }
    .hero-actions { align-items: stretch; flex-direction: column; margin-top: 30px; }
    .hero-actions .button { width: 100%; }
    .feature-section { padding-top: 56px; }
    .feature-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { min-height: 0; padding: 24px; }
    .logo-wall { padding: 58px 0; }
    .logo-wall > div { justify-content: center; }
    .logo-wall span { min-width: 120px; justify-content: center; font-size: 16px; }
    .metrics-section { padding: 68px 0; }
    .metrics-copy h2,
    .cta-band h2 { font-size: 34px; }
    .metrics-copy p { font-size: 16px; }
    .metrics-stats { grid-template-columns: 1fr; }
    .metrics-stats > div { padding: 26px 12px; }
    .metrics-stats > div + div { border-top: 1px solid rgba(255, 255, 255, .3); border-left: 0; }
    .metrics-stats strong { font-size: 38px; }
    .latest-section,
    .faq-section { padding: 70px 0; }
    .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
    .section-heading h2 { font-size: 34px; }
    .section-heading.centered { align-items: center; }
    .post-grid.columns-3,
    .post-grid.columns-4 { grid-template-columns: 1fr; }
    .post-card-body { min-height: 230px; }
    .faq-item summary { min-height: 68px; font-size: 16px; }
    .cta-section { padding: 66px 0; }
    .site-footer { padding-top: 58px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 24px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-follow { grid-column: 1 / -1; }
    .footer-bottom { align-items: flex-start; flex-direction: column; margin-top: 42px; }
    .footer-bottom > div { justify-content: flex-start; }
    .page-intro { padding: 54px 0 28px; }
    .page-intro h1 { font-size: 38px; }
    .content-section { padding-bottom: 72px; }
    .article-layout { padding: 42px 0 80px; }
    .article-header { padding: 24px 0 26px; }
    .article-header h1 { font-size: 38px; }
    .article-content { font-size: 16px; }
    .article-content h1 { font-size: 30px; }
    .article-content h2 { margin-top: 42px; font-size: 25px; }
    .article-content h3 { font-size: 21px; }
    .neighbor-grid { grid-template-columns: 1fr; }
    .neighbor-next { text-align: left; }
    .form-grid { grid-template-columns: 1fr; }
    .comment-item { margin-left: calc(var(--comment-depth) * 8px); padding: 14px; }
    .doc-category-grid,
    .document-link-grid,
    .tag-cloud,
    .category-overview { grid-template-columns: 1fr; }
    .doc-section,
    .taxonomy-section { padding: 28px 0 64px; }
    .search-dialog { padding: 14px; }
    .search-panel { margin-top: 8vh; padding: 20px; }
    .search-form { align-items: stretch; flex-direction: column; }
    .search-form .button { width: 100%; }
    .standalone-panel { padding: 30px 22px; }
}

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

