:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #14202b;
  --muted: #637083;
  --line: #dfe5ee;
  --brand: #0b8f64;
  --brand-dark: #076949;
  --accent: #f4c84b;
  --accent-dark: #d79e14;
  --shadow: 0 18px 50px rgba(20, 32, 43, .12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

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

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

.header-inner {
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: 108px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 304px;
}

.brand img {
  display: block;
  width: 304px;
  height: 104px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  font-weight: 700;
}

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

.main-nav a:hover {
  color: var(--accent);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .7);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
}

.nav-toggle {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: var(--radius);
  background: #111b25;
  background-color: #111b25;
  place-items: center;
  cursor: pointer;
}

.header-actions .burger {
  background: #111b25 !important;
  background-color: #111b25 !important;
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  content: "";
}

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

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

.breadcrumbs {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 16px auto 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 {
  margin-right: 8px;
  color: #98a4b3;
  content: "/";
}

.hero {
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: 390px;
  margin: 18px auto 34px;
  display: grid;
  align-items: center;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #07141e;
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 20, 30, .9) 0%, rgba(7, 20, 30, .72) 33%, rgba(7, 20, 30, .08) 68%);
  content: "";
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  width: 100%;
  max-width: 510px;
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  z-index: 1;
  color: #fff;
}

.hero-content p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(16px, 2vw, 19px);
}

.hero-title {
  display: block;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero .button {
  border-color: var(--accent);
  background: var(--accent);
  color: #171205;
}

.hero .button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.page {
  width: calc(100% - 32px);
  max-width: 980px;
  margin: 0 auto 44px;
}

.content-card,
.author-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(20, 32, 43, .07);
}

.content-card {
  padding: clamp(22px, 4vw, 44px);
}

.content-card > h1 {
  margin-top: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
}

h2 {
  margin-top: 42px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

h1,
h2,
h3,
p,
td,
th {
  overflow-wrap: anywhere;
}

h3 {
  margin-top: 28px;
  font-size: 22px;
  line-height: 1.25;
}

.toc {
  margin: 28px 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfd;
}

.toc summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 800;
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
  margin: 0;
  list-style: none;
}

.toc-list a {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.toc-list a:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}

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

th {
  background: #eef4f7;
}

details {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

details summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-item {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.author-box {
  width: calc(100% - 32px);
  max-width: 980px;
  margin: 0 auto 44px;
  padding: 16px 22px;
}

.author-box p {
  margin: 4px 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #101820;
  color: #eaf0f5;
}

.footer-inner {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: #eaf0f5;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .site-header {
    width: 100vw;
  }

  .header-inner {
    width: 100%;
    padding: 0 16px;
    min-height: 92px;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    justify-content: initial;
    align-items: center;
    gap: 8px;
  }

  .brand {
    width: 120px;
    grid-column: 1;
    overflow: visible;
  }

  .brand img {
    width: 120px;
    height: 76px;
    max-width: none;
    transform: none;
    transform-origin: left center;
  }

  .header-actions {
    grid-column: 2;
    justify-self: end;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }

  .button {
    min-height: 40px;
    padding: 8px 8px;
    font-size: 13px;
  }

  .burger {
    display: grid;
    width: 40px;
    height: 40px;
    border-color: rgba(255, 255, 255, .68);
    background: #111b25 !important;
    background-color: #111b25 !important;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    width: auto;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius);
    background: #111b25;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  }

  .main-nav a {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .07);
    color: #fff;
  }

  .nav-toggle:checked ~ .main-nav {
    display: flex;
  }

  .breadcrumbs,
  .hero,
  .page,
  .author-box {
    width: auto;
    max-width: none;
    margin-left: 16px;
    margin-right: 16px;
  }

  .hero {
    min-height: 0;
    display: block;
    background: #07141e;
  }

  .hero::after {
    display: none;
  }

  .hero-media {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1280 / 512;
    object-fit: contain;
  }

  .hero-content {
    padding: 22px 24px 26px;
  }

  .hero-title {
    max-width: none;
    font-size: 30px;
    line-height: 1.12;
  }

  .hero-content p {
    max-width: none;
    font-size: 16px;
  }

  .content-card {
    padding: 20px;
  }

  .content-card > h1 {
    font-size: 30px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th,
  td {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .header-inner {
    gap: 6px;
    padding: 0 8px;
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .brand {
    width: 84px;
  }

  .brand img {
    width: 118px;
  }

  .brand img {
    height: 70px;
    transform: none;
  }

  .header-actions {
    gap: 3px;
    justify-content: flex-end;
  }

  .button {
    min-height: 34px;
    padding: 6px 5px;
    font-size: 10px;
  }

  .burger {
    width: 32px;
    height: 34px;
  }

  .hero-content {
    padding: 20px 22px 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .burger span,
  .burger span::before,
  .burger span::after {
    width: 17px;
  }
}
