/**
 * Public documentation — zelfde shell als Instellingen (#view-settings.ksh).
 * Geen dashboard-sidebar; wel ksh-layout, ksh-nav, pf-section-kaarten.
 */
:root {
  --dash-page-gutter-x: 24px;
  --dash-title-pad-top: 12px;
  --color-bg-deep: #121212;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text-main: #e5e7eb;
  --color-text-dim: #9ca3af;
  --color-text-muted: #6b7280;
  --color-brand: #ccff00;
}

@media (min-width: 1024px) {
  :root {
    --dash-page-gutter-x: 32px;
  }
}

html,
body.docs-public-body {
  margin: 0;
  min-height: 100%;
  background: var(--color-bg-deep);
  color: var(--color-text-main);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.docs-topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(var(--dash-page-gutter-x), env(safe-area-inset-left, 0px))
    0 max(var(--dash-page-gutter-x), env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--color-border);
  background: rgba(18, 18, 18, 0.96);
  position: sticky;
  top: 0;
  z-index: 40;
  box-sizing: border-box;
}

.docs-topbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

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

.docs-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.docs-topbar__actions a {
  color: var(--color-text-dim);
  text-decoration: none;
  transition: color 0.12s;
}

.docs-topbar__actions a:hover {
  color: #fff;
}

.docs-topbar__actions .docs-topbar__cta {
  color: var(--color-brand);
  font-weight: 600;
}

/* ── KSH shell (parallel aan #view-settings.ksh) ── */
#docs-hub.ksh {
  --ksh-side-w: 260px;
  --ksh-content-max: 720px;
  --ksh-row-hover: rgba(255, 255, 255, 0.04);
  --ksh-surface: rgba(255, 255, 255, 0.04);
  --ksh-edge: rgba(255, 255, 255, 0.08);
}

#docs-hub.ksh.ksh--wide {
  --ksh-content-max: 960px;
}

#docs-hub .ksh-layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 48px);
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  gap: 32px;
  padding: var(--dash-title-pad-top, 12px) var(--dash-page-gutter-x) 40px;
}

#docs-hub .ksh-side {
  width: var(--ksh-side-w);
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  padding: 0 20px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

#docs-hub .dash-page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.25;
}

#docs-hub .dash-page-sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-dim);
  margin: 0 0 6px;
  max-width: 46rem;
}

#docs-hub .ksh-search {
  position: relative;
  margin: 4px 4px 8px 4px;
  padding: 2px 0;
}

#docs-hub .ksh-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.4;
  pointer-events: none;
}

#docs-hub .ksh-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 8px 12px 8px 36px;
  font-size: 12px;
  color: #e5e7eb;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
}

#docs-hub .ksh-search input::placeholder {
  color: #6b7280;
}

#docs-hub .ksh-search input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#docs-hub .ksh-nav {
  list-style: none;
  margin: 0;
  padding: 4px 0 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

#docs-hub .ksh-nav li {
  margin: 0;
}

#docs-hub .ksh-nav a.ksh-nav-link {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  text-decoration: none;
  background: none;
  border: none;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px 8px 12px;
  margin: 0 0 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  box-sizing: border-box;
}

#docs-hub .ksh-nav a.ksh-nav-link:hover {
  background: var(--ksh-row-hover);
}

#docs-hub .ksh-nav a.ksh-nav-link.ksh-active {
  background: rgba(255, 255, 255, 0.07);
  color: #fafafa;
}

#docs-hub .ksh-nav a.ksh-nav-link:focus,
#docs-hub .ksh-nav a.ksh-nav-link:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

#docs-hub .ksh-nav-key {
  font-size: 13px;
  font-weight: 700;
  display: block;
  width: 100%;
}

#docs-hub .ksh-nav-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  margin-top: 1px;
  line-height: 1.35;
  width: 100%;
}

#docs-hub .ksh-nav li.ksh-nav-sep {
  list-style: none;
  margin: 10px 0 4px 12px;
  padding: 0;
  pointer-events: none;
}

