/* Fonts: self-hosted (Unbounded, Golos Text, JetBrains Mono - SIL OFL 1.1) */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/unbounded-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/unbounded-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/unbounded-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/unbounded-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/golos-text-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/golos-text-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/golos-text-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/golos-text-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/golos-text-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/golos-text-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/golos-text-cyrillic-700-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/golos-text-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/jetbrains-mono-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/jetbrains-mono-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Nightward site. Landing is a single night palette by design; docs follow the reader's theme. */

:root {
	--ink: #0a0f24;
	--ink-2: #10173a;
	--ink-3: #172048;
	--line: #242e5c;
	--moon: #eceef6;
	--mist: #a3abcb;
	--haze: #6f78a0;
	--lantern: #f4b740;
	--lantern-2: #ffca63;
	--on-lantern: #1b1405;
	--crit: #ff6b6b;
	--high: #ffa24a;
	--med: #7fb2ff;
	--ok: #4fd39a;

	/* docs palette (light) */
	--d-bg: #f5f6fa;
	--d-surface: #ffffff;
	--d-text: #151a33;
	--d-muted: #555d80;
	--d-line: #e1e4ef;
	--d-code: #eef0f7;
	--d-link: #8a5a00;
	--d-accent: #f4b740;
	--d-side: #0f1532;
	--d-side-text: #c9cee4;

	--f-display: "Unbounded", "Golos Text", system-ui, sans-serif;
	--f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--d-bg: #0b1026;
		--d-surface: #10173a;
		--d-text: #e6e9f4;
		--d-muted: #a3abcb;
		--d-line: #242e5c;
		--d-code: #172048;
		--d-link: #ffca63;
		--d-side: #0a0f24;
		--d-side-text: #b8bfdc;
	}
	:root:not([data-theme="light"]) body.docs { color-scheme: dark; }
}
:root[data-theme="dark"] {
	--d-bg: #0b1026;
	--d-surface: #10173a;
	--d-text: #e6e9f4;
	--d-muted: #a3abcb;
	--d-line: #242e5c;
	--d-code: #172048;
	--d-link: #ffca63;
	--d-side: #0a0f24;
	--d-side-text: #b8bfdc;
}
:root[data-theme="dark"] body.docs { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--f-body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; border-radius: 4px; }
code, kbd, .mono { font-family: var(--f-mono); font-size: .86em; }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; }
.ico { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.15em; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--lantern); color: var(--on-lantern); padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- landing (night) ---------- */
body.night { background: var(--ink); color: var(--moon); color-scheme: dark; }

.site-head {
	position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
	background: color-mix(in srgb, var(--ink) 82%, transparent);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: .01em; color: var(--moon); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--mist); font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--moon); }
.nav-gh { display: inline-flex; align-items: center; gap: 6px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-lantern); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 13px; font-weight: 600; }
.lang a, .lang span { padding: 4px 10px; text-decoration: none; color: var(--mist); }
.lang [aria-current="true"] { background: var(--ink-3); color: var(--moon); }
.btn {
	display: inline-flex; align-items: center; gap: 8px; justify-content: center;
	font: 600 15px/1 var(--f-body); text-decoration: none; border-radius: 10px;
	padding: 13px 18px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--lantern); color: var(--on-lantern); }
.btn-primary:hover { background: var(--lantern-2); }
.btn-ghost { border-color: var(--line); color: var(--moon); }
.btn-ghost:hover { border-color: var(--haze); }
.btn-sm { padding: 9px 13px; font-size: 14px; border-radius: 9px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--moon); border-radius: 9px; padding: 8px 10px; font: 600 14px var(--f-body); }

.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-sky svg { position: absolute; right: -120px; top: -140px; width: 620px; height: 620px; opacity: .9; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow { font: 600 12px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--lantern); }
.hero h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -.02em; margin: 14px 0 20px; }
.hero h1 em { font-style: normal; color: var(--lantern); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--mist); max-width: 34em; margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--haze); font-size: 14px; }
.facts li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--haze); margin-right: 8px; vertical-align: middle; }
.facts li:first-child::before { display: none; }

/* event card mock */
.event {
	background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
	border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 16px;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .02) inset;
	font-size: 14px;
}
.event-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--haze); font-size: 12.5px; }
.pill { display: inline-block; font: 700 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 5px 9px; border: 1px solid; }
.pill.crit { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 45%, transparent); background: color-mix(in srgb, var(--crit) 12%, transparent); }
.pill.high { color: var(--high); border-color: color-mix(in srgb, var(--high) 45%, transparent); background: color-mix(in srgb, var(--high) 12%, transparent); }
.pill.med { color: var(--med); border-color: color-mix(in srgb, var(--med) 45%, transparent); background: color-mix(in srgb, var(--med) 12%, transparent); }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 0 color-mix(in srgb, var(--crit) 60%, transparent); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--crit) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.event h3 { font: 600 17px/1.35 var(--f-body); letter-spacing: 0; margin: 12px 0 6px; color: var(--moon); }
.event p { margin: 0 0 14px; color: var(--mist); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kv dt, .kv dd { margin: 0; padding: 8px 11px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--haze); font-size: 12.5px; }
.kv dd { font-family: var(--f-mono); font-size: 12px; color: var(--moon); overflow-wrap: anywhere; }
.kv dt:nth-last-of-type(1), .kv dd:last-of-type { border-bottom: 0; }
.kv mark { background: none; color: var(--lantern); }
.event-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; color: var(--haze); font-size: 12.5px; }

