/* Apexti Web Style Guide v1.0 — light theme (default) */
:root {
  --color-primary: #ed3c3c;
  --color-secondary: #0a0a0a;
  --color-interactive: #0d74ce;
  --color-muted: #737373;
  --color-border: #e5e5e5;
  --color-bg: #f9f9fb;
  --color-bg-white: #ffffff;
  --color-success: #2ecc71;
  --color-warning: #f39c12;
  --color-danger: #ed3c3c;
  --color-info: #0d74ce;
  --gradient-red: linear-gradient(135deg, #ed3c3c, #ff6b6b);
  --gradient-blue: linear-gradient(135deg, #0d74ce, #3b9ae8);
  --font-heading: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-max: 1200px;
  --container-padding: 24px;
  --transition-fast: all 0.2s ease;
  --transition-base: all 0.3s ease;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-anchor: none;
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-secondary);
  line-height: 1.4;
  font-size: 1rem;
  font-weight: 400;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-secondary);
}

.app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

header.top {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) var(--container-padding);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.header-start {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
/* ID beats `button.btn-icon { display: inline-flex }` so this stays off on desktop. */
#btn-open-nav {
  display: none;
}
.nav-backdrop {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
}
.brand:hover .brand-text {
  color: var(--color-interactive);
}
.brand:focus-visible {
  outline: 2px solid var(--color-interactive);
  outline-offset: 3px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.brand-text {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

header.top .meta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
}
button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 32px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-fast);
}
button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--gradient-red);
  color: #fff;
  border: none;
}
button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(237, 60, 60, 0.3);
}
button.secondary {
  background: transparent;
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
}
button.secondary:hover {
  border-color: var(--color-muted);
  background: var(--color-bg);
}
button.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}
button.btn-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Stroke-only SVGs barely receive hits; let the button capture the full box. */
button.btn-icon svg,
button.btn-icon svg *,
button.btn-icon img {
  pointer-events: none;
}
button.btn-icon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
button.btn-icon:hover:not(:disabled) {
  transform: translateY(-2px);
}
button.secondary.btn-icon:hover:not(:disabled) {
  border-color: var(--color-muted);
  background: var(--color-bg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
button.btn-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  background: var(--color-bg);
  transition: grid-template-columns 0.22s ease;
}
.layout.layout--nav-collapsed {
  grid-template-columns: minmax(48px, 52px) 1fr;
}
.layout.layout--nav-collapsed aside.nav {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-2) 0;
  align-items: stretch;
}
.layout.layout--nav-collapsed .nav-body {
  display: none;
}
.layout.layout--nav-collapsed .nav-controls {
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-2) 0;
  gap: 0;
  border-bottom: none;
}
.layout.layout--nav-collapsed .nav-search {
  display: none;
}
.layout.layout--nav-collapsed main.doc {
  border-left: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .layout {
    transition: none;
  }
  aside.nav {
    transition: none;
  }
}
@media (max-width: 820px) {
  header.top {
    padding: var(--space-3) var(--space-4);
  }
  #btn-open-nav {
    display: inline-flex;
  }
  .layout,
  .layout.layout--nav-collapsed {
    grid-template-columns: 1fr;
  }
  .layout.layout--nav-collapsed aside.nav {
    padding: 0 0 var(--space-4);
    align-items: stretch;
  }
  .layout.layout--nav-collapsed .nav-body,
  .layout.layout--nav-collapsed .nav-search {
    display: flex;
  }
  .layout.layout--nav-collapsed .nav-controls {
    flex-direction: row;
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  aside.nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(20rem, 88vw);
    max-height: none;
    z-index: 50;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: none;
  }
  body.nav-drawer-open aside.nav {
    transform: translateX(0);
    box-shadow: var(--shadow-sm);
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 0;
    background: rgba(10, 10, 10, 0.4);
    cursor: pointer;
  }
  .nav-backdrop[hidden] {
    display: none;
  }
  body.nav-drawer-open {
    overflow: hidden;
  }
  #btn-toggle-nav {
    display: none;
  }
}
@media (max-width: 640px) {
  header.top {
    padding: var(--space-3) var(--space-4);
  }
}

