/*
Theme Name: TensorAct Documentation
Theme URI: https://tensoract.com
Author: TensorAct
Author URI: https://tensoract.com
Description: Modern, responsive, dark-mode ready documentation theme for TensorAct, featuring live search, hierarchical navigation, drawer views, and code copy tools.
Version: 1.2.2
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: tensoract-docs
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap');

:root {
  --font: 'Inter', sans-serif;
  --bg: #FCF8FF;
  --surface: #FFFFFF;
  --border: #E7E6EE;
  --border-soft: #EFEDF5;
  --navy: #0F2A4A;
  --body-text: #4B4B57;
  --muted: #7A7A87;
  --muted-2: #6B7280;
  --charcoal: #1B1B22;
  --accent: #7C3AED;
  --accent-strong: #6D28D9;
  --accent-soft-bg: #E5DEFF;
  --accent-icon-bg: #8B5CF6;
  --link: #5430C7;
  --header-h: 64px;
  --tabs-h: 48px;
  --top-bar-h: calc(var(--header-h) + var(--tabs-h));
  --sidebar-w: 310px;
  --aside-w: 280px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 2px rgba(15, 42, 74, 0.04);
  --shadow-card-hover: 0 6px 20px rgba(15, 42, 74, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-bar-h) + 32px);
}

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--body-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 42, 74, 0.02);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-icon-bg);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.4px;
  color: var(--navy);
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  flex-shrink: 0;
}

.menu-toggle .icon {
  width: 18px;
  height: 18px;
}

.search-field {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.search-field .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-field input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--charcoal);
  flex: 1 1 auto;
  min-width: 0;
}

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

.kbd {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  background: #FAFAFC;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
}

.search-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.search-close-btn:hover {
  color: var(--navy);
  background: var(--accent-soft-bg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}

img.logo-1 {
  max-width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-soft-bg);
}

.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  padding: 0;
}

.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform .18s ease;
}

.theme-toggle-knob .icon {
  width: 12px;
  height: 12px;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-knob {
  transform: translateX(20px);
}

@media (max-width: 760px) {
  .theme-toggle {
    display: inline-flex;
  }
}

.search-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  flex-shrink: 0;
}

.search-toggle .icon {
  width: 17px;
  height: 17px;
}

/* ---------- Layout ---------- */
.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1900px;
  margin: 0 auto;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 80;
  background: rgba(15, 15, 25, 0.35);
}

/* ---------- Left sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  background: var(--bg);
  padding: 20px 12px 24px;
}

.nav-group {
  margin-bottom: 4px;
}

nav.nav-group>div {
  margin: 3px 0;
}

.nav-group+.nav-appendix {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.nav-appendix-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

a.nav-item:hover,
button.nav-item:hover {
  background: var(--accent-soft-bg);
}

.nav-item.current {
  background: var(--accent-soft-bg);
  color: var(--navy);
}

.nav-item .icon {
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  flex-shrink: 0;
}

.nav-item .label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}

.nav-item .chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .15s ease;
}

.nav-parent {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
}

.nav-parent[aria-expanded="true"] .chev {
  transform: rotate(90deg);
}

.nav-children {
  display: none !important;
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
  padding-left: 27px;
}

.nav-children.open {
  display: none !important;
  max-height: 0;
}

.nav-subitem {
  display: block;
  padding: 6px 10px;
  margin: 1px 0;
  font-size: 13.5px;
  color: #374151;
  border-radius: 6px;
  line-height: 1.4;
  text-decoration: none;
}

.nav-subitem:hover {
  background: var(--accent-soft-bg);
  color: var(--navy);
}

.nav-subitem.current {
  color: var(--navy);
  font-weight: 600;
  background: var(--accent-soft-bg);
}

.nav-sub-subitem {
  display: block;
  padding: 5px 10px 5px 12px;
  margin: 1px 0 1px 10px;
  font-size: 12.5px;
  color: #4B5563;
  border-left: 2px solid #E5E7EB;
  border-radius: 0 6px 6px 0;
  line-height: 1.35;
  text-decoration: none;
  transition: all .15s ease;
}

.nav-sub-subitem:hover {
  background: var(--accent-soft-bg);
  color: var(--accent);
  border-left-color: var(--accent);
}

.nav-sub-subitem.current {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.toc-num {
  font-size: 12px;
  font-weight: 500;
  color: #9CA3AF;
  margin-right: 6px;
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: 18px;
  padding: 10px;
  border-top: 1px solid var(--border-soft);
}

.collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #4B5563;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.collapse-btn:hover {
  background: var(--accent-soft-bg);
}

.collapse-btn .icon {
  width: 16px;
  height: 16px;
}

/* Collapsed Sidebar on Tablet & Desktop */
.sidebar {
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1), padding 0.24s ease, opacity 0.2s ease;
}

.sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-right: none !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar-expand-tab {
  display: none;
  position: fixed;
  left: 0;
  top: calc(var(--header-h) + 18px);
  z-index: 75;
  align-items: center;
  gap: 7px;
  padding: 8px 12px 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}

.sidebar-expand-tab:hover {
  background: var(--accent-soft-bg);
  color: var(--accent);
  box-shadow: 2px 6px 16px rgba(0, 0, 0, 0.14);
  transform: translateX(2px);
}

body.sidebar-collapsed .sidebar-expand-tab {
  display: inline-flex;
  animation: slideInTab 0.2s ease-out;
}

@keyframes slideInTab {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (min-width: 761px) {
  body.sidebar-collapsed .menu-toggle {
    display: flex;
  }
}

/* ---------- Main content ---------- */
.main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 40px 40px 80px;
}

.page-intro {
  /* max-width: 760px; */
  text-align: center;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}

.page-intro h1 {
  font-size: 42px;
  -webkit-text-stroke: 0px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--charcoal);
  font-weight: 700;
  margin-bottom: 12px;
}

.page-intro p {
  font-size: 16px;
  line-height: 1.6;
  color: #4B4B57;
  max-width: 62ch;
  margin: auto;
}

.doc-section {
  margin-bottom: 36px;
}

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

.doc-section-head {
  margin-bottom: 14px;
}

.doc-section-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.doc-section-head p {
  font-size: 14px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

a.doc-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: #DCD3F7;
  transform: translateY(-1px);
}

.doc-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-card-icon .icon {
  width: 18px;
  height: 18px;
}

.doc-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
}

.doc-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1 1 auto;
}

.doc-card .explore {
  font-size: 13px;
  font-weight: 600;
  color: var(--link);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  display: none;
}

.doc-card .explore .icon {
  width: 13px;
  height: 13px;
  transition: transform .15s ease;
}

a.doc-card:hover .explore .icon {
  transform: translateX(2px);
}

/* ---------- Right sidebar ---------- */
.aside {
  width: var(--aside-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-left: 1px solid var(--border-soft);
  padding: 28px 20px 32px;
  background: var(--bg);
}

.aside-block {
  margin-bottom: 26px;
}

.aside-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #7c3aed;
  margin-bottom: 12px;
  display: flex;
  gap: 5px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  font-size: 13.5px;
  color: #4B5563;
}

.related-item:hover {
  background: var(--accent-soft-bg);
  color: var(--navy);
}

/* Hierarchical Table of Contents in Aside */
.related-list.hierarchical-toc {
  gap: 6px;
}

.hierarchical-toc .toc-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hierarchical-toc .toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, font-weight 0.15s ease;
}

.hierarchical-toc .toc-item.toc-h2 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  line-height: 1.4;
}

.hierarchical-toc .toc-item.toc-h2:hover,
.hierarchical-toc .toc-item.toc-h2.active {
  background: var(--accent-soft-bg);
  color: var(--accent);
}

.hierarchical-toc .toc-item.toc-h2.active-parent {
  color: var(--accent);
}

.hierarchical-toc .toc-item.toc-h2 img {
  width: 11px;
  height: 14px;
  flex-shrink: 0;
}

.hierarchical-toc .toc-children {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 2px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  margin-bottom: 4px;
}

.hierarchical-toc .toc-item.toc-h3 {
  font-size: 12.5px;
  font-weight: 400;
  color: #6B7280;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1.35;
  display: block;
}

.hierarchical-toc .toc-item.toc-h3:hover {
  background: var(--accent-soft-bg);
  color: var(--navy);
}

.hierarchical-toc .toc-item.toc-h3.active {
  background: var(--accent-soft-bg);
  color: var(--accent);
  font-weight: 600;
}

