:root {
    --bg: #f7f9fc;
    --panel: #ffffff;
    --text: #172033;
    --muted: #5d6b82;
    --border: #dbe3ee;
    --soft: #eef4fa;
    --primary: #155e95;
    --primary-dark: #0f3f63;
    --accent: #16866a;
    --warn: #b7791f;
    --danger: #b42318;
    --sidebar-w: 292px;
    --toc-w: 260px;
    --topbar-h: 64px;
    --radius: 8px;
    --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(22, 134, 106, 0.12), transparent 30%),
        radial-gradient(circle at 86% 8%, rgba(37, 99, 235, 0.11), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 46%, #eef3f7 100%),
        var(--bg);
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(203, 213, 225, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 220px; }
.brand__logo {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f172a, #2563eb, #16866a);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}
.brand__text small { display: block; color: var(--muted); margin-top: 2px; }
.topbar__right { display: flex; gap: 10px; align-items: center; }
.pill {
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}
.btn--primary {
    background: linear-gradient(135deg, #1d4ed8, #16866a);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
}
.search { position: relative; width: min(620px, 44vw); }
.search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 88px 0 38px;
    outline: none;
    background: #fff;
}
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21, 94, 149, 0.12); }
.search__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--muted);
}
.kbd {
    font-family: var(--mono);
    font-size: 11px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 2px 5px;
    color: var(--muted);
    background: var(--soft);
}
.search .kbd { position: absolute; top: 50%; transform: translateY(-50%); }
.search .kbd:nth-of-type(1) { right: 48px; }
.search .kbd:nth-of-type(2) { right: 18px; }
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
    min-height: calc(100vh - var(--topbar-h));
    background:
        linear-gradient(rgba(15, 23, 42, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.022) 1px, transparent 1px);
    background-size: 38px 38px, 38px 38px;
}
.sidebar {
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: auto;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(18, 32, 51, 0.9), rgba(13, 23, 38, 0.94)),
        radial-gradient(circle at 16% 0%, rgba(37, 99, 235, 0.26), transparent 34%),
        radial-gradient(circle at 88% 16%, rgba(22, 134, 106, 0.24), transparent 36%);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 18px 0 50px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
    color: #e7eefc;
}
.sidebar__section {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.065);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 10px;
}
.sidebar__section + .sidebar__section {
    margin-top: 12px;
}
.sidebar__title {
    color: rgba(231, 238, 252, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    font-weight: 900;
    margin: 0 0 8px;
    padding: 0 4px;
}
.sidebar__title:first-child { margin-top: 0; }
.nav { display: grid; gap: 4px; }
.nav__link {
    display: block;
    color: rgba(231, 238, 252, 0.84);
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.nav__link:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateX(2px);
}
.nav__link.is-active {
    background: linear-gradient(135deg, #ffffff, #eaf3ff);
    color: #132238;
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
    font-weight: 850;
}
.main { padding: 28px 24px 48px; min-width: 0; }
.content {
    max-width: 980px;
    min-width: 0;
    margin: 0 auto;
    overflow-wrap: anywhere;
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}
h1 { font-size: 34px; line-height: 1.16; margin: 8px 0 12px; letter-spacing: 0; }
h2 { font-size: 23px; margin: 34px 0 12px; padding-top: 8px; letter-spacing: 0; }
h3 { font-size: 18px; margin: 22px 0 10px; letter-spacing: 0; }
p, li { line-height: 1.75; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 800; font-size: 12px; margin: 0 0 10px; }
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(120deg, rgba(22, 134, 106, 0.12), transparent 36%),
        linear-gradient(68deg, transparent 0%, rgba(37, 99, 235, 0.075) 58%, rgba(183, 121, 31, 0.08) 100%),
        linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    background-size: 38px 38px, 38px 38px, auto, auto, auto;
    box-shadow: 0 18px 44px rgba(16, 24, 40, 0.08);
    padding: clamp(20px, 3vw, 32px);
}
.hero__panel, .card, .callout {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}
.hero__panel { padding: 18px; }
.hero__panel--visual {
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 10px;
}
.hero__panel--visual img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fafc;
}
.hero__panel--visual strong,
.hero__panel--visual p {
    margin-inline: 8px;
}
.hero__panel--visual p {
    margin-top: 0;
    color: var(--muted);
}
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.card { padding: 16px; }
.card__title { font-weight: 800; margin-bottom: 8px; }
.list { margin: 0; padding-left: 20px; }
.steps { margin: 0; padding-left: 22px; }
code {
    font-family: var(--mono);
    font-size: 0.92em;
}
:not(pre) > code {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 5px;
    white-space: normal;
    overflow-wrap: anywhere;
}
pre {
    position: relative;
    max-width: 100%;
    overflow: auto;
    background: #101827;
    color: #eef4ff;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid #253247;
}
pre code { color: inherit; background: transparent; border: 0; padding: 0; white-space: pre; }
.copyBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 6px;
    padding: 5px 9px;
    cursor: pointer;
}
.callout { padding: 14px 16px; margin: 16px 0; border-left: 5px solid var(--primary); }
.callout--tip { border-left-color: var(--accent); background: #f2fbf7; }
.callout--warn { border-left-color: var(--warn); background: #fff8e8; }
.callout--note { border-left-color: var(--primary); background: #edf6fc; }
.screenshot-placeholders {
    margin: 34px 0 8px;
    padding: 18px;
    background: #f8fbfe;
    border: 1px dashed #b9c8d9;
    border-radius: var(--radius);
}
.screenshot-placeholders h2 { margin-top: 0; padding-top: 0; }
.screenshot-placeholders__intro { color: var(--muted); margin-top: -4px; }
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.screenshot-placeholder {
    min-height: 166px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    border: 1px dashed #9fb2c8;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(21, 94, 149, 0.06), rgba(22, 134, 106, 0.06)),
        #fff;
}
.screenshot-placeholder__label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
}
.screenshot-placeholder__title {
    font-size: 18px;
    font-weight: 800;
}
.screenshot-placeholder__path {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.screenshot-placeholder__note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    display: block;
    margin: 16px 0;
}
th, td { border-bottom: 1px solid var(--border); padding: 11px 12px; text-align: left; vertical-align: top; line-height: 1.6; }
th { background: var(--soft); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    margin-top: 34px;
    padding-top: 18px;
}
.pager a { max-width: 48%; }
.toc {
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: auto;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(18, 32, 51, 0.86), rgba(13, 23, 38, 0.9)),
        radial-gradient(circle at 24% 0%, rgba(37, 99, 235, 0.2), transparent 38%),
        radial-gradient(circle at 80% 20%, rgba(22, 134, 106, 0.18), transparent 42%);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -18px 0 46px rgba(15, 23, 42, 0.09);
    backdrop-filter: blur(18px);
}
.toc__title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(231, 238, 252, 0.68);
    font-weight: 800;
    margin-bottom: 10px;
}
.toc__list a {
    display: block;
    color: rgba(231, 238, 252, 0.78);
    padding: 7px 9px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
}
.toc__list a:hover, .toc__list a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    text-decoration: none;
}
.muted { color: var(--muted); }
@media (max-width: 1180px) {
    .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
    .toc { display: none; }
}
@media (max-width: 860px) {
    .topbar { flex-wrap: wrap; height: auto; padding: 12px; }
    .brand { min-width: 0; }
    .search { width: 100%; order: 3; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    .hero, .grid2, .cards3 { grid-template-columns: 1fr; }
    .screenshot-grid { grid-template-columns: 1fr; }
    .main { padding: 20px 14px 40px; }
    h1 { font-size: 28px; }
    table { display: block; overflow-x: auto; }
}
@media print {
    .topbar, .sidebar, .toc, .pager, .copyBtn { display: none !important; }
    body { background: #fff; }
    .main { padding: 0; }
}
