/* AI Падел — документация API для партнёров и интеграторов.
   Тот же язык, что у сайта продукта: светлый спортивный стиль, белый фон и тёплый
   светло-серый #f3f3f0, чёрный #0b0d0e — кнопки, текст, код, подвал; акцент — голубой
   #47c1f0 и зелёный #8cbd2e из знака AI Solutions и переход между ними.
   На белом мелкий текст и ссылки — тёмные варианты #0b6e99 и #4a6e10 (контраст не ниже 4,5:1).

   Сайт самодостаточный: шрифты лежат в assets/fonts/, внешних адресов нет.
   Шрифты распространяются по лицензии SIL Open Font License 1.1 (OFL):
   - Sofia Sans Extra Condensed — Lettersoup (Botio Nikoltchev, Ani Petrova), OFL 1.1
   - Onest — Dmitri Voloshin, OFL 1.1 */

/* ---------- Шрифты ---------- */
@font-face {
  font-family: "Sofia Sans XCond";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("fonts/sofia-sans-xcond-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia Sans XCond";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("fonts/sofia-sans-xcond-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: "Onest";
  font-style: normal;
  font-weight: 400 800;
  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 800;
  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;
}

/* ---------- Дизайн-токены (как у сайта) ---------- */
:root {
  color-scheme: light;

  --ink: #0b0d0e;
  --ink-2: #2f3438;
  --muted: #5b6268;
  --line: #e2e4e6;
  --line-strong: #c9cdd1;
  --bg: #ffffff;
  --bg-soft: #f3f3f0;
  --bg-soft-2: #e9eae6;
  --brand-blue: #47c1f0;
  --brand-green: #8cbd2e;
  --brand-grad: linear-gradient(90deg, #47c1f0, #8cbd2e);
  --brand-grad-deep: linear-gradient(90deg, #1a93c8, #6a9a1c);
  --brand-blue-ink: #0b6e99;
  --brand-green-ink: #4a6e10;
  --brand-blue-soft: #e3f4fc;
  --brand-green-soft: #eef6df;
  --night: #0b0d0e;
  --night-text: #f4f5f6;
  --night-muted: #a7aeb5;
  --night-line: rgba(255, 255, 255, .16);
  --code-text: #e8ecef;

  --f-display: "Sofia Sans XCond", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, Impact, sans-serif;
  --f-body: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --gutter: clamp(16px, 3vw, 40px);
  --hdr-h: 72px;
  --hdr-total: 72px;     /* высота шапки целиком; на узком экране уточняет site.js */
  --side-w: 280px;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: .22s;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--hdr-total) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--brand-blue-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t); }
a:hover { color: var(--ink); }
button, input { font: inherit; }
code, pre { font-family: var(--f-mono); }
strong, b { color: var(--ink); font-weight: 700; }

:focus-visible { outline: 3px solid var(--brand-blue-ink); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; color: #fff; }

/* ---------- Шапка ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--hdr-h);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--f-display); font-weight: 900; font-size: 27px; letter-spacing: .005em; white-space: nowrap; color: var(--ink); }
.brand-name b,
.grad-text {
  background: var(--brand-grad-deep);
  -webkit-background-clip: text;
  background-clip: text;
  color: #1a93c8;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.brand-sub {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* поиск */
.search { position: relative; flex: 1 1 auto; max-width: 480px; margin-inline-start: auto; }
.search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .q {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.search .q::placeholder { color: #8a9096; }
.search .q:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(71, 193, 240, .35); }
.results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 24px 48px rgba(11, 13, 14, .12);
}
.results a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.results a .rt { display: block; font-weight: 600; }
.results a .rp { display: block; font-size: 13px; color: var(--muted); font-family: var(--f-mono); overflow-wrap: anywhere; }
.results a .rs { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-blue-ink); }
.results a.sel, .results a:hover { background: var(--bg-soft); }
.results .none { padding: 10px 12px; color: var(--muted); }

/* кнопки шапки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn:hover { background: var(--ink); color: #fff; }
.btn svg { flex: none; transition: transform var(--t) var(--ease); }
.btn:hover svg { transform: translateX(-3px); }
.to-site { flex: none; }
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.menu-btn .i-close { display: none; }
body.nav-open .menu-btn .i-open { display: none; }
body.nav-open .menu-btn .i-close { display: block; }

/* ---------- Раскладка ---------- */
.layout {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: clamp(24px, 3.5vw, 56px);
}
.side {
  width: var(--side-w);
  flex: none;
  position: sticky;
  top: var(--hdr-total);
  align-self: flex-start;
  max-height: calc(100vh - var(--hdr-total));
  overflow: auto;
  padding: 28px 6px 40px 0;
  font-size: 15px;
  scrollbar-width: thin;
}
.nav { list-style: none; margin: 0 0 4px; padding: 0; }
.nav a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: background var(--t), color var(--t);
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; font-weight: 600; }
.nav a.on .cnt { color: var(--brand-green); }
.nav-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 12px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-blue-ink);
  line-height: 1.2;
}
.nav-h::before { content: ""; width: 20px; height: 3px; background: var(--brand-grad); flex: none; }
.cnt { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.content { flex: 1; min-width: 0; max-width: 940px; padding: 32px 0 80px; }

/* ---------- Текст ---------- */
h1, h2, h3, h4 { color: var(--ink); }
h1 {
  margin: 8px 0 18px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: .9;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h2 {
  margin: 52px 0 14px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(30px, 3vw, 40px);
  line-height: .98;
  letter-spacing: -.002em;
  text-wrap: balance;
}
h2 a { color: inherit; text-decoration: none; }
h2 a:hover { color: var(--brand-blue-ink); }
h2 .cnt { font-family: var(--f-body); font-size: 15px; vertical-align: middle; }
h3 { margin: 28px 0 10px; font-size: 18px; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 64ch; }
.meta-line { color: var(--muted); font-size: 15px; }
p, li { overflow-wrap: break-word; }
.content ul:not([class]) { list-style: none; margin: 0 0 16px; padding: 0; }
.content ul:not([class]) > li { position: relative; margin: 0 0 8px; padding-inline-start: 22px; }
.content ul:not([class]) > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .62em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand-grad);
}
.content ol { margin: 0 0 16px; padding-inline-start: 24px; }
.content ol > li { margin: 0 0 8px; padding-inline-start: 4px; }
.content ol > li::marker { color: var(--brand-blue-ink); font-weight: 700; }
:not(pre) > code {
  padding: .08em .4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: .86em;
  overflow-wrap: anywhere;
}