.related-item .icon {
  width: 14px;
  height: 14px;
  color: #9CA3AF;
  flex-shrink: 0;
}

.feedback-card h4,
.support-card h4,
.role-card h4,
.aside-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 10px;
}

.feedback-buttons {
  display: flex;
  gap: 8px;
}

.fb-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: #374151;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.fb-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.fb-btn.selected,
.fb-btn.fb-btn-yes.selected {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10B981;
  color: #065F46;
  font-weight: 600;
  box-shadow: 0 0 0 1px #10B981;
}

.fb-btn.fb-btn-no.selected {
  background: rgba(239, 68, 68, 0.12);
  border-color: #EF4444;
  color: #991B1B;
  font-weight: 600;
  box-shadow: 0 0 0 1px #EF4444;
}

.feedback-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: #059669;
  font-weight: 500;
  line-height: 1.35;
  animation: fadeInStatus 0.25s ease;
}

.feedback-status svg {
  flex-shrink: 0;
}

@keyframes fadeInStatus {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fb-btn .icon {
  width: 14px;
  height: 14px;
}

.support-card p {
  font-size: 13.5px;
  color: #4B5563;
  margin-bottom: 8px;
}

.support-card .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

.support-card .contact-link .icon {
  width: 13px;
  height: 13px;
}

.role-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.role-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.role-link:hover {
  border-color: #DCD3F7;
  background: #FBF9FF;
}

.role-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent-soft-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.role-icon .icon {
  width: 15px;
  height: 15px;
}

.role-link span.role-name {
  flex: 1 1 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: #1B1B22;
}

.role-link .icon.chev {
  width: 14px;
  height: 14px;
  color: #9CA3AF;
}

/* Right Aside Drawer & Toggle (Tablet & Mobile) */
.aside-backdrop {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 85;
  background: rgba(15, 15, 25, 0.35);
}

.aside-backdrop.open {
  display: block;
}

.aside-toggle-btn {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 75;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.aside-toggle-btn svg {
  color: var(--accent);
  flex-shrink: 0;
}

.aside-toggle-btn:hover {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.aside-toggle-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* When the drawer is open, smoothly hide the sticky bottom toggle button */
.aside-backdrop.open+.aside-toggle-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
}

.aside-drawer-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.aside-drawer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
}

.aside-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.aside-close-btn:hover {
  color: var(--navy);
  background: var(--accent-soft-bg);
  border-color: var(--accent);
}

.aside-drawer-footer {
  display: none !important;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.aside-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.aside-collapse-btn:hover {
  background: var(--accent-soft-bg);
  color: var(--navy);
  border-color: var(--accent);
}

/* ---------- Responsive ---------- */

/* Tablet & Mobile: Collapsible Right Aside Drawer (visible and toggleable) */
@media (max-width: 1180px) {
  .aside-toggle-btn {
    display: inline-flex;
  }

  .aside {
    display: block;
    position: fixed;
    top: var(--header-h);
    right: 0;
    height: calc(100vh - var(--header-h));
    width: min(86vw, 320px);
    z-index: 90;
    transform: translateX(100%);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.24s ease, box-shadow 0.24s ease;
    box-shadow: none !important;
    visibility: hidden;
    pointer-events: none;
    border-left: 1px solid var(--border);
    background: var(--bg);
    overflow-y: auto;
    padding: 16px 20px 36px;
  }

  .aside.open {
    transform: translateX(0);
    box-shadow: -8px 0 24px rgba(15, 15, 25, 0.14) !important;
    visibility: visible;
    pointer-events: auto;
  }

  .aside-drawer-header {
    display: flex;
  }

  /* .aside-drawer-footer {
        display: block;
      } */

  .main {
    padding: 32px 32px 84px;
  }
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  :root {
    --sidebar-w: 248px;
  }
}

/* Mobile: off-canvas left sidebar, collapsed header search */
@media (max-width: 760px) {
  .site-header {
    padding: 0 14px;
    gap: 10px;
  }

  .brand-name {
    font-size: 17px;
  }

  .menu-toggle {
    display: flex;
  }

  .search-field {
    display: none;
  }

  .search-toggle {
    display: flex;
  }

  .btn-outline {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  /* Mobile Search Active State */
  .site-header.search-active .brand,
  .site-header.search-active .menu-toggle,
  .site-header.search-active .search-toggle,
  .site-header.search-active .btn-primary,
  .site-header.search-active .theme-toggle {
    display: none !important;
  }

  .site-header.search-active .header-actions {
    flex: 1 1 100%;
    width: 100%;
    gap: 0;
  }

  .site-header.search-active .search-field {
    display: flex !important;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    height: 40px;
    border-color: var(--accent);
    background: var(--surface);
  }

  .site-header.search-active .search-field input {
    font-size: 14.5px;
  }

  .site-header.search-active .search-field .kbd {
    display: none;
  }

  .site-header.search-active .search-close-btn {
    display: flex;
  }

  .site-header.search-active .search-dropdown {
    position: fixed;
    top: calc(var(--header-h) + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - var(--header-h) - 20px);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    z-index: 1000;
  }

  /* Hide collapse sidebar button section on mobile */
  .sidebar-footer {
    display: none !important;
  }

  .sidebar-expand-tab {
    display: none !important;
  }

  .site-header.search-active~.aside-toggle-btn {
    display: none !important;
  }

  .aside-toggle-btn {
    right: 16px;
    bottom: 18px;
    padding: 9px 15px;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.16);
  }

  .aside {
    width: min(88vw, 320px);
  }

  .layout {
    position: relative;
  }

  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    height: calc(100vh - var(--header-h));
    width: min(84vw, 300px);
    z-index: 90;
    transform: translateX(-100%);
    transition: transform .22s ease, visibility .22s ease, box-shadow .22s ease;
    box-shadow: none !important;
    visibility: hidden;
    pointer-events: none;
    border-right: 1px solid var(--border);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(15, 15, 25, 0.12) !important;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .main {
    padding: 24px 18px 84px;
  }

  .doc-toast {
    bottom: 76px;
    right: 16px;
  }

  .page-intro h1 {
    font-size: 32px;
    -webkit-text-stroke: 0;
  }

  .page-intro p {
    font-size: 15px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand-name {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #7c3aed00;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Figma Imported Image & Vector Styles ---------- */
.search-field img.icon-11 {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.search-toggle img.icon-11 {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.theme-toggle-knob img {
  width: 12px;
  height: 12px;
  display: block;
  object-fit: contain;
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item .nav-icon img {
  max-width: 18px;
  max-height: 18px;
  object-fit: contain;
  display: block;
}

.nav-item .chev,
.nav-appendix-label .chev {
  width: 6px;
  height: 10px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .15s ease;
}

.collapse-btn img {
  width: 14px;
  height: 9px;
  flex-shrink: 0;
  display: inline-block;
}

.page-intro {
  margin-bottom: 28px;
}

.page-intro .line-1-773 {
  width: 100%;
  height: 1px;
  margin-top: 24px;
  display: block;
}

.doc-card-icon>img {
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  display: block;
}

/* Figma Vector Groups inside .doc-card-icon */
.group-216,
.group-229,
.group-263,
.group-276,
.group-293,
.group-3-329,
.group-346,
.group-372,
.group-4-395,
.group-412,
.group-437,
.group-5-468,
.group-511,
.group-528,
.group-6-552 {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.group-216 .vector-218 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-216 .vector-217 {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
}

.group-229 .vector-231 {
  position: absolute;
  top: 0;
  left: 0.5px;
  width: 21px;
  height: 22px;
}

.group-229 .vector-230 {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
}

.group-263 .vector-265 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-263 .vector-264 {
  position: absolute;
  top: 4px;
  left: 7px;
  width: 8px;
  height: 8px;
}

.group-263 .vector-266 {
  position: absolute;
  top: 12px;
  left: 4px;
  width: 14px;
  height: 7px;
}

.group-276 {
  width: 22px;
  height: 18px;
}

.group-276 .vector-279 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 18px;
}

.group-276 .vector-277 {
  position: absolute;
  top: 4px;
  left: 3px;
  width: 6px;
  height: 6px;
}

.group-276 .vector-278 {
  position: absolute;
  top: 9px;
  left: 2px;
  width: 10px;
  height: 6px;
}

.group-276 .vector-280 {
  position: absolute;
  top: 5px;
  left: 13px;
  width: 6px;
  height: 2px;
}

.group-276 .vector-281 {
  position: absolute;
  top: 8px;
  left: 13px;
  width: 7px;
  height: 2px;
}

.group-276 .vector-282 {
  position: absolute;
  top: 11px;
  left: 13px;
  width: 5px;
  height: 2px;
}

.group-293 .vector-296 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-293 .vector-294 {
  position: absolute;
  top: 3px;
  left: 5.5px;
  width: 11px;
  height: 8px;
}

.group-293 .vector-295 {
  position: absolute;
  top: 11px;
  left: 5.5px;
  width: 11px;
  height: 8px;
}

.group-3-329 .vector-330 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-3-329 .vector-331 {
  position: absolute;
  top: 11px;
  left: 8px;
  width: 6px;
  height: 6px;
}

.group-346 {
  width: 22px;
  height: 20px;
}

.group-346 .vector-347 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 20px;
}

.group-346 .vector-348 {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 2px;
  height: 2px;
}

.group-346 .vector-349 {
  position: absolute;
  top: 9px;
  left: 4px;
  width: 2px;
  height: 2px;
}

.group-346 .vector-350 {
  position: absolute;
  top: 15px;
  left: 4px;
  width: 2px;
  height: 2px;
}

.group-372 {
  width: 22px;
  height: 20px;
}

.group-372 .vector-373 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 20px;
}

.group-372 .vector-374 {
  position: absolute;
  top: 6px;
  left: 0.5px;
  width: 21px;
  height: 2px;
}

.group-4-395 .vector-397 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-4-395 .vector-398 {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 7px;
  height: 7px;
}

.group-412 {
  width: 22px;
  height: 20px;
}

.group-412 .vector-413 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 20px;
}

.group-412 .vector-415 {
  position: absolute;
  top: 6px;
  left: 0;
  width: 22px;
  height: 2px;
}

.group-412 .vector-414 {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 6px;
  height: 6px;
}

.group-437 .vector-439 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-437 .vector-438 {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
}

.group-5-468 {
  width: 22px;
  height: 20px;
}

.group-5-468 .vector-470 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 20px;
}

.group-5-468 .vector-471 {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 6px;
  height: 6px;
}

.group-5-468 .vector-472 {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 7px;
  height: 9px;
}

.group-511 .vector-512 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-511 .vector-513 {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 13px;
  height: 13px;
}

.group-528 .vector-530 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-528 .vector-529 {
  position: absolute;
  top: 7px;
  left: 6.5px;
  width: 9px;
  height: 7px;
}

.group-6-552 .vector-554 {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

.group-6-552 .glossary-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  color: #7C3AED;
  line-height: 1;
  user-select: none;
}

.group-6-743 {
  position: relative;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.group-6-743 .vector-745 {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
}

.group-6-743 .text-746 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: 700;
  color: #0F2A4A;
  line-height: 1;
}

.doc-card .explore img {
  width: 10px;
  height: 8px;
  display: inline-block;
  transition: transform .15s ease;
}

a.doc-card:hover .explore img {
  transform: translateX(3px);
}

.related-item img {
  width: 11px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
}

.fb-btn img {
  width: 14px;
  height: 13px;
  flex-shrink: 0;
  display: inline-block;
}

.support-card .contact-link img {
  width: 11px;
  height: 9px;
  flex-shrink: 0;
  display: inline-block;
}

.role-icon img {
  width: 15px;
  height: 17px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.role-link img.chev {
  margin-left: auto;
  width: 7px;
  height: 10px;
  flex-shrink: 0;
}

nav.nav-group div {
  margin: 5px 0;
}


/* ---------- Documentation Articles & Component Styles ---------- */
.doc-articles {
  display: block;
  width: 100%;
}

.doc-article {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.doc-article.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Breadcrumbs */
.doc-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 20px;
}

.doc-breadcrumb .bc-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.doc-breadcrumb .bc-link:hover {
  color: var(--navy);
  text-decoration: underline;
}

.doc-breadcrumb .bc-sep {
  color: #9CA3AF;
  font-size: 12px;
}

.doc-breadcrumb .bc-current {
  color: #111827;
  font-weight: 600;
}

/* Header */
.doc-header {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}

.doc-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 9999px;
  background: var(--accent-soft-bg);
  color: var(--accent);
  margin-bottom: 10px;
}

.doc-title {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--charcoal);
  font-weight: 700;
  margin-bottom: 12px;
}

.doc-intro {
  font-size: 15.5px;
  line-height: 1.6;
  color: #4B4B57;
  /* max-width: 72ch; */
}

/* Section blocks & Anchor Scroll Offsets */
:target,
[id],
.doc-section-block,
.doc-section-block[id],
.doc-article [id],
.doc-step-card,
.doc-step-card[id],
.doc-h2,
.doc-h3,
.rn-item,
.rn-item[id],
.rn-version-card,
.rn-version-card[id] {
  scroll-margin-top: calc(var(--top-bar-h) + 32px) !important;
}

.doc-section-block {
  margin-bottom: 38px;
}

.doc-h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
}

.doc-h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: #1F2937;
  margin: 20px 0 10px;
}

.doc-p {
  font-size: 14.5px;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 14px;
}

.doc-list {
  margin: 10px 0 16px 20px;
  padding: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
}

.doc-list li {
  margin-bottom: 8px;
}

/* Step Cards */
.doc-step-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 10px;
  row-gap: 5px;
  align-items: start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 22px 0;
  box-shadow: none;
  transition: none;
  scroll-margin-top: calc(var(--top-bar-h) + 32px) !important;
}