#docs-hub .ksh-nav li.ksh-nav-sep:first-of-type {
  margin-top: 0;
}

#docs-hub .ksh-nav .ksh-nav-sep-txt {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: none;
  color: #6b7280;
}

#docs-hub .ksh-nav li.ksh-nav-hidden {
  display: none;
}

#docs-hub .ksh-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: min(var(--ksh-content-max), 100%);
  padding: 4px 0 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

/* Content card — zelfde als .pf-section in instellingen */
#docs-hub .pf-section.docs-prose {
  margin-bottom: 0;
  padding: 26px 28px 30px;
  background: var(--ksh-surface);
  border: 1px solid var(--ksh-edge);
  border-radius: 14px;
  box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

#docs-hub .docs-page-header {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#docs-hub .docs-page-header h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f4f4f5;
  margin: 0 0 8px;
  line-height: 1.25;
}

#docs-hub .docs-page-header p {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  margin: 0;
  line-height: 1.45;
  max-width: 46rem;
}

#docs-hub .docs-breadcrumb {
  font-size: 11px;
  color: #6b7280;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

#docs-hub .docs-breadcrumb a {
  color: #9ca3af;
  text-decoration: none;
}

#docs-hub .docs-breadcrumb a:hover {
  color: var(--color-brand);
}

/* Markdown prose */
#docs-hub .docs-prose :is(h1, h2, h3, h4) {
  scroll-margin-top: 5rem;
  color: #f4f4f5;
  letter-spacing: -0.02em;
}

#docs-hub .docs-prose > h1:first-child {
  display: none;
}

#docs-hub .docs-prose h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 12px;
  padding-top: 8px;
}

#docs-hub .docs-prose h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

#docs-hub .docs-prose h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: #e5e7eb;
}

#docs-hub .docs-prose h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
}

#docs-hub .docs-prose p,
#docs-hub .docs-prose li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-dim);
  margin: 0 0 12px;
}

#docs-hub .docs-prose strong {
  color: #f4f4f5;
  font-weight: 600;
}

#docs-hub .docs-prose a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#docs-hub .docs-prose ul,
#docs-hub .docs-prose ol {
  margin: 0 0 14px;
  padding-left: 1.25rem;
}

#docs-hub .docs-prose li {
  margin-bottom: 4px;
}

#docs-hub .docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 12px;
}

#docs-hub .docs-prose th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--ksh-edge);
  color: #e5e7eb;
  font-weight: 600;
}

#docs-hub .docs-prose td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-text-dim);
}

#docs-hub .docs-prose pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--ksh-edge);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0 18px;
  font-size: 12px;
  line-height: 1.5;
}

#docs-hub .docs-prose code {
  font-size: 0.92em;
  color: #d8ff5a;
}

#docs-hub .docs-prose pre code {
  color: rgba(255, 255, 255, 0.88);
}

#docs-hub .docs-prose blockquote {
  border-left: 2px solid rgba(204, 255, 0, 0.45);
  padding: 4px 0 4px 14px;
  margin: 14px 0;
  color: #9ca3af;
}

/* Topic cards (hub + siblings) */
#docs-hub .docs-topics {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#docs-hub .docs-topics h2 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #6b7280;
  margin: 0 0 14px;
  text-transform: none;
}

#docs-hub .docs-topic-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  #docs-hub .docs-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#docs-hub a.docs-topic-card {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  transition: background 0.12s, border-color 0.12s;
  box-sizing: border-box;
}

#docs-hub a.docs-topic-card:hover {
  background: var(--ksh-row-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

#docs-hub .docs-topic-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: #f4f4f5;
  margin: 0 0 4px;
}

#docs-hub .docs-topic-card p {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 1023px) {
  #docs-hub .ksh-layout {
    flex-direction: column;
    gap: 0;
    padding: 0 16px 28px;
  }

  #docs-hub .ksh-side {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0 10px;
  }

  #docs-hub .ksh-main {
    max-width: 100%;
    padding: 12px 0 0;
  }

  #docs-hub .pf-section.docs-prose {
    padding: 20px 18px 24px;
  }
}
