/* ============================================================
   THROUGHLINE DOCS — Design System
   Matches throughline-marketing visual identity
   ============================================================ */

:root {
  /* Brand colours (shared) */
  --violet: #6020C0;
  --magenta: #9030C8;
  --crimson: #D04070;
  --amber: #E06050;
  --blue: #3050D8;
  --cyan: #50A0F8;
  --orbit: #CC40A0;

  /* Product colours (shared) */
  --product-platform: #6020C0;
  --product-intelligence: #3050D8;
  --product-orbit: #CC40A0;

  /* Typography (shared) */
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'SF Mono', 'Fira Code', Consolas, monospace;

  /* Layout (shared) */
  --sidebar-w: 260px;
  --header-h: 56px;
  --content-max: 780px;
  --toc-w: 200px;

  /* Easing (shared) */
  --e: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Dark theme (default) ---- */
[data-theme="dark"] {
  --void: #05050A;
  --deep: #080810;
  --surface: #0C0C16;
  --elevated: #12121E;
  --card: #161624;
  --border: #1E1E30;
  --border-s: #18182A;
  --muted: #383858;
  --secondary: #58587A;
  --tertiary: #7878A0;
  --text: #B0B0D0;
  --bright: #D0D0E8;
  --white: #E8E8F4;
  --frost-bg: rgba(12,12,22,0.62);
  --frost-border: rgba(255,255,255,0.08);
  --orb-opacity: 1;
  --sidebar-bg: rgba(8,8,16,.75);
  --search-bg: rgba(255,255,255,.04);
  --hover-bg: rgba(255,255,255,.04);
  --active-bg: rgba(255,255,255,.06);
  --code-bg: rgba(255,255,255,.06);
  --code-block-bg: rgba(8,8,16,.8);
  --table-head-bg: rgba(255,255,255,.04);
  --table-hover-bg: rgba(255,255,255,.02);
  --shadow-card: rgba(0,0,0,.25);
  --shadow-dropdown: rgba(0,0,0,.4);
  --tab-hover-bg: rgba(255,255,255,.06);
  --tab-platform-bg: rgba(96,32,192,.25);
  --tab-platform-border: rgba(96,32,192,.3);
  --tab-intel-bg: rgba(48,80,216,.25);
  --tab-intel-border: rgba(48,80,216,.3);
  --tab-orbit-bg: rgba(204,64,160,.25);
  --tab-orbit-border: rgba(204,64,160,.3);
  --badge-platform-bg: rgba(96,32,192,.35);
  --badge-platform-border: rgba(96,32,192,.4);
  --badge-intel-bg: rgba(48,80,216,.35);
  --badge-intel-border: rgba(48,80,216,.4);
  --badge-orbit-bg: rgba(204,64,160,.35);
  --badge-orbit-border: rgba(204,64,160,.4);
  --badge-all-bg: rgba(255,255,255,.1);
  --callout-info-bg: rgba(48,80,216,.1);
  --callout-info-border: rgba(48,80,216,.2);
  --callout-warn-bg: rgba(224,96,80,.1);
  --callout-warn-border: rgba(224,96,80,.2);
  --callout-success-bg: rgba(80,200,120,.1);
  --callout-success-border: rgba(80,200,120,.2);
  --callout-danger-bg: rgba(208,64,112,.1);
  --callout-danger-border: rgba(208,64,112,.2);
  --frost-violet-bg: rgba(96,32,192,.08);
  --frost-violet-border: rgba(96,32,192,.15);
  --frost-violet-hover: rgba(96,32,192,.3);
  --frost-blue-bg: rgba(48,80,216,.07);
  --frost-blue-border: rgba(48,80,216,.15);
  --frost-blue-hover: rgba(48,80,216,.3);
  --frost-orbit-bg: rgba(204,64,160,.07);
  --frost-orbit-border: rgba(204,64,160,.15);
  --frost-orbit-hover: rgba(204,64,160,.3);
  --tag-platform-bg: rgba(96,32,192,.2);
  --tag-platform-color: #A070E0;
  --tag-platform-border: rgba(96,32,192,.25);
  --tag-intel-bg: rgba(48,80,216,.2);
  --tag-intel-color: #7090E8;
  --tag-intel-border: rgba(48,80,216,.25);
  --tag-orbit-bg: rgba(204,64,160,.2);
  --tag-orbit-color: #E070C0;
  --tag-orbit-border: rgba(204,64,160,.25);
}

/* ---- Light theme ---- */
[data-theme="light"] {
  --void: #F5F5FA;
  --deep: #EFEFF5;
  --surface: #FFFFFF;
  --elevated: #FFFFFF;
  --card: #FFFFFF;
  --border: #D8D8E8;
  --border-s: #E2E2EE;
  --muted: #A0A0B8;
  --secondary: #6E6E8A;
  --tertiary: #555570;
  --text: #3A3A50;
  --bright: #1E1E30;
  --white: #0E0E1A;
  --frost-bg: rgba(245,245,255,.72);
  --frost-border: rgba(0,0,0,.08);
  --orb-opacity: .4;
  --sidebar-bg: rgba(245,245,255,.82);
  --search-bg: rgba(0,0,0,.03);
  --hover-bg: rgba(0,0,0,.04);
  --active-bg: rgba(0,0,0,.06);
  --code-bg: rgba(0,0,0,.05);
  --code-block-bg: #1E1E2E;
  --table-head-bg: rgba(0,0,0,.03);
  --table-hover-bg: rgba(0,0,0,.02);
  --shadow-card: rgba(0,0,0,.08);
  --shadow-dropdown: rgba(0,0,0,.12);
  --tab-hover-bg: rgba(0,0,0,.05);
  --tab-platform-bg: rgba(96,32,192,.1);
  --tab-platform-border: rgba(96,32,192,.2);
  --tab-intel-bg: rgba(48,80,216,.1);
  --tab-intel-border: rgba(48,80,216,.2);
  --tab-orbit-bg: rgba(204,64,160,.1);
  --tab-orbit-border: rgba(204,64,160,.2);
  --badge-platform-bg: rgba(96,32,192,.12);
  --badge-platform-border: rgba(96,32,192,.2);
  --badge-intel-bg: rgba(48,80,216,.12);
  --badge-intel-border: rgba(48,80,216,.2);
  --badge-orbit-bg: rgba(204,64,160,.12);
  --badge-orbit-border: rgba(204,64,160,.2);
  --badge-all-bg: rgba(0,0,0,.06);
  --callout-info-bg: rgba(48,80,216,.07);
  --callout-info-border: rgba(48,80,216,.15);
  --callout-warn-bg: rgba(224,96,80,.07);
  --callout-warn-border: rgba(224,96,80,.15);
  --callout-success-bg: rgba(80,200,120,.07);
  --callout-success-border: rgba(80,200,120,.15);
  --callout-danger-bg: rgba(208,64,112,.07);
  --callout-danger-border: rgba(208,64,112,.15);
  --frost-violet-bg: rgba(96,32,192,.06);
  --frost-violet-border: rgba(96,32,192,.12);
  --frost-violet-hover: rgba(96,32,192,.22);
  --frost-blue-bg: rgba(48,80,216,.05);
  --frost-blue-border: rgba(48,80,216,.12);
  --frost-blue-hover: rgba(48,80,216,.22);
  --frost-orbit-bg: rgba(204,64,160,.05);
  --frost-orbit-border: rgba(204,64,160,.12);
  --frost-orbit-hover: rgba(204,64,160,.22);
  --tag-platform-bg: rgba(96,32,192,.1);
  --tag-platform-color: #6020C0;
  --tag-platform-border: rgba(96,32,192,.18);
  --tag-intel-bg: rgba(48,80,216,.1);
  --tag-intel-color: #3050D8;
  --tag-intel-border: rgba(48,80,216,.18);
  --tag-orbit-bg: rgba(204,64,160,.1);
  --tag-orbit-color: #CC40A0;
  --tag-orbit-border: rgba(204,64,160,.18);
}

/* Light theme overrides for links and code */
[data-theme="light"] .article a { color: var(--blue); text-decoration-color: rgba(48,80,216,.3); }
[data-theme="light"] .article a:hover { text-decoration-color: var(--blue); }
[data-theme="light"] .article code { color: var(--violet); }
[data-theme="light"] .breadcrumb a:hover { color: var(--blue); }
[data-theme="light"] .toc a.active { color: var(--blue); }
[data-theme="light"] .version-info a { color: var(--blue); }
[data-theme="light"] .code-block { color: #CDD6F4; }
[data-theme="light"] .search-input:focus { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(96,32,192,.12); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--void);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

/* ---- Background orbs ---- */
.gradient-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(180px);
  opacity: var(--orb-opacity, 1);
  transition: background 1.5s ease, opacity 1.5s ease;
}
.orb:nth-child(1) {
  width: 70vw; height: 70vh; top: -20%; left: -15%;
  background: rgba(96,32,192,.12);
  animation: orbDrift1 36s ease-in-out infinite alternate;
}
.orb:nth-child(2) {
  width: 60vw; height: 60vh; top: 5%; right: -20%;
  background: rgba(48,80,216,.09);
  animation: orbDrift2 42s ease-in-out infinite alternate;
}
.orb:nth-child(3) {
  width: 65vw; height: 65vh; bottom: -15%; right: 0;
  background: rgba(80,160,248,.08);
  animation: orbDrift3 38s ease-in-out infinite alternate;
}
.orb:nth-child(4) {
  width: 55vw; height: 55vh; bottom: 0; left: -10%;
  background: rgba(144,48,200,.09);
  animation: orbDrift4 44s ease-in-out infinite alternate;
}
.orb:nth-child(5) {
  width: 45vw; height: 45vh; top: 35%; left: 25%;
  background: rgba(208,64,112,.06);
  animation: orbDrift5 48s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  20%  { transform: translate(600px, -400px) scale(1.15); }
  50%  { transform: translate(-500px, 500px) scale(.88); }
  80%  { transform: translate(350px, 250px) scale(1.08); }
  100% { transform: translate(-400px, -300px) scale(.95); }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-550px, 350px) scale(1.1); }
  55%  { transform: translate(400px, -200px) scale(.92); }
  75%  { transform: translate(-250px, -350px) scale(1.05); }
  100% { transform: translate(300px, 400px) scale(.9); }
}
@keyframes orbDrift3 {
  0%   { transform: translate(0, 0) scale(1); }
  30%  { transform: translate(450px, 300px) scale(1.12); }
  60%  { transform: translate(-350px, -150px) scale(.9); }
  100% { transform: translate(200px, -400px) scale(1.04); }
}
@keyframes orbDrift4 {
  0%   { transform: translate(0, 0) scale(1); }
  35%  { transform: translate(-400px, -300px) scale(1.08); }
  65%  { transform: translate(500px, 200px) scale(.88); }
  100% { transform: translate(-200px, 350px) scale(1.02); }
}
@keyframes orbDrift5 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(350px, -250px) scale(1.1); }
  70%  { transform: translate(-300px, 300px) scale(.9); }
  100% { transform: translate(150px, -200px) scale(1.05); }
}