.doc-step-card:hover {
  border-color: transparent;
  box-shadow: none;
}

.doc-step-card>* {
  grid-column: 2;
}

.doc-step-card>.step-badge {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  min-width: 35px;
  min-height: 35px;
  border-radius: 9px;
  background: #7B44EF;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  border: none;
  box-shadow: 0 2px 6px rgba(123, 68, 239, 0.25);
}

.doc-step-card>.step-title {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.4;
}

.doc-step-card>.step-text {
  grid-column: 2;
  font-size: 14.5px;
  line-height: 1.65;
  color: #4B5563;
  margin-top: 2px;
  margin-bottom: 0;
}

.doc-step-card>.doc-image-area {
  grid-column: 2;
}

.doc-step-card>.doc-code-block {
  grid-column: 2;
}

.doc-step-card>.doc-ui-mockup {
  grid-column: 2;
}

.doc-step-card:not(:has(.step-badge)) {
  display: block;
}

.doc-step-card:not(:has(.step-badge))>* {
  grid-column: auto;
}

/* Callout Boxes */
.doc-callout {
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
  border: 1px solid transparent;
  line-height: 1.55;
}

.doc-callout-note {
  background: #FBF9FE;
  border-color: #EDE9FE;
  border-left: 4px solid var(--accent);
}

.doc-callout-warning {
  background: #FFFBEB;
  border-color: #FEF3C7;
  border-left: 4px solid #F59E0B;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.doc-callout-note .callout-title {
  color: #5B21B6;
}

.doc-callout-warning .callout-title {
  color: #92400E;
}

.callout-text {
  font-size: 13.5px;
  color: #4B5563;
}

/* Code Blocks */
.doc-code-block {
  border: 1px solid #2E3440;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
  background: #1E1E2E;
  color: #CDD6F4;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #181825;
  border-bottom: 1px solid #313244;
  font-size: 12px;
  color: #A6ADC8;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #CDD6F4;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.doc-code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
}

.doc-code-block code {
  font-family: inherit;
}

/* Tables */
.doc-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 18px 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.doc-table th {
  background: #F9FAFB;
  padding: 10px 14px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.doc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
  color: #4B5563;
  vertical-align: middle;
}

.doc-table tr:nth-child(even) td {
  background: #FAFAFB;
}

.doc-table tr:hover td {
  background: #F3EEFF44;
}

/* Badges */
.badge-full {
  background: #DEF7EC;
  color: #03543F;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-block;
}

.badge-view {
  background: #E1EFFE;
  color: #1E429F;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-block;
}

.badge-none {
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 500;
}

.badge-state {
  background: #F3EEFF;
  color: #7C3AED;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #DDD6FE;
  display: inline-block;
  text-transform: uppercase;
}

.role-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-badge.global {
  background: #EDE9FE;
  color: #5B21B6;
}

.role-badge.tenant {
  background: #DBEAFE;
  color: #1E40AF;
}

