:root {
  color-scheme: light;
  --bg: #f5f9fc;
  --text: #1e1e1e;
  --muted: #5f6b76;
  --line: #d7e5ef;
  --brand: #0066b3;
  --brand-dark: #005a9e;
  --accent: #0071ad;
  --soft: #e8f3fb;
  --warn: #fff4df;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.topbar {
  border-bottom: 1px solid #2d2d30;
  background: rgba(30, 30, 30, 0.96);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  color: #4daafc;
  font-weight: 800;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.nav a {
  color: #c8c8c8;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #ffffff;
}

.article {
  max-width: 920px;
  margin: 0 auto;
  padding: 52px 20px 72px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs [aria-current="page"] {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

section[id] {
  scroll-margin-top: 76px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--brand-dark);
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: 52px;
}

h2 {
  margin-top: 44px;
  font-size: 28px;
}

h3 {
  margin-top: 28px;
  font-size: 21px;
}

.lead {
  margin: 22px 0 0;
  max-width: 760px;
  color: #3f4f5b;
  font-size: 20px;
}

.meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.quick-answer {
  margin: 26px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
  background: var(--soft);
}

.quick-answer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-dark);
}

.quick-answer p {
  margin: 0;
}

.editorial-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.editorial-note strong {
  color: var(--text);
}

.toc,
.note,
.example,
.cta,
.checklist,
.faq-block,
.score-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.toc {
  margin: 34px 0;
  padding: 20px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.toc a {
  display: inline-block;
  margin: 6px 14px 0 0;
}

.note {
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--soft);
}

.example {
  margin: 22px 0;
  padding: 20px;
}

.example p:last-child,
.note p:last-child {
  margin-bottom: 0;
}

.checklist {
  margin: 24px 0;
  padding: 22px 24px;
}

.checklist li {
  margin: 8px 0;
}

.score-table {
  width: 100%;
  margin: 24px 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.score-table th,
.score-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.score-table tr:last-child td {
  border-bottom: 0;
}

.score-table th {
  background: var(--soft);
  color: var(--brand-dark);
}

.cta {
  margin-top: 48px;
  padding: 26px;
  background: var(--soft);
}

.cta h2 {
  margin-top: 0;
}

.seo-voice-gate {
  margin-top: 48px;
  padding: 26px;
  border: 1px solid #b9d8ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 73, 122, 0.12);
}

.seo-voice-gate h2 {
  margin-top: 0;
}

.seo-voice-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-voice-question {
  margin: 18px 0 10px;
  padding: 18px 20px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.45;
}

.seo-voice-cue ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.seo-voice-actions,
.seo-voice-login-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.seo-voice-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.seo-voice-status[data-mode="recording"] {
  color: var(--accent);
  font-weight: 800;
}

.seo-voice-status[data-mode="saved"] {
  color: var(--brand);
  font-weight: 800;
}

.seo-voice-status[data-mode="error"] {
  color: #b91c1c;
  font-weight: 800;
}

.button.danger {
  background: var(--accent);
}

.seo-voice-auth {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.seo-voice-auth p {
  margin: 8px 0 14px;
}

.seo-voice-login-row + .seo-voice-login-row {
  margin-top: 10px;
}

.oauth-mini,
.email-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.oauth-mini.yandex {
  background: #fc3f1d;
}

.oauth-mini.vk {
  background: #0077ff;
  font-size: 13px;
}

.email-mini {
  width: auto;
  min-width: 68px;
  padding: 0 14px;
  background: var(--brand);
  font-size: 14px;
}

.seo-voice-login-row input {
  min-height: 44px;
  min-width: min(260px, 100%);
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  color: var(--brand-dark);
  background: #ffffff;
  border: 1px solid var(--line);
}

.faq-block {
  margin-top: 18px;
  padding: 20px 24px;
}

.faq-block h3:first-child {
  margin-top: 0;
}

.related {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sources {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sources h2 {
  margin-top: 0;
}

.source-list {
  padding-left: 20px;
}

.source-list li {
  margin: 8px 0;
}

.question-groups {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.question-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.question-group summary {
  padding: 15px 18px;
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
}

.question-group[open] summary {
  border-bottom: 1px solid var(--line);
}

.question-group ul {
  margin: 0;
  padding: 14px 22px 18px 38px;
}

.question-group li {
  margin: 8px 0;
}

.related ul {
  padding-left: 20px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px;
  }

  .nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .article {
    padding-top: 36px;
  }

  .breadcrumbs {
    margin-bottom: 18px;
  }

  section[id] {
    scroll-margin-top: 92px;
  }

  h1 {
    font-size: 36px;
  }

  .lead {
    font-size: 18px;
  }

  .editorial-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .score-table,
  .score-table tbody,
  .score-table tr,
  .score-table td,
  .score-table th {
    display: block;
    width: 100%;
  }

  .score-table th {
    display: none;
  }

  .score-table td {
    border-bottom: 1px solid var(--line);
  }

  .actions {
    flex-direction: column;
  }

  .seo-voice-actions,
  .seo-voice-login-row {
    align-items: stretch;
    flex-direction: column;
  }

  .seo-voice-login-row input,
  .email-mini {
    width: 100%;
  }

  .button {
    width: 100%;
  }
}
