:root {
  color-scheme: light;
  --bg: #ffffff;
  --card: #ffffff;
  --card-muted: #f7f7f7;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #000000;
  --text-soft: rgba(0, 0, 0, 0.72);
  --text-muted: rgba(0, 0, 0, 0.48);
  --text-faint: rgba(0, 0, 0, 0.28);
  --surface: #ffffff;
  --surface-strong: rgba(0, 0, 0, 0.04);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --surface-active: rgba(0, 0, 0, 0.08);
  --surface-accent: #eeeeee;
  --accent: #534ab7;
  --accent-hover: #3c3489;
  --accent-secondary: #7f77dd;
  --accent-soft: rgba(83, 74, 183, 0.07);
  --accent-border: rgba(83, 74, 183, 0.28);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
  --transition-fast: 160ms ease;
  --transition-medium: 220ms ease;
  --radius-panel: 32px;
  --radius-item: 16px;
  --radius-chip: 999px;
  --shell-gap: 16px;
  --shell-padding: 16px;
  --sidebar-width: 288px;
  --content-width: 920px;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --chrome-line: rgba(0, 0, 0, 0.1);
  --chrome-line-strong: rgba(0, 0, 0, 0.16);
  --chrome-fill-soft: #ffffff;
  --chrome-fill: rgba(0, 0, 0, 0.03);
  --chrome-fill-strong: rgba(0, 0, 0, 0.05);
  --chrome-icon: rgba(0, 0, 0, 0.42);
  --chrome-icon-strong: rgba(0, 0, 0, 0.68);
  --chrome-muted: rgba(0, 0, 0, 0.56);
  --search-placeholder: rgba(0, 0, 0, 0.32);
  --link-underline: rgba(0, 0, 0, 0.24);
  --link-underline-hover: rgba(0, 0, 0, 0.52);
  --blockquote-border: rgba(0, 0, 0, 0.14);
  --inline-code-bg: rgba(0, 0, 0, 0.05);
  --table-row-border: rgba(0, 0, 0, 0.08);
  --table-head-bg: rgba(0, 0, 0, 0.05);
  --admonition-bg: rgba(0, 0, 0, 0.035);
  --pagination-bg: rgba(0, 0, 0, 0.03);
  --pagination-bg-hover: rgba(0, 0, 0, 0.06);
  --scrollbar-thumb: rgba(0, 0, 0, 0.12);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.22);
}

:root.dark {
  color-scheme: dark;
  --bg: #000000;
  --card: #000000;
  --card-muted: #050505;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.48);
  --text-faint: rgba(255, 255, 255, 0.28);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-active: rgba(255, 255, 255, 0.08);
  --surface-accent: rgba(255, 255, 255, 0.06);
  --accent: #7f77dd;
  --accent-hover: #534ab7;
  --accent-secondary: #afa9ec;
  --accent-soft: rgba(127, 119, 221, 0.1);
  --accent-border: rgba(127, 119, 221, 0.3);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --chrome-line: rgba(255, 255, 255, 0.1);
  --chrome-line-strong: rgba(255, 255, 255, 0.16);
  --chrome-fill-soft: #000000;
  --chrome-fill: rgba(255, 255, 255, 0.03);
  --chrome-fill-strong: rgba(255, 255, 255, 0.05);
  --chrome-icon: rgba(255, 255, 255, 0.42);
  --chrome-icon-strong: rgba(255, 255, 255, 0.68);
  --chrome-muted: rgba(255, 255, 255, 0.56);
  --search-placeholder: rgba(255, 255, 255, 0.32);
  --link-underline: rgba(255, 255, 255, 0.24);
  --link-underline-hover: rgba(255, 255, 255, 0.52);
  --blockquote-border: rgba(255, 255, 255, 0.14);
  --inline-code-bg: rgba(255, 255, 255, 0.05);
  --table-row-border: rgba(255, 255, 255, 0.08);
  --table-head-bg: rgba(255, 255, 255, 0.05);
  --admonition-bg: rgba(255, 255, 255, 0.035);
  --pagination-bg: rgba(255, 255, 255, 0.03);
  --pagination-bg-hover: rgba(255, 255, 255, 0.06);
  --scrollbar-thumb: rgba(255, 255, 255, 0.12);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
  transition: background-color 180ms ease;
}

::selection {
  background: rgba(83, 74, 183, 0.16);
  color: inherit;
}

body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 180ms ease, color 180ms ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--border) 28%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--border) 22%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.06;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.15), transparent 50%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.15), transparent 50%);
}

a {
  color: inherit;
}

.help-shell {
  height: 100dvh;
  padding: var(--shell-padding);
  overflow: hidden;
}

.help-layout {
  display: flex;
  gap: var(--shell-gap);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sidebar-panel,
.content-panel {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--card);
  box-shadow: var(--shadow);
}