.role-badge.project {
  background: #E0E7FF;
  color: #3730A3;
}

.role-badge.task {
  background: #FEF3C7;
  color: #92400E;
}

.role-badge.qc {
  background: #FCE7F3;
  color: #9D174D;
}

.role-badge.hybrid {
  background: #F3E8FF;
  color: #6B21A8;
}

.role-badge.data {
  background: #D1FAE5;
  color: #065F46;
}

.role-badge.read {
  background: #F3F4F6;
  color: #4B5563;
}

.role-badge.api {
  background: #CCFBF1;
  color: #115E59;
}

/* UI Mockup */
.doc-ui-mockup {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F9FAFB;
  padding: 8px 14px;
  border-bottom: 1px solid #E5E7EB;
}

.mockup-dots {
  display: flex;
  gap: 5px;
}

.mockup-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D1D5DB;
}

.mockup-dots span:nth-child(1) {
  background: #FCA5A5;
}

.mockup-dots span:nth-child(2) {
  background: #FCD34D;
}

.mockup-dots span:nth-child(3) {
  background: #86EFAC;
}

.mockup-title {
  font-size: 11.5px;
  font-weight: 500;
  color: #6B7280;
}

.mockup-body {
  padding: 20px;
  background: #FAFAFB;
  display: flex;
  justify-content: center;
}

.mockup-card,
.mockup-form {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.mockup-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--navy);
  font-size: 16px;
}

.mockup-logo {
  background: var(--navy);
  color: #fff;
  font-weight: bold;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
}

.mockup-title-sm,
.mockup-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.mockup-card-sub {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 14px;
}

.mockup-input-group {
  margin-bottom: 12px;
  text-align: left;
}

.mockup-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.mockup-input-box {
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: #9CA3AF;
  background: #FFFFFF;
}

.mockup-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 14px;
  color: #4B5563;
}

.mockup-btn {
  width: 100%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: default;
}

.mockup-link {
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.mockup-link.block {
  display: block;
  margin-top: 10px;
}

.mockup-otp-boxes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0;
}

.otp-box {
  width: 38px;
  height: 42px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  background: #FFFFFF;
}

.mockup-shield {
  font-size: 28px;
  margin-bottom: 8px;
}

.mockup-divider {
  position: relative;
  margin: 14px 0;
  text-align: center;
}

.mockup-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #E5E7EB;
}

.mockup-divider span {
  position: relative;
  background: #FFFFFF;
  padding: 0 8px;
  font-size: 11px;
  color: #9CA3AF;
}

.mockup-org-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--accent);
  background: var(--accent-soft-bg);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  text-align: left;
}

.mockup-org-meta {
  font-size: 11.5px;
  color: #6B7280;
}

.mockup-check {
  margin-left: auto;
  color: var(--accent);
  font-weight: bold;
}

/* Grids inside articles */
.role-cards-grid,
.states-grid,
.node-types-grid,
.retention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.role-def-card,
.state-card,
.node-type-card,
.retention-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.role-def-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.role-def-head h3,
.role-def-head h4,
.node-type-card h3,
.node-type-card h4,
.retention-card h3,
.retention-card h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0;
}

.node-type-card .badge-state,
.state-card .badge-state {
  margin-bottom: 8px;
}

.role-def-card p,
.state-card p,
.node-type-card p,
.retention-card p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Appendix Glossary */
.glossary-filter-bar {
  margin-bottom: 20px;
}

.glossary-input {
  width: 100%;
  max-width: 420px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: var(--surface);
}

.glossary-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.glossary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.15s ease;
}

.glossary-card:hover {
  border-color: #DDD6FE;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.05);
}

.glossary-term {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.glossary-def {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Appendix FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}

.faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.faq-a {
  font-size: 14px;
  line-height: 1.6;
  color: #4B5563;
  margin: 0;
}

/* Matrix Table Legend & Layout */
.matrix-legend-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: #4B5563;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-table-title {
  font-size: 14.5px;
  font-style: italic;
  text-align: center;
  margin: 20px 0 12px;
  color: var(--charcoal);
}

.matrix-table {
  min-width: 760px;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  font-weight: 600;
  color: var(--charcoal);
  text-align: left;
}

.matrix-table th:not(:first-child),
.matrix-table td:not(:first-child) {
  text-align: center;
  padding: 9px 8px;
}

.matrix-table .badge-full,
.matrix-table .badge-view {
  min-width: 26px;
  text-align: center;
}

.matrix-legend-footer {
  font-size: 12.5px;
  color: #6B7280;
  margin-top: 14px;
  line-height: 1.6;
}

/* Footer Navigation */
.doc-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.footer-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  min-width: 200px;
  transition: all 0.15s ease;
}

.footer-nav-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft-bg);
  transform: translateY(-1px);
}

.footer-nav-btn span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #6B7280;
  font-weight: 500;
  margin-bottom: 4px;
}

.footer-nav-btn.next span {
  justify-content: flex-end;
}

.footer-nav-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.footer-nav-btn.prev:hover .footer-nav-arrow {
  transform: translateX(-3px);
}

.footer-nav-btn.next:hover .footer-nav-arrow {
  transform: translateX(3px);
}

.footer-nav-btn:hover .footer-nav-arrow {
  stroke: var(--accent);
}

.footer-nav-btn strong {
  font-size: 14px;
  color: var(--charcoal);
}

.footer-nav-btn.next {
  text-align: right;
  margin-left: auto;
}

/* Toast Notification */
.doc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0F2A4A;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.doc-toast svg {
  color: #34D399;
  flex-shrink: 0;
}


