:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #182033;
  --muted: #657085;
  --line: #dfe5ee;
  --brand: #0c7a5a;
  --brand-dark: #075541;
  --accent: #f5b942;
  --accent-dark: #9b1f2f;
  --shadow: 0 18px 42px rgba(24, 32, 51, 0.12);
  --radius: 8px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.68;
}

picture,
img {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: var(--content);
  min-height: 78px;
  margin: 0 auto;
  padding: 10px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 122px;
  min-width: 92px;
}

.brand picture,
.brand img,
.footer-brand picture,
.footer-brand img {
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.site-nav a,
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-radius: 7px;
}

.site-nav a:hover,
.site-footer nav a:hover {
  background: #eaf4ef;
  color: var(--brand-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 7px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #211703;
  box-shadow: 0 8px 18px rgba(245, 185, 66, 0.28);
}

.btn-primary:hover {
  background: #ffd066;
}

.btn-ghost {
  background: #ffffff;
  color: var(--brand-dark);
  border-color: var(--brand);
}

.btn-ghost:hover {
  background: #eaf4ef;
}

.nav-toggle,
.burger {
  display: none;
}

.breadcrumbs {
  max-width: var(--content);
  margin: 0 auto;
  padding: 14px 20px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: #9aa4b5;
}

main {
  max-width: var(--content);
  margin: 0 auto;
  padding: 18px 20px 54px;
}

section {
  margin: 28px 0;
}

.hero {
  margin-top: 10px;
}

.hero-media {
  position: relative;
  overflow: hidden;
  background: #08140f;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: auto;
}

.hero-content {
  position: absolute;
  left: 5.2%;
  top: 50%;
  width: min(430px, 42%);
  transform: translateY(-50%);
  color: #ffffff;
}

.hero-content h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 38px;
  line-height: 1.12;
}

.hero-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  line-height: 1.55;
}

.hero-cta {
  width: fit-content;
}

.toc details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(24, 32, 51, 0.06);
}

.toc summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--text);
  font-weight: 800;
}

.toc nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 0 18px 18px;
}

.toc a {
  color: var(--brand-dark);
  font-weight: 700;
}

section:not(.hero):not(.toc) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 10px 28px rgba(24, 32, 51, 0.05);
}

h1,
h2,
h3 {
  color: #142033;
  line-height: 1.24;
}

h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

h3 {
  margin: 18px 0 8px;
  font-size: 21px;
}

p {
  margin: 0 0 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: break-word;
}

caption {
  display: block;
  width: 100%;
  caption-side: top;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
}

thead th {
  background: #143426;
  color: #ffffff;
}

tbody th {
  width: 34%;
  background: #eef6f2;
}

article {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

article:first-of-type {
  border-top: 0;
}

.site-footer {
  background: #142033;
  color: #d7deea;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 28px 20px;
}

.footer-brand {
  width: 104px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.site-footer nav a {
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #c2cad8;
  font-size: 14px;
}

@media (max-width: 860px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    grid-template-columns: auto auto 1fr;
    gap: 10px;
    min-height: 68px;
    padding: 8px 12px;
  }

  .brand {
    width: 82px;
  }

  .burger {
    display: inline-flex;
    position: relative;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
  }

  .burger span,
  .burger::before,
  .burger::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  .burger::before {
    transform: translateY(-7px);
  }

  .burger::after {
    transform: translateY(7px);
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav a {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-toggle:checked ~ .site-nav {
    display: grid;
    gap: 4px;
  }

  .header-actions {
    justify-self: end;
    gap: 6px;
  }

  .header-actions .btn {
    min-height: 38px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .breadcrumbs,
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-media {
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .hero-media img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .hero-content {
    position: static;
    width: auto;
    transform: none;
    margin-top: 14px;
    padding: 20px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(24, 32, 51, 0.05);
  }

  .hero-content h1 {
    color: var(--text);
    font-size: 29px;
  }

  .hero-content p {
    color: var(--muted);
  }

  .toc nav {
    grid-template-columns: 1fr;
  }

  section:not(.hero):not(.toc) {
    padding: 20px;
  }

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

  thead {
    display: none;
  }

  tbody th {
    width: 100%;
    border-bottom: 0;
  }

  tbody td {
    border-top: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .brand {
    width: 70px;
  }

  .burger {
    width: 38px;
    height: 38px;
  }

  .header-actions .btn {
    padding: 7px 7px;
    font-size: 11px;
  }

  .hero-content h1 {
    font-size: 25px;
  }
}
