.docs-page {
  --docs-accent: #d1f96b;
}

.docs-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 88px;
}

.docs-sidebar {
  position: sticky;
  top: 112px;
  max-height: calc(100svh - 144px);
  overflow-y: auto;
  padding-bottom: 12px;
}

.docs-sidebar > p {
  color: #d1d0d9;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 16px 12px;
}

.docs-nav {
  display: grid;
  border-left: 1px solid var(--line);
}

.docs-nav a {
  padding: 9px 0 9px 15px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: #9c9da6;
  font-size: 12px;
  line-height: 1.6;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.docs-nav a:hover {
  color: var(--text);
}

.docs-nav a[aria-current="location"] {
  color: var(--docs-accent);
  border-color: var(--docs-accent);
}

.docs-sidebar-download {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #bba5e3;
  padding: 18px 0 0 12px;
  margin-top: 22px;
  font-size: 12px;
}

.docs-sidebar-download svg {
  width: 15px;
  height: 15px;
}

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

.docs-intro {
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.docs-intro .eyebrow {
  color: var(--violet);
  gap: 9px;
}

.docs-intro .eyebrow svg {
  width: 17px;
  height: 17px;
}

.docs-intro h1 {
  font-size: 52px;
  font-weight: 600;
  margin-top: 17px;
}

.docs-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 65ch;
  margin-top: 20px;
}

.docs-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 24px;
  color: #999ba5;
  font-size: 11px;
}

.docs-metadata span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.docs-metadata span:first-child {
  color: var(--lime);
}

.docs-metadata svg {
  width: 14px;
  height: 14px;
}

.docs-intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.docs-intro-actions .button {
  font-size: 13px;
  min-height: 46px;
}

.docs-portable {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
  font-size: 11px;
  color: #92949d;
}

.docs-portable a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.docs-portable a:hover {
  color: var(--text);
}

.docs-portable svg {
  width: 13px;
  height: 13px;
}

.docs-mobile-toc {
  display: none;
}

.docs-article > section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 0;
  min-width: 0;
}

.docs-article h2 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 20px;
  text-wrap: balance;
}

.docs-article h3 {
  font-size: 18px;
}

.docs-article section p {
  max-width: 78ch;
  font-size: 14px;
  line-height: 1.85;
  color: #aaaab4;
  margin-top: 15px;
  overflow-wrap: anywhere;
}

.docs-article section a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.docs-article section a:hover {
  color: #e1ffa8;
}

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

.hp-docs-split {
  display: grid;
  gap: 28px;
}

.hp-docs-list > div,
.hp-api-components > article {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1.6fr);
  gap: 24px;
  padding: 17px 0;
  border-top: 1px solid #ffffff0e;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.hp-docs-list > div > strong,
.hp-api-components > article > strong {
  color: #dbd6e8;
  font-size: 12px;
  font-weight: 500;
}

.hp-docs-list > div > span,
.hp-api-components > article > span {
  color: var(--muted);
}

.hp-api-map__heading > .hp-kicker {
  color: var(--violet);
  font-size: 12px;
  margin: 0 0 12px;
}

.hp-api-map__grid {
  display: grid;
  margin-top: 30px;
}

.hp-api-map__grid > article {
  position: relative;
  padding: 22px 0 22px 38px;
  border-top: 1px solid #ffffff0e;
}

.hp-api-map__grid > article > span {
  position: absolute;
  left: 0;
  top: 25px;
  font-size: 10px;
  color: #9f83ca;
}

.hp-api-map__grid > article > strong {
  font-size: 14px;
  font-weight: 600;
}

.hp-api-map__grid > article > p {
  margin-top: 8px;
}

.docs-article :not(pre) > code {
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
  font-size: 0.88em;
  line-height: 1.7;
  color: #d7c4fa;
  background: #b6a1da0c;
  border-radius: 3px;
  padding: 2px 4px;
  overflow-wrap: anywhere;
}

.docs-article pre {
  margin: 18px 0;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  background: #121318;
  overflow: hidden;
  max-width: 100%;
}

.docs-article pre > code {
  display: block;
  overflow-x: auto;
  padding: 18px 20px;
  white-space: pre;
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.85;
  color: #d2d0dd;
  tab-size: 4;
  scrollbar-width: thin;
  scrollbar-color: #70617e #121318;
}

.code-example {
  border: 1px solid #ffffff20;
  border-radius: 8px;
  background: #121318;
  margin: 18px 0;
  overflow: hidden;
}

.code-example pre {
  border: 0;
  border-radius: 0;
  margin: 0;
}

.code-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px 7px 20px;
  border-bottom: 1px solid #ffffff0c;
  background: #ffffff02;
  font-size: 10px;
  color: #9e99ad;
}

.code-feedback {
  min-width: 0;
  margin-left: auto;
  text-align: right;
  line-height: 1.4;
  color: var(--lime);
}

.code-feedback.is-error {
  color: #efa9ac;
}

.code-copy {
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 5px;
  background: transparent;
  color: #b9b3c8;
}

.code-copy:hover {
  background: #ffffff0c;
  color: white;
}

.code-copy svg {
  width: 15px;
  height: 15px;
}

.docs-final p {
  margin-bottom: 20px;
}

.docs-final .text-link {
  text-decoration: none;
}

@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 36px;
    padding-top: 36px;
  }

  .docs-intro h1 {
    font-size: 46px;
  }
}

@media (max-width: 800px) {
  .docs-layout {
    display: block;
    padding-top: 28px;
    padding-bottom: 60px;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-intro {
    padding-bottom: 28px;
  }

  .docs-mobile-toc {
    display: block;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .docs-mobile-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    list-style: none;
    cursor: pointer;
    font-size: 12px;
    color: #d7d2e2;
  }

  .docs-mobile-toc summary::-webkit-details-marker {
    display: none;
  }

  .docs-mobile-toc summary svg {
    width: 16px;
    height: 16px;
    color: var(--violet);
    transition: transform 0.2s;
  }

  .docs-mobile-toc[open] summary svg {
    transform: rotate(180deg);
  }

  .docs-mobile-toc .docs-nav {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin: 0 16px;
    padding: 8px 0;
  }

  .docs-mobile-toc .docs-nav a {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 540px) {
  .docs-intro h1 {
    font-size: 36px;
    margin-top: 15px;
  }

  .docs-intro > p:not(.eyebrow) {
    font-size: 14px;
    margin-top: 16px;
  }

  .docs-metadata {
    gap: 10px 16px;
    font-size: 10px;
    margin-top: 20px;
  }

  .docs-intro-actions {
    gap: 10px;
    margin-top: 24px;
  }

  .docs-intro-actions .button {
    font-size: 12px;
    padding: 10px 14px;
    gap: 10px;
    min-height: 44px;
  }

  .docs-intro-actions svg {
    width: 16px;
    height: 16px;
  }

  .docs-portable {
    gap: 10px 16px;
    font-size: 10px;
  }

  .docs-article h2 {
    font-size: 23px;
  }

  .docs-article > section {
    padding: 32px 0;
  }

  .docs-article section p {
    font-size: 13px;
    line-height: 1.85;
  }

  .hp-docs-list > div,
  .hp-api-components > article {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding-block: 15px;
    font-size: 12px;
  }

  .hp-api-map__grid > article {
    padding-left: 28px;
  }

  .hp-api-map__grid > article > strong {
    font-size: 13px;
  }

  .docs-article pre > code {
    padding: 15px;
    font-size: 11px;
  }

  .code-toolbar {
    padding-left: 15px;
  }
  .code-copy {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-page * {
    transition: none;
  }
}