/* Search Dropdown */
.search-field {
  position: relative;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 340px;
  max-width: min(460px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
  z-index: 99999;
  padding: 6px 0;
}

.search-dropdown.show {
  display: block;
}

.search-result-item {
  display: block;
  padding: 9px 14px;
  border-bottom: 1px solid #F3F4F6;
  text-decoration: none;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s ease, color 0.1s ease;
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item:focus {
  background: var(--accent-soft-bg);
  color: var(--accent);
  outline: none;
}

.search-result-chapter {
  font-size: 11px;
  color: #9CA3AF;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

.search-result-title {
  display: block;
  font-weight: 500;
  color: inherit;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .doc-footer-nav {
    flex-direction: column;
  }

  .footer-nav-btn {
    width: 100%;
    min-width: unset;
  }

  .footer-nav-btn.next {
    text-align: left;
    margin-left: 0;
  }

  .footer-nav-btn.next span {
    justify-content: flex-start;
  }

  .doc-title {
    font-size: 22px;
  }

  .doc-step-card {
    grid-template-columns: 36px 1fr;
    column-gap: 12px;
    row-gap: 6px;
    margin: 18px 0;
    padding: 0;
  }

  .step-num {
    width: 25px;
    height: 25px;
    min-width: 30px;
    min-height: 30px;
    font-size: 14px;
    border-radius: 6px;
  }

  .doc-step-card>.step-title {
    font-size: 15px;
  }

  .doc-step-card>.step-text {
    font-size: 13.5px;
  }
}

.nav-appendix a.nav-item {
  margin: 10px 0;
}

/* =========================================================
       DARK & LIGHT THEME TOGGLE STYLES
       ========================================================= */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid #C4B5FD;
  background: #DDD6FE;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  background: #C4B5FD;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-knob img {
  width: 11px;
  height: 11px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.theme-toggle[aria-pressed="true"] {
  background: #7C3AED;
  border-color: #8B5CF6;
}

.theme-toggle[aria-pressed="true"]:hover {
  background: #6D28D9;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-knob {
  transform: translateX(20px);
}

/* Global Transitions for theme switching */
body,
.site-header,
.sidebar,
.aside,
.main,
.doc-card,
.doc-step-card,
.doc-table th,
.doc-table td,
.doc-callout,
.doc-ui-mockup,
.mockup-header,
.mockup-body,
.mockup-card,
.mockup-form,
.search-field,
.search-dropdown,
.footer-nav-btn,
.role-def-card,
.state-card,
.node-type-card,
.retention-card,
.glossary-card,
.faq-card,
.role-link,
.fb-btn {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* =========================================================
       DARK THEME DEFINITIONS ([data-theme="dark"])
       ========================================================= */
[data-theme="dark"] {
  --bg: #0B0F19;
  --surface: #111827;
  --border: #1F2937;
  --border-soft: #1F2937;
  --navy: #F3F4F6;
  --body-text: #D1D5DB;
  --muted: #9CA3AF;
  --muted-2: #9CA3AF;
  --charcoal: #F9FAFB;
  --accent: #A78BFA;
  --accent-strong: #C4B5FD;
  --accent-soft-bg: rgba(124, 58, 237, 0.22);
  --accent-icon-bg: #7C3AED;
  --link: #C4B5FD;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] body {
  background: var(--bg);
  color: var(--body-text);
}

[data-theme="dark"] .site-header {
  background: #111827;
  border-bottom-color: #1F2937;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .brand-name {
  color: #F9FAFB;
}

[data-theme="dark"] .menu-toggle,
[data-theme="dark"] .search-toggle {
  background: #111827;
  border-color: #1F2937;
  color: #F3F4F6;
}

[data-theme="dark"] .search-field {
  background: #161F30;
  border-color: #1F2937;
  color: #F3F4F6;
}

[data-theme="dark"] .search-field input {
  color: #F9FAFB;
}

[data-theme="dark"] .search-field input::placeholder {
  color: #6B7280;
}

[data-theme="dark"] .kbd {
  background: #1F2937;
  border-color: #374151;
  color: #9CA3AF;
}

[data-theme="dark"] .search-dropdown {
  background: #111827;
  border-color: #1F2937;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .search-result-item {
  color: #D1D5DB;
  border-bottom-color: #1F2937;
}

[data-theme="dark"] .search-result-item:hover {
  background: rgba(124, 58, 237, 0.22);
  color: #C4B5FD;
}

[data-theme="dark"] .search-result-chapter {
  color: #6B7280;
}

[data-theme="dark"] .search-close-btn {
  color: #9CA3AF;
}

[data-theme="dark"] .search-close-btn:hover {
  color: #F9FAFB;
  background: rgba(124, 58, 237, 0.2);
}

[data-theme="dark"] .sidebar-expand-tab {
  background: #111827;
  border-color: #1F2937;
  color: #F3F4F6;
  box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .sidebar-expand-tab:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #C4B5FD;
  border-color: var(--accent);
}

[data-theme="dark"] .aside-toggle-btn {
  background: #161F30;
  border-color: #2D3748;
  color: #F3F4F6;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .aside-toggle-btn svg {
  color: #A78BFA;
}

[data-theme="dark"] .aside-toggle-btn:hover {
  background: #1E293B;
  color: #FFFFFF;
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .aside-drawer-header {
  border-bottom-color: #1F2937;
}

[data-theme="dark"] .aside-drawer-title {
  color: #F9FAFB;
}

[data-theme="dark"] .aside-close-btn {
  border-color: #1F2937;
  color: #9CA3AF;
}

[data-theme="dark"] .aside-close-btn:hover {
  color: #F3F4F6;
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.2);
}

[data-theme="dark"] .aside-drawer-footer {
  border-top-color: #1F2937;
}

[data-theme="dark"] .aside-collapse-btn {
  border-color: #1F2937;
  color: #9CA3AF;
}

[data-theme="dark"] .aside-collapse-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  color: #F3F4F6;
  border-color: var(--accent);
}

[data-theme="dark"] .btn-outline {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="dark"] .btn-outline:hover {
  background: var(--accent-soft-bg);
  color: #FFFFFF;
}

[data-theme="dark"] .sidebar {
  background: #0D1322;
  border-right-color: #1F2937;
}

[data-theme="dark"] .nav-item {
  color: #E5E7EB;
}

[data-theme="dark"] a.nav-item:hover,
[data-theme="dark"] button.nav-item:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #FFFFFF;
}

[data-theme="dark"] .nav-item.current {
  background: rgba(124, 58, 237, 0.24);
  color: #F9FAFB;
}

[data-theme="dark"] .nav-subitem {
  color: #9CA3AF;
}

[data-theme="dark"] .nav-subitem:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #F9FAFB;
}

[data-theme="dark"] .nav-subitem.current {
  background: rgba(124, 58, 237, 0.24);
  color: #F9FAFB;
}

[data-theme="dark"] .nav-sub-subitem {
  color: #9CA3AF;
  border-left-color: #1F2937;
}

[data-theme="dark"] .nav-sub-subitem:hover {
  background: rgba(124, 58, 237, 0.18);
  color: var(--accent);
  border-left-color: var(--accent);
}

[data-theme="dark"] .nav-sub-subitem.current {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(124, 58, 237, 0.22);
}

[data-theme="dark"] .nav-appendix {
  border-top-color: #1F2937;
}

[data-theme="dark"] .nav-appendix-label {
  color: #F3F4F6;
}

[data-theme="dark"] .sidebar-footer {
  border-top-color: #1F2937;
}

[data-theme="dark"] .collapse-btn {
  color: #9CA3AF;
}

[data-theme="dark"] .collapse-btn:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #F3F4F6;
}

[data-theme="dark"] .main {
  background: #0B0F19;
}

[data-theme="dark"] .page-intro {
  border-bottom-color: #1F2937;
}

[data-theme="dark"] .page-intro h1 {
  color: #F9FAFB;
}

[data-theme="dark"] .page-intro p {
  color: #9CA3AF;
}

[data-theme="dark"] .doc-header {
  border-bottom-color: #1F2937;
}

[data-theme="dark"] .doc-breadcrumb .bc-link {
  color: var(--accent);
}

[data-theme="dark"] .doc-breadcrumb .bc-current {
  color: #F3F4F6;
}

[data-theme="dark"] .doc-breadcrumb .bc-sep {
  color: #6B7280;
}

[data-theme="dark"] .doc-title {
  color: #F9FAFB;
}

[data-theme="dark"] .doc-intro {
  color: #9CA3AF;
}

[data-theme="dark"] .doc-h2 {
  color: #F9FAFB;
  border-bottom-color: #1F2937;
}

[data-theme="dark"] .doc-h3 {
  color: #F3F4F6;
}

[data-theme="dark"] .doc-p,
[data-theme="dark"] .doc-list {
  color: #D1D5DB;
}

[data-theme="dark"] .doc-card {
  background: #111827;
  border-color: #1F2937;
}

[data-theme="dark"] a.doc-card:hover {
  border-color: var(--accent);
  background: #151F32;
}

[data-theme="dark"] .doc-card h3 {
  color: #F9FAFB;
}

[data-theme="dark"] .doc-card p {
  color: #9CA3AF;
}

[data-theme="dark"] .doc-step-card {
  background: transparent;
  border: none;
  box-shadow: none;
}

[data-theme="dark"] .doc-step-card:hover {
  border: none;
  box-shadow: none;
}

[data-theme="dark"] .step-num {
  background: #7B44EF;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 2px 8px rgba(123, 68, 239, 0.45);
}

[data-theme="dark"] .step-title {
  color: #F9FAFB;
}

[data-theme="dark"] .step-text {
  color: #9CA3AF;
}

[data-theme="dark"] .doc-callout-note {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.35);
  border-left: 4px solid var(--accent);
}

[data-theme="dark"] .doc-callout-note .callout-title {
  color: #DDD6FE;
}

[data-theme="dark"] .doc-callout-note .callout-text {
  color: #D1D5DB;
}

[data-theme="dark"] .doc-callout-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  border-left: 4px solid #F59E0B;
}

[data-theme="dark"] .doc-callout-warning .callout-title {
  color: #FDE68A;
}

[data-theme="dark"] .doc-callout-warning .callout-text {
  color: #D1D5DB;
}

[data-theme="dark"] .doc-table-wrapper {
  border-color: #1F2937;
}

[data-theme="dark"] .doc-table th {
  background: #161F30;
  color: #F3F4F6;
  border-bottom-color: #243048;
}

[data-theme="dark"] .doc-table td {
  color: #CBD5E1;
  border-bottom-color: #1A2436;
}

[data-theme="dark"] .doc-table tr:nth-child(even) td {
  background: #0E1626;
}

