.help-page {
  min-height: 100vh;
  background: #f4f6f5;
}

.help-page .site-nav a.is-active {
  color: var(--green-dark);
  font-weight: 700;
}

.help-page .site-nav a.is-active::after {
  right: 0;
}

.help-main {
  width: min(var(--max), calc(100% - 56px));
  min-height: calc(100vh - 145px);
  margin: 0 auto;
  padding: 116px 0 54px;
}

.help-heading {
  min-height: 126px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 26px;
}

.help-heading .eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  letter-spacing: .08em;
}

.help-heading .eyebrow-mark {
  background: var(--green);
}

.help-heading h1 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
}

.help-summary {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.help-workspace {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(20, 35, 39, .08);
}

.help-catalog {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f8faf9;
}

.catalog-title {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-title strong {
  font-size: 14px;
}

.catalog-title span,
.category-heading span {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: #e8eeeb;
  color: #71807c;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

#video-catalog {
  max-height: 650px;
  overflow-y: auto;
  padding: 16px 12px 24px;
}

.video-category + .video-category {
  margin-top: 20px;
}

.category-heading {
  min-height: 30px;
  padding: 0 7px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-heading h2 {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.category-empty {
  padding: 8px 9px;
  color: #98a39f;
  font-size: 11px;
}

.video-item {
  width: 100%;
  min-height: 44px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #51615e;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.video-item + .video-item {
  margin-top: 3px;
}

.video-item:hover {
  background: #eef3f0;
  color: var(--ink);
}

.video-item:focus-visible {
  border-color: #75a493;
  outline: none;
}

.video-item.is-active {
  border-color: #b8d4ca;
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 700;
}

.video-item-symbol {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e2e9e6;
  color: #6b7b76;
  display: grid;
  place-items: center;
  font-size: 9px;
  line-height: 1;
}

.video-item.is-active .video-item-symbol {
  background: var(--green);
  color: #fff;
}

.video-item-title {
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.help-content {
  min-width: 0;
  min-height: 590px;
  background: #fff;
}

.video-view {
  padding: 31px 34px 38px;
}

.video-heading {
  min-height: 63px;
  margin-bottom: 17px;
}

.video-heading p {
  margin-bottom: 3px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.video-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #10191b;
  box-shadow: 0 10px 26px rgba(20, 35, 39, .16);
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #10191b;
}

.video-error {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid #edc1ba;
  border-radius: 6px;
  background: #fff4f1;
  color: #a64435;
  font-size: 12px;
}

.help-state {
  min-height: 590px;
  padding: 36px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.help-state[hidden],
.video-view[hidden],
.video-error[hidden] {
  display: none;
}

.help-state strong {
  max-width: 540px;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.state-symbol {
  width: 34px;
  height: 34px;
  border: 2px solid #cfd9d5;
  border-top-color: var(--green);
  border-radius: 50%;
}

.help-state.is-loading .state-symbol {
  animation: help-spin .9s linear infinite;
}

.help-state.is-empty .state-symbol,
.help-state.is-error .state-symbol {
  border: 1px solid #cbd5d1;
  background: #eef2f0;
}

.help-state.is-error {
  color: #a64435;
}

.help-footer {
  width: min(var(--max), calc(100% - 56px));
}

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

@media (max-width: 800px) {
  .help-main {
    width: calc(100% - 36px);
    padding-top: 94px;
  }

  .help-heading {
    min-height: 112px;
  }

  .help-heading h1 {
    font-size: 31px;
  }

  .help-workspace {
    display: flex;
    flex-direction: column;
  }

  .help-catalog {
    max-height: 310px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #video-catalog {
    max-height: 251px;
  }

  .help-content,
  .help-state {
    min-height: 420px;
  }

  .video-view {
    padding: 25px 20px 30px;
  }

  .help-footer {
    width: calc(100% - 44px);
  }
}

@media (max-width: 500px) {
  .help-main {
    width: calc(100% - 24px);
    padding-bottom: 40px;
  }

  .help-heading {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
  }

  .help-summary {
    margin: 0;
    text-align: left;
  }

  .video-heading h2 {
    font-size: 18px;
  }

  .video-view {
    padding: 21px 12px 24px;
  }

  .help-content,
  .help-state {
    min-height: 330px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .help-state.is-loading .state-symbol {
    animation: none;
  }
}
