:root {
	--page: #f3f6f4;
	--paper: #ffffff;
	--paper-muted: #e9efec;
	--ink: #17211c;
	--text: #29372f;
	--muted: #607067;
	--nav: #101713;
	--nav-soft: #18231e;
	--nav-text: #d6dfda;
	--accent: #087a58;
	--accent-bright: #31d398;
	--accent-soft: #dff5ec;
	--gold: #976b16;
	--gold-soft: #fff2ce;
	--blue: #285f8e;
	--blue-soft: #e8f2fb;
	--danger: #99433c;
	--danger-soft: #fbecea;
	--line: #d9e1dd;
	--shadow: 0 12px 30px rgba(22, 33, 27, .08);
	--sidebar-width: 292px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.72;
	letter-spacing: 0;
}
body.docs-nav-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #045f44; }
img { max-width: 100%; }

.reading-progress { position: fixed; top: 0; right: 0; left: 0; z-index: 100; height: 3px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--accent-bright); }
.documentation-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding: 28px 22px 22px;
	overflow-y: auto;
	background: var(--nav);
	color: var(--nav-text);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.brand, .mobile-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover, .mobile-brand:hover { color: #fff; }
.brand-mark, .mobile-brand > span {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 4px;
	background: var(--accent-bright);
	color: #062118;
	font-size: 14px;
	font-weight: 900;
}
.brand strong, .brand small { display: block; line-height: 1.3; }
.brand strong { color: #fff; font-size: 17px; }
.brand small { margin-top: 3px; color: #8fa098; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.documentation-nav { display: grid; gap: 2px; }
.nav-label { display: block; margin: 20px 10px 7px; color: #73867c; font-size: 10px; font-weight: 800; line-height: 1.3; text-transform: uppercase; }
.nav-label:first-child { margin-top: 0; }
.documentation-nav a { position: relative; display: block; padding: 8px 12px; border-radius: 4px; color: #aebdb5; font-size: 14px; font-weight: 650; line-height: 1.4; text-decoration: none; }
.documentation-nav a:hover, .documentation-nav a:focus-visible { background: var(--nav-soft); color: #fff; }
.documentation-nav a.is-active { background: #20362c; color: #fff; }
.documentation-nav a.is-active::before { position: absolute; top: 9px; bottom: 9px; left: 0; width: 3px; background: var(--accent-bright); content: ""; }
.sidebar-support { margin-top: auto; padding: 18px 12px 4px; }
.sidebar-support span, .sidebar-support a { display: block; }
.sidebar-support span { margin-bottom: 5px; color: #7e9187; font-size: 12px; }
.sidebar-support a { color: var(--accent-bright); font-size: 14px; font-weight: 750; }

.main-content { min-width: 0; background: var(--page); }
.document-width { width: min(100%, 1080px); margin: 0 auto; padding: 64px 64px 42px; }
.document-header { padding: 52px 56px; background: var(--nav); color: #f4f7f5; box-shadow: var(--shadow); }
.document-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 26px; color: #9eafa6; font-size: 12px; font-weight: 750; text-transform: uppercase; }
.document-meta span + span { position: relative; }
.document-meta span + span::before { position: absolute; top: 50%; left: -12px; width: 3px; height: 3px; border-radius: 50%; background: var(--accent-bright); content: ""; transform: translateY(-50%); }
h1, h2, h3, p { letter-spacing: 0; }
h1 { max-width: 760px; margin: 0; color: #fff; font-size: 52px; font-weight: 760; line-height: 1.08; }
.document-summary { max-width: 760px; margin: 22px 0 0; color: #c6d1cb; font-size: 19px; line-height: 1.65; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 4px; font-size: 14px; font-weight: 800; line-height: 1.3; text-decoration: none; }
.button-primary { background: var(--accent-bright); color: #062118; }
.button-primary:hover { background: #53dfac; color: #062118; }
.button-secondary { background: #27332d; color: #f4f7f5; }
.button-secondary:hover { background: #34443c; color: #fff; }

.section { padding: 70px 0; scroll-margin-top: 24px; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 30px; }
.section-number { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 4px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 850; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 850; line-height: 1.35; text-transform: uppercase; }
h2 { margin: 0; color: var(--ink); font-size: 36px; font-weight: 740; line-height: 1.18; }
h3 { margin: 34px 0 12px; color: var(--ink); font-size: 21px; font-weight: 750; line-height: 1.35; }
p { margin: 0 0 18px; }
p + p { margin-top: 14px; }
strong { color: var(--ink); }
ul, ol { margin: 18px 0; padding-left: 24px; }
li { margin: 8px 0; }
code { padding: 2px 6px; border-radius: 3px; background: #e4ebe7; color: #174835; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; overflow-wrap: anywhere; }

.scope-grid, .comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.scope-panel, .comparison-grid > div { padding: 26px 28px; background: var(--paper); box-shadow: var(--shadow); }
.scope-panel h3, .comparison-grid h3 { margin-top: 0; }
.scope-panel.included { border-top: 4px solid var(--accent); }
.scope-panel.excluded { border-top: 4px solid var(--gold); }
.check-list, .plain-list { padding: 0; list-style: none; }
.check-list li, .plain-list li { position: relative; padding-left: 28px; }
.check-list li::before { position: absolute; top: 1px; left: 0; color: var(--accent); content: "\2713"; font-weight: 900; }
.plain-list li::before { position: absolute; top: 10px; left: 4px; width: 8px; height: 2px; background: var(--gold); content: ""; }
.two-column-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.notice { position: relative; margin: 28px 0; padding: 22px 24px 22px 58px; border-radius: 4px; }
.notice::before { position: absolute; top: 23px; left: 24px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; content: "i"; font-size: 13px; font-weight: 900; }
.notice strong, .notice p { display: block; }
.notice strong { margin-bottom: 4px; }
.notice p { margin: 0; }
.notice-important { background: var(--gold-soft); }
.notice-important::before { background: var(--gold); content: "!"; }
.notice-info { background: var(--blue-soft); }
.notice-info::before { background: var(--blue); }
.notice-success { background: var(--accent-soft); }
.notice-success::before { background: var(--accent); content: "\2713"; }
.notice-warning { background: var(--danger-soft); }
.notice-warning::before { background: var(--danger); content: "!"; }

.definition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 26px 0 34px; background: var(--line); }
.definition-grid > div { padding: 20px; background: var(--paper); }
.definition-grid dt, .definition-grid dd { margin: 0; }
.definition-grid dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.definition-grid dd { margin-top: 8px; color: var(--ink); font-weight: 730; line-height: 1.4; }
.table-scroll { max-width: 100%; overflow-x: auto; border-radius: 4px; background: var(--paper); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td { padding: 17px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #e7ece9; color: #506158; font-size: 11px; font-weight: 850; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.task-steps { counter-reset: task-step; display: grid; gap: 1px; margin: 28px 0; padding: 0; background: var(--line); list-style: none; box-shadow: var(--shadow); }
.task-steps li { position: relative; min-height: 108px; margin: 0; padding: 25px 28px 24px 86px; background: var(--paper); }
.task-steps li::before { counter-increment: task-step; position: absolute; top: 26px; left: 28px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; content: counter(task-step); font-size: 13px; font-weight: 850; }
.task-steps h3, .task-steps p { margin: 0; }
.task-steps h3 { font-size: 18px; }
.task-steps p { margin-top: 6px; color: var(--muted); }
.compact-steps li { min-height: 94px; }
.quick-path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 28px 0; background: var(--ink); color: #fff; }
.quick-path span { position: relative; padding: 18px; font-size: 12px; font-weight: 800; line-height: 1.35; text-align: center; }
.quick-path span + span::before { position: absolute; top: 50%; left: 0; width: 1px; height: 26px; background: #425047; content: ""; transform: translateY(-50%); }

.figure { margin: 30px 0; background: var(--paper); box-shadow: var(--shadow); }
.figure-media { display: grid; place-items: center; padding: 18px; overflow: hidden; background: #15211b; }
.figure img { display: block; width: 100%; height: auto; background: #0b100d; }
.figure figcaption { padding: 16px 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.decision-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.decision-list > div { padding: 22px; background: var(--paper); box-shadow: var(--shadow); }
.decision-list strong, .decision-list p { display: block; }
.decision-list p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.code-list { display: grid; gap: 1px; margin-top: 26px; background: var(--line); box-shadow: var(--shadow); }
.code-row { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(0, 1.5fr) 44px; gap: 18px; align-items: center; min-width: 0; padding: 18px 20px; background: var(--paper); }
.code-row strong, .code-row span { display: block; }
.code-row span { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
pre { min-width: 0; margin: 0; padding: 13px 15px; overflow-x: auto; border-radius: 3px; background: #17211c; color: #d7eee3; font-size: 13px; line-height: 1.55; }
pre code { padding: 0; background: transparent; color: inherit; white-space: pre; }
.copy-button, .icon-button { display: inline-grid; place-items: center; border: 0; border-radius: 4px; cursor: pointer; }
.copy-button { width: 40px; height: 40px; background: var(--paper-muted); color: var(--ink); }
.copy-button:hover, .copy-button:focus-visible { background: var(--accent-soft); color: var(--accent); }
.copy-button svg, .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.copy-button.is-copied { background: var(--accent); color: #fff; }
.copy-status { position: fixed; right: 20px; bottom: 20px; z-index: 110; padding: 11px 15px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }
.copy-status.is-visible { opacity: 1; transform: translateY(0); }

.media-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.media-pair .figure { margin: 28px 0; }
.media-pair .figure img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; }
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 26px; background: var(--line); }
.game-list span { padding: 13px 16px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 700; }
.feature-figure { width: min(100%, 620px); margin-right: auto; margin-left: auto; }
.feature-figure img { width: 100%; height: auto; max-height: none; object-fit: contain; }
.maintenance-grid, .faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.maintenance-grid > div, .faq-grid > div { padding: 24px 26px; background: var(--paper); box-shadow: var(--shadow); }
.maintenance-grid strong, .faq-grid h3 { display: block; margin: 0; font-size: 17px; }
.maintenance-grid p, .faq-grid p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.troubleshooting-list { background: var(--paper); box-shadow: var(--shadow); }
.troubleshooting-list details + details { border-top: 1px solid var(--line); }
.troubleshooting-list summary { position: relative; padding: 19px 58px 19px 22px; color: var(--ink); cursor: pointer; font-weight: 760; list-style: none; }
.troubleshooting-list summary::-webkit-details-marker { display: none; }
.troubleshooting-list summary::after { position: absolute; top: 50%; right: 22px; content: "+"; font-size: 22px; font-weight: 500; transform: translateY(-50%); }
.troubleshooting-list details[open] summary::after { content: "-"; }
.troubleshooting-list details p { margin: -4px 0 0; padding: 0 58px 22px 22px; color: var(--muted); }
.support-section { padding-bottom: 52px; }
.support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.support-grid a { padding: 22px; background: var(--ink); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.support-grid a:hover { background: #24332b; color: #fff; }
.support-grid span, .support-grid strong { display: block; }
.support-grid span { color: #91a39a; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.support-grid strong { margin-top: 7px; color: #fff; overflow-wrap: anywhere; }
.document-footer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 30px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.document-footer p { margin: 0; }
.mobile-bar, .sidebar-close, .sidebar-backdrop { display: none; }

@media (max-width: 1120px) {
	.document-width { padding: 46px 42px 36px; }
	.document-header { padding: 44px; }
	.definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.code-row { grid-template-columns: minmax(150px, .65fr) minmax(0, 1.5fr) 40px; }
}

@media (max-width: 900px) {
	.mobile-bar { position: sticky; top: 0; z-index: 70; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 18px; background: var(--nav); box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
	.mobile-brand > span { width: 34px; height: 34px; font-size: 12px; }
	.mobile-brand strong { color: #fff; font-size: 15px; }
	.icon-button { width: 42px; height: 42px; background: #223029; color: #fff; }
	.documentation-shell { display: block; }
	.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 90; width: min(86vw, 320px); height: 100dvh; transform: translateX(-105%); transition: transform .22s ease; }
	.docs-nav-open .sidebar { transform: translateX(0); }
	.sidebar-close { display: inline-grid; flex: 0 0 auto; }
	.sidebar-backdrop { position: fixed; inset: 0; z-index: 80; display: block; background: rgba(4, 9, 6, .58); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
	.docs-nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
	.document-width { padding-top: 34px; }
	h1 { font-size: 44px; }
	.scope-grid, .comparison-grid, .maintenance-grid, .faq-grid { grid-template-columns: 1fr; }
	.decision-list { grid-template-columns: 1fr; }
	.code-row { grid-template-columns: minmax(0, 1fr) 40px; gap: 12px; }
	.code-row > div, .code-row pre { grid-column: 1; }
	.code-row .copy-button { grid-column: 2; grid-row: 1 / span 2; }
	.media-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 15px; }
	.document-width { padding: 20px 16px 30px; }
	.document-header { padding: 34px 24px; }
	.document-meta { display: grid; gap: 4px; margin-bottom: 20px; }
	.document-meta span + span::before { display: none; }
	h1 { font-size: 36px; }
	.document-summary { font-size: 17px; }
	.header-actions { display: grid; }
	.section { padding: 52px 0; }
	.section-heading { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; margin-bottom: 24px; }
	.section-number { width: 38px; height: 38px; }
	h2 { font-size: 28px; }
	h3 { font-size: 19px; }
	.scope-panel, .comparison-grid > div, .maintenance-grid > div, .faq-grid > div { padding: 22px; }
	.notice { padding: 20px 20px 20px 52px; }
	.notice::before { top: 21px; left: 19px; }
	.definition-grid { grid-template-columns: 1fr; }
	.task-steps li { min-height: 0; padding: 22px 20px 22px 66px; }
	.task-steps li::before { top: 22px; left: 18px; width: 32px; height: 32px; }
	.quick-path { grid-template-columns: 1fr; }
	.quick-path span { padding: 13px 16px; text-align: left; }
	.quick-path span + span::before { top: 0; right: 16px; left: 16px; width: auto; height: 1px; transform: none; }
	.two-column-list, .game-list { grid-template-columns: 1fr; }
	.code-row { padding: 16px; }
	.media-pair { grid-template-columns: 1fr; }
	.media-pair .figure { margin: 20px 0 0; }
	.media-pair .figure img { height: auto; max-height: none; object-fit: contain; }
	.figure-media { padding: 12px; }
	.figure figcaption { padding: 14px 16px; }
	.troubleshooting-list summary { padding: 17px 48px 17px 18px; }
	.troubleshooting-list summary::after { right: 18px; }
	.troubleshooting-list details p { padding: 0 18px 19px; }
	.document-footer { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sidebar, .sidebar-backdrop, .copy-status { transition: none; }
}

@media print {
	.reading-progress, .mobile-bar, .sidebar, .sidebar-backdrop, .header-actions, .copy-button, .copy-status { display: none !important; }
	body, .main-content { background: #fff; color: #111; }
	.documentation-shell { display: block; }
	.document-width { width: 100%; padding: 0; }
	.document-header, .scope-panel, .figure, .task-steps, .table-scroll, .maintenance-grid > div, .faq-grid > div { box-shadow: none; }
	.section { break-inside: avoid; }
	a { color: #111; }
}
