:root {
  --help-header-height: 104px;
  --help-sidebar-width: 330px;
  --help-bg: #030811;
  --help-panel: rgba(7, 17, 31, 0.92);
  --help-panel-strong: #081525;
  --help-line: rgba(88, 155, 198, 0.22);
  --help-text: #e8f0f7;
  --help-muted: #8fa8bb;
  --help-cyan: #34d5d3;
  --help-blue: #66bce8;
  --help-gold: #e8bd67;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.help-page {
  min-width: 0;
  overflow-x: hidden;
  color: var(--help-text);
  background:
    radial-gradient(circle at 78% 0, rgba(21, 102, 155, 0.2), transparent 31rem),
    linear-gradient(180deg, #07101d 0, var(--help-bg) 28rem, #02060c 100%);
}

.help-page button,
.help-page input {
  font: inherit;
}

.help-skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #07111e;
  background: #e8bd67;
  transform: translateY(-160%);
}

.help-skip-link:focus {
  transform: translateY(0);
}

.help-page__main {
  min-height: 100vh;
}

.help-shell {
  min-height: 100vh;
  padding-top: var(--help-header-height);
}

.help-sidebar {
  position: fixed;
  z-index: 80;
  top: var(--help-header-height);
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: var(--help-sidebar-width);
  border-right: 1px solid var(--help-line);
  background:
    linear-gradient(180deg, rgba(13, 31, 51, 0.97), rgba(4, 12, 22, 0.99)),
    var(--help-panel-strong);
  box-shadow: 18px 0 52px rgba(0, 0, 0, 0.22);
}

.help-sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 22px 15px;
}

.help-sidebar__head div {
  min-width: 0;
}

.help-sidebar__head span,
.help-sidebar__head small {
  display: block;
}

.help-sidebar__head span {
  color: var(--help-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.help-sidebar__head strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 22px;
  line-height: 1.25;
}

.help-sidebar__head small {
  margin-top: 6px;
  color: var(--help-muted);
  font-size: 11px;
}

.help-sidebar__close {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--help-line);
  border-radius: 12px;
  color: var(--help-text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.help-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px;
  padding: 0 11px;
  border: 1px solid rgba(87, 165, 210, 0.25);
  border-radius: 12px;
  background: rgba(1, 8, 15, 0.62);
}

.help-search:focus-within {
  border-color: rgba(52, 213, 211, 0.72);
  box-shadow: 0 0 0 3px rgba(52, 213, 211, 0.1);
}

.help-search svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--help-muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.help-search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.help-search input::placeholder {
  color: #70889c;
}

.help-search kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #7590a5;
  font: 700 11px/1.2 system-ui, sans-serif;
}

.help-search-status {
  min-height: 18px;
  margin: 8px 20px 4px;
  color: #738da2;
  font-size: 11px;
}

.help-tree {
  min-height: 0;
  padding: 4px 12px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(84, 142, 181, 0.35) transparent;
}

.help-tree-section {
  position: relative;
  margin: 3px 0;
}

.help-tree-chapter {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 45px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  color: #cbd9e5;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.help-tree-chapter:hover,
.help-tree-chapter:focus-visible {
  color: #fff;
  background: rgba(71, 133, 175, 0.1);
}

.help-tree-chapter__index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(232, 189, 103, 0.38);
  border-radius: 9px;
  color: var(--help-gold);
  font-size: 11px;
  font-weight: 800;
}

.help-tree-chapter__title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.help-tree-chapter__chevron {
  color: #68849a;
  font-size: 14px;
  transform: rotate(-90deg);
  transition: transform 160ms ease;
}

.help-tree-section.is-open .help-tree-chapter__chevron {
  transform: rotate(0deg);
}

.help-tree-topics {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 0 0 6px 22px;
  padding: 2px 0 3px 18px;
}

.help-tree-topics::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;
  left: 7px;
  width: 1px;
  background: linear-gradient(180deg, rgba(52, 213, 211, 0.36), rgba(63, 113, 148, 0.08));
}

.help-tree-section:not(.is-open) .help-tree-topics {
  display: none;
}

.help-tree-topic {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 7px 24px 7px 12px;
  border: 0;
  border-radius: 8px;
  color: #8ea6b8;
  background: transparent;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.help-tree-topic::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -11px;
  width: 11px;
  height: 1px;
  background: rgba(77, 145, 188, 0.35);
}

.help-tree-topic:hover,
.help-tree-topic:focus-visible {
  color: #eaf7ff;
  background: rgba(42, 115, 161, 0.12);
}

.help-tree-topic.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(31, 154, 172, 0.23), rgba(27, 80, 121, 0.14));
  box-shadow: inset 2px 0 var(--help-cyan);
}

