:root {
  --ink: #f5f7fb;
  --muted: #b5c1d0;
  --page: #08111f;
  --surface: rgba(12, 24, 39, 0.9);
  --surface-strong: rgba(17, 31, 50, 0.96);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #f05a28;
  --accent-2: #1199a8;
  --accent-3: #ffd166;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(240, 90, 40, 0.16), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(17, 153, 168, 0.18), transparent 30%),
    linear-gradient(180deg, #08111f 0%, #0d1828 50%, #08111f 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 52px);
  color: #ffffff;
  background: rgba(8, 17, 31, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 760;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav a {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 680;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.language-select {
  width: 188px;
  min-height: 40px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 680;
}

.language-select option {
  color: #11151d;
}

.guide-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 42px clamp(18px, 4vw, 48px) 70px;
  display: grid;
  grid-template-columns: minmax(220px, 285px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 19, 32, 0.78);
  box-shadow: var(--shadow);
}

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

.guide-sidebar h2 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.2;
}

.guide-nav-list {
  display: grid;
  gap: 8px;
}

.guide-nav-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.05);
}

.guide-nav-item:hover,
.guide-nav-item:focus-visible,
.guide-nav-item.is-active {
  color: #ffffff;
  border-color: rgba(17, 153, 168, 0.58);
  background: rgba(17, 153, 168, 0.13);
  outline: none;
}

.guide-nav-item span {
  font-size: 14px;
  font-weight: 760;
}

.guide-nav-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.guide-article {
  min-width: 0;
}

.article-hero {
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 153, 168, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.article-lead {
  max-width: 820px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.section-block {
  padding: 34px 0 0;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
}

.info-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-card,
.steps-panel,
.media-panel,
.video-panel,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.info-card {
  padding: 18px;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.24;
}

.info-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.info-card.is-wide {
  grid-column: 1 / -1;
}

.steps-panel {
  padding: 20px;
}

.steps-list,
.bullet-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.8);
}

.steps-list li::marker,
.bullet-list li::marker {
  color: var(--accent-3);
  font-weight: 800;
}

.callout {
  margin-top: 18px;
  padding: 18px;
  border-left: 3px solid var(--accent);
  color: rgba(255, 255, 255, 0.82);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 15px;
}

.callout p {
  margin: 0;
}

.guide-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 14px;
  font-weight: 740;
}

.button.primary {
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.16);
  color: #fff3c4;
}

.button:hover,
.button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: rgba(255, 209, 102, 0.24);
}

.media-panel,
.video-panel {
  overflow: hidden;
}

.media-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #eef3fa;
}

.media-panel figcaption {
  padding: 14px 16px 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050b14;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-panel figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 16px 16px;
}

.video-panel figcaption p {
  flex: 1 1 260px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

body[data-guide="trigger-bindings"] .media-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-guide="trigger-bindings"] .media-panel img {
  height: auto;
  aspect-ratio: auto;
  display: block;
}

.site-footer {
  padding: 30px clamp(20px, 5vw, 72px);
  background: #08111f;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-copy {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    justify-content: flex-start;
  }

  .guide-shell {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
    max-height: none;
  }

  .guide-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    gap: 10px;
    min-height: 64px;
    padding: 10px 14px;
  }

  .language-select {
    width: 150px;
  }

  .guide-shell {
    padding: 24px 16px 54px;
  }

  .article-hero {
    padding: 24px;
  }

  .article-lead {
    font-size: 16px;
  }

  .info-grid,
  .media-grid,
  .guide-nav-list {
    grid-template-columns: 1fr;
  }

  .video-panel figcaption {
    align-items: stretch;
  }

  .video-panel figcaption .button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .brand span {
    display: none;
  }
}
