:root {
    --navy-950: #06111f;
    --navy-900: #0a1a2e;
    --navy-800: #102844;
    --blue-600: #1769e0;
    --blue-500: #2f7df4;
    --cyan-400: #4bd8e8;
    --ink-950: #101828;
    --ink-800: #25324a;
    --ink-600: #526079;
    --ink-500: #6d7890;
    --line: #e5eaf1;
    --surface: #ffffff;
    --surface-soft: #f5f7fa;
    --surface-blue: #edf5ff;
    --success: #1a9b63;
    --warning: #b36a00;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 14px 38px rgba(15, 35, 67, 0.1);
    --header-height: 72px;
    --sidebar-width: 292px;
    --toc-width: 232px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --content-width: 980px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink-950);
    background:
        radial-gradient(circle at 76% -20%, rgba(47, 125, 244, 0.12), transparent 34rem),
        var(--surface-soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--blue-600);
}

.is-hidden {
    display: none !important;
}

.skip-link {
    position: fixed;
    z-index: 9999;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    color: #fff;
    background: var(--blue-600);
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.topbar {
    position: fixed;
    z-index: 1000;
    inset: 0 0 auto;
    height: var(--header-height);
    display: grid;
    grid-template-columns: minmax(290px, 0.9fr) minmax(320px, 640px) auto;
    align-items: center;
    gap: 28px;
    padding: 0 28px;
    color: #fff;
    background: rgba(6, 17, 31, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(4, 13, 25, 0.18);
    backdrop-filter: blur(16px);
}

.brand-area,
.brand,
.brand-copy {
    min-width: 0;
}

.brand-area {
    display: flex;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    background: linear-gradient(145deg, var(--blue-500), var(--cyan-400));
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(47, 125, 244, 0.3);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-copy strong {
    overflow: hidden;
    font-size: 16px;
    font-weight: 680;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy small {
    margin-top: 4px;
    font-size: 11px;
    color: rgba(224, 236, 255, 0.62);
    letter-spacing: 0.08em;
}

.menu-button {
    display: none;
}

.global-search {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search input {
    width: 100%;
    height: 42px;
    padding: 0 72px 0 44px;
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    outline: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.global-search input::placeholder {
    color: rgba(232, 241, 255, 0.57);
}

.global-search input:focus {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(75, 216, 232, 0.62);
    box-shadow: 0 0 0 3px rgba(75, 216, 232, 0.12);
}

.search-icon {
    position: absolute;
    z-index: 1;
    left: 17px;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(232, 241, 255, 0.72);
    border-radius: 50%;
    pointer-events: none;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 2px;
    right: -5px;
    bottom: -3px;
    background: rgba(232, 241, 255, 0.72);
    border-radius: 2px;
    transform: rotate(45deg);
}

.global-search kbd {
    position: absolute;
    right: 11px;
    padding: 2px 7px;
    color: rgba(232, 241, 255, 0.58);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    pointer-events: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.language-switch {
    display: inline-flex;
    padding: 3px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
}

.language-switch a {
    padding: 4px 8px;
    color: rgba(239, 246, 255, 0.68);
    text-decoration: none;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.4;
}

.language-switch a[aria-current="page"] {
    color: #071426;
    background: #fff;
    font-weight: 750;
}

.support-link,
.website-link {
    padding: 8px 13px;
    color: rgba(239, 246, 255, 0.82);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    font-size: 13px;
    transition: 0.2s ease;
}

.support-link {
    color: #fff;
    background: rgba(47, 125, 244, 0.22);
    border-color: rgba(75, 216, 232, 0.3);
}

.support-link:hover,
.website-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.24);
}

.search-results {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    max-height: min(66vh, 560px);
    overflow-y: auto;
    padding: 7px;
    color: var(--ink-950);
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: 0 24px 70px rgba(4, 15, 31, 0.28);
}

.search-results.is-open {
    display: block;
}

.search-result {
    width: 100%;
    display: block;
    padding: 11px 12px;
    text-align: left;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible {
    background: var(--surface-blue);
    outline: none;
}

.search-result strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.search-result small,
.search-result p {
    display: block;
    margin: 0;
    color: var(--ink-600);
    font-size: 12px;
    line-height: 1.55;
}

.search-result p {
    margin-top: 4px;
}

.search-result mark {
    color: #7b4300;
    background: #fff0b8;
    border-radius: 3px;
}

.search-empty {
    padding: 22px 14px;
    text-align: center;
    color: var(--ink-500);
    font-size: 13px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
    padding-top: var(--header-height);
}

.sidebar {
    position: sticky;
    z-index: 700;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 22px 14px;
    color: var(--ink-600);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.document-count {
    min-width: 28px;
    padding: 1px 7px;
    text-align: center;
    color: var(--blue-600);
    background: var(--surface-blue);
    border-radius: 999px;
    letter-spacing: normal;
}

.document-tree {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 22px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.tree-group {
    margin: 4px 0;
}

.tree-directory,
.tree-document {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-align: left;
    color: var(--ink-800);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.18s, background 0.18s;
}

.tree-directory {
    font-weight: 650;
}

.tree-directory:hover,
.tree-document:hover {
    color: var(--blue-600);
    background: #f2f6fb;
}

.tree-directory::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.18s;
}

.tree-group.is-expanded > .tree-directory::before {
    transform: rotate(45deg) translate(-1px, -1px);
}

.tree-children {
    display: none;
    margin-left: 15px;
    padding-left: 5px;
    border-left: 1px solid #e6ebf2;
}

.tree-group.is-expanded > .tree-children {
    display: block;
}

.tree-document {
    position: relative;
    min-height: 38px;
    padding: 7px 9px 7px 19px;
    color: var(--ink-600);
    font-size: 13px;
    line-height: 1.45;
}

.tree-document::before {
    content: "";
    position: absolute;
    left: 7px;
    width: 4px;
    height: 4px;
    background: #aeb8c8;
    border-radius: 50%;
}

.tree-document.is-active {
    color: var(--blue-600);
    background: var(--surface-blue);
    font-weight: 650;
}

.tree-document.is-active::before {
    background: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(47, 125, 244, 0.13);
}

.sidebar-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 14px 16px;
    padding: 11px 12px;
    color: var(--ink-500);
    background: #f6f8fb;
    border: 1px solid #e9edf3;
    border-radius: 11px;
    font-size: 11px;
    line-height: 1.5;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin-top: 5px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(26, 155, 99, 0.12);
}

.main {
    min-width: 0;
    padding: 40px clamp(24px, 4vw, 64px) 72px;
}

.home-view,
.document-view,
.error-view {
    width: min(100%, var(--content-width));
    margin: 0 auto;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 6vw, 66px);
    color: #fff;
    background:
        radial-gradient(circle at 85% 24%, rgba(75, 216, 232, 0.28), transparent 19rem),
        linear-gradient(135deg, #071528 0%, #0b2b52 62%, #0d4880 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    box-shadow: 0 24px 70px rgba(8, 31, 63, 0.18);
}

.hero-card::after {
    content: "B";
    position: absolute;
    right: -20px;
    bottom: -82px;
    color: rgba(255, 255, 255, 0.035);
    font-size: 230px;
    font-weight: 900;
    letter-spacing: -0.1em;
    line-height: 1;
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.hero-card .eyebrow {
    color: #72e4ef;
}

.hero-card h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.hero-card > p:not(.eyebrow) {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 20px 0 28px;
    color: rgba(229, 240, 255, 0.76);
    font-size: 16px;
    line-height: 1.75;
}

.primary-button {
    position: relative;
    z-index: 1;
    min-height: 44px;
    padding: 0 19px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-500), #2e9edc);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 10px 24px rgba(47, 125, 244, 0.24);
    cursor: pointer;
    font-weight: 650;
}

.primary-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.secondary-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 11px;
    font-weight: 650;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.13);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 44px 2px 17px;
}

.section-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
}

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

.category-card {
    position: relative;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
    padding: 22px;
    text-align: left;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #cfe0f7;
    box-shadow: var(--shadow-md);
}

.category-index {
    color: var(--blue-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.category-card strong {
    display: block;
    margin-top: 16px;
    font-size: 18px;
}

.category-card small {
    color: var(--ink-500);
}

.category-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    color: var(--blue-600);
    background: var(--surface-blue);
    border-radius: 50%;
}

.recent-list {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.recent-item {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 20px;
    text-align: left;
    color: inherit;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.recent-item:last-child {
    border-bottom: 0;
}

.recent-item:hover {
    background: #f8fbff;
}

.recent-item strong,
.recent-item small {
    display: block;
}

.recent-item strong {
    margin-bottom: 2px;
}

.recent-item small {
    color: var(--ink-500);
    font-size: 12px;
}

.recent-item > span:last-child {
    color: var(--blue-500);
    font-size: 20px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 4px 15px;
    color: var(--ink-500);
    font-size: 12px;
}

.breadcrumbs button {
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.breadcrumbs button:hover {
    color: var(--blue-600);
}

.breadcrumb-separator {
    color: #a7b0bf;
}

.document-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-md);
}

.document-header {
    padding: clamp(28px, 5vw, 52px) clamp(24px, 5vw, 58px) 30px;
    background:
        radial-gradient(circle at 90% 10%, rgba(47, 125, 244, 0.1), transparent 20rem),
        linear-gradient(180deg, #fbfdff, #fff);
    border-bottom: 1px solid var(--line);
}

.document-kicker {
    margin: 0 0 7px;
    color: var(--blue-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.document-header h1 {
    margin: 0;
    font-size: clamp(29px, 4vw, 43px);
    line-height: 1.22;
    letter-spacing: -0.025em;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    color: var(--ink-500);
    font-size: 12px;
}

.copy-link-button {
    padding: 5px 9px;
    color: var(--blue-600);
    background: var(--surface-blue);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.markdown-body {
    padding: 36px clamp(24px, 5vw, 58px) 54px;
    color: #26334a;
    font-size: 15px;
    line-height: 1.82;
    overflow-wrap: anywhere;
}

.markdown-body > :first-child {
    margin-top: 0 !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: var(--ink-950);
    line-height: 1.35;
    scroll-margin-top: calc(var(--header-height) + 24px);
}

.markdown-body h1 {
    margin: 2.2em 0 0.8em;
    font-size: 30px;
}

.markdown-body h2 {
    margin: 2.15em 0 0.75em;
    padding-bottom: 0.45em;
    font-size: 24px;
    border-bottom: 1px solid var(--line);
}

.markdown-body h3 {
    margin: 1.8em 0 0.65em;
    font-size: 19px;
}

.markdown-body h4 {
    margin: 1.55em 0 0.6em;
    font-size: 16px;
}

.markdown-body p {
    margin: 0.8em 0 1.15em;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.45em;
}

.markdown-body li {
    margin: 0.33em 0;
}

.markdown-body strong {
    color: #18243a;
}

.markdown-body a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.markdown-body blockquote {
    margin: 1.4em 0;
    padding: 14px 17px;
    color: #3c526f;
    background: #f2f7fd;
    border: 1px solid #dce9f8;
    border-left: 4px solid var(--blue-500);
    border-radius: 4px 12px 12px 4px;
}

.markdown-body blockquote.is-warning {
    color: #70460e;
    background: #fff8e8;
    border-color: #f4deb0;
    border-left-color: #d78a18;
}

.markdown-body blockquote p {
    margin: 0.2em 0;
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 1.2em 0 1.8em;
    border: 1px solid var(--line);
    border-radius: 12px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.table-scroll:focus-visible {
    outline: 3px solid rgba(47, 125, 244, 0.25);
    outline-offset: 2px;
}

.markdown-body table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.55;
}

.markdown-body table.is-wide-table {
    width: max-content;
    min-width: 100%;
}

.markdown-body table.is-wide-table th,
.markdown-body table.is-wide-table td {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

.markdown-body th,
.markdown-body td {
    padding: 11px 13px;
    text-align: left;
    vertical-align: top;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.markdown-body th:last-child,
.markdown-body td:last-child {
    border-right: 0;
}

.markdown-body tr:last-child td {
    border-bottom: 0;
}

.markdown-body th {
    color: #24354e;
    background: #f2f6fb;
    font-weight: 700;
    white-space: nowrap;
}

.markdown-body tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.markdown-body tbody tr:hover {
    background: #f3f8ff;
}

.markdown-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.25em auto;
    background: #f7f8fa;
    border: 1px solid #e4e8ee;
    border-radius: 13px;
    box-shadow: 0 8px 26px rgba(14, 33, 61, 0.08);
    cursor: zoom-in;
}

.image-blocked {
    margin: 1em 0;
    padding: 12px 14px;
    color: #7a4b0b;
    background: #fff8e8;
    border: 1px solid #f0d8a8;
    border-radius: 10px;
    font-size: 13px;
}

.markdown-body code {
    padding: 0.15em 0.38em;
    color: #aa3150;
    background: #f5f1f4;
    border-radius: 5px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    overflow-x: auto;
    padding: 16px 18px;
    color: #dce7f7;
    background: #0b1728;
    border-radius: 12px;
}

.markdown-body pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.heading-anchor {
    margin-left: 8px;
    color: transparent;
    text-decoration: none;
    font-size: 0.72em;
}

.markdown-body h2:hover .heading-anchor,
.markdown-body h3:hover .heading-anchor,
.heading-anchor:focus {
    color: #9aa8ba;
}

.page-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 22px clamp(24px, 5vw, 58px) 32px;
    background: #fbfcfe;
    border-top: 1px solid var(--line);
}

.document-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin: 0 clamp(24px, 5vw, 58px) 42px;
    padding: 22px 24px;
    color: #eaf3ff;
    background: linear-gradient(135deg, #0a1a2e, #123f70);
    border: 1px solid rgba(47, 125, 244, 0.2);
    border-radius: 16px;
}

.document-contact h2 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 19px;
}

.document-contact p {
    margin: 0;
    color: rgba(234, 243, 255, 0.72);
    font-size: 13px;
    line-height: 1.6;
}

.document-contact a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #071426;
    text-decoration: none;
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.page-nav-button {
    min-height: 76px;
    padding: 12px 14px;
    text-align: left;
    color: var(--ink-800);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
}

.page-nav-button:last-child {
    text-align: right;
}

.page-nav-button:hover {
    color: var(--blue-600);
    border-color: #c9dcf6;
}

.page-nav-button small,
.page-nav-button strong {
    display: block;
}

.page-nav-button small {
    margin-bottom: 3px;
    color: var(--ink-500);
    font-size: 11px;
}

.toc-panel {
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 42px 24px 32px 8px;
}

.toc-title {
    margin-bottom: 11px;
    color: var(--ink-800);
    font-size: 12px;
    font-weight: 750;
}

.toc-panel nav {
    padding-left: 13px;
    border-left: 1px solid #dce2ea;
}

.toc-link {
    display: block;
    margin: 7px 0;
    color: var(--ink-500);
    text-decoration: none;
    font-size: 12px;
    line-height: 1.45;
}

.toc-link.level-3 {
    padding-left: 10px;
    font-size: 11px;
}

.toc-link:hover,
.toc-link.is-active {
    color: var(--blue-600);
}

.error-view {
    padding: 100px 20px;
    text-align: center;
}

.error-code {
    color: #ccdaeb;
    font-size: 68px;
    font-weight: 850;
    line-height: 1;
}

.error-view h1 {
    margin: 14px 0 6px;
}

.error-view p {
    margin: 0 0 22px;
    color: var(--ink-500);
}

.image-viewer {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 54px 24px 24px;
    background: rgba(2, 8, 18, 0.93);
    backdrop-filter: blur(8px);
}

.image-viewer.is-open {
    display: flex;
}

.image-viewer figure {
    max-width: 96vw;
    max-height: 90vh;
    margin: 0;
    text-align: center;
}

.image-viewer img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
}

.image-viewer figcaption {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.image-viewer-close {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    font-size: 25px;
}

.toast {
    position: fixed;
    z-index: 2200;
    right: 22px;
    bottom: 22px;
    max-width: min(360px, calc(100vw - 44px));
    padding: 11px 15px;
    color: #fff;
    background: rgba(7, 20, 38, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(3, 12, 25, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    font-size: 13px;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.mobile-overlay {
    display: none;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }

    .toc-panel {
        display: none;
    }

    .topbar {
        grid-template-columns: minmax(270px, 0.8fr) minmax(300px, 1.5fr) auto;
        gap: 18px;
    }

    .website-link {
        display: none;
    }
}

@media (max-width: 820px) {
    :root {
        --header-height: 116px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .topbar {
        height: var(--header-height);
        grid-template-columns: 1fr auto;
        grid-template-rows: 62px 44px;
        gap: 0 12px;
        padding: 0 14px 10px;
    }

    .brand-area {
        grid-column: 1;
        grid-row: 1;
    }

    .brand-mark {
        width: 35px;
        height: 35px;
        border-radius: 10px;
    }

    .brand-copy strong {
        font-size: 14px;
    }

    .brand-copy small {
        display: none;
    }

    .menu-button {
        width: 40px;
        height: 40px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 0 0 auto;
        margin-right: 6px;
        color: #fff;
        background: transparent;
        border: 0;
        border-radius: 9px;
    }

    .menu-button span {
        width: 18px;
        height: 1.5px;
        background: currentColor;
        border-radius: 2px;
    }

    .topbar-actions {
        grid-column: 2;
        grid-row: 1;
        gap: 6px;
    }

    .support-link {
        padding: 6px 9px;
        font-size: 11px;
    }

    .global-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .global-search input {
        height: 40px;
        padding-right: 16px;
    }

    .global-search kbd {
        display: none;
    }

    .app-shell {
        display: block;
        padding-top: var(--header-height);
    }

    .sidebar {
        position: fixed;
        z-index: 950;
        top: var(--header-height);
        bottom: 0;
        left: 0;
        width: min(86vw, 330px);
        height: auto;
        transform: translateX(-102%);
        transition: transform 0.24s ease;
        box-shadow: 20px 0 60px rgba(5, 17, 35, 0.2);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .mobile-overlay {
        position: fixed;
        z-index: 900;
        inset: var(--header-height) 0 0;
        background: rgba(4, 13, 25, 0.48);
        backdrop-filter: blur(2px);
    }

    body.sidebar-open .mobile-overlay {
        display: block;
    }

    .main {
        padding: 24px 14px 54px;
    }

    .hero-card {
        padding: 34px 25px 38px;
        border-radius: 20px;
    }

    .hero-card h1 {
        font-size: 34px;
    }

    .hero-card > p:not(.eyebrow) {
        margin-top: 16px;
        font-size: 14px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 128px;
    }

    .section-heading {
        margin-top: 35px;
    }

    .document-card {
        border-radius: 16px;
    }

    .document-header {
        padding: 28px 22px 24px;
    }

    .document-header h1 {
        font-size: 29px;
    }

    .document-meta {
        flex-wrap: wrap;
    }

    .markdown-body {
        padding: 28px 20px 40px;
        font-size: 15px;
        line-height: 1.78;
    }

    .markdown-body h2 {
        font-size: 22px;
    }

    .markdown-body h3 {
        font-size: 18px;
    }

    .markdown-body table {
        min-width: 560px;
        font-size: 12px;
    }

    .markdown-body th,
    .markdown-body td {
        padding: 9px 10px;
    }

    .page-navigation {
        grid-template-columns: 1fr;
        padding: 18px 20px 24px;
    }

    .document-contact {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 0 20px 32px;
        padding: 19px;
    }

    .document-contact a {
        justify-self: start;
    }

    .page-nav-button:last-child {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .brand-copy strong {
        max-width: 190px;
    }

    .support-link {
        display: none;
    }

    .hero-card::after {
        right: -48px;
        font-size: 180px;
    }

    .recent-item {
        padding: 14px 15px;
    }

    .breadcrumbs {
        margin-left: 2px;
    }
}

@media print {
    :root {
        --header-height: 0px;
    }

    body {
        background: #fff;
        font-size: 11pt;
    }

    .topbar,
    .sidebar,
    .toc-panel,
    .breadcrumbs,
    .copy-link-button,
    .page-navigation,
    .toast,
    .image-viewer {
        display: none !important;
    }

    .app-shell {
        display: block;
        padding: 0;
    }

    .main {
        padding: 0;
    }

    .document-view {
        width: 100%;
    }

    .document-card {
        border: 0;
        box-shadow: none;
    }

    .document-header,
    .markdown-body {
        padding-right: 0;
        padding-left: 0;
    }

    .table-scroll {
        overflow: visible;
    }

    .markdown-body table {
        min-width: 0;
        break-inside: avoid;
    }

    .markdown-body table.is-wide-table {
        width: 100%;
        min-width: 0;
    }

    .markdown-body table.is-wide-table th,
    .markdown-body table.is-wide-table td {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .markdown-body img {
        max-height: 220mm;
        break-inside: avoid;
    }
}

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