:root {
  color-scheme: dark;
  --bg: #111116;
  --panel: #1b1b24;
  --panel-soft: #242431;
  --text: #f6f4ec;
  --muted: #c6c0ad;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f5c84b;
  --accent-strong: #ffdf70;
  --danger: #e3414f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  width: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  color: var(--text);
  overflow-x: clip;
  background:
    radial-gradient(circle at top left, rgba(245, 200, 75, 0.14), transparent 34rem),
    linear-gradient(180deg, #15151d 0%, #101015 42%, #17171f 100%);
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

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

.header-inner {
  width: min(var(--max), calc(100% - 32px));
  min-height: 146px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

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

.brand picture {
  display: block;
  line-height: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a,
.footer-links a {
  color: var(--text);
  font-weight: 700;
}

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

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

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  color: #17120a;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 10px 26px rgba(245, 200, 75, 0.28);
}

.btn-secondary {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

.burger span {
  position: relative;
}

.burger span::before,
.burger span::after {
  position: absolute;
  left: 0;
}

.burger span::before {
  top: -7px;
}

.burger span::after {
  top: 7px;
}

.breadcrumbs {
  width: min(var(--max), calc(100% - 32px));
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.breadcrumbs li + li::before {
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.45);
  content: "/";
}

.hero {
  width: min(var(--max), calc(100% - 32px));
  min-height: clamp(420px, 46vw, 540px);
  margin: 18px auto 38px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08040b;
  box-shadow: var(--shadow);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.hero picture {
  position: absolute;
  inset: 0;
  display: block;
}

.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 4, 11, 0.92) 0%, rgba(8, 4, 11, 0.62) 34%, rgba(8, 4, 11, 0.04) 64%);
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(560px, 58%);
  min-height: inherit;
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(1.85rem, 3.2vw, 3rem);
}

h2 {
  margin-top: 42px;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}

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

.hero p {
  margin: 0 0 24px;
  color: #eee7d6;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  overflow-wrap: anywhere;
}

.content {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 48px;
}

.content > p:first-of-type {
  color: #eee7d6;
  font-size: 1.08rem;
}

section {
  margin-top: 32px;
}

p {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 1.35rem;
}

li {
  margin-bottom: 8px;
}

.toc {
  margin: 28px 0 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

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

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

.toc-grid a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

table {
  width: 100%;
  margin: 20px 0 28px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

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

th {
  color: #16110a;
  background: var(--accent);
}

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

details:not(.toc) {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

details:not(.toc) summary {
  padding: 16px 18px;
  cursor: pointer;
}

details:not(.toc) p {
  padding: 0 18px 16px;
}

.faq-item {
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.author-box {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 48px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.author-box p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0f0f14;
}

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

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

@media (max-width: 820px) {
  .header-inner {
    position: relative;
    width: calc(100% - 20px);
    min-height: 96px;
    gap: 6px;
  }

  .brand {
    position: absolute;
    left: 0;
    top: 50%;
    margin-right: 0;
    transform: translateY(-50%);
  }

  .brand img {
    width: 126px;
    height: 82px;
  }

  .header-actions {
    position: absolute;
    left: 130px;
    right: 42px;
    width: auto;
    margin: 0;
    gap: 5px;
    display: flex;
    justify-content: flex-end;
  }

  .btn {
    min-height: 38px;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
  }

  .header-actions .btn {
    width: 76px;
  }

  .burger {
    display: inline-flex;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 10px;
    width: min(250px, calc(100vw - 20px));
    display: none;
    margin-left: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20, 20, 27, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav a {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
  }

  .menu-toggle:checked ~ .main-nav {
    display: grid;
    gap: 8px;
  }

  .breadcrumbs,
  .hero,
  .content,
  .author-box,
  .footer-inner {
    width: calc(100% - 20px);
  }

  .hero {
    min-height: 0;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    background: var(--panel);
  }

  .hero img {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 1983 / 793;
    object-fit: contain;
    object-position: center;
    background: #08040b;
  }

  .hero picture {
    position: static;
    display: block;
    width: 100%;
    line-height: 0;
    background: #08040b;
  }

  .hero::after {
    display: none;
  }

  .hero-content {
    width: 100%;
    min-height: 0;
    padding: 22px 18px 24px;
    background: linear-gradient(180deg, #201925, #15151d);
  }

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

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

  th,
  td {
    white-space: normal;
    min-width: 160px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .brand img {
    width: 112px;
    height: 76px;
  }

  .header-inner {
    gap: 4px;
  }

  .header-actions {
    left: 116px;
    gap: 4px;
  }

  .btn {
    padding: 7px 4px;
    font-size: 0.62rem;
  }

  .header-actions .btn {
    width: 68px;
  }

  .burger {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .hero-content {
    width: 100%;
  }

  h1 {
    font-size: 1.72rem;
  }
}