/* sections */
.band { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.band-alt { background: var(--ink-2); }
.head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.head h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.015em; margin: 10px 0 14px; }
.head p { color: var(--mist); margin: 0; max-width: 40em; }

.contrast { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contrast div { border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.contrast h3 { font-size: 15px; font-weight: 500; margin: 0 0 10px; }
.contrast p { margin: 0; color: var(--mist); font-size: 15px; }
.contrast .us { border-color: color-mix(in srgb, var(--lantern) 55%, transparent); background: color-mix(in srgb, var(--lantern) 6%, transparent); }
.contrast .us h3 { color: var(--lantern); }
.questions { margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.questions li { padding-left: 22px; position: relative; color: var(--moon); }
.questions li::before { content: "?"; position: absolute; left: 0; top: 0; color: var(--lantern); font-family: var(--f-display); font-weight: 600; }

.monitors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.mon-group h3 { font: 600 12px/1.2 var(--f-body); letter-spacing: .14em; letter-spacing: .14em; text-transform: uppercase; color: var(--haze); margin: 0 0 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mon { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.mon-name { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.mon-name b { font-family: var(--f-display); font-weight: 500; font-size: 15.5px; letter-spacing: -.005em; }
.mon-name code { color: var(--lantern); font-size: 12px; }
.mon p { margin: 0; color: var(--mist); font-size: 15px; }

.spot { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.spot + .spot { margin-top: clamp(56px, 8vw, 96px); }
.spot.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.spot.flip .spot-text { order: 2; }
.spot h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; margin: 10px 0 14px; letter-spacing: -.01em; }
.spot p { color: var(--mist); margin: 0 0 14px; }
.spot ul { margin: 0; padding-left: 18px; color: var(--mist); }
.spot li { margin: 6px 0; }
.shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #f0f0f1; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8); }
.shot img { width: 100%; }
.shot a { display: block; cursor: zoom-in; }

.mails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.mails figure { margin: 0; }
.mails .shot { background: #f2f4f7; max-height: 640px; position: relative; }
.mails .shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 80px; background: linear-gradient(transparent, #f2f4f7); }
figcaption { color: var(--haze); font-size: 14px; margin-top: 10px; }
.points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.points div { border-top: 1px solid var(--line); padding-top: 14px; }
.points b { display: block; margin-bottom: 4px; }
.points span { color: var(--mist); font-size: 15px; }
.clock { font-family: var(--f-display); color: var(--lantern); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { background: none; border: 1px solid var(--line); color: var(--mist); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--f-body); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--moon); border-color: var(--moon); color: var(--ink); }
.tab-panel p { color: var(--mist); max-width: 60em; margin: 0 0 16px; }

.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.limits div { border: 1px dashed var(--line); border-radius: 14px; padding: 20px; }
.limits b { display: block; margin-bottom: 6px; }
.limits span { color: var(--mist); font-size: 15px; }

.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; font-family: var(--f-body); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lantern); font-family: var(--f-display); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--mist); margin: 12px 0 0; }

.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; max-width: 860px; }
.avatar { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; border: 1px solid var(--line); background: var(--ink-3); }
.about-links { margin-top: 14px !important; }
.about-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--moon) !important; font-size: 14px; font-weight: 500; }
.about-links a:hover { border-color: var(--haze); }
.about p { margin: 0 0 10px; color: var(--mist); }
.about a { color: var(--lantern); }

.final { text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 44px); background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--lantern) 14%, transparent), transparent 55%), var(--ink-2); }
.final h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; }
.final p { margin: 0; color: var(--mist); }
.final small { display: block; color: var(--haze); margin-top: 8px; font-size: 13px; }
.final small a { color: var(--mist); }