.content-panel {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-panel {
  width: min(100%, var(--sidebar-width));
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-inner {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 14px 14px 0 14px;
  overflow-x: clip;
}

.brand-block {
  padding: 6px 6px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex-shrink: 0;
  border-radius: 14px;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  min-width: 5.5em;
}

.brand-title::after {
  content: '|';
  color: var(--accent);
  margin-left: 1px;
  animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin-right: -14px;
  padding-right: 14px;
  padding-bottom: 0;
}

.sidebar-nav::after {
  content: '';
  display: block;
  height: 20px;
}

.nav-group + .nav-group {
  margin-top: 6px;
}

.nav-group {
  display: block;
  border-radius: 20px;
}

.nav-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group-summary::marker {
  content: '';
}

.nav-group:hover .nav-group-summary {
  background: var(--surface-hover);
}

.nav-group[open] .nav-group-summary {
  background: transparent;
}

.nav-group-title {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.nav-group-icon {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--chrome-icon);
  border-bottom: 1.5px solid var(--chrome-icon);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.nav-group[open] .nav-group-icon {
  transform: rotate(225deg) translateY(1px);
}

.nav-group:hover .nav-group-icon,
.nav-group[open] .nav-group-icon {
  border-color: var(--chrome-icon-strong);
}

.nav-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 8px;
}

.nav-item + .nav-item {
  margin-top: 2px;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-item);
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.hdr-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.hdr-btn:hover {
  background: color-mix(in srgb, var(--surface) 76%, var(--surface-accent));
  border-color: var(--accent-secondary);
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.hdr-btn-icon {
  width: 44px;
  min-height: 44px;
  padding: 0;
  flex-shrink: 0;
}

.hdr-btn-accent {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(83, 74, 183, 0.22);
}

.hdr-btn-accent:hover {
  background: var(--accent-hover);
  border-color: transparent;
  color: #ffffff;
}

.hdr-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  transition-delay: 200ms;
  z-index: 100;
}

.hdr-btn[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.header-controls .hdr-btn[data-tooltip]:last-child::after {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

.header-controls .hdr-btn[data-tooltip]:last-child:hover::after {
  transform: translateY(0);
}

.hdr-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-soft);
}

.hdr-btn:hover .hdr-icon {
  color: var(--text);
}

.hdr-btn-accent .hdr-icon,
.hdr-btn-accent:hover .hdr-icon {
  color: #ffffff;
}

.hdr-icon-light {
  display: none;
}

:root.light .hdr-icon-dark {
  display: none;
}

:root.light .hdr-icon-light {
  display: block;
}

.content-scroll {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: 0 16px 16px;
}

.content-inner {
  width: 100%;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.page-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 0;
  margin-bottom: 16px;
  overflow: visible;
  position: relative;
  z-index: 20;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 1;
  flex-wrap: nowrap;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.page-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: clamp(1.45rem, 2.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.doc-search {
  position: relative;
  width: 320px;
  min-width: 0;
  flex-shrink: 1;
}

.doc-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.doc-search-field:hover {
  background: color-mix(in srgb, var(--surface) 76%, var(--surface-accent));
  border-color: var(--accent-secondary);
}

.doc-search-field:focus-within {
  background: color-mix(in srgb, var(--surface) 76%, var(--surface-accent));
  border-color: var(--accent-secondary);
}

.doc-search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--chrome-icon);
}

.doc-search-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.doc-search-input::placeholder {
  color: var(--search-placeholder);
}

.doc-search-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  min-width: 380px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), 0 24px 64px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.doc-search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 10px;
}

.doc-search-result {
  display: block;
  padding: 12px 14px;
  border-radius: 18px;
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.doc-search-result:hover {
  background: color-mix(in srgb, var(--surface) 76%, var(--surface-accent));
}

.doc-search-result + .doc-search-result {
  margin-top: 3px;
}

.doc-search-result-meta {
  color: var(--chrome-icon);
  font-size: 0.78rem;
  line-height: 1.4;
}

.doc-search-result-title {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.925rem;
  font-weight: 500;
  line-height: 1.35;
}

.doc-search-result-snippet {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.825rem;
  line-height: 1.55;
}

.doc-search-result-snippet mark {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.doc-content {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  scroll-padding-top: 18px;
  scroll-padding-bottom: 18px;
}

.doc-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--chrome-line);
  border-radius: 32px;
  background: var(--chrome-fill-soft);
}

.doc-main {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 0 0 0 16px;
}

.doc-content > :first-child {
  margin-top: 0;
}

.doc-content > :last-child {
  margin-bottom: 0;
}

.doc-article-title {
  margin: 0 0 1.15rem;
  color: var(--text);
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.doc-empty {
  padding: 2px 0;
}

.doc-empty-title {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.doc-empty p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.doc-sidepanel {
  width: 340px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 18px 18px;
}

.doc-sidepanel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--chrome-line);
}