/* ---- Topbar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--frost-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--frost-border);
  display: flex; align-items: center;
  padding: 0 24px;
  z-index: 100; gap: 16px;
}
.topbar-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  flex-shrink: 0; width: calc(var(--sidebar-w) - 24px);
}
.topbar-logo svg { flex-shrink: 0; }
.topbar-logo .logo-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--white);
}
.topbar-logo .logo-docs {
  font-size: 11px; font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 6px;
}

/* ---- Search ---- */
.search-container { flex: 1; max-width: 480px; position: relative; }
.search-input {
  width: 100%; height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px 0 36px;
  font-family: var(--sans); font-size: 13.5px;
  color: var(--white);
  background: var(--search-bg);
  outline: none;
  transition: border-color .2s var(--e), box-shadow .2s var(--e);
}
.search-input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px rgba(96,32,192,.2);
}
.search-input::placeholder { color: var(--secondary); }
.search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--secondary); pointer-events: none;
}
.search-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px;
  color: var(--secondary);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; line-height: 1.4;
}

/* ---- Product tabs ---- */
.product-tabs { display: flex; gap: 2px; margin-left: auto; flex-shrink: 0; }
.product-tab {
  padding: 6px 14px; font-size: 12.5px; font-weight: 500;
  border-radius: 8px; cursor: pointer;
  transition: all .2s var(--e);
  border: none; background: transparent;
  color: var(--secondary); white-space: nowrap;
  font-family: var(--sans);
}
.product-tab:hover { background: var(--tab-hover-bg); color: var(--bright); }
.product-tab.active { color: var(--white); }
.product-tab[data-product="platform"].active { background: var(--tab-platform-bg); border: 1px solid var(--tab-platform-border); }
.product-tab[data-product="intelligence"].active { background: var(--tab-intel-bg); border: 1px solid var(--tab-intel-border); }
.product-tab[data-product="orbit"].active { background: var(--tab-orbit-bg); border: 1px solid var(--tab-orbit-border); }

