:root { --bg: #0f1419; --panel: #171d25; --line: #2a3140; --text: #e6e8ee; --muted: #a3abbb; --accent: #6aa3ff; --warn: #f5b84b; color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.g-nav, .g-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between; padding: 12px max(16px, calc((100% - 860px) / 2)); background: #0b0f14; border-bottom: 1px solid var(--line); }
.g-foot { border: 0; border-top: 1px solid var(--line); margin-top: 56px; color: var(--muted); font-size: 14px; }
.g-nav nav, .g-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.g-nav a:not(.g-btn):not(.g-brand), .g-foot nav a { color: var(--text); text-decoration: none; }
.g-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text) !important; text-decoration: none; }
.g-brand img { border-radius: 6px; }
.g-btn { display: inline-block; background: linear-gradient(135deg, #4f8cff, #7b5cff); color: #fff !important; text-decoration: none; border: 0; border-radius: 10px; padding: 9px 16px; font: 600 15px/1.2 system-ui, sans-serif; cursor: pointer; }
.g-btn.small { padding: 6px 12px; font-size: 13px; background: #2a3140; }
.g-btn.big { padding: 14px 26px; font-size: 17px; }
.g-main { max-width: 860px; margin: 0 auto; padding: 8px 16px 0; }
.g-crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 16px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.g-crumbs li + li::before { content: '›'; margin: 0 8px; }
.g-crumbs a { color: var(--muted); }
h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.2; margin: 14px 0 12px; }
h2 { font-size: clamp(22px, 3.6vw, 28px); line-height: 1.25; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 20px 0 4px; }
section { margin-top: 44px; }
.g-lead { font-size: 19px; color: #d3d8e2; }
.g-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 0; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.g-run { position: relative; border: 1px solid var(--line); border-radius: 12px; background: #11161d; overflow: hidden; }
.g-run { height: 560px; }
.g-run iframe { width: 100%; height: 100%; border: 0; display: block; }
.g-small { font-size: 14px; color: var(--muted); }
.g-steps { padding-left: 0; list-style: none; counter-reset: s; }
.g-steps li { counter-increment: s; position: relative; padding: 2px 0 6px 48px; }
.g-steps li::before { content: counter(s); position: absolute; left: 0; top: 4px; width: 32px; height: 32px; border-radius: 50%; background: #243049; color: #fff; display: grid; place-items: center; font-weight: 700; }
.g-steps h3 { margin: 4px 0 2px; }
.g-steps p { margin: 0; color: #cdd3de; }
.g-list li { margin: 4px 0; }
.g-warn { background: #2a2210; border: 1px solid #6b5217; border-left: 4px solid var(--warn); border-radius: 8px; padding: 12px 14px; }
.g-note { color: var(--muted); font-size: 15px; }
.g-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--muted); caption-side: top; }
th, td { text-align: left; padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--panel); border-top: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
.g-code { border: 1px solid var(--line); border-radius: 10px; background: #0b0f14; }
.g-code summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
.g-codebar { display: flex; justify-content: flex-end; padding: 6px 10px; }
pre { margin: 0; padding: 12px 14px; overflow: auto; max-height: 560px; font: 13px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: #0b0f14; border-radius: 10px; }
.g-code pre { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
#embed pre { border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; }
.g-fix dt { font-weight: 700; margin-top: 16px; }
.g-fix dd { margin: 4px 0 0; color: #cdd3de; }
.g-cta { text-align: center; padding: 28px 16px; background: linear-gradient(135deg, #16203a, #1f1a3a); border: 1px solid var(--line); border-radius: 14px; }
.g-related ul { padding-left: 20px; }
.g-cards { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g-cards a { display: block; height: 100%; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; }
.g-cards a:hover { border-color: var(--accent); }
.g-cards img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #11161d; border-radius: 8px; }
.g-cards h2 { font-size: 19px; margin: 12px 0 6px; }
.g-cards p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.g-more { color: var(--accent); font-weight: 600; font-size: 15px; }
@media (max-width: 560px) { body { font-size: 16px; } .g-run { height: 620px; } .g-lead { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
