/* Шрифты лежат рядом со страницей: без запросов к чужим серверам первая отрисовка быстрее */
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/onest-latin.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-weight: 400 500; font-display: swap;
  src: url(fonts/jetbrains-mono-cyrillic.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-weight: 400 500; font-display: swap;
  src: url(fonts/jetbrains-mono-latin.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;
}
/* Пока Onest не загрузился, Arial уменьшен до его ширины, чтобы текст не сдвигался при подмене */
@font-face { font-family: "Onest Fallback"; src: local("Arial"); size-adjust: 90%; }

:root {
  --bg: #0a0a0a;
  --bg-raise: #111111;
  --bg-soft: #161616;
  --line: #222222;
  --line-strong: #333333;
  --ink: #ededed;
  --ink-soft: #a1a1a1;
  --ink-faint: #8a8a8a;
  --good: #3fb950;
  --mid: #d29922;
  --low: #f85149;
  --code-key: #a1a1a1;
  --code-str: #e6e6e6;
  --code-num: #79c0ff;
  --code-kw: #ff9bce;
  --radius: 14px;
  --gutter: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: "Onest", "Onest Fallback", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --btn-hover: #ffffff;
  --line-hover: #4a4a4a;
  --focus-ring: rgba(237, 237, 237, .14);
  --error-text: #ff8a80;
  --header-bg: rgba(10, 10, 10, .78);
  --glow: rgba(255, 255, 255, .07);
  --shadow-window: 0 40px 100px -30px rgba(0, 0, 0, .9);
  --shadow-card: 0 24px 60px -12px rgba(0, 0, 0, .85);
  --card-bg: #141414;
  --method-bg: rgba(63, 185, 80, .1);
  --method-ink: #3fb950;
  --scroll: #333333;
  color-scheme: dark;
}

/* Светлая тема. Атрибут ставит скрипт в <head> до отрисовки: из выбора посетителя или из настроек системы */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-raise: #fafafa;
  --bg-soft: #f0f0f0;
  --line: #eaeaea;
  --line-strong: #dddddd;
  --ink: #111111;
  --ink-soft: #5c5c5c;
  --ink-faint: #6e6e6e;
  --good: #1a7f37;
  --mid: #9a6700;
  --low: #cf222e;
  --code-key: #57606a;
  --code-str: #1f2328;
  --code-num: #0550ae;
  --code-kw: #a0337a;
  --btn-hover: #000000;
  --line-hover: #b5b5b5;
  --focus-ring: rgba(17, 17, 17, .12);
  --error-text: #cf222e;
  --header-bg: rgba(255, 255, 255, .8);
  --glow: rgba(0, 0, 0, .035);
  --shadow-window: 0 30px 80px -32px rgba(0, 0, 0, .22);
  --shadow-card: 0 18px 50px -14px rgba(0, 0, 0, .25);
  --card-bg: #ffffff;
  --method-bg: rgba(26, 127, 55, .1);
  --method-ink: #116329;
  --scroll: #cccccc;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--ink);
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.08; letter-spacing: -0.03em; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, pre { font-family: var(--mono); font-feature-settings: "calt" 0; }
p code, summary code, details code {
  font-size: .88em; padding: .1em .35em; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--line);
}