/* ---- Sidebar ---- */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-right: 1px solid var(--frost-border);
  overflow-y: auto; padding: 16px 0; z-index: 50;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.nav-section { margin-bottom: 4px; }
.nav-section-title {
  padding: 8px 20px 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--secondary);
}
.nav-item {
  display: block; padding: 7px 20px 7px 28px;
  font-size: 13.5px; color: var(--tertiary);
  text-decoration: none; cursor: pointer;
  transition: all .15s var(--e);
  border-left: 3px solid transparent;
  line-height: 1.4;
}
.nav-item:hover { color: var(--bright); background: var(--hover-bg); }
.nav-item.active {
  color: var(--white);
  background: var(--active-bg);
  font-weight: 500;
}
[data-active-product="platform"] .nav-item.active { border-left-color: var(--product-platform); }
[data-active-product="intelligence"] .nav-item.active { border-left-color: var(--product-intelligence); }
[data-active-product="orbit"] .nav-item.active { border-left-color: var(--product-orbit); }

/* ---- Main ---- */
.main {
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 1;
}
.content-wrapper {
  display: flex;
  max-width: calc(var(--content-max) + var(--toc-w) + 80px);
  margin: 0 auto; padding: 0 40px;
}

/* ---- Article ---- */
.article { flex: 1; max-width: var(--content-max); padding: 40px 0 80px; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--secondary); margin-bottom: 16px;
}
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb-sep { font-size: 10px; }
.page-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: var(--secondary);
  margin-bottom: 32px; flex-wrap: wrap;
}
.page-meta .product-badge {
  font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 10px; color: var(--white);
}
.product-badge-platform { background: var(--badge-platform-bg); border: 1px solid var(--badge-platform-border); }
.product-badge-intelligence { background: var(--badge-intel-bg); border: 1px solid var(--badge-intel-border); }
.product-badge-orbit { background: var(--badge-orbit-bg); border: 1px solid var(--badge-orbit-border); }
.product-badge-all { background: var(--badge-all-bg); border: 1px solid var(--frost-border); }