/* выноски */
.note, .warn, .plan { margin: 20px 0; padding: 16px 20px; border-radius: var(--r-md); font-size: 15.5px; line-height: 1.55; }
.note { background: var(--brand-blue-soft); color: var(--ink-2); }
.warn { position: relative; padding-inline-start: 52px; background: var(--ink); color: #fff; font-weight: 500; }
.warn::before {
  content: "!";
  position: absolute;
  inset-inline-start: 18px;
  top: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--ink);
  font: 900 15px/22px var(--f-body);
  text-align: center;
}
.warn strong, .warn b { color: #fff; }
.warn a { color: var(--brand-blue); }
.warn a:hover { color: #fff; }
.warn :not(pre) > code { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.plan { border: 1.5px dashed var(--line-strong); background: #fff; }
.note > :first-child, .warn > :first-child, .plan > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child, .plan > :last-child { margin-bottom: 0; }

/* статусы — как бейджи «Работает / Готово к подключению / В разработке» на сайте */
.status, .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
  vertical-align: middle;
}
.status::before, .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st-ok, .acc-public { background: var(--brand-green-soft); color: var(--brand-green-ink); }
.st-ok::before, .acc-public::before { background: var(--brand-green); }
.st-req, .st-cond, .acc-club, .acc-club_or_player, .acc-player, .acc-staff { background: var(--brand-blue-soft); color: var(--brand-blue-ink); }
.st-req::before, .st-cond::before, .acc-club::before, .acc-club_or_player::before, .acc-player::before, .acc-staff::before { background: var(--brand-blue); }
.acc-onec { background: var(--bg-soft); color: var(--ink); }
.acc-onec::before { background: var(--ink); }
.st-wip, .acc-yookassa { border: 1.5px dashed var(--line-strong); color: var(--muted); padding: 4px 11px; }

/* ---------- Таблицы ---------- */
.tw {
  margin: 12px 0 18px;
  overflow-x: auto;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th {
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfbf9; }
td code { white-space: nowrap; }
.cons { margin-top: 3px; font-size: 13px; color: var(--muted); }
table.idx td:first-child { width: 76px; }

/* ---------- Код ---------- */
.code { position: relative; margin: 12px 0 20px; }
pre {
  margin: 0;
  padding: 18px 20px;
  overflow: auto;
  border-radius: var(--r-md);
  background: var(--night);
  color: var(--code-text);
  font-size: 14px;
  line-height: 1.55;
  tab-size: 2;
}
pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.code:has(.copy) pre { padding-top: 46px; }
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--night-line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.copy:hover, .copy:focus-visible { background: #fff; color: var(--ink); border-color: #fff; }
.code :focus-visible { outline-color: var(--brand-blue); }

/* ---------- Методы ---------- */
.op {
  margin: 28px 0;
  padding: 6px clamp(18px, 2.4vw, 32px) 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.op h2 { margin-top: 22px; font-size: clamp(28px, 2.6vw, 36px); }
.op .hash { color: var(--muted); font-family: var(--f-body); font-weight: 400; font-size: .6em; text-decoration: none; opacity: 0; transition: opacity var(--t); }
.op h2:hover .hash, .op .hash:focus { opacity: 1; }
.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
}
.endpoint .p { padding: 0; border: 0; background: none; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.m {
  display: inline-block;
  min-width: 58px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  color: #fff;
  font: 700 12px/1 var(--f-mono);
  letter-spacing: .03em;
  text-align: center;
}
.m-get { background: var(--brand-blue-ink); }
.m-post { background: var(--brand-green-ink); }
.m-put, .m-patch, .m-delete { background: var(--ink); }
.acc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0; }
.acc-d { color: var(--muted); font-size: 14.5px; }
.ct { margin-inline-start: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-soft); color: var(--muted); font: 600 12px var(--f-mono); vertical-align: middle; }
.sc { padding: 2px 9px; border-radius: var(--r-pill); font: 700 13px var(--f-mono); }
.sc-2 { background: var(--brand-green-soft); color: var(--brand-green-ink); }
.sc-4 { background: var(--brand-blue-soft); color: var(--brand-blue-ink); }
.sc-5 { background: var(--bg-soft-2); color: var(--ink); }
.opref code { white-space: normal; }

/* ---------- Оглавления ---------- */
.toc { margin: 24px 0 12px; padding: 18px 22px 16px; border-radius: var(--r-md); background: var(--bg-soft); }
.toc .toc-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-family: var(--f-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-blue-ink);
  line-height: 1.2;
}
.toc .toc-h::before { content: ""; width: 28px; height: 3px; background: var(--brand-grad); flex: none; }
.toc ol { margin: 0; padding-inline-start: 22px; columns: 2 260px; column-gap: 32px; }
.toc ol li { margin: 0 0 5px; break-inside: avoid; }
.toc ol li::marker { color: var(--brand-blue-ink); font-weight: 700; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand-blue-ink); text-decoration: underline; }
.optoc { list-style: none; margin: 0; padding: 0; }
.optoc a { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 2px 12px; padding: 8px 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.optoc a:hover { background: #fff; color: var(--ink); }
.optoc .m { grid-row: span 2; align-self: start; margin-top: 2px; }
.optoc .tt { font-weight: 600; }
.optoc code { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; }

/* ---------- Карточки и списки ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 16px 0 20px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 22px 24px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t);
}
.card:hover { border-color: var(--ink); color: var(--ink); }
.card .ch { font-family: var(--f-display); font-weight: 900; font-size: 28px; line-height: .95; }
.card .cn { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-green-ink); }
.card .cd { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.glist { columns: 2 240px; column-gap: 32px; margin: 12px 0 20px; padding: 0; list-style: none; }
.glist li { position: relative; margin: 0 0 8px; padding-inline-start: 22px; break-inside: avoid; }
.glist li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 9px; height: 9px; border-radius: 2px; background: var(--brand-grad); }
.glist a { color: var(--ink); font-weight: 600; text-decoration: none; }
.glist a:hover { color: var(--brand-blue-ink); text-decoration: underline; }

/* вступление главной — тёмная секция, как «Технологии» на сайте */
.hero {
  position: relative;
  overflow: hidden;
  margin: 4px 0 24px;
  padding: clamp(28px, 4vw, 48px) clamp(22px, 3.6vw, 44px) clamp(26px, 3.6vw, 40px);
  border-radius: var(--r-lg);
  background: var(--night);
  color: var(--night-text);
}
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-grad); }
.hero h1 { margin-top: 0; color: #fff; font-size: clamp(48px, 6vw, 84px); }
.hero p { color: var(--night-muted); font-size: 17px; max-width: 66ch; }
.hero p:last-child { margin-bottom: 0; }
.hero a { color: var(--brand-blue); }
.hero a:hover { color: #fff; }
.hero code { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.hero :focus-visible { outline-color: var(--brand-blue); }

/* ---------- Подвал ---------- */
.foot { margin-top: auto; padding: clamp(44px, 5vw, 72px) 0 28px; background: var(--night); color: var(--night-muted); font-size: 15px; }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--night-line);
}
.foot-brand .brand-name { color: #fff; font-size: 40px; }
.foot-brand p { margin: 12px 0 0; max-width: 34ch; }
.foot-h { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col--wide ul { display: block; columns: 2 180px; column-gap: 24px; }
.foot-col--wide li { margin-bottom: 8px; break-inside: avoid; }
.foot a { color: var(--night-muted); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-req { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 22px; font-size: 13.5px; }
.foot-req b { color: #fff; font-weight: 700; }
.foot :focus-visible { outline-color: var(--brand-blue); }

/* ---------- Узкие экраны ---------- */
@media (max-width: 1099px) {
  :root { --side-w: 250px; }
  .brand-sub { display: none; }
  .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hdr { gap: 12px; }
  .menu-btn { display: inline-flex; order: 5; }
  .layout { display: block; }
  /* меню разделов — выпадает из шапки, как меню сайта на телефоне */
  .side {
    display: none;
    position: fixed;
    z-index: 40;
    top: var(--hdr-total);
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100vh - var(--hdr-total));
    max-height: calc(100dvh - var(--hdr-total));
    padding: 8px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(11, 13, 14, .12);
    overscroll-behavior: contain;
  }
  body.nav-open .side { display: block; }
  .side .nav a { padding: 11px 12px; font-size: 16px; }
  .content { padding: 22px 0 60px; }
}
@media (max-width: 720px) {
  :root { --hdr-h: 64px; --hdr-total: 120px; }
  .hdr { flex-wrap: wrap; height: auto; row-gap: 0; padding-bottom: 12px; }
  .brand { height: var(--hdr-h); }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 25px; }
  .to-site { margin-inline-start: auto; }
  .search { order: 10; flex: 1 1 100%; max-width: none; margin: 0; }
  .results { max-height: min(60vh, 440px); }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  h2 { margin-top: 40px; }
  th, td { padding: 9px 11px; }
  /* на телефоне колонки не сжимаются в столбик слов — таблица прокручивается внутри рамки */
  td { min-width: 120px; }
  .status, .badge { white-space: normal; }
  pre { padding: 16px; font-size: 13px; }
  .code:has(.copy) pre { padding-top: 44px; }
  .warn { padding-inline-start: 48px; }
  .warn::before { inset-inline-start: 16px; }
}
@media (max-width: 420px) {
  .to-site { padding: 0 14px; }
  .optoc a { grid-template-columns: 60px minmax(0, 1fr); }
}

/* ---------- Уменьшение движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ---------- Печать ---------- */
@media print {
  body { font-size: 11pt; background: #fff; color: #000; }
  .top, .side, .copy, .skip, .hash, .menu-btn, .search, .to-site, .foot { display: none !important; }
  .layout { display: block; max-width: none; padding: 0; }
  .content { padding: 0; max-width: none; }
  .op { break-inside: auto; border-color: #bbb; }
  h1, h2, h3 { break-after: avoid; color: #000; }
  pre { white-space: pre-wrap; word-break: break-word; background: #f4f5f6; color: #000; border: 1px solid #ccc; }
  .hero { background: none; color: #000; border: 1px solid #bbb; }
  .hero::before { display: none; }
  .hero h1, .hero p, .hero code, .hero a { color: #000; }
  .warn { background: none; color: #000; border: 1px solid #000; }
  .warn strong, .warn b, .warn a { color: #000; }
  .m { color: #000 !important; background: none !important; border: 1px solid #000; }
  a { color: #000; text-decoration: none; }
}