[data-theme="dark"] .doc-table tr:hover td {
  background: rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .badge-full {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

[data-theme="dark"] .badge-view {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}

[data-theme="dark"] .matrix-legend-bar,
[data-theme="dark"] .matrix-legend-footer {
  color: #9CA3AF;
}

[data-theme="dark"] .matrix-legend-footer strong {
  color: #E5E7EB;
}

[data-theme="dark"] .doc-ui-mockup {
  background: #111827;
  border-color: #1F2937;
}

[data-theme="dark"] .mockup-header {
  background: #161F30;
  border-bottom-color: #1F2937;
}

[data-theme="dark"] .mockup-title {
  color: #9CA3AF;
}

[data-theme="dark"] .mockup-body {
  background: #0B0F19;
}

[data-theme="dark"] .mockup-card,
[data-theme="dark"] .mockup-form {
  background: #111827;
  border-color: #1F2937;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mockup-brand {
  color: #F3F4F6;
}

[data-theme="dark"] .mockup-logo {
  background: #7C3AED;
  color: #FFFFFF;
}

[data-theme="dark"] .mockup-title-sm,
[data-theme="dark"] .mockup-card-title {
  color: #F9FAFB;
}

[data-theme="dark"] .mockup-card-sub {
  color: #9CA3AF;
}

[data-theme="dark"] .mockup-input-group label {
  color: #D1D5DB;
}

[data-theme="dark"] .mockup-input-box {
  background: #161F30;
  border-color: #374151;
  color: #F3F4F6;
}

[data-theme="dark"] .mockup-form-row {
  color: #9CA3AF;
}

[data-theme="dark"] .mockup-divider::before {
  border-top-color: #374151;
}

[data-theme="dark"] .mockup-divider span {
  background: #111827;
  color: #9CA3AF;
}

[data-theme="dark"] .otp-box {
  background: #161F30;
  border-color: var(--accent);
  color: #F3F4F6;
}

[data-theme="dark"] .mockup-org-item {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent);
}

[data-theme="dark"] .mockup-org-meta {
  color: #A78BFA;
}

[data-theme="dark"] .role-def-card,
[data-theme="dark"] .state-card,
[data-theme="dark"] .node-type-card,
[data-theme="dark"] .retention-card,
[data-theme="dark"] .glossary-card,
[data-theme="dark"] .faq-card {
  background: #111827;
  border-color: #1F2937;
}

[data-theme="dark"] .role-def-head h3,
[data-theme="dark"] .role-def-head h4,
[data-theme="dark"] .node-type-card h3,
[data-theme="dark"] .node-type-card h4,
[data-theme="dark"] .retention-card h3,
[data-theme="dark"] .retention-card h4,
[data-theme="dark"] .glossary-term,
[data-theme="dark"] .faq-q {
  color: #F9FAFB;
}

[data-theme="dark"] .role-def-card p,
[data-theme="dark"] .state-card p,
[data-theme="dark"] .node-type-card p,
[data-theme="dark"] .retention-card p,
[data-theme="dark"] .glossary-def,
[data-theme="dark"] .faq-a {
  color: #9CA3AF;
}

[data-theme="dark"] .glossary-input {
  background: #161F30;
  border-color: #374151;
  color: #F3F4F6;
}

[data-theme="dark"] .glossary-input:focus {
  border-color: var(--accent);
}

[data-theme="dark"] .aside {
  background: #0D1322;
  border-left-color: #1F2937;
}

/* [data-theme="dark"] .aside-eyebrow {
  color: #9CA3AF;
} */

[data-theme="dark"] .related-item {
  color: #9CA3AF;
}

[data-theme="dark"] .related-item:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #F3F4F6;
}

/* Dark Mode Hierarchical Table of Contents */
[data-theme="dark"] .hierarchical-toc .toc-item.toc-h2 {
  color: #E5E7EB;
}

[data-theme="dark"] .hierarchical-toc .toc-item.toc-h2:hover,
[data-theme="dark"] .hierarchical-toc .toc-item.toc-h2.active {
  background: rgba(124, 58, 237, 0.18);
  color: #C4B5FD;
}

[data-theme="dark"] .hierarchical-toc .toc-item.toc-h2.active-parent {
  color: #C4B5FD;
}

[data-theme="dark"] .hierarchical-toc .toc-children {
  border-left-color: #374151;
}

[data-theme="dark"] .hierarchical-toc .toc-item.toc-h3 {
  color: #9CA3AF;
}

[data-theme="dark"] .hierarchical-toc .toc-item.toc-h3:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #F9FAFB;
}

[data-theme="dark"] .hierarchical-toc .toc-item.toc-h3.active {
  background: rgba(124, 58, 237, 0.24);
  color: #C4B5FD;
}

[data-theme="dark"] .feedback-card h4,
[data-theme="dark"] .support-card h4,
[data-theme="dark"] .role-card h4,
[data-theme="dark"] .aside-card-title {
  color: #F3F4F6;
}

[data-theme="dark"] .support-card p,
[data-theme="dark"] .role-card p {
  color: #9CA3AF;
}

[data-theme="dark"] .fb-btn {
  background: #161F30;
  border-color: #1F2937;
  color: #D1D5DB;
}

[data-theme="dark"] .fb-btn:hover {
  background: #1F2937;
  color: #F3F4F6;
}

[data-theme="dark"] .fb-btn.selected,
[data-theme="dark"] .fb-btn.fb-btn-yes.selected {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10B981 !important;
  color: #34D399 !important;
  box-shadow: 0 0 0 1px #10B981 !important;
}

[data-theme="dark"] .fb-btn.fb-btn-no.selected {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #EF4444 !important;
  color: #F87171 !important;
  box-shadow: 0 0 0 1px #EF4444 !important;
}

[data-theme="dark"] .feedback-status {
  color: #34D399;
}

[data-theme="dark"] .role-link {
  background: #111827;
  border-color: #1F2937;
}

[data-theme="dark"] .role-link:hover {
  background: #161F30;
  border-color: var(--accent);
}

[data-theme="dark"] .role-link span.role-name {
  color: #F3F4F6;
}

[data-theme="dark"] .footer-nav-btn {
  background: #111827;
  border-color: #1F2937;
}

[data-theme="dark"] .footer-nav-btn:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: var(--accent);
}

[data-theme="dark"] .footer-nav-btn strong {
  color: #F9FAFB;
}

[data-theme="dark"] .footer-nav-btn span {
  color: #9CA3AF;
}

[data-theme="dark"] .doc-toast {
  background: #1E293B;
  color: #F8FAFC;
  border: 1px solid #334155;
}

.nav-sub-subitem {
  display: none;
}

/* =========================================================
       DARK MODE ICON VISIBILITY & CONTRAST ENHANCEMENTS
       ========================================================= */