/* ---- Typography ---- */
.article h1 {
  font-size: clamp(28px, 3vw, 36px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.2;
  margin-bottom: 8px; color: var(--white);
}
.article .subtitle {
  font-size: 17px; color: var(--tertiary);
  line-height: 1.6; margin-bottom: 12px;
}
.article h2 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 48px; margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--bright);
}
.article h2:first-of-type { border-top: none; margin-top: 32px; }
.article h3 {
  font-size: 17px; font-weight: 600;
  margin-top: 32px; margin-bottom: 12px;
  color: var(--bright);
}
.article p { margin-bottom: 16px; font-size: 15px; color: var(--text); }
.article a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(80,160,248,.3);
  text-underline-offset: 2px;
}
.article a:hover { text-decoration-color: var(--cyan); }
.article ul, .article ol { margin-bottom: 16px; padding-left: 24px; }
.article li { font-size: 15px; color: var(--text); margin-bottom: 6px; line-height: 1.6; }
.article strong { color: var(--bright); font-weight: 600; }
.article code {
  font-family: var(--mono); font-size: 13px;
  background: var(--code-bg);
  padding: 2px 6px; border-radius: 4px;
  color: var(--cyan);
  border: 1px solid var(--border);
}

/* ---- Code block ---- */
.code-block {
  background: var(--code-block-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 20px 24px; margin-bottom: 24px;
  overflow-x: auto;
  font-family: var(--mono); font-size: 13px;
  line-height: 1.65; white-space: pre;
  backdrop-filter: blur(12px);
}
.code-block .cmt { color: var(--secondary); }

/* ---- Callouts ---- */
.callout {
  padding: 16px 20px; border-radius: 12px;
  margin-bottom: 24px; font-size: 14px;
  line-height: 1.6; display: flex; gap: 12px;
  backdrop-filter: blur(12px);
}
.callout-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.callout-info {
  background: var(--callout-info-bg);
  border: 1px solid var(--callout-info-border);
  color: var(--text);
}
.callout-warning {
  background: var(--callout-warn-bg);
  border: 1px solid var(--callout-warn-border);
  color: var(--text);
}
.callout-success {
  background: var(--callout-success-bg);
  border: 1px solid var(--callout-success-border);
  color: var(--text);
}
.callout-danger {
  background: var(--callout-danger-bg);
  border: 1px solid var(--callout-danger-border);
  color: var(--text);
}

/* ---- Tables ---- */
.article table {
  width: 100%; border-collapse: collapse;
  margin-bottom: 24px; font-size: 14px;
}
.article th {
  text-align: left; padding: 10px 16px;
  background: var(--table-head-bg);
  font-weight: 600; color: var(--bright);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-s);
  color: var(--text);
}
.article tr:last-child td { border-bottom: none; }
.article tr:hover td { background: var(--table-hover-bg); }