.site-foot { padding-block: 36px; border-top: 1px solid var(--line); color: var(--haze); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--mist); }
body.docs .site-foot { background: var(--d-side); border-top-color: #1d2650; }

/* ---------- docs ---------- */
body.docs { background: var(--d-bg); color: var(--d-text); }
body.docs .site-head { background: color-mix(in srgb, var(--d-side) 92%, transparent); border-bottom-color: #1d2650; }
body.docs .site-head .brand, body.docs .menu-btn { color: #eceef6; }
body.docs .nav a { color: #a3abcb; }
body.docs .nav a:hover, body.docs .nav a[aria-current="page"] { color: #fff; }
body.docs .nav a.btn-primary { color: var(--on-lantern); }
body.docs .lang { border-color: #2b3566; }
body.docs .lang a, body.docs .lang span { color: #a3abcb; }
body.docs .lang [aria-current="true"] { background: #1d2650; color: #fff; }

.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding-block: 32px; font-size: 14.5px; }
.toc p { font: 600 11.5px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted); margin: 18px 0 8px; }
.toc p:first-child { margin-top: 0; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 4px 10px; margin-left: -10px; border-radius: 7px; text-decoration: none; color: var(--d-muted); }
.toc a:hover { color: var(--d-text); }
.toc a.is-active { color: var(--d-text); background: var(--d-code); font-weight: 600; }
.doc { padding-block: 32px 80px; max-width: 780px; }
.doc-intro h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.015em; line-height: 1.1; margin: 8px 0 14px; }
.doc-intro .eyebrow { color: var(--d-link); }
.doc-intro p { color: var(--d-muted); font-size: 18px; margin: 0; }
.doc section { padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--d-line); scroll-margin-top: 80px; }
.doc h2 { font-family: var(--f-display); font-weight: 600; font-size: 24px; letter-spacing: -.01em; line-height: 1.2; margin: 8px 0 16px; }
.doc h3 { font-size: 17px; font-weight: 500; margin: 30px 0 10px; scroll-margin-top: 80px; }
.doc h4 { font-size: 15px; font-weight: 500; margin: 24px 0 8px; }
.doc p, .doc li { max-width: 68ch; }
.doc a { color: var(--d-link); }
.doc code { background: var(--d-code); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.doc pre { background: var(--d-side); color: #e6e9f4; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; position: relative; }
.doc pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copy { position: absolute; top: 8px; right: 8px; background: #1d2650; color: #c9cee4; border: 0; border-radius: 7px; padding: 5px 9px; font: 600 12px var(--f-body); cursor: pointer; }
.table { overflow-x: auto; margin: 16px 0 20px; border: 1px solid var(--d-line); border-radius: 12px; background: var(--d-surface); }
.table table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--d-line); vertical-align: top; }
.table th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--d-muted); font-weight: 600; background: var(--d-code); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { white-space: nowrap; }
.note { border: 1px solid var(--d-line); background: var(--d-surface); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.note b { display: block; margin-bottom: 4px; }
.note.warn { border-color: color-mix(in srgb, var(--d-accent) 60%, var(--d-line)); }
.sev { display: inline-block; font: 700 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 4px 8px; border: 1px solid; white-space: nowrap; }
.sev.c { color: #c0262d; border-color: #f3b4b6; background: #fdf0f0; }
.sev.h { color: #a44d00; border-color: #f6d09c; background: #fff7ea; }
.sev.m { color: #1c58c7; border-color: #b9d3fb; background: #eef5ff; }
.sev.l, .sev.i { color: #4b5470; border-color: #dde1ec; background: #f6f7fb; }
.docs .shot { background: #f0f0f1; border-color: var(--d-line); box-shadow: none; margin: 16px 0; }
.log { list-style: none; padding: 0; margin: 0; }
.log > li { margin: 0 0 22px; }
.log li li { margin: 6px 0; }
.log time { color: var(--d-muted); }
.log b { font-family: var(--f-mono); font-size: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	.hero .wrap, .spot, .spot.flip { grid-template-columns: minmax(0, 1fr); }
	.spot.flip .spot-text { order: 0; }
	.monitors { grid-template-columns: minmax(0, 1fr); }
	.mon-group + .mon-group { margin-top: 28px; }
	.points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.toc { position: static; max-height: none; padding-block: 20px 0; border-bottom: 1px solid var(--d-line); }
	.toc ul { columns: 2; column-gap: 16px; }
}
@media (max-width: 760px) {
	.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px var(--gutter) 18px; background: var(--ink); border-bottom: 1px solid var(--line); }
	body.docs .nav { background: var(--d-side); }
	.nav.open { display: flex; }
	.nav a { padding: 8px 0; font-size: 16px; }
	.menu-btn { display: inline-flex; }
	.contrast, .questions, .mails { grid-template-columns: minmax(0, 1fr); }
	.hero-sky svg { right: -260px; top: -200px; opacity: .6; }
	.kv { grid-template-columns: minmax(0, 1fr); }
	.kv dt { border-bottom: 0; padding-bottom: 0; }
	.about { grid-template-columns: minmax(0, 1fr); }
	.toc ul { columns: 1; }
}
@media (max-width: 480px) {
	.points { grid-template-columns: minmax(0, 1fr); }
	.cta-row .btn { flex: 1 1 100%; }
	body { font-size: 16px; }
}