/* Sidebar chapter navigation icons */
[data-theme="dark"] .nav-icon img,
[data-theme="dark"] .nav-item .nav-icon img {
  filter: brightness(0) invert(0.88);
  opacity: 0.9;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .nav-item:hover .nav-icon img,
[data-theme="dark"] .nav-item.current .nav-icon img,
[data-theme="dark"] .nav-parent[aria-expanded="true"] .nav-icon img {
  filter: brightness(0) invert(1) drop-shadow(0 0 3px rgba(167, 139, 250, 0.45));
  opacity: 1;
}

/* Chevron arrows in sidebar */
[data-theme="dark"] .nav-item .chev,
[data-theme="dark"] .nav-appendix-label .chev {
  filter: brightness(0) invert(0.75);
  opacity: 0.75;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

[data-theme="dark"] .nav-item:hover .chev,
[data-theme="dark"] .nav-parent[aria-expanded="true"] .chev {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* Appendix Terminology Glossary icon */
[data-theme="dark"] .group-6-743 img {
  filter: brightness(0) invert(0.88);
  opacity: 0.9;
}

[data-theme="dark"] .group-6-743 .text-746 {
  color: #F3F4F6;
}

/* Collapse sidebar button icon */
[data-theme="dark"] .collapse-btn img {
  filter: brightness(0) invert(0.85);
  opacity: 0.85;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

[data-theme="dark"] .collapse-btn:hover img {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* Header Search icons */
[data-theme="dark"] .search-field img.icon-11,
[data-theme="dark"] .search-toggle img.icon-11 {
  filter: brightness(0) invert(0.85);
  opacity: 0.85;
}

/* Right sidebar related items icons */
[data-theme="dark"] .related-item img {
  filter: brightness(0) invert(0.85);
  opacity: 0.85;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

[data-theme="dark"] .related-item:hover img {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* Right sidebar role link chevrons & icons */
[data-theme="dark"] .role-icon {
  background: rgb(124 58 237 / 15%);
  color: #C4B5FD;
}

[data-theme="dark"] .role-link .icon.chev {
  color: #D1D5DB;
}

/* Hub card icons */
[data-theme="dark"] .doc-card-icon img,
[data-theme="dark"] .role-icon img {
  filter: brightness(1.35) saturate(1.15);
}

/* Generic SVG icons in dark mode */
[data-theme="dark"] .icon svg {
  color: #E5E7EB;
}

.doc-image-area {
  margin: 28px auto;
  max-width: 560px;
  width: 100%;
}

.doc-image-area img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .doc-image-area img {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.doc-image-caption {
  text-align: center;
  margin: 12px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-2);
  opacity: 0.85;
}

[data-theme="dark"] .doc-image-caption {
  color: #9CA3AF;
}

button#sidebarExpandTab {
  display: none;
}

/* ==========================================================================
       Search Full-Screen Dark Overlay
       ========================================================================== */
.search-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-backdrop.open,
body.search-overlay-open .search-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.site-header.search-active,
body.search-overlay-open .site-header {
  z-index: 120;
}

.site-header.search-active .search-field,
body.search-overlay-open .search-field {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22), 0 8px 24px rgba(15, 23, 42, 0.12);
  background: var(--surface);
}

.site-header.search-active .search-close-btn,
body.search-overlay-open .search-close-btn {
  display: flex;
}

.site-header.search-active .search-field .kbd,
body.search-overlay-open .search-field .kbd {
  background: var(--accent-soft-bg);
  color: var(--accent);
  border-color: rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] .site-header.search-active .search-field,
[data-theme="dark"] body.search-overlay-open .search-field {
  border-color: var(--accent-icon-bg);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35), 0 8px 30px rgba(0, 0, 0, 0.5);
  background: var(--surface);
}

/* ==========================================================================
       Image Lightbox (Zoom View)
       ========================================================================== */
.doc-image-area img,
.doc-step-card .doc-image-area img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-image-area img:hover,
.doc-step-card .doc-image-area img:hover {
  transform: scale(1.012);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.16);
}

.doc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.doc-lightbox.open {
  display: flex;
}

.doc-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
  animation: lightboxFadeIn 0.22s ease forwards;
}

.doc-lightbox-container {
  position: relative;
  z-index: 2;
  max-width: min(94vw, 1200px);
  max-height: 94vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxScaleUp 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.doc-lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin-bottom: 12px;
  gap: 12px;
  z-index: 10;
}

.doc-lightbox-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 4px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.doc-lightbox-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
  padding: 0;
}

.doc-lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: scale(1.08);
}

.doc-lightbox-btn:active {
  transform: scale(0.95);
}

.doc-lightbox-btn:focus-visible {
  outline: 2px solid #7C3AED;
  outline-offset: 2px;
}

.doc-lightbox-zoom-level {
  color: #F1F5F9;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-width: 44px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.doc-lightbox-close {
  position: static;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.doc-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.doc-lightbox-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.doc-lightbox-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(86vh - 60px);
  width: 100%;
  position: relative;
}

.doc-lightbox-img-wrap {
  position: relative;
  max-width: 100%;
  max-height: calc(80vh - 60px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  background: #FFFFFF;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: zoom-in;
}

.doc-lightbox-img-wrap.is-zoomed {
  cursor: grab;
}

.doc-lightbox-img-wrap.is-panning {
  cursor: grabbing;
}

.doc-lightbox-img-wrap img {
  max-width: 100%;
  max-height: calc(80vh - 60px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  pointer-events: none;
}

.doc-lightbox-img-wrap:not(.is-panning) img {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-lightbox-caption {
  margin-top: 12px;
  color: #E2E8F0;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  max-width: 80ch;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  user-select: none;
  -webkit-user-select: none;
}

body.lightbox-open {
  overflow: hidden !important;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes lightboxScaleUp {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

div#docFeedbackCard,
div.aside-block.support-card {
  max-width: 180px;
  margin: 20px auto;
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 5px;
  background: var(--surface);
}

.feedback-buttons .fb-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.feedback-buttons .fb-btn:disabled:hover {
  opacity: 0.6;
}

.retention-card h3 {
    color: #7c3aed;
    height: 30px;
    font-size: 14.5px !important;
}


/* ==========================================================================
   Navigation Tabs (Platform vs. Release Notes)
   ========================================================================== */
.site-tabs-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 95;
  height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 42, 74, 0.02);
}

.site-tabs-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1900px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.site-tab-btn {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
}

.site-tab-btn:hover {
  color: var(--accent);
}

.site-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

/* Adjust sidebar and aside sticky offsets to account for .site-tabs-nav */
.sidebar,
.aside {
  top: calc(var(--header-h) + 48px) !important;
  height: calc(100vh - var(--header-h) - 48px) !important;
}

/* Tab View Toggle Rules */
body.tab-release-notes-active .sidebar:not(.rn-sidebar),
body.tab-release-notes-active .main.platform-main,
body.tab-release-notes-active .aside:not(.rn-aside) {
  display: none !important;
}

body.tab-release-notes-active .rn-sidebar {
  display: block !important;
}

body.tab-release-notes-active .rn-main {
  display: block !important;
}

body.tab-release-notes-active .rn-aside {
  display: block !important;
}

body:not(.tab-release-notes-active) .rn-sidebar,
body:not(.tab-release-notes-active) .rn-main,
body:not(.tab-release-notes-active) .rn-aside {
  display: none !important;
}

body:not(.tab-release-notes-active) .sidebar:not(.rn-sidebar),
body:not(.tab-release-notes-active) .main.platform-main,
body:not(.tab-release-notes-active) .aside:not(.rn-aside) {
  display: block;
}

/* ==========================================================================
   Release Notes Left Sidebar
   ========================================================================== */
.rn-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border-soft);
  background: var(--bg);
  padding: 20px 14px 24px;
}

.rn-nav-group {
  margin-bottom: 20px;
}

.rn-year-accordion {
  display: flex;
  flex-direction: column;
}

.rn-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rn-year-header:hover {
  background: var(--accent-soft-bg);
  color: var(--accent);
}

.rn-year-chev {
  color: var(--muted-2);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rn-year-header[aria-expanded="false"] .rn-year-chev {
  transform: rotate(-90deg);
}

.rn-version-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-left: 2px;
}

.rn-version-list.collapsed {
  display: none;
}

.rn-version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  color: #374151;
  transition: all 0.15s ease;
}

.rn-version-item:hover {
  background: var(--accent-soft-bg);
  color: var(--navy);
}

.rn-version-item.active {
  background: #F4EBFF;
  color: #7F56D9;
  font-weight: 600;
}

.rn-ver-badge {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
}

.rn-ver-date {
  font-size: 12.5px;
  color: #667085;
  margin-left: auto;
  margin-right: 8px;
}

.rn-version-item.active .rn-ver-date {
  color: #7F56D9;
}

.rn-ver-arrow {
  color: #98A2B3;
  flex-shrink: 0;
}

.rn-version-item.active .rn-ver-arrow {
  color: #7F56D9;
}

.rn-version-item[data-version="v0.8"] {
  display: none !important;
}

#collapseRnSidebarBtn,
.rn-sidebar-footer {
  display: none !important;
}

/* ==========================================================================
   Release Notes Center Content
   ========================================================================== */
.rn-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 40px 48px 80px;
}

.rn-content-container {
  max-width: 860px;
  margin: 0;
}

.rn-header {
  margin-bottom: 20px;
}

.rn-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.rn-subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: #4B4B57;
}

.rn-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 20px 0 24px;
}

/* Filter Pills */
.rn-filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.rn-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #D0D5DD;
  background: #FFFFFF;
  color: #344054;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rn-filter-pill:hover {
  border-color: #7F56D9;
  color: #7F56D9;
  background: #F9F5FF;
}

.rn-filter-pill.active {
  background: #7F56D9;
  border-color: #7F56D9;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* Version Header Bar */
.rn-version-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.rn-version-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.rn-version-tag {
  font-size: 20px;
  font-weight: 700;
  color: var(--charcoal);
}

.rn-version-date {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.rn-version-anchor {
  color: #98A2B3;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.rn-version-anchor:hover {
  color: #7F56D9;
  background: var(--accent-soft-bg);
}

/* Release Summary Card (hidden via CSS display: none, can be enabled later if needed) */
.rn-summary-section {
  display: none !important;
  margin-bottom: 32px;
}

.rn-summary-box {
  background: #FAF9FE;
  border: 1px solid #E9E6F5;
  border-radius: 12px;
  padding: 20px 24px;
}

.rn-summary-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 14px;
}

.rn-table-responsive {
  overflow-x: auto;
}

.rn-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.rn-summary-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  color: #475467;
  border-bottom: 1px solid #EAECF0;
  background: #F4F3FA;
}