/* ---- Feature grid / Frost cards ---- */
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 24px;
}
.feature-card {
  background: var(--frost-bg);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--frost-border);
  border-radius: 16px;
  padding: 20px;
  transition: transform .3s var(--e), box-shadow .3s var(--e), border-color .3s var(--e);
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px var(--shadow-card);
  border-color: rgba(255,255,255,.14);
}
.feature-card h4 {
  font-size: 14.5px; font-weight: 600;
  margin-bottom: 6px; color: var(--bright);
}
.feature-card p {
  font-size: 13.5px; color: var(--tertiary);
  margin: 0; line-height: 1.5;
}

/* Coloured frost cards */
.frost-violet { background: var(--frost-violet-bg); border-color: var(--frost-violet-border); }
.frost-violet:hover { border-color: var(--frost-violet-hover); }
.frost-blue { background: var(--frost-blue-bg); border-color: var(--frost-blue-border); }
.frost-blue:hover { border-color: var(--frost-blue-hover); }
.frost-orbit { background: var(--frost-orbit-bg); border-color: var(--frost-orbit-border); }
.frost-orbit:hover { border-color: var(--frost-orbit-hover); }

/* ---- Steps ---- */
.steps { counter-reset: step-counter; margin-bottom: 24px; }
.step {
  counter-increment: step-counter;
  padding: 16px 20px 16px 60px;
  position: relative;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}
.step:last-child { border-left-color: transparent; }
.step::before {
  content: counter(step-counter);
  position: absolute; left: -15px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--violet); color: var(--white);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--bright); }
.step p { font-size: 14px; color: var(--text); margin: 0; }

/* ---- TOC ---- */
.toc {
  width: var(--toc-w); flex-shrink: 0;
  padding: 40px 0 40px 32px;
  position: sticky; top: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.toc-title {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--secondary); margin-bottom: 12px;
}
.toc a {
  display: block; font-size: 12.5px;
  color: var(--secondary); text-decoration: none;
  padding: 4px 0; line-height: 1.4;
  transition: color .15s var(--e);
}
.toc a:hover { color: var(--bright); }
.toc a.active { color: var(--cyan); font-weight: 500; }
.version-info {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--secondary);
}
.version-info a { color: var(--cyan); }

