:root {
  --navy: #1A2540;
  --navy-deep: #131C31;
  --steel: #2F86D0;
  --steel-deep: #246FAD;
  --mist: #F6F9FC;
  --mist-2: #EFF4FA;
  --panel: #FFFFFF;
  --line: #E2EAF2;
  --muted: #5B6C84;
  --body: #3F4D63;
  --ink: #0F172A;
  --font: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 860px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--steel-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.wrap-wide { width: min(100% - 40px, 1100px); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 249, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; display: block; }
.brand .wordmark { font-size: 16px; font-weight: 500; letter-spacing: -0.03em; }
.brand .wordmark b { font-weight: 800; }
.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
}
.topbar-nav a { color: var(--muted); text-decoration: none; }
.topbar-nav a:hover,
.topbar-nav a[aria-current="page"] { color: var(--navy); text-decoration: none; }

.hero {
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 320px at 12% -10%, rgba(47, 134, 208, 0.12), transparent 60%),
    var(--mist);
}
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-deep);
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.hero .lede {
  margin: 0;
  max-width: 62ch;
  font-size: 16px;
  color: var(--body);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3cd;
  color: #7a5b00;
  font-size: 12px;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  padding: 36px 0 72px;
  align-items: start;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static !important; }
}

.toc {
  position: sticky;
  top: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.toc h2 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc a {
  font-size: 13px;
  color: var(--body);
  text-decoration: none;
}
.toc a:hover { color: var(--steel-deep); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px 36px;
}
.doc h2 {
  margin: 28px 0 12px;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.doc h2:first-child { margin-top: 0; }
.doc h3 {
  margin: 20px 0 8px;
  font-size: 16px;
  color: var(--navy);
}
.doc p, .doc li { color: var(--body); font-size: 15px; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin: 6px 0; }
.doc .note {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 3px solid #e0a800;
  background: #fff8e1;
  color: #5c4a00;
  font-size: 14px;
}
.doc code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--mist-2, #EFF4FA);
  font-family: var(--mono);
  font-size: 0.88em;
}
.consent-btn {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--steel, #2F86D0);
  border-radius: 8px;
  background: var(--steel, #2F86D0);
  color: #fff;
  font: 600 14px/1 var(--font, "Inter", system-ui, sans-serif);
  cursor: pointer;
}
.consent-btn:hover { background: var(--steel-deep, #246FAD); border-color: var(--steel-deep, #246FAD); }
.consent-btn:focus-visible { outline: 2px solid var(--steel, #2F86D0); outline-offset: 2px; }
.ph {
  display: inline;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(47, 134, 208, 0.12);
  color: var(--steel-deep);
  font-family: var(--mono);
  font-size: 0.9em;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 36px 0 72px;
}
.grid-cards a.item {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.grid-cards a.item:hover {
  border-color: #b9d4ef;
  box-shadow: 0 12px 28px rgba(26, 37, 64, 0.08);
  text-decoration: none;
}
.grid-cards .kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-deep);
}
.grid-cards h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--navy);
}
.grid-cards p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--navy); }
.site-footer .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }

/* Таблицы в тексте документов */
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 15px; }
.doc th, .doc td { border: 1px solid #d9e0e8; padding: 8px 10px; vertical-align: top; text-align: left; }
.doc th { background: #f3f6fa; font-weight: 600; }
.doc h3 { margin-top: 22px; }
.doc table.wide { font-size: 13px; }
.doc table.wide th, .doc table.wide td { padding: 6px 7px; }