.help-tree-topic.is-active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--help-gold);
  box-shadow: 0 0 8px rgba(232, 189, 103, 0.85);
}

.help-sidebar__foot {
  display: grid;
  gap: 6px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--help-line);
  background: rgba(2, 8, 15, 0.62);
}

.help-sidebar__foot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(232, 189, 103, 0.38);
  border-radius: 10px;
  color: #f6d891;
  background: rgba(232, 189, 103, 0.06);
  font-size: 12px;
  font-weight: 760;
}

.help-sidebar__foot span {
  color: #688297;
  font-size: 10px;
  text-align: center;
}

.help-content {
  min-height: calc(100vh - var(--help-header-height));
  margin-left: var(--help-sidebar-width);
}

.help-mobile-bar {
  display: none;
}

.help-article {
  width: min(920px, calc(100% - 72px));
  min-height: calc(100vh - var(--help-header-height));
  margin: 0 auto;
  padding: 42px 0 88px;
  outline: 0;
}

.help-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18vh 20px 0;
  color: var(--help-muted);
  text-align: center;
}

.help-loading span {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(52, 213, 211, 0.2);
  border-top-color: var(--help-cyan);
  border-radius: 50%;
  animation: help-spin 800ms linear infinite;
}

.help-loading strong {
  color: var(--help-text);
}

.help-loading p {
  margin: 0;
  font-size: 13px;
}

.help-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
  color: #7692a8;
  font-size: 12px;
}

.help-breadcrumbs span:last-child {
  color: var(--help-gold);
}

.help-article-header {
  position: relative;
  padding: 30px 34px 32px;
  border: 1px solid rgba(79, 154, 197, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(47, 160, 197, 0.14), transparent 18rem),
    linear-gradient(145deg, rgba(12, 31, 51, 0.9), rgba(5, 15, 28, 0.94));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.help-article-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--help-cyan), var(--help-gold), transparent 82%);
}

.help-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #83a4bb;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.help-article-meta span {
  padding: 5px 9px;
  border: 1px solid rgba(87, 165, 210, 0.19);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.help-article-header h1 {
  margin: 17px 0 10px;
  color: #fff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.help-article-header > p {
  max-width: 720px;
  margin: 0;
  color: #b4c8d8;
  font-size: 16px;
  line-height: 1.75;
}

.help-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.help-article-actions a,
.help-article-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(93, 172, 216, 0.25);
  border-radius: 11px;
  color: #dcebf5;
  background: rgba(14, 42, 64, 0.62);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.help-article-actions a:first-child {
  border-color: rgba(232, 189, 103, 0.38);
  color: #ffe4a5;
  background: rgba(232, 189, 103, 0.08);
}

.help-section {
  margin-top: 26px;
  padding: 25px 28px;
  border: 1px solid rgba(79, 145, 188, 0.16);
  border-radius: 18px;
  background: rgba(6, 17, 31, 0.76);
}

.help-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #f2f8fc;
  font-size: 19px;
}

.help-section h2::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--help-cyan), var(--help-blue));
}

.help-section p {
  margin: 0;
  color: #b4c7d6;
  font-size: 14px;
  line-height: 1.8;
}

.help-section--state {
  border-color: rgba(232, 189, 103, 0.25);
  background: linear-gradient(145deg, rgba(79, 56, 14, 0.28), rgba(28, 22, 11, 0.22));
}

.help-section--state h2::before,
.help-section--note h2::before {
  background: var(--help-gold);
}