/* ---- Search results ---- */
.search-results {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px var(--shadow-dropdown);
  max-height: 360px; overflow-y: auto; z-index: 200;
  backdrop-filter: blur(24px);
}
.search-results.visible { display: block; }
.search-result-item {
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border-s);
  transition: background .1s;
}
.search-result-item:hover { background: var(--hover-bg); }
.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-size: 13.5px; font-weight: 500; color: var(--bright); }
.search-result-path { font-size: 11.5px; color: var(--secondary); margin-top: 2px; }
.search-no-results { padding: 20px 16px; text-align: center; color: var(--secondary); font-size: 13px; }

/* ---- Gradient text ---- */
.gradient-text-platform {
  background: linear-gradient(135deg, #6838C8, #5878E0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gradient-text-intelligence {
  background: linear-gradient(135deg, #5888E0, #7848C8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gradient-text-orbit {
  background: linear-gradient(135deg, #A040B8, #CC50A0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Home hero cards ---- */
.home-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.home-card {
  background: var(--frost-bg);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--frost-border);
  border-radius: 16px;
  padding: 24px; cursor: pointer;
  transition: transform .3s var(--e), box-shadow .3s var(--e), border-color .3s var(--e);
}
.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px var(--shadow-card);
}
.home-card h4 {
  font-size: 16px; font-weight: 700;
  margin-bottom: 8px; color: var(--white);
}
.home-card p { font-size: 13.5px; color: var(--tertiary); margin: 0; line-height: 1.55; }
.home-card .card-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  margin-bottom: 12px;
}
.tag-platform { background: var(--tag-platform-bg); color: var(--tag-platform-color); border: 1px solid var(--tag-platform-border); }
.tag-intelligence { background: var(--tag-intel-bg); color: var(--tag-intel-color); border: 1px solid var(--tag-intel-border); }
.tag-orbit { background: var(--tag-orbit-bg); color: var(--tag-orbit-color); border: 1px solid var(--tag-orbit-border); }

/* ---- Accent line ---- */
.accent-line {
  height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, #6020C0, #8040D8, #D04070, #E06050, #3050D8, #50A0F8, #B8DEFF);
  opacity: 0.5; margin-bottom: 32px;
}

/* ---- Stat grid ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--frost-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--frost-border);
  border-radius: 12px; padding: 16px; text-align: center;
}
.stat-card .stat-num {
  font-size: 28px; font-weight: 700; color: var(--white);
  font-family: var(--sans); letter-spacing: -0.02em;
}
.stat-card .stat-label {
  font-size: 11px; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px;
}

/* ---- Mobile ---- */
.mobile-toggle {
  display: none; background: none; border: none;
  color: var(--bright); cursor: pointer; padding: 4px;
}
@media (max-width: 1100px) { .toc { display: none; } }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .mobile-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .25s var(--e); }
  .sidebar.open { transform: translateX(0); }
  .main { left: 0; }
  .topbar-logo { width: auto; }
  .product-tabs { display: none; }
  .article { padding: 24px 0 60px; }
  .content-wrapper { padding: 0 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .orb { filter: blur(120px); opacity: .5; }
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.article { animation: fadeIn .3s var(--e); }

/* Mark logo keyframes */
@keyframes ambPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.03); }
}
@keyframes panelPulse1 {
  0%, 100% { opacity: .22; transform: scale(1); }
  50% { opacity: .34; transform: scale(1.04); }
}
@keyframes panelPulse2 {
  0%, 100% { opacity: .28; transform: scale(1); }
  50% { opacity: .42; transform: scale(1.03); }
}
@keyframes panelPulse3 {
  0%, 100% { opacity: .36; transform: scale(1); }
  50% { opacity: .50; transform: scale(1.02); }
}
@keyframes panelPulse4 {
  0%, 100% { opacity: .42; transform: scale(1); }
  50% { opacity: .58; transform: scale(1.02); }
}
@keyframes panelPulse5 {
  0%, 100% { opacity: .52; transform: scale(1); }
  50% { opacity: .68; transform: scale(1.01); }
}
@keyframes lineGlow {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
@keyframes lineShimmer {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 24; }
}