.doc-side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.doc-side-toc-label {
  color: var(--chrome-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.doc-side-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-side-link {
  display: block;
  color: var(--text-soft);
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 3px 0;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.doc-side-link:hover {
  color: var(--accent);
}

.doc-content h2,
.doc-content h3,
.doc-content h4 {
  margin: 2.25rem 0 0.95rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
  scroll-margin-top: 18px;
}

.doc-content h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
}

.doc-content h3 {
  font-size: 1.05rem;
}

.doc-content h4 {
  font-size: 0.95rem;
}

.doc-content p,
.doc-content ul,
.doc-content ol,
.doc-content table,
.doc-content blockquote,
.doc-content pre,
.doc-content .admonition {
  margin: 0 0 0.95rem;
}

.doc-content ul,
.doc-content ol {
  padding-left: 1.4rem;
}

.doc-content li + li {
  margin-top: 0.3rem;
}

.doc-content p,
.doc-content li,
.doc-content td,
.doc-content th {
  font-size: 0.95rem;
}

.doc-content strong {
  color: var(--text);
}

.doc-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.doc-content a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent);
}

.doc-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08);
}

.doc-content p > img:only-child {
  margin: 1.5rem 0;
}

.doc-content blockquote {
  padding: 0 0 0 16px;
  border-left: 3px solid var(--blockquote-border);
  color: var(--text-soft);
}

.doc-content pre {
  overflow-x: auto;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card-muted);
}

.doc-content code {
  padding: 0.18rem 0.42rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--inline-code-bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.92em;
}

.doc-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
}

.doc-content th,
.doc-content td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--table-row-border);
}

.doc-content th {
  color: var(--text);
  background: var(--table-head-bg);
  font-weight: 600;
}

.doc-content tr:last-child td {
  border-bottom: 0;
}

.admonition {
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--admonition-bg);
}

.admonition-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admonition p:last-child,
.admonition ul:last-child,
.admonition ol:last-child {
  margin-bottom: 0;
}

.doc-pagination {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 48px 0 0;
}

.doc-pagination.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.pagination-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  text-decoration: none;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pagination-link:hover {
  background: color-mix(in srgb, var(--surface) 76%, var(--surface-accent));
  border-color: var(--accent-secondary);
  transform: translateY(-1px);
}

.pagination-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.pagination-title {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.doc-pagination .pagination-link,
.doc-pagination .pagination-link:hover,
.doc-pagination .pagination-link:focus-visible,
.doc-pagination .pagination-link .pagination-label,
.doc-pagination .pagination-link .pagination-title {
  text-decoration: none;
}

.doc-content::-webkit-scrollbar,
.doc-search-results::-webkit-scrollbar,
.doc-sidepanel::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 10px;
}

.doc-content::-webkit-scrollbar-track,
.doc-search-results::-webkit-scrollbar-track,
.doc-sidepanel::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.doc-content::-webkit-scrollbar-thumb,
.doc-search-results::-webkit-scrollbar-thumb,
.doc-sidepanel::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--scrollbar-thumb);
  background-clip: padding-box;
}

.doc-content::-webkit-scrollbar-thumb:hover,
.doc-search-results::-webkit-scrollbar-thumb:hover,
.doc-sidepanel::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .help-layout {
    height: auto;
    min-height: calc(100dvh - (var(--shell-padding) * 2));
    flex-direction: column;
    overflow: visible;
  }

  .sidebar-panel {
    width: 100%;
  }

  .sidebar-nav {
    overflow: visible;
  }

  .content-scroll {
    flex: initial;
    overflow: visible;
    padding: 0;
  }

  .content-inner,
  .doc-content,
  .doc-workspace,
  .doc-main,
  .doc-sidepanel {
    min-height: auto;
    overflow: visible;
  }

  .doc-workspace {
    flex-direction: column;
  }

  .page-header {
    align-items: center;
  }

  .doc-main {
    padding: 0;
  }

  .doc-sidepanel {
    width: 100%;
    padding: 0 18px 18px;
  }

  .doc-sidepanel::before {
    left: 18px;
    right: 18px;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .doc-pagination,
  .doc-pagination.is-single {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .help-shell {
    height: auto;
    min-height: 100dvh;
    padding: 10px;
  }

  .help-layout {
    gap: 10px;
    min-height: calc(100dvh - 20px);
  }

  .sidebar-inner {
    padding: 14px;
  }

  .content-scroll {
    padding: 0;
  }

  .page-header {
    padding: 14px 0 0;
    margin-bottom: 8px;
  }

  .doc-main {
    padding: 0;
  }

  .doc-sidepanel {
    padding: 0 16px 16px;
  }

  .doc-sidepanel::before {
    left: 16px;
    right: 16px;
  }

  .page-title {
    font-size: 1.75rem;
  }
}

/* ── Cookie banner ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #111111;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.40);
}

:root.dark .cookie-banner {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.cookie-banner .cookie-banner-text {
  color: rgba(255,255,255,0.75);
}

.cookie-banner .cookie-banner-link {
  color: #afa9ec;
}

:root.dark .cookie-banner .cookie-banner-text {
  color: rgba(0,0,0,0.60);
}

:root.dark .cookie-banner .cookie-banner-link {
  color: #534ab7;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cookie-banner-link {
  color: var(--accent);
  text-decoration: none;
}

.cookie-banner-link:hover {
  text-decoration: underline;
}

.cookie-banner-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-banner-btn:hover {
  opacity: 0.88;
}

@media (max-width: 480px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: 12px;
  }
}
/* ───────────────────────────────────────────────────────────── */