.wrap { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 20; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip:focus { top: 12px; }

/* Кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 10px;
  background: var(--ink); color: var(--bg); font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .2s, border-color .2s, transform .15s var(--ease);
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--line-hover); }

input, select {
  height: 44px; padding: 0 14px; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-raise);
  color: var(--ink); font: 400 15px var(--sans); transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: var(--ink-faint); }
input:hover, select:hover { border-color: var(--line-hover); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-ring); }
select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--bg-raise) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888888' stroke-width='1.5'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 14px center;
}

.key-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 460px; }
.key-form input[type=email] { flex: 1 1 220px; }
.form-note { flex-basis: 100%; margin-top: 4px; color: var(--ink-soft); font-size: 14px; }
.key-form.is-error input[type=email] { border-color: var(--low); }
.key-form.is-error .form-note { color: var(--error-text); }
.key-form.is-done .form-note { color: var(--good); }
.key-form.is-busy .btn { position: relative; color: transparent; }
.key-form.is-busy .btn::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--bg); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.top-in { display: flex; align-items: center; gap: 32px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.logo b { font-weight: 600; color: var(--ink-soft); }
.nav { display: flex; gap: 24px; margin-right: auto; font-size: 14px; }
.nav a { color: var(--ink-soft); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong);
  border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-hover); background: var(--bg-soft); }
.theme-toggle svg { grid-area: 1 / 1; transition: transform .45s var(--ease), opacity .3s; }
.theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="light"] .theme-toggle .sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(.6); }
.top-actions { display: flex; align-items: center; gap: 10px; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* Первый экран */
.hero { position: relative; padding: clamp(56px, 9vw, 112px) 0 clamp(72px, 9vw, 120px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 72% 30%, var(--glow), transparent 70%);
}
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 650; }
.lead { margin: 24px 0 36px; max-width: 34ch; color: var(--ink-soft); font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.55; }

.demo {
  position: relative; margin-bottom: 48px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise);
  box-shadow: var(--shadow-window);
}
.demo-bar { border-bottom: 1px solid var(--line); }
.demo-tabs { display: flex; gap: 2px; padding: 8px; min-height: 46px; overflow-x: auto; scrollbar-width: none; }  /* Место под вкладки до работы скрипта, иначе первый экран сдвигается */
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tabs button, .code-tabs button {
  flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ink-soft); font: 500 13px var(--sans); cursor: pointer; transition: color .2s, background .2s;
}
.demo-tabs button:hover, .code-tabs button:hover { color: var(--ink); }
.demo-tabs [aria-selected=true], .code-tabs [aria-selected=true] { background: var(--bg-soft); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong) inset; }

.demo-req { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.demo-req code { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.method { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--method-ink); padding: 4px 6px; border-radius: 5px; background: var(--method-bg); }
.status { margin-left: auto; font: 500 12px var(--mono); color: var(--good); }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }

.demo-json {
  margin: 0; height: 400px; overflow: auto; padding: 16px 18px 120px;
  font-size: 12.5px; line-height: 1.7; color: var(--code-str); tab-size: 2;
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent;
}
.demo-json .ln { display: block; white-space: pre; }
.j-key { color: var(--code-key); }
.j-str { color: var(--code-str); }
.j-num { color: var(--code-num); }
.j-null { color: var(--code-kw); }
.j-p { color: var(--ink-faint); }

