/**
 * KB & docs layout — loaded last (critical) so rules beat async theme CSS.
 */

/* All primary main columns: Tailwind py-* must not collapse fixed-header clearance */
html.hs-theme-cyber body.flex.min-h-screen.flex-col > main.flex-1 {
  padding-top: var(--hs-main-pad-top, 116px) !important;
  min-width: 0;
  position: relative;
  z-index: 1;
}

body[data-hs-kb-page] > main.flex-1,
body[data-hs-docs-page] > main.flex-1 {
  padding-top: var(--hs-main-pad-top, 116px) !important;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hs-kb-shell,
.hs-docs-shell {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: 1.25rem 1rem 3.5rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hs-kb-shell,
  .hs-docs-shell {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 1.5rem 1.5rem 4rem;
  }
}

.hs-kb-sidebar,
.hs-docs-sidebar {
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .hs-kb-sidebar,
  .hs-docs-sidebar {
    width: 15rem;
    flex: 0 0 15rem;
    position: sticky;
    top: calc(var(--hs-main-pad-top, 116px) + 0.75rem);
    max-height: calc(100vh - var(--hs-main-pad-top, 116px) - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
  }
}

.hs-kb-content,
.hs-docs-content {
  min-width: 0;
  flex: 1 1 0%;
  padding-top: 0 !important;
}

.hs-kb-sidebar-panel,
.hs-docs-sidebar-panel {
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 0.875rem;
  background: rgba(6, 18, 38, 0.55);
  padding: 0.75rem 0.5rem 1rem;
}

.hs-docs-sidebar-guides,
.hs-docs-toc {
  border-color: rgba(56, 189, 248, 0.12) !important;
  background: rgba(4, 12, 28, 0.55) !important;
}

/* Dark theme readable prose */
html.hs-theme-cyber body[data-hs-kb-page] main article p,
html.hs-theme-cyber body[data-hs-docs-page] main article p,
html.hs-theme-cyber body[data-hs-kb-page] .hs-kb-content p,
html.hs-theme-cyber body[data-hs-docs-page] .hs-docs-content p,
html.hs-theme-cyber body[data-hs-kb-page] .hs-kb-content li,
html.hs-theme-cyber body[data-hs-docs-page] .hs-docs-content li {
  color: rgb(203 213 225) !important;
}

html.hs-theme-cyber body[data-hs-kb-page] main article h1,
html.hs-theme-cyber body[data-hs-kb-page] main article h2,
html.hs-theme-cyber body[data-hs-kb-page] main article h3,
html.hs-theme-cyber body[data-hs-docs-page] main article h1,
html.hs-theme-cyber body[data-hs-docs-page] main article h2,
html.hs-theme-cyber body[data-hs-docs-page] main article h3 {
  color: rgb(248 250 252) !important;
}

html.hs-theme-cyber body[data-hs-kb-page] main article a:not([class]),
html.hs-theme-cyber body[data-hs-docs-page] main article a:not([class]),
html.hs-theme-cyber body[data-hs-kb-page] .hs-kb-content a:not([class]),
html.hs-theme-cyber body[data-hs-docs-page] .hs-docs-content a:not([class]) {
  color: rgb(34 211 238) !important;
}

html.hs-theme-cyber body[data-hs-kb-page] .hs-kb-sidebar a.bg-violet-100,
html.hs-theme-cyber body[data-hs-docs-page] .hs-docs-sidebar a.bg-violet-100 {
  background: rgba(56, 189, 248, 0.12) !important;
  color: rgb(34 211 238) !important;
}

/* Blog, legal, trust reading columns — byline/meta contrast on dark chrome */
html.hs-theme-cyber body.hs-pb-mobile-ui.flex.min-h-screen.flex-col.bg-slate-50:not([data-hs-store-landing]) main.mx-auto.max-w-3xl.flex-1 .text-slate-500,
html.hs-theme-cyber body.hs-pb-mobile-ui.flex.min-h-screen.flex-col.bg-slate-50:not([data-hs-store-landing]) main.mx-auto.max-w-lg.flex-1 .text-slate-500,
html.hs-theme-cyber body.hs-pb-mobile-ui.flex.min-h-screen.flex-col.bg-slate-50:not([data-hs-store-landing]) main.mx-auto.max-w-3xl.flex-1 .text-slate-400,
html.hs-theme-cyber body.hs-pb-mobile-ui.flex.min-h-screen.flex-col.bg-slate-50:not([data-hs-store-landing]) main.mx-auto.max-w-lg.flex-1 .text-slate-400 {
  color: rgb(148 163 184) !important;
}

html.hs-theme-cyber body.hs-pb-mobile-ui.flex.min-h-screen.flex-col.bg-slate-50:not([data-hs-store-landing]) main.mx-auto.max-w-3xl.flex-1 .hs-blog-article p.text-slate-700,
html.hs-theme-cyber body.hs-pb-mobile-ui.flex.min-h-screen.flex-col.bg-slate-50:not([data-hs-store-landing]) main.mx-auto.max-w-3xl.flex-1 article p.text-slate-700 {
  color: rgb(203 213 225) !important;
}

html.hs-theme-cyber body[data-hs-kb-page] main a.text-violet-700,
html.hs-theme-cyber body[data-hs-docs-page] main a.text-violet-700,
html.hs-theme-cyber body[data-hs-kb-page] main a.text-violet-800,
html.hs-theme-cyber body[data-hs-docs-page] main a.text-violet-800 {
  color: rgb(34 211 238) !important;
}