aside.nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--color-bg-white);
  border-right: 1px solid var(--color-border);
  overflow: hidden;
  padding: 0 0 var(--space-4);
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
#btn-toggle-nav {
  flex-shrink: 0;
}
.nav-search {
  flex: 1;
  min-width: 0;
}
.nav-search input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-white);
  color: var(--color-secondary);
  transition: var(--transition-fast);
  outline: none;
}
.nav-search input::placeholder {
  color: var(--color-muted);
}
.nav-search input:focus {
  border-color: var(--color-interactive);
  box-shadow: 0 0 0 3px rgba(13, 116, 206, 0.1);
}
.nav-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#nav-root {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.nav-group {
  margin-bottom: 0.75rem;
}
.nav-group:last-child {
  margin-bottom: 0;
}
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
  padding: 0.75rem var(--space-4) 0.5rem;
  margin: 0;
  font-family: var(--font-body);
  opacity: 0.92;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.nav-group-title:hover {
  color: var(--color-secondary);
  background: var(--color-bg);
  opacity: 1;
}
.nav-group-title:focus-visible {
  outline: 2px solid var(--color-interactive);
  outline-offset: 2px;
}
.nav-group:first-child .nav-group-title {
  padding-top: 0.25rem;
}
.nav-group-chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.nav-group-title:hover .nav-group-chevron {
  opacity: 0.85;
}
.nav-group--collapsed .nav-group-chevron {
  transform: rotate(-90deg);
}
.nav-group-pages {
  display: block;
}
.nav-group--collapsed .nav-group-pages {
  display: none;
}
.nav-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px var(--space-4) 10px calc(var(--space-4) + 2px);
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  transition: var(--transition-fast);
  text-transform: none;
  font-variant: normal;
}
.nav-item-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.nav-item.active .nav-item-icon {
  color: var(--color-secondary);
}
.nav-item:hover {
  background: var(--color-bg);
  color: var(--color-secondary);
}
.nav-item.active {
  border-left-color: var(--color-primary);
  background: rgba(237, 60, 60, 0.08);
  color: var(--color-secondary);
}
.nav-item.nav-item--loading {
  opacity: 0.72;
}
.nav-item .sub {
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--color-muted);
  font-weight: 400;
  margin-top: 0.12rem;
  opacity: 0.72;
  letter-spacing: 0.01em;
}

.nav-page-row {
  margin-bottom: 2px;
}
.nav-item-main {
  display: block;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.nav-item.nav-item--has-toc {
  gap: 8px;
}
.nav-item-toc-chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-top: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.nav-item.nav-item--has-toc:hover .nav-item-toc-chevron {
  opacity: 0.85;
}
.nav-page-row--toc-collapsed .nav-item-toc-chevron {
  transform: rotate(-90deg);
  margin-top: 8px;
}
.nav-toc-panel {
  margin: 4px var(--space-4) var(--space-3) calc(var(--space-4) + 2px);
  padding: 10px 12px 10px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-interactive);
  box-shadow: var(--shadow-sm);
}
.nav-toc-panel-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-interactive);
  margin: 0 0 8px;
  font-family: var(--font-body);
}
.nav-page-toc {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: none;
}
.nav-page-row--toc-collapsed .nav-toc-panel {
  display: none;
}
.nav-toc-link {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  line-height: 1.35;
  padding: 5px 6px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 2px solid transparent;
}
.nav-toc-link:hover {
  color: var(--color-interactive);
  background: rgba(13, 116, 206, 0.08);
  border-left-color: rgba(13, 116, 206, 0.35);
}
.nav-toc-link.nav-toc-level-1 {
  font-weight: 600;
}
.nav-toc-link.nav-toc-level-2 {
  padding-left: 8px;
}
.nav-toc-link.nav-toc-level-3 {
  padding-left: 14px;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--color-muted);
}
.nav-toc-link.nav-toc-level-4 {
  padding-left: 20px;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--color-muted);
}
.nav-toc-link.nav-toc-level-5 {
  padding-left: 26px;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--color-muted);
}
.nav-toc-link.nav-toc-level-6 {
  padding-left: 32px;
  font-weight: 400;
  font-size: 0.66rem;
  color: var(--color-muted);
}
.nav-toc-link.nav-toc-level-3:hover,
.nav-toc-link.nav-toc-level-4:hover,
.nav-toc-link.nav-toc-level-5:hover,
.nav-toc-link.nav-toc-level-6:hover {
  color: var(--color-interactive);
}