.rn-summary-table td {
  padding: 12px;
  border-bottom: 1px solid #F0EEF8;
  vertical-align: top;
}

.rn-td-type {
  width: 110px;
  white-space: nowrap;
}

.rn-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rn-summary-list li a {
  color: #475467;
  text-decoration: none;
  transition: color 0.15s ease;
}

.rn-summary-list li a:hover {
  color: #7F56D9;
  text-decoration: underline;
}

/* Timeline */
.rn-timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 24px;
}

.rn-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 24px;
  width: 2px;
  background: #EAECF0;
}

.rn-timeline-item {
  position: relative;
  margin-bottom: 36px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rn-timeline-item.filtered-out {
  display: none !important;
}

.rn-timeline-marker {
  position: absolute;
  left: -28px;
  top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rn-timeline-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #7F56D9;
  background: #FFFFFF;
  display: block;
}

.rn-timeline-body {
  padding-left: 4px;
}

.rn-item-title {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.35;
  margin-bottom: 4px;
}

.rn-item-location {
  display: none !important;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 10px;
}

.rn-item-content p {
  font-size: 14px;
  line-height: 1.65;
  color: #4B4B57;
  margin-bottom: 12px;
}

.rn-item-footer {
  margin-top: 8px;
}

/* Badges */
.rn-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.rn-badge-added {
  background: #ECFDF3;
  color: #027A48;
  border: 1px solid #ABEFC6;
}

.rn-badge-updated {
  background: #EFF8FF;
  color: #175CD3;
  border: 1px solid #B2DDFF;
}

.rn-badge-removed {
  background: #FEF3F2;
  color: #B42318;
  border: 1px solid #FECDCA;
}

/* ==========================================================================
   Release Notes Right Aside
   ========================================================================= */
.rn-aside {
  width: var(--aside-w);
  flex-shrink: 0;
  border-left: 1px solid var(--border-soft);
  background: var(--bg);
  padding: 32px 16px 32px 20px;
}

.rn-toc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.rn-toc-icon {
  color: #667085;
  flex-shrink: 0;
}

.rn-toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #667085;
}

.rn-toc-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 24px;
}

.rn-toc-link {
  display: block;
  font-size: 13px;
  color: #475467;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.rn-toc-link:hover {
  background: var(--accent-soft-bg);
  color: var(--accent);
}

.rn-toc-link.active {
  background: #F4EBFF;
  color: #7F56D9;
  font-weight: 600;
}

.rn-help-card {
  max-width: 100% !important;
  margin: 16px 0 !important;
  background: #FFFFFF !important;
  border: 1px solid #EAECF0 !important;
  border-radius: 10px !important;
  padding: 16px !important;
}

.rn-help-card .aside-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.rn-help-card p {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.rn-help-card .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.rn-help-card .contact-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Dark Mode Support for Tabs & Release Notes
   ========================================================================== */
[data-theme="dark"] .site-tabs-nav {
  background: #13131A;
  border-bottom-color: #22222E;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .site-tab-btn {
  color: #9496A1;
}

[data-theme="dark"] .site-tab-btn:hover {
  color: #A78BFA;
}

[data-theme="dark"] .site-tab-btn.active {
  color: #A78BFA;
  border-bottom-color: #A78BFA;
}

[data-theme="dark"] .rn-sidebar {
  background: #13131A;
  border-right-color: #22222E;
}

[data-theme="dark"] .rn-year-header {
  color: #D1D1DB;
}

[data-theme="dark"] .rn-year-header:hover {
  background: #26243A;
  color: #A78BFA;
}

[data-theme="dark"] .rn-version-item {
  color: #D1D1DB;
}

[data-theme="dark"] .rn-version-item:hover {
  background: #1E1E2A;
  color: #FFFFFF;
}

[data-theme="dark"] .rn-version-item.active {
  background: #2D234C;
  color: #C4B5FD;
}

[data-theme="dark"] .rn-version-item.active .rn-ver-date,
[data-theme="dark"] .rn-version-item.active .rn-ver-arrow {
  color: #A78BFA;
}

[data-theme="dark"] .rn-main {
  background: #171720;
}

[data-theme="dark"] .rn-title {
  color: #F5F5F7;
}

[data-theme="dark"] .rn-subtitle {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-divider {
  background: #2A2A38;
}

[data-theme="dark"] .rn-filter-pill {
  background: #1E1E2A;
  border-color: #37374A;
  color: #D1D1DB;
}

[data-theme="dark"] .rn-filter-pill:hover {
  border-color: #A78BFA;
  color: #A78BFA;
  background: #2D234C;
}

[data-theme="dark"] .rn-filter-pill.active {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #FFFFFF;
}

[data-theme="dark"] .rn-version-bar {
  border-bottom-color: #2A2A38;
}

[data-theme="dark"] .rn-version-tag {
  color: #F5F5F7;
}

[data-theme="dark"] .rn-version-date {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-version-anchor {
  color: #6B7280;
}

[data-theme="dark"] .rn-version-anchor:hover {
  color: #A78BFA;
  background: #2D234C;
}

[data-theme="dark"] .rn-summary-box {
  background: #1E1E2A;
  border-color: #2E2D42;
}

[data-theme="dark"] .rn-summary-heading {
  color: #F5F5F7;
}

[data-theme="dark"] .rn-summary-table th {
  background: #242335;
  color: #D1D1DB;
  border-bottom-color: #2E2D42;
}

[data-theme="dark"] .rn-summary-table td {
  border-bottom-color: #262537;
  color: #D1D1DB;
}

[data-theme="dark"] .rn-summary-list li a {
  color: #D1D1DB;
}

[data-theme="dark"] .rn-summary-list li a:hover {
  color: #A78BFA;
}

[data-theme="dark"] .rn-timeline::before {
  background: #2E2D42;
}

[data-theme="dark"] .rn-timeline-circle {
  border-color: #A78BFA;
  background: #171720;
}

[data-theme="dark"] .rn-item-title {
  color: #F5F5F7;
}

[data-theme="dark"] .rn-item-location {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-item-content p {
  color: #D1D1DB;
}

[data-theme="dark"] .rn-badge-added {
  background: rgba(2, 122, 72, 0.2);
  color: #6CE9A6;
  border-color: rgba(2, 122, 72, 0.4);
}

[data-theme="dark"] .rn-badge-updated {
  background: rgba(23, 92, 211, 0.2);
  color: #84CAFF;
  border-color: rgba(23, 92, 211, 0.4);
}

[data-theme="dark"] .rn-badge-removed {
  background: rgba(180, 35, 24, 0.2);
  color: #FDA29B;
  border-color: rgba(180, 35, 24, 0.4);
}

[data-theme="dark"] .rn-aside {
  background: #13131A;
  border-left-color: #22222E;
}

[data-theme="dark"] .rn-toc-header {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-toc-icon {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-toc-title {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-toc-link {
  color: #D1D1DB;
}

[data-theme="dark"] .rn-toc-link:hover {
  background: #2D234C;
  color: #A78BFA;
}

[data-theme="dark"] .rn-toc-link.active {
  background: #2D234C;
  color: #A78BFA;
}

[data-theme="dark"] .rn-help-card {
  background: #1E1E2A !important;
  border-color: #2E2D42 !important;
}

[data-theme="dark"] .rn-help-card .aside-card-title {
  color: #F5F5F7;
}

[data-theme="dark"] .rn-help-card p {
  color: #9CA3AF;
}

[data-theme="dark"] .rn-help-card .contact-link {
  color: #A78BFA;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1180px) {
  .rn-aside {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .site-tabs-inner {
    padding: 0 16px;
    gap: 20px;
  }
  .site-tab-btn {
    font-size: 14px;
  }
  .rn-sidebar {
    position: fixed;
    top: calc(var(--header-h) + 48px);
    left: 0;
    bottom: 0;
    z-index: 85;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  body.tab-release-notes-active .rn-sidebar.open {
    transform: translateX(0);
  }
  .rn-main {
    padding: 24px 16px 60px;
  }
  .rn-title {
    font-size: 26px;
  }
  .rn-item-title {
    font-size: 21px;
  }
  .rn-timeline {
    padding-left: 22px;
  }
  .rn-timeline::before {
    left: 4px;
  }
  .rn-timeline-marker {
    left: -22px;
  }
}