/*
  NeoCore Documentation — Premium Theme
  Typefaces: Plus Jakarta Sans (display) · IBM Plex Sans (body) · IBM Plex Mono (code) · DM Sans (nav)
  Strategy:  Direct element styles rather than CSS-variable overrides — avoids Material's
             palette-injection cascade which wins over external stylesheets.
  Sidebar:   Dev portal style — dark (#161b22) sidebar, GitHub-dark nav items, DM Sans labels.
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --nc-900: #0C1628;
  --nc-800: #152338;
  --nc-700: #1E3355;
  --nc-600: #2A4872;
  --nc-400: #4A6FA0;
  --nc-100: #E8EFF7;
  --nc-50:  #F4F7FB;

  --teal:     #00AFAA;
  --teal-lit: #00C9C3;
  --teal-bg:  rgba(0, 175, 170, 0.09);

  --border:   #E4EAF1;
  --page-bg:  #FAFBFD;
}

/* ─── Base Page Background ───────────────────────────────────── */
body {
  background: var(--page-bg);
}

.md-main,
.md-content,
.md-sidebar--primary {
  background: var(--page-bg);
}

/* ─── Header ────────────────────────────────────────────────── */
.md-header {
  background: var(--nc-900) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 10px rgba(0,0,0,0.28);
}

.md-header__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

/* ─── Navigation Tabs (hidden — sections moved to left sidebar) ── */
.md-tabs {
  display: none;
}

/* ─── Sidebar Navigation ─────────────────────────────────────── */
.md-sidebar--primary {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  width: 260px;
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  padding: 0.75rem 0.75rem 1rem;
}

.md-sidebar--secondary {
  border-left: 1px solid var(--border);
}

/* Shift primary sidebar right to make room for the icon rail */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    margin-left: 52px;
  }
}

/* ─── Icon Rail (fixed, appended to body) ────────────────────── */
.nc-icon-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 52px;
  z-index: 3;                /* below Material header (z:4) and drawer overlay */
  background: #0f766e;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0 20px;      /* 60px clears the header bar */
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.nc-icon-rail::-webkit-scrollbar { display: none; }

/* Hide on mobile — sidebar becomes a drawer and the rail would obscure it */
@media screen and (max-width: 76.1875em) {
  .nc-icon-rail { display: none !important; }
  .md-sidebar--primary { margin-left: 0 !important; }
}

.nc-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 8px;
  width: 44px;
  color: rgba(255,255,255,0.55);
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.nc-rail-btn:hover {
  background: rgba(255,255,255,0.13);
  color: #ffffff;
}

.nc-rail-btn--active {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
}

.nc-rail-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nc-rail-btn span {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
  max-width: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

/* Dark mode */
[data-md-color-scheme="slate"] .nc-icon-rail {
  background: #0a4f4b;
}
[data-md-color-scheme="slate"] .md-sidebar--primary {
  background: #161b22;
  border-right-color: #30363d;
}

/* Hide ALL md-nav__title elements in the primary sidebar.
   Material renders these as position:sticky back-links ("NeoCore") inside each
   expanded section. The site name is already in the top header bar — no need
   to repeat it here. Using .md-sidebar--primary as the scope beats Material's
   own specificity without needing per-selector !important fights. */
.md-sidebar--primary .md-nav__title {
  display: none !important;
  visibility: hidden !important;
  position: static !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: 0 !important;
}

/* Top-level section headers — teal label ("SERVICES", "API", "SCREENS" etc.) */
/* These match whether the section renders as <label> (toggle) or <a> (index link) */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link,
.md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link,
.md-nav--primary > .md-nav__list > .md-nav__item > a.md-nav__link {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0f766e !important;
  padding: 14px 14px 6px;
  border-radius: 0;
  background: none !important;
  margin-top: 4px;
}

/* Sub-page nav items */
.md-nav--primary .md-nav__link {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  padding: 8px 14px;
  border-radius: 8px;
  border-left: none;
  color: #475569;
  transition: all 0.15s ease;
  margin: 1px 0;
}

.md-nav--primary .md-nav__link:hover {
  background: #e2e8f0;
  color: #0f172a !important;
}

/* Active state for sub-pages (not top-level section headers) */
.md-nav--primary .md-nav .md-nav__item--active > .md-nav__link,
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list > .md-nav__item--active > .md-nav__link {
  background: #dbeafe !important;
  color: #2563eb !important;
  font-weight: 500;
  border-left: none !important;
}

/* When a top-level section header IS the active page (navigation.indexes), keep teal not blue */
.md-nav--primary > .md-nav__list > .md-nav__item--active > a.md-nav__link {
  background: none !important;
  color: #0f766e !important;
  font-weight: 700;
}

/* Sub-navigation pages (nested under sections) */
.md-nav--primary .md-nav .md-nav__link {
  font-size: 0.845rem;
  padding: 7px 14px 7px 28px;
  border-radius: 7px;
  border-left: none;
  color: #475569;
  font-weight: 400;
}

.md-nav--primary .md-nav .md-nav__link:hover {
  background: #e2e8f0;
  color: #0f172a !important;
}

.md-nav--primary .md-nav .md-nav__item--active > .md-nav__link {
  background: #dbeafe !important;
  color: #2563eb !important;
  border-left: none !important;
}

/* ─── Content ───────────────────────────────────────────────── */
.md-content__inner {
  padding: 1.75rem 1.75rem 3.5rem;
  max-width: 900px;
}

/* ─── Typography ─────────────────────────────────────────────── */
.md-typeset {
  font-size: 0.83rem;
  line-height: 1.75;
  color: var(--nc-900);
}

.md-typeset h1 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--nc-900);
  text-wrap: balance;
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.md-typeset h2 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--nc-900);
  text-wrap: balance;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

.md-typeset h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--nc-700);
  margin-top: 2rem;
}

.md-typeset h4 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--nc-400);
  margin-top: 1.5rem;
}

/* ─── Links ──────────────────────────────────────────────────── */
.md-typeset a:not(.md-button):not(.md-nav__link) {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 175, 170, 0.28);
  transition: border-color 0.12s ease, color 0.12s ease;
}

.md-typeset a:not(.md-button):not(.md-nav__link):hover {
  color: var(--nc-700);
  border-bottom-color: var(--nc-700);
}

/* ─── Tables ─────────────────────────────────────────────────── */
.md-typeset__scrollwrap {
  margin: 1.25rem 0;
}

.md-typeset table:not([class]) {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(12,22,40,0.05);
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
  display: table;
  width: 100%;
}

.md-typeset table:not([class]) th {
  background: var(--nc-900) !important;
  color: rgba(255,255,255,0.9) !important;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.8rem 1rem;
  white-space: nowrap;
  border: none !important;
}

.md-typeset table:not([class]) td {
  padding: 0.62rem 1rem;
  border: none !important;
  border-bottom: 1px solid var(--nc-100) !important;
  vertical-align: middle;
  color: var(--nc-800);
  background: #FFFFFF;
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none !important;
}

.md-typeset table:not([class]) tr:hover td {
  background: var(--nc-50) !important;
}

/* ─── Code — Inline ──────────────────────────────────────────── */
.md-typeset :not(pre) > code {
  background: rgba(12,22,40,0.06) !important;
  color: var(--nc-800) !important;
  border-radius: 3px;
  padding: 0.1em 0.38em;
  font-size: 0.82em;
  border: 1px solid rgba(12,22,40,0.09);
  box-shadow: none;
}

/* ─── Code — Blocks ──────────────────────────────────────────── */
/* Strategy: light bg in light mode (Pygments default tokens are dark),  */
/* dark bg in dark/slate mode (Pygments slate tokens are light).          */
/* Mixing modes causes invisible text — let Material's token colors lead. */
.md-typeset pre {
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Light mode — clean off-white, keeps Pygments dark token colors readable */
.highlight {
  background: #f6f8fa !important;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
}

.highlight code,
.md-typeset pre > code {
  background: #f6f8fa !important;
  color: #24292f !important;
  font-size: 0.78rem;
  line-height: 1.7;
}

/* Dark mode — GitHub dark, Pygments slate tokens are already light */
[data-md-color-scheme="slate"] .highlight {
  background: #161b22 !important;
  border-color: #30363d;
}

[data-md-color-scheme="slate"] .highlight code,
[data-md-color-scheme="slate"] .md-typeset pre > code {
  background: #161b22 !important;
  color: #e6edf3 !important;
}

/* ─── Admonitions ────────────────────────────────────────────── */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 6px;
  border-width: 0 0 0 3px;
  box-shadow: 0 1px 4px rgba(12,22,40,0.06);
  font-size: 0.8rem;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ─── Cards Grid ─────────────────────────────────────────────── */
.md-typeset .grid.cards > ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0.5rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.md-typeset .grid.cards > ul > li {
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(12,22,40,0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  padding: 1.25rem 1.4rem 1.4rem;
  background: #FFFFFF !important;
  color: var(--nc-900) !important;
  margin: 0;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(0,175,170,0.1);
  transform: translateY(-2px);
}

.md-typeset .grid.cards > ul > li > hr {
  border-color: var(--border) !important;
  margin: 0.75rem 0 0.9rem;
}

/* Card body text */
.md-typeset .grid.cards > ul > li p {
  color: var(--nc-600);
  font-size: 0.79rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Card title (first paragraph which contains the bold icon + label) */
.md-typeset .grid.cards > ul > li > p:first-of-type {
  color: var(--nc-900);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0;
}

.md-typeset .grid.cards > ul > li > p:first-of-type strong {
  color: var(--nc-900);
  font-weight: 700;
}

/* Card icons inherit the teal color */
.md-typeset .grid.cards .twemoji svg,
.md-typeset .grid.cards .md-icon svg {
  fill: var(--teal);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.md-typeset .md-button {
  display: inline-block;
  border-radius: 5px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.42rem 0.95rem;
  transition: all 0.12s ease;
  border: 1px solid var(--border);
  color: var(--nc-900) !important;
  background: var(--nc-50) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--border) !important;
  margin-top: 0.85rem;
}

.md-typeset .md-button:hover {
  background: var(--nc-100) !important;
  border-color: var(--nc-700) !important;
  color: var(--nc-900) !important;
}

/* ─── Content Tabs ───────────────────────────────────────────── */
.md-typeset .tabbed-set {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.md-typeset .tabbed-labels {
  background: var(--nc-50);
  border-bottom: 1px solid var(--border);
  padding: 0 0.75rem;
  gap: 0;
}

.md-typeset .tabbed-labels > label {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--nc-400);
  padding: 0.7rem 0.85rem;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.md-typeset .tabbed-labels > label:hover {
  color: var(--nc-900);
}

.md-typeset .tabbed-labels > label:is(:focus-within, :hover) {
  color: var(--teal);
}

.md-typeset .tabbed-content {
  padding: 1.1rem 1.25rem;
  background: #FFFFFF;
}

/* ─── Hero Section ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(148deg, #0C1628 0%, #152847 55%, #0D2345 100%);
  margin: -1.75rem -1.75rem 2.75rem;
  padding: 3.75rem 2.75rem 3.25rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 55%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(0,175,170,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,175,170,0.4) 40%, rgba(0,175,170,0.4) 60%, transparent 100%);
}

.hero-eyebrow {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
  display: block;
}

.hero h1 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  font-size: 2.65rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.08 !important;
  color: #FFFFFF !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 0.9rem !important;
  text-wrap: balance;
}

.hero-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.52);
  line-height: 1.7;
  margin: 0 0 2rem;
  max-width: 500px;
}

.hero-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.hero-chip {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.65rem;
  border-radius: 3px;
  border: 1px solid;
}

.chip-teal {
  color: rgba(0,215,208,0.9);
  border-color: rgba(0,175,170,0.32);
  background: rgba(0,175,170,0.1);
}

.chip-dim {
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

.hero-stats {
  display: flex;
  gap: 3.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.stat { display: flex; flex-direction: column; }

.stat-n {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.stat-n em {
  color: var(--teal);
  font-style: normal;
}

.stat-l {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* ─── LED Status Indicators ──────────────────────────────────────── */
/* Used as: :material-circle:{ .status-live }  :material-circle:{ .status-planned } */

.status-live {
  color: #16a34a !important;
  filter: drop-shadow(0 0 5px #22c55e) drop-shadow(0 0 2px #4ade80);
  animation: led-pulse 2.2s ease-in-out infinite;
}

.status-planned {
  color: #d97706 !important;
  filter: drop-shadow(0 0 3px rgba(217, 119, 6, 0.45));
  opacity: 0.75;
}

@keyframes led-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 5px #22c55e) drop-shadow(0 0 2px #4ade80);
    opacity: 1;
  }
  50% {
    filter: drop-shadow(0 0 9px #22c55e) drop-shadow(0 0 5px #86efac);
    opacity: 0.88;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-live { animation: none; }
}

/* ─── Mermaid — stop Material from forcing its fg color on node labels ── */
/* Material sets .nodeLabel color via var(--md-default-fg-color) which   */
/* overwrites classDef text colors on dark-fill nodes. We reset to        */
/* inherit so the SVG element's own fill/color wins.                       */
.md-typeset .mermaid .nodeLabel,
.md-typeset .mermaid .nodeLabel p,
.md-typeset .mermaid .label div,
.md-typeset .mermaid .label foreignObject div {
  color: inherit !important;
}
.md-typeset .mermaid svg text,
.md-typeset .mermaid svg tspan {
  font-family: 'DM Sans', system-ui, sans-serif !important;
}

/* ─── TOC ────────────────────────────────────────────────────── */
.md-nav--secondary .md-nav__title {
  color: var(--teal) !important;
  background: none !important;
  box-shadow: none;
}

.md-nav--secondary .md-nav__link {
  font-size: 0.77rem;
  color: var(--nc-600);
}

.md-nav--secondary .md-nav__link--active {
  color: var(--teal) !important;
  font-weight: 600;
}

/* ─── Search ─────────────────────────────────────────────────── */
.md-search__form {
  border-radius: 5px;
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  transition: all 0.15s ease;
}

.md-search__form:focus-within {
  background: rgba(255,255,255,0.13) !important;
  border-color: var(--teal) !important;
}

/* ─── Back to Top ────────────────────────────────────────────── */
.md-top {
  background: var(--nc-900) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.md-footer {
  background: var(--nc-900) !important;
}

.md-footer-meta {
  background: #07101E !important;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.md-footer__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ─── Dark Mode Adjustments ──────────────────────────────────── */
[data-md-color-scheme="slate"] .md-content,
[data-md-color-scheme="slate"] .md-main,
[data-md-color-scheme="slate"] body {
  background: #0C1628;
}

[data-md-color-scheme="slate"] .md-typeset {
  color: rgba(210, 228, 248, 0.87);
}

[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3 {
  color: rgba(220, 235, 250, 0.95);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  background: #0F2040;
  color: rgba(210, 228, 248, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background: #162A4A !important;
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li {
  background: #0F2040 !important;
  border-color: rgba(255,255,255,0.08);
  color: rgba(210,228,248,0.87) !important;
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li > p:first-of-type,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li > p:first-of-type strong {
  color: rgba(220, 235, 250, 0.95);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li p {
  color: rgba(170, 200, 235, 0.7);
}

[data-md-color-scheme="slate"] .md-sidebar--primary {
  background: #161b22;
  border-right-color: #30363d;
}

[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link,
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link,
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item > a.md-nav__link {
  color: #4ade80 !important;
}

[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--active > a.md-nav__link {
  background: none !important;
  color: #4ade80 !important;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__link {
  color: #8b949e;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__link:hover {
  background: #21262d;
  color: #c9d1d9 !important;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item--active > .md-nav__link,
[data-md-color-scheme="slate"] .md-nav--primary .md-nav .md-nav__item--active > .md-nav__link {
  background: #21262d !important;
  color: #58a6ff !important;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav .md-nav__link {
  color: #8b949e;
}

[data-md-color-scheme="slate"] .md-typeset .md-button {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: rgba(220,235,250,0.9) !important;
}

[data-md-color-scheme="slate"] .md-typeset .tabbed-content {
  background: #0F2040;
}

[data-md-color-scheme="slate"] .md-typeset .tabbed-labels {
  background: #0A1828;
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-md-color-scheme="slate"] .md-typeset :not(pre) > code {
  background: rgba(255,255,255,0.06) !important;
  color: rgba(200, 225, 255, 0.85) !important;
  border-color: rgba(255,255,255,0.08);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media screen and (max-width: 960px) {
  .md-typeset .grid.cards > ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 600px) {
  .hero {
    padding: 2.75rem 1.4rem 2.25rem;
    margin: -1.75rem -1rem 2.25rem;
  }

  .hero h1 { font-size: 1.9rem !important; }

  .hero-stats {
    gap: 2rem;
    flex-wrap: wrap;
  }

  .md-typeset .grid.cards > ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .grid.cards > ul > li { transition: none; }
}