.doc-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg-white);
  border-left: 1px solid var(--color-border);
}
.doc-bridge-banner {
  flex: 0 0 auto;
  padding: 8px var(--container-padding);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9a3412;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}
html[data-theme="dark"] .doc-bridge-banner {
  color: #fed7aa;
  background: #431407;
  border-bottom-color: #9a3412;
}
.doc-bridge-banner[hidden] {
  display: none;
}
main.doc {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Custom TOC scroller owns timing; avoid fighting native smooth. */
  scroll-behavior: auto;
  padding: var(--space-6) var(--container-padding) 80px;
  background: var(--color-bg-white);
  border-left: none;
}
@media (max-width: 820px) {
  .doc-column,
  main.doc {
    border-left: none;
  }
}

.state {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-muted);
  font-size: 0.875rem;
}
.state.error {
  border-color: rgba(237, 60, 60, 0.35);
  background: rgba(237, 60, 60, 0.06);
  color: #7f1d1d;
}
.state.warn {
  border-color: rgba(243, 156, 18, 0.35);
  background: rgba(243, 156, 18, 0.08);
  color: #92400e;
}
.state.state--loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 200px;
  padding: var(--space-6) var(--space-4);
  gap: var(--space-4);
  border-style: dashed;
}
/* Plunger matches Desktop/kanban-board.html .spinner-toolbelt */
.state-loading__plunger {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: doc-plunger-spin 1.2s linear infinite;
  filter: drop-shadow(0 0 18px rgba(237, 60, 60, 0.45)) drop-shadow(0 0 40px rgba(237, 60, 60, 0.2));
}
.state-loading__plunger::before {
  content: "🪠";
  font-size: 40px;
  line-height: 1;
}
@keyframes doc-plunger-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .state-loading__plunger {
    animation: none;
  }
}
.state-loading__msg {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-muted);
  max-width: 22rem;
}

.doc-header {
  margin-bottom: var(--space-6);
}
.doc-header h1,
.doc-header h2 {
  margin: 0 0 var(--space-2);
  font-size: clamp(2rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.doc-header .desc {
  color: var(--color-muted);
  margin-top: var(--space-2);
  font-size: 1rem;
  line-height: 1.5;
  max-width: none;
}
.doc-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
}
.doc-header__row h1,
.doc-header__row h2 {
  flex: 1 1 12rem;
  min-width: 0;
}
.doc-header__copy-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-secondary);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}
.doc-header__copy-link:hover {
  border-color: var(--color-muted);
  background: var(--color-bg);
}
.doc-header__copy-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.doc-header__copy-link.doc-header__copy-link--ok {
  border-color: var(--color-success);
  color: var(--color-success);
}
html[data-theme="dark"] .doc-header__copy-link {
  background: #171717;
  color: #fafafa;
  border-color: #404040;
}
html[data-theme="dark"] .doc-header__copy-link:hover {
  background: #262626;
  border-color: #737373;
}
html[data-theme="dark"] .doc-header__copy-link.doc-header__copy-link--ok {
  border-color: var(--color-success);
  color: #4ade80;
}