.help-steps {
  counter-reset: help-step;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-steps li {
  counter-increment: help-step;
  position: relative;
  min-height: 48px;
  padding: 12px 14px 12px 58px;
  border: 1px solid rgba(77, 143, 185, 0.14);
  border-radius: 12px;
  color: #c5d5e1;
  background: rgba(11, 30, 48, 0.48);
  font-size: 14px;
  line-height: 1.7;
}

.help-steps li::before {
  content: counter(help-step);
  position: absolute;
  top: 10px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(52, 213, 211, 0.38);
  border-radius: 9px;
  color: var(--help-cyan);
  background: rgba(52, 213, 211, 0.06);
  font-size: 12px;
  font-weight: 840;
}

.help-figure {
  margin: 26px 0 0;
}

.help-figure img {
  display: block;
  width: 100%;
  max-height: 650px;
  border: 1px solid rgba(93, 158, 198, 0.22);
  border-radius: 16px;
  background: #02060c;
  object-fit: contain;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

.help-figure figcaption {
  margin-top: 11px;
  color: #8099ac;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.help-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}

.help-summary-grid .help-section {
  margin: 0;
}

.help-section--result {
  border-color: rgba(52, 213, 211, 0.2);
  background: rgba(11, 48, 52, 0.36);
}

.help-section--note {
  border-color: rgba(232, 189, 103, 0.22);
  background: rgba(64, 46, 16, 0.24);
}

.help-faq {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(211, 100, 100, 0.18);
  border-radius: 14px;
  background: rgba(55, 22, 30, 0.19);
}

.help-faq strong {
  color: #f08b8b;
  font-size: 13px;
}

.help-faq p {
  margin: 0;
  color: #b9cbd7;
  font-size: 13px;
  line-height: 1.7;
}

.help-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}

.help-pagination button {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 15px 17px;
  border: 1px solid rgba(87, 151, 190, 0.18);
  border-radius: 14px;
  color: #d5e3ed;
  background: rgba(8, 24, 40, 0.74);
  text-align: left;
  cursor: pointer;
}

.help-pagination button:last-child {
  text-align: right;
}

.help-pagination button:hover,
.help-pagination button:focus-visible {
  border-color: rgba(52, 213, 211, 0.45);
  background: rgba(13, 42, 64, 0.86);
}

.help-pagination small {
  color: #718da1;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-pagination strong {
  font-size: 13px;
  line-height: 1.35;
}

.help-pagination button:disabled {
  opacity: 0.42;
  cursor: default;
}

.help-empty {
  margin: 18vh auto 0;
  padding: 36px;
  border: 1px solid var(--help-line);
  border-radius: 18px;
  color: var(--help-muted);
  background: var(--help-panel);
  text-align: center;
}

.help-empty strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.help-noscript {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 14px;
  border-radius: 12px;
  color: #201a0d;
  background: #f0cf86;
  text-align: center;
}

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

.help-drawer-backdrop {
  display: none;
}

@keyframes help-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  :root {
    --help-sidebar-width: 300px;
  }

  .help-article {
    width: min(860px, calc(100% - 48px));
  }
}

@media (max-width: 960px) {
  .help-sidebar {
    z-index: 180;
    width: min(360px, calc(100vw - 36px));
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .help-shell.is-nav-open .help-sidebar {
    transform: translateX(0);
  }

  .help-sidebar__close {
    display: inline-grid;
    place-items: center;
  }

  .help-drawer-backdrop {
    position: fixed;
    z-index: 170;
    top: var(--help-header-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    background: rgba(0, 5, 11, 0.72);
    backdrop-filter: blur(4px);
  }

  .help-drawer-backdrop[hidden] {
    display: none;
  }

  .help-content {
    margin-left: 0;
  }

  .help-mobile-bar {
    position: sticky;
    z-index: 60;
    top: var(--help-header-height);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 6px 18px;
    border-bottom: 1px solid var(--help-line);
    background: rgba(4, 12, 22, 0.94);
    backdrop-filter: blur(14px);
  }

  .help-mobile-bar button,
  .help-mobile-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid rgba(86, 155, 197, 0.22);
    border-radius: 10px;
    color: #d9e8f2;
    background: rgba(13, 35, 54, 0.62);
    font-size: 12px;
    font-weight: 740;
  }

  .help-mobile-bar > span {
    min-width: 0;
    overflow: hidden;
    color: #a8bdcc;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .help-article {
    min-height: calc(100vh - var(--help-header-height) - 52px);
    padding-top: 28px;
  }
}

@media (max-width: 820px) {
  :root {
    --help-header-height: 112px;
  }
}

@media (max-width: 620px) {
  .help-mobile-bar {
    padding-inline: 12px;
  }

  .help-mobile-bar button {
    padding-inline: 9px;
  }

  .help-article {
    width: calc(100% - 28px);
    padding: 22px 0 68px;
  }

  .help-breadcrumbs {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .help-article-header {
    padding: 24px 20px 25px;
    border-radius: 17px;
  }

  .help-article-header h1 {
    margin-top: 14px;
    font-size: 30px;
  }

  .help-article-header > p {
    font-size: 14px;
  }

  .help-article-actions > * {
    flex: 1 1 150px;
  }

  .help-section {
    margin-top: 17px;
    padding: 21px 18px;
    border-radius: 15px;
  }

  .help-summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 17px;
  }

  .help-steps li {
    padding-left: 53px;
  }

  .help-faq {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .help-pagination {
    grid-template-columns: 1fr;
  }

  .help-pagination button:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .help-sidebar { transition: none; }
  .help-loading span { animation-duration: 1600ms; }
}

@media print {
  .home-fixed-header,
  .help-sidebar,
  .help-mobile-bar,
  .help-article-actions,
  .help-pagination {
    display: none !important;
  }

  .help-shell {
    padding: 0;
  }

  .help-content {
    margin: 0;
  }

  .help-article {
    width: 100%;
    padding: 0;
  }

  .help-page,
  .help-section,
  .help-article-header {
    color: #172436;
    background: #fff !important;
    box-shadow: none;
  }
}