/* ---- Full-page shell (loading / access-denied) ---- */
.fp-shell {
  position: fixed; inset: 0;
  overflow: hidden; background: var(--void);
  z-index: 200;
}
.fp-orbs {
  position: absolute; inset: 0; z-index: 0;
  opacity: var(--orb-opacity, 1);
  transition: opacity 1.5s ease;
}
[data-theme="light"] .fp-orbs { opacity: .4; filter: saturate(1.3) brightness(1.15); }
.fp-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}
[data-theme="light"] .fp-grain { opacity: 0.015; }
[data-theme="light"] .fp-shell { background: #f0ecf6; }
[data-theme="light"] .ad-card { background: rgba(255,255,255,0.82); border-color: rgba(255,255,255,0.7); box-shadow: 0 24px 80px rgba(0,0,0,0.12); }
[data-theme="light"] .ad-card h1 { color: #0f0f24; }
[data-theme="light"] .ad-msg { color: #3a3a50; }
[data-theme="light"] .ad-sub { color: #7878a0; }
[data-theme="light"] .ad-foot { color: #7878a0; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .ad-btn-secondary { color: #4a4a68; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .ad-btn-secondary:hover { color: #0f0f24; }
.fp-center {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Auth loading ---- */
.auth-loading {
  text-align: center; color: var(--secondary);
  font-size: 14px; display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.auth-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

/* ---- Access denied card ---- */
.ad-card {
  text-align: center; width: 100%; max-width: 400px; padding: 48px 40px 32px;
  background: rgba(10,10,20,0.85);
  backdrop-filter: blur(48px) saturate(1.4);
  -webkit-backdrop-filter: blur(48px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; gap: 0;
  animation: fadeIn .5s var(--e);
}
.ad-icon { font-size: 48px; margin-bottom: 20px; line-height: 1; }
.ad-card h1 {
  font-size: 26px; font-weight: 700; color: var(--white);
  margin-bottom: 12px; letter-spacing: -0.02em;
  font-family: var(--sans);
}
.ad-msg {
  font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 4px;
  font-family: var(--sans);
}
.ad-sub {
  font-size: 12.5px; color: var(--secondary); margin-bottom: 28px;
  font-family: var(--sans);
}
.ad-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px 20px; border-radius: 14px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  text-decoration: none; text-align: center;
  transition: all 0.4s var(--e);
  position: relative; overflow: hidden;
  margin-bottom: 10px;
}
.ad-btn::before {
  content: ''; position: absolute; inset: -1px; border-radius: 15px; padding: 1px;
  background: linear-gradient(135deg, rgba(124,77,255,0.25), rgba(0,191,165,0.2), rgba(96,184,255,0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s;
}
.ad-btn:hover::before { opacity: 1; }
.ad-btn-primary {
  background: var(--violet); color: #fff;
  border: 1px solid rgba(96,32,192,.4);
}
.ad-btn-primary:hover {
  background: #7030D0; transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(96,32,192,0.3);
}
.ad-btn-secondary {
  background: transparent; color: var(--secondary);
  border: 1px solid var(--border);
}
.ad-btn-secondary:hover {
  color: var(--bright); border-color: var(--secondary);
  transform: translateY(-1px);
}
.ad-foot {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--frost-border);
  font-size: 10.5px; color: var(--secondary);
  font-family: var(--sans);
}

/* ---- Theme toggle ---- */
.theme-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
  padding: 5px 8px;
  color: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  transition: color .2s var(--e), background .2s var(--e), border-color .2s var(--e);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--bright);
  background: var(--hover-bg);
  border-color: var(--frost-border);
}
.theme-toggle svg { display: block; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