.prose {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-muted);
  width: 100%;
  max-width: none;
}
.prose h1[id],
.prose h2[id],
.prose h3[id],
.prose h4[id],
.prose h5[id],
.prose h6[id] {
  scroll-margin-top: 1.5rem;
  position: relative;
}
.heading-anchor {
  margin-left: 0.35em;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  opacity: 0;
  font-size: 0.85em;
}
.prose h1:hover .heading-anchor,
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor,
.prose h5:hover .heading-anchor,
.prose h6:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
  color: var(--color-interactive);
  text-decoration: none;
}
@media (hover: none) {
  .heading-anchor {
    opacity: 0.45;
  }
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.table-scroll {
  overflow-x: auto;
  margin: var(--space-4) 0;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table {
  margin: 0;
  min-width: 28rem;
}
.nav-empty {
  padding: var(--space-4);
  color: var(--color-muted);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}
.nav-empty p {
  margin: 0;
}
.nav-boot-skeleton {
  padding: 0.25rem var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.nav-boot-skeleton__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nav-boot-skeleton__label,
.nav-boot-skeleton__line {
  display: block;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-muted) 22%, transparent);
  animation: nav-boot-pulse 1.1s ease-in-out infinite;
}
.nav-boot-skeleton__label {
  width: 4.5rem;
  height: 0.55rem;
  margin-top: 0.35rem;
}
.nav-boot-skeleton__line {
  height: 0.85rem;
  width: 88%;
}
.nav-boot-skeleton__line:nth-child(3) { width: 72%; animation-delay: 0.12s; }
.nav-boot-skeleton__line:nth-child(4) { width: 80%; animation-delay: 0.24s; }
.nav-boot-skeleton__group:nth-child(2) .nav-boot-skeleton__label { animation-delay: 0.08s; }
.nav-boot-skeleton__group:nth-child(3) .nav-boot-skeleton__label { animation-delay: 0.16s; }
@keyframes nav-boot-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-boot-skeleton__label,
  .nav-boot-skeleton__line {
    animation: none;
    opacity: 0.55;
  }
}
.doc-breadcrumb {
  margin: 0 0 var(--space-3);
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.doc-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--color-border);
}
.doc-breadcrumb li[aria-current="page"] {
  color: var(--color-secondary);
  font-weight: 600;
}
.doc-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.doc-find {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.doc-find input {
  width: 10.5rem;
  font: inherit;
  font-size: 0.8125rem;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-white);
  color: var(--color-secondary);
}
.doc-find__count {
  font-size: 0.75rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.doc-fresh-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}
.doc-inline-toc {
  display: none;
  margin: 0 0 var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
/* Sidebar already has “On this page”; show the in-article copy only when that TOC is hidden. */
.layout.layout--nav-collapsed .doc-inline-toc {
  display: block;
}
@media (max-width: 820px) {
  .doc-inline-toc {
    display: block;
  }
  body.nav-drawer-open .doc-inline-toc {
    display: none;
  }
}
.doc-inline-toc h3 {
  margin: 0 0 var(--space-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.doc-inline-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-inline-toc a {
  display: block;
  padding: 4px 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
}
.doc-inline-toc a.doc-inline-toc-level-1 {
  font-weight: 700;
}
.doc-inline-toc a.doc-inline-toc-level-2 {
  font-weight: 600;
}
.doc-inline-toc a.doc-inline-toc-level-3 {
  padding-left: 0.75rem;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.doc-inline-toc a.doc-inline-toc-level-4 {
  padding-left: 1.25rem;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--color-muted);
}
.doc-inline-toc a.doc-inline-toc-level-5 {
  padding-left: 1.75rem;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--color-muted);
}
.doc-inline-toc a.doc-inline-toc-level-6 {
  padding-left: 2.25rem;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--color-muted);
}
.doc-inline-toc a:hover,
.doc-inline-toc a.is-active,
.nav-toc-link.is-active {
  color: var(--color-interactive);
}
.doc-inline-toc a.is-active,
.nav-toc-link.is-active {
  font-weight: 600;
}
.prose mark.page-find-hit {
  background: rgba(237, 60, 60, 0.22);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}
@media print {
  html,
  body {
    height: auto;
    overflow: visible;
  }
  .skip-link,
  header.top,
  aside.nav,
  .nav-backdrop,
  .header-menu-btn,
  .doc-header__actions,
  .doc-pager,
  .doc-inline-toc,
  .heading-anchor {
    display: none !important;
  }
  .app {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .layout {
    display: block;
    height: auto;
    max-width: none;
    overflow: visible;
  }
  .doc-column {
    border: none;
    height: auto;
    overflow: visible;
  }
  main.doc {
    overflow: visible;
    border: none;
    padding: 0;
  }
  body.nav-drawer-open {
    overflow: visible;
  }
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--color-bg-white);
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--color-interactive);
  outline-offset: 2px;
}
.doc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.doc-pager__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-white);
}
.doc-pager__link:hover {
  border-color: var(--color-interactive);
  text-decoration: none;
}
.doc-pager__link--next {
  text-align: right;
  grid-column: 2;
}
.doc-pager__dir {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}
.doc-pager__title {
  font-weight: 600;
  color: var(--color-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .doc-pager {
    grid-template-columns: 1fr;
  }
  .doc-pager__link--next {
    grid-column: 1;
    text-align: left;
  }
}
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  margin: var(--space-6) 0 var(--space-3);
  line-height: 1.2;
  color: var(--color-secondary);
}
.prose h1 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 800;
}
.prose h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 800;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-2);
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 800;
}
.prose h4 {
  font-size: 1.1rem;
  font-weight: 700;
}
.prose h5 {
  font-size: 1rem;
  font-weight: 700;
}
.prose h6 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-muted);
}
.prose p {
  margin: 0.65rem 0;
}
.prose hr.md-thematic-break {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.25rem 0;
  height: 0;
}
.prose ul,
.prose ol {
  margin: 0.65rem 0;
  padding-left: 1.35rem;
}
/**
 * Mintlify-style vertical steps: numbered badges + connector (matches Steps on e.g.
 * https://apexti.mintlify.app/features/quick-chats ). Applied to all prose ordered lists
 * and to :::steps / MDX <Steps> — use bullets (-/*) for compact lists that should stay plain.
 */
.prose ol.doc-steps {
  list-style: none;
  padding-left: 0;
  margin: 1.35rem 0;
  counter-reset: doc-step-i;
}
.prose ol.doc-steps ol.doc-steps {
  counter-reset: doc-step-i;
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
}
.prose ol.doc-steps > li {
  position: relative;
  padding-left: 3rem;
  margin: 0 0 1.35rem;
  min-height: 2rem;
}
.prose ol.doc-steps > li:last-child {
  margin-bottom: 0;
}
.prose ol.doc-steps > li::before {
  counter-increment: doc-step-i;
  content: counter(doc-step-i);
  position: absolute;
  left: 0;
  top: 0.12rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--gradient-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  font-family: var(--font-heading);
  line-height: 2rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(13, 116, 206, 0.28);
  z-index: 1;
}
.prose ol.doc-steps > li::after {
  content: "";
  position: absolute;
  left: 1rem;
  top: 2.35rem;
  bottom: -1.35rem;
  width: 2px;
  transform: translateX(-50%);
  background: var(--color-border);
  border-radius: 1px;
}
.prose ol.doc-steps > li:last-child::after {
  display: none;
}
.prose ol.doc-steps > li > strong:first-child {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0 0 0.4rem;
  font-family: var(--font-heading);
}
.prose ol.doc-steps > li > p:first-child:has(> strong:only-child) strong {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-secondary);
  font-family: var(--font-heading);
}
.prose ol.doc-steps > li > p:first-child:has(> strong:only-child) {
  margin-top: 0;
  margin-bottom: 0.4rem;
}
/* `1. **Title**: body` → <p><strong>Title</strong>: … — not only-child strong */
.prose ol.doc-steps > li > p:first-child:has(> strong:first-child) > strong:first-of-type {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-secondary);
  font-family: var(--font-heading);
}
.prose ol.doc-steps > li > p:first-child:has(> strong:first-child) {
  margin-top: 0;
}
.prose ol.doc-steps > li > ul {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--color-muted);
}
.prose ol.doc-steps > li > ul > li {
  margin: 0.2rem 0;
}
.prose ol.doc-steps > li > p {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}
.prose ol.doc-steps > li > p:last-child {
  margin-bottom: 0;
}
.prose ol.doc-steps > li > .prose.doc-step-body {
  margin-top: 0.35rem;
  margin-bottom: 0;
}
.prose ol.doc-steps > li > .prose.doc-step-body > :first-child {
  margin-top: 0;
}
.prose ol.doc-steps > li > .prose.doc-step-body > :last-child {
  margin-bottom: 0;
}
.card-tile .prose ol.doc-steps {
  margin: 0.85rem 0;
}
.card-tile .prose ol.doc-steps > li {
  padding-left: 2.65rem;
  margin-bottom: 1rem;
}
.card-tile .prose ol.doc-steps > li::before {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.75rem;
  line-height: 1.65rem;
  top: 0.08rem;
}
.card-tile .prose ol.doc-steps > li::after {
  left: 0.825rem;
  top: 2rem;
}
.prose blockquote {
  margin: 0.75rem 0;
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-border);
  color: var(--color-muted);
  background: var(--color-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose pre {
  margin: 0.85rem 0;
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: auto;
  font-size: 0.875rem;
  line-height: 1.45;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.84em;
}
.prose p code,
.prose li code {
  background: var(--color-bg);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  color: var(--color-secondary);
}
.prose pre code {
  border: none;
  padding: 0;
  background: none;
  color: var(--color-secondary);
}
/* Highlight.js replaces inner markup; theme owns colors on .hljs */
.prose pre:has(code.hljs) {
  padding: 0;
  background: transparent;
  border-color: var(--color-border);
}
.prose pre code.hljs {
  display: block;
  padding: var(--space-4);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.45;
  border-radius: var(--radius-sm);
}
.card-tile .prose pre:has(code.hljs) {
  padding: 0;
  background: transparent;
}
.card-tile .prose pre code.hljs {
  padding: var(--space-3);
  font-size: 0.8125rem;
}
/* Mintlify-style copy on fenced code blocks */
.prose pre {
  position: relative;
}
.prose pre .doc-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-white);
  color: var(--color-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.prose pre .doc-code-copy:hover {
  color: var(--color-secondary);
  border-color: var(--color-muted);
  background: var(--color-bg);
}
.prose pre .doc-code-copy:focus-visible {
  outline: 2px solid var(--color-interactive);
  outline-offset: 2px;
}
.prose pre .doc-code-copy svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.prose pre .doc-code-copy.doc-code-copy--ok {
  color: var(--color-success);
  border-color: rgba(46, 204, 113, 0.45);
}
.card-tile .prose pre .doc-code-copy {
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
}
.card-tile .prose pre .doc-code-copy svg {
  width: 14px;
  height: 14px;
}
.prose a {
  color: var(--color-interactive);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}
.prose a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.prose a.doc-internal-link {
  cursor: pointer;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--space-4) 0;
  font-size: 0.875rem;
  font-family: var(--font-body);
}
.prose th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  padding: 12px 16px;
  border-bottom: 2px solid var(--color-border);
  text-align: left;
}
.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-secondary);
}
.prose tr:hover {
  background: var(--color-bg);
}

.callout {
  margin: 0.85rem 0;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.callout.note {
  background: rgba(13, 116, 206, 0.08);
  border-color: rgba(13, 116, 206, 0.2);
}
.callout.warning {
  background: rgba(243, 156, 18, 0.08);
  border-color: rgba(243, 156, 18, 0.2);
}
.callout.tip {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.2);
}
.callout-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  color: var(--color-secondary);
}
.callout.note .callout-icon {
  color: #0d74ce;
}
.callout.warning .callout-icon {
  color: #c47d0e;
}
.callout.tip .callout-icon {
  color: #1e9e55;
}
.callout-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.callout-body {
  min-width: 0;
  flex: 1;
}
.callout-body > strong:first-child {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-heading);
  color: var(--color-secondary);
}
.callout p {
  color: var(--color-muted);
  margin: 0.35rem 0 0;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
  margin: 0.85rem 0;
}
.card-list[data-cols="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.card-list[data-cols="3"] {
  grid-template-columns: repeat(3, 1fr);
}
.card-list[data-cols="4"] {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 720px) {
  .card-list[data-cols="2"],
  .card-list[data-cols="3"],
  .card-list[data-cols="4"] {
    grid-template-columns: 1fr;
  }
}
.card-list .card-tile--linked,
.card-list .card-tile.card-tile--static {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-white);
  color: var(--color-secondary);
  font-family: var(--font-body);
  transition: var(--transition-base);
  min-height: 100%;
}
.card-list .card-tile.card-tile--static {
  cursor: default;
}
.card-list .card-tile__link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin: 0 0 0.15rem;
}
.card-list .card-tile__link--span {
  cursor: default;
}
.card-list .card-tile--linked:hover {
  border-color: rgba(237, 60, 60, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.card-tile__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.card-tile__icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1.1;
  margin-top: 0.05em;
}
.card-tile__icon--svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0;
  margin-top: 0.12em;
  color: var(--color-interactive);
}
.card-tile__icon--svg svg {
  width: 1.35rem;
  height: 1.35rem;
}
.card-tile__title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--color-secondary);
}
.card-tile__body {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-muted);
  margin-top: 0.15rem;
}
.card-tile .prose {
  font-size: 0.875rem;
  color: var(--color-muted);
}
.card-tile .prose > :first-child {
  margin-top: 0;
}
.card-tile .prose > :last-child {
  margin-bottom: 0;
}

details.accordion {
  margin: 0.75rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-white);
}
details.accordion > summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-secondary);
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.1rem 0;
}
details.accordion > summary::-webkit-details-marker {
  display: none;
}
details.accordion > summary::before {
  content: "";
  flex: 0 0 0.45em;
  width: 0.45em;
  height: 0.45em;
  margin-top: 0.32em;
  border-right: 2px solid var(--color-muted);
  border-bottom: 2px solid var(--color-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  opacity: 0.8;
}
details.accordion[open] > summary::before {
  transform: rotate(45deg);
  margin-top: 0.38em;
}
.accordion-stack {
  margin: 0.85rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-white);
}
.accordion-stack details.accordion {
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.accordion-stack details.accordion:not(:last-of-type) {
  border-bottom: 1px solid var(--color-border);
}
.accordion-stack details.accordion > summary {
  padding: 0.9rem 1rem 0.85rem 0.75rem;
}
.accordion-stack details.accordion[open] > summary {
  padding-bottom: 0.5rem;
}
.accordion-stack details.accordion > .prose {
  margin: 0;
  padding: 0 1rem 1rem 2.1rem;
  font-size: 0.9375rem;
  color: var(--color-muted);
}
.accordion-stack details.accordion > .prose > :first-child {
  margin-top: 0;
}
.accordion-stack details.accordion > .prose > :last-child {
  margin-bottom: 0;
}

.theme-select {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 28px 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-secondary);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  min-width: 8.5rem;
  transition: var(--transition-fast);
}
.theme-select:hover {
  border-color: var(--color-muted);
}
.theme-select:focus {
  border-color: var(--color-interactive);
  box-shadow: 0 0 0 3px rgba(13, 116, 206, 0.1);
}
html[data-theme="dark"] .theme-select:focus {
  box-shadow: 0 0 0 3px rgba(13, 116, 206, 0.22);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app-root:fullscreen {
  background: var(--color-bg);
  min-height: 100vh;
}

/* Dark — Apexti Web Style Guide §16 */
html[data-theme="dark"] {
  color-scheme: dark;
  --color-secondary: #f0f0f5;
  --color-muted: #9b9bb0;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-bg: #050508;
  --color-bg-white: #111118;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.45);
}
html[data-theme="light"] {
  color-scheme: light;
}
html[data-theme="dark"] body {
  color: #9b9bb0;
}
html[data-theme="dark"] header.top {
  background: rgba(5, 5, 8, 0.88);
  border-bottom-color: var(--color-border);
}
html[data-theme="dark"] .brand-text {
  color: #f0f0f5;
}
html[data-theme="dark"] .brand:hover .brand-text {
  color: #3b9ae8;
}
html[data-theme="dark"] .doc-pager {
  border-top-color: var(--color-border);
}
html[data-theme="dark"] .doc-pager__link {
  background: #111118;
  border-color: var(--color-border);
}
html[data-theme="dark"] .doc-pager__title {
  color: #f0f0f5;
}
html[data-theme="dark"] .brand-icon {
  background: #111118;
  border-color: var(--color-border);
}
html[data-theme="dark"] button.secondary {
  color: #f0f0f5;
  border-color: var(--color-border);
}
html[data-theme="dark"] button.secondary:hover {
  background: #16161f;
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] button.secondary.btn-icon:hover:not(:disabled) {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .nav-search input:focus {
  box-shadow: 0 0 0 3px rgba(13, 116, 206, 0.22);
}
html[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .nav-item.active {
  background: rgba(237, 60, 60, 0.12);
  color: #f0f0f5;
}
html[data-theme="dark"] .nav-item .sub {
  color: #6b6b80;
  opacity: 0.65;
}
html[data-theme="dark"] .nav-group-title {
  color: #8a8a9e;
  opacity: 0.95;
}
html[data-theme="dark"] .nav-group-title:hover {
  color: #f0f0f5;
  background: rgba(255, 255, 255, 0.04);
  opacity: 1;
}
html[data-theme="dark"] .nav-item-icon {
  color: #6b6b80;
}
html[data-theme="dark"] .nav-item.active .nav-item-icon {
  color: #f0f0f5;
}
html[data-theme="dark"] .nav-toc-panel {
  background: #0a0a0f;
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: #3b9ae8;
  box-shadow: none;
}
html[data-theme="dark"] .nav-toc-panel-label {
  color: #7eb8ea;
}
html[data-theme="dark"] .nav-toc-link {
  color: #c4c4d4;
}
html[data-theme="dark"] .nav-toc-link.nav-toc-level-3,
html[data-theme="dark"] .nav-toc-link.nav-toc-level-4,
html[data-theme="dark"] .nav-toc-link.nav-toc-level-5,
html[data-theme="dark"] .nav-toc-link.nav-toc-level-6 {
  color: #6b6b80;
}
html[data-theme="dark"] .nav-toc-link:hover {
  color: #e8e8f0;
  background: rgba(59, 154, 232, 0.12);
  border-left-color: rgba(59, 154, 232, 0.45);
}
html[data-theme="dark"] .prose {
  color: #9b9bb0;
  line-height: 1.7;
}
html[data-theme="dark"] .prose td {
  color: #d4d4e8;
}
html[data-theme="dark"] .prose tr:hover {
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .prose blockquote {
  background: #0a0a0f;
  border-left-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .prose hr.md-thematic-break {
  border-top-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .prose ol.doc-steps > li::after {
  background: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .prose ol.doc-steps > li::before {
  box-shadow: 0 2px 12px rgba(59, 154, 232, 0.35);
}
html[data-theme="dark"] .prose ol.doc-steps > li > ul {
  color: #b4b4c8;
}
html[data-theme="dark"] .prose pre,
html[data-theme="dark"] .prose p code,
html[data-theme="dark"] .prose li code {
  background: #0a0a0f;
}
html[data-theme="dark"] .prose pre:has(code.hljs) {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .prose pre .doc-code-copy {
  background: rgba(20, 20, 28, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #9b9bb0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .prose pre .doc-code-copy:hover {
  color: #f4f4f8;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(30, 30, 40, 0.95);
}
html[data-theme="dark"] .prose pre .doc-code-copy.doc-code-copy--ok {
  color: #6ee7a8;
  border-color: rgba(110, 231, 168, 0.4);
}
html[data-theme="dark"] .state.error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  border-color: rgba(248, 113, 113, 0.35);
}
html[data-theme="dark"] .state.warn {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.4);
  border-color: rgba(251, 191, 36, 0.3);
}
html[data-theme="dark"] .state.state--loading {
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .state-loading__msg {
  color: #9b9bb0;
}
html[data-theme="dark"] .card-list .card-tile--linked:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .card-tile .prose {
  color: #9b9bb0;
}


/* Static HTML site: card tiles may be direct <a.card-tile> / <div.card-tile> */
.card-list > a.card-tile,
.card-list > .card-tile.card-tile--linked,
.card-list > .card-tile.card-tile--static {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-white);
  color: var(--color-secondary);
  font-family: var(--font-body);
  transition: var(--transition-base);
  min-height: 100%;
  text-decoration: none;
}
.card-list > a.card-tile:hover,
.card-list > .card-tile.card-tile--linked:hover {
  border-color: rgba(237, 60, 60, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