.film-card {
  position: absolute; right: -32px; bottom: -48px; width: 330px;
  display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card-bg);
  box-shadow: var(--shadow-card);
}
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.poster::before {
  content: attr(data-title); position: absolute; inset: 0; display: grid; place-items: center; padding: 6px;
  color: var(--ink-faint); font-size: 10px; line-height: 1.2; text-align: center;
}
.poster img { position: relative; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.poster.is-loaded img { opacity: 1; }
.film-info { min-width: 0; align-self: center; }
.film-title { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.film-sub { margin-top: 2px; color: var(--ink-soft); font-size: 12.5px; }
.film-genres { margin-top: 6px; color: var(--ink-faint); font-size: 12.5px; }
.film-rates { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rate b { font-weight: 600; margin-right: 2px; }
.rate.good b { color: var(--good); }
.rate.mid b { color: var(--mid); }
.rate.low b { color: var(--low); }

.is-running .ln { animation: line-in .5s var(--ease) both; animation-delay: calc(var(--i) * 24ms + 120ms); }
.is-running .film-card { animation: card-in .7s var(--ease) both; animation-delay: 380ms; }
.is-running .status { animation: status-in .4s var(--ease) both; animation-delay: 80ms; }
@keyframes line-in { from { opacity: .12; transform: translateY(5px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(4px); } }
@keyframes status-in { from { opacity: 0; } }

/* Разделы */
.section { padding: clamp(80px, 10vw, 128px) 0; border-top: 1px solid var(--line); }
.section-lead { margin-top: 16px; max-width: 60ch; color: var(--ink-soft); font-size: 1.05rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.split-copy > p { margin-top: 16px; max-width: 46ch; color: var(--ink-soft); }
.totals { display: grid; gap: 0; margin: 36px 0 40px; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.totals dt { color: var(--ink-soft); }
.totals dd { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.split-copy h3 { color: var(--ink); }
.soon { margin-top: 8px; max-width: 40ch; color: var(--ink-soft); }

.coverage { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.coverage th, .coverage td { padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.coverage thead th { padding-top: 0; color: var(--ink-faint); font-size: 13px; font-weight: 500; }
.coverage tbody th { color: var(--ink); padding-right: 16px; }
.coverage td:nth-child(2), .coverage thead th:nth-child(2) { color: var(--ink-soft); text-align: right; padding-right: 24px; white-space: nowrap; }
.coverage td:last-child { width: 44%; }
.bar { display: inline-block; vertical-align: middle; width: calc(100% - 52px); height: 6px; border-radius: 3px; background: var(--bg-soft); position: relative; overflow: hidden; }
.bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--ink); opacity: .85; }
.pct { display: inline-block; width: 52px; text-align: right; color: var(--ink-soft); font-size: 13px; vertical-align: middle; }

/* Документация */
.docs { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; margin-top: 48px; align-items: start; }
.endpoints { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.endpoints button {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; width: 100%;
  padding: 16px 18px; border: 1px solid transparent; border-radius: 12px; background: transparent;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .2s, border-color .2s;
}
.endpoints button:hover { background: var(--bg-raise); }
.endpoints [aria-pressed=true] { background: var(--bg-raise); border-color: var(--line-strong); }
.endpoints code { font-size: 14px; }
.endpoints span:last-child { grid-column: 2; color: var(--ink-soft); font-size: 14px; }

.code { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.code-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-soft); font: 500 13px var(--sans); cursor: pointer; transition: color .2s, background .2s;
}
.copy:hover { color: var(--ink); background: var(--bg-soft); }
.code pre { margin: 0; padding: 20px; min-height: 240px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--ink-soft); scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
.c-str { color: var(--code-str); }
.c-kw { color: var(--code-kw); }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.plan { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.plan-main { background: var(--bg-raise); border-color: var(--line-hover); }
.plan h3 { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.price { margin-top: 10px; font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.plan ul { list-style: none; margin: 24px 0 32px; padding: 0; display: grid; gap: 10px; color: var(--ink-soft); font-size: 15px; }
.plan li { display: flex; gap: 10px; }
.plan li::before {
  content: ""; flex: none; width: 14px; height: 8px; margin-top: 7px;
  border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg) scale(.7); transform-origin: 30% 60%;
}
.plan .btn { margin-top: auto; }

/* Вопросы */
.faq-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; padding: 20px 40px 20px 0; list-style: none; cursor: pointer; font-weight: 500; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 1.5px; background: var(--ink-soft);
  transition: transform .3s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq summary:hover::before, .faq summary:hover::after { background: var(--ink); }
.faq details p { padding: 0 40px 22px 0; max-width: 62ch; color: var(--ink-soft); }

/* Призыв */
.cta { position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 70% at 50% 100%, var(--glow), transparent 70%);
}
.cta-in { position: relative; display: grid; justify-items: center; text-align: center; gap: 36px; }
.cta h2 { max-width: 18ch; }
.key-form-wide { max-width: 620px; justify-content: center; }
.key-form-wide .form-note { text-align: center; }

.foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-faint); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Документация */
.nav a[aria-current=page] { color: var(--ink); }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 60px; max-height: calc(100vh - 60px); overflow-y: auto; padding: 40px 0; scrollbar-width: none; }
.toc nav { display: grid; gap: 2px; font-size: 14px; }
.toc-group { margin: 20px 0 6px; color: var(--ink-faint); font-size: 12px; font-weight: 500; }
.toc-group:first-child { margin-top: 0; }
.toc a {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-left: -10px; border-radius: 7px;
  color: var(--ink-soft); text-decoration: none; transition: color .2s, background .2s;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); background: var(--bg-soft); }
.toc .method { padding: 2px 4px; font-size: 9.5px; }

.docs-main { min-width: 0; max-width: 860px; padding: 40px 0 96px; }
.doc { padding: 48px 0; border-top: 1px solid var(--line); }
.doc:first-child { padding-top: 24px; border-top: 0; }
.doc h1 { font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; }
.doc h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 1.6rem; }
.doc h2 code { font-size: 1.15rem; font-weight: 500; letter-spacing: 0; overflow-wrap: anywhere; }
.doc h2 .method { font-size: 12px; padding: 5px 8px; }
.doc > p { margin-top: 14px; max-width: 70ch; color: var(--ink-soft); }
.doc > p a, .params a, .steps a { color: var(--ink); }
.doc-lead { font-size: 1.1rem; }
.steps { margin: 28px 0 0; padding-left: 1.4em; display: grid; gap: 10px; color: var(--ink-soft); max-width: 70ch; }
.steps b { color: var(--ink); font-weight: 500; }
.steps li::marker { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.console-settings { margin-top: 36px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); }
.console-settings p { color: var(--ink-soft); font-size: 14px; }
.settings-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.settings-row label, .try-fields label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 13px; }
.settings-row input { font-family: var(--mono); font-size: 13px; }

.snippet {
  margin: 18px 0 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raise);
  font-size: 13px; line-height: 1.7; color: var(--ink-soft);
}

.params { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 14px; }
.params th, .params td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.params thead th { padding-top: 0; color: var(--ink-faint); font-size: 13px; font-weight: 500; }
.params td { color: var(--ink-soft); }
.params td:first-child { color: var(--ink); white-space: nowrap; }
.params td:nth-child(2) { white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }
.params code { font-size: 13px; }
.req { display: block; margin-top: 2px; color: var(--mid); font-size: 12px; font-family: var(--sans); }

.try { margin-top: 28px; }
.try-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.try-fields code { color: var(--ink); font-size: 12.5px; }
.try-fields input, .try-fields select { height: 38px; font-size: 14px; border-radius: 8px; }
.console { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.console-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink); }
.console-code { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--ink-soft); scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
.console-result { border-top: 1px solid var(--line); }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.result-status { font-family: var(--mono); color: var(--ink-soft); }
.result-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.result-status.ok { color: var(--good); }
.result-status.warn { color: var(--mid); }
.result-status.bad { color: var(--low); }
.result-meta { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.console-json {
  margin: 0; max-height: 440px; overflow: auto; padding: 16px 20px; font-size: 12.5px; line-height: 1.7; color: var(--code-str);
  scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; animation: result-in .4s var(--ease) both;
}
.console-json .ln { display: block; white-space: pre; }
.try.is-busy .console-bar .btn { opacity: .6; }
@keyframes result-in { from { opacity: 0; transform: translateY(4px); } }

@media (max-width: 960px) {
  .hero-in, .split, .docs, .faq-in, .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .lead { max-width: 46ch; }
  .film-card { right: 16px; bottom: -40px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav { display: none; }
  .top-in { justify-content: space-between; }
  .demo { margin-bottom: 0; }
  .demo-json { height: 300px; padding-bottom: 20px; }
  .film-card { position: static; width: auto; margin: 0 8px 8px; box-shadow: none; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .coverage td:last-child { width: 34%; }
  .coverage td:nth-child(2) { padding-right: 12px; }
  .bar { width: calc(100% - 40px); }
  .pct { width: 40px; }
  .key-form .btn { flex: 1 1 100%; }
  .key-form-wide select { flex: 1 1 100%; }
  .settings-row { grid-template-columns: minmax(0, 1fr); }
  .params td:first-child { white-space: normal; overflow-wrap: anywhere; }
  .params td:nth-child(2) { white-space: normal; overflow-wrap: normal; font-size: 11.5px; }
  .params th, .params td { padding-right: 10px; }
  .console-bar { flex-wrap: wrap; }
  .console-bar .btn { flex: 1 1 100%; }
}

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