/* ==========================================================================
   Avid Common UI – Documentation Theme
   ==========================================================================
   Loads after central_style.css and overrides it with a token-based approach.
   Provides full light/dark mode support via CSS custom properties.

   Design principles:
   - Compact, scannable layout — no wasted vertical space
   - Card-based toolkit entries with clear hover affordance
   - Developer-friendly: readable code blocks, clean tables, breathing room
   - Smooth light ↔ dark transitions using Avid Common UI tokens
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Font Import
   -------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   1. Design Tokens
   ========================================================================== */

/* --- 1a. Light mode (default) ------------------------------------------- */

:root {
  /* Surfaces */
  --avid-surface-canvas: #F5F6F8;
  --avid-surface-primary: #EBEDF0;
  --avid-surface-secondary: rgba(255, 255, 255, 0.6);
  --avid-surface-raised: #FFFFFF;
  --avid-surface-scrim: rgba(0, 0, 0, 0.45);
  --avid-surface-inset: #F0F1F3;

  /* Content */
  --avid-content-primary: #1a1a1a;
  --avid-content-secondary: #4a4a4a;
  --avid-content-tertiary: #737373;
  --avid-content-disabled: rgba(0, 0, 0, 0.38);

  /* Accent */
  --avid-accent: #0075C9;
  --avid-accent-hover: #005A9C;
  --avid-accent-pressed: #003357;
  --avid-accent-text: #FFFFFF;
  --avid-accent-subtle: rgba(0, 117, 201, 0.08);
  --avid-accent-subtle-hover: rgba(0, 117, 201, 0.14);

  /* Strokes */
  --avid-stroke-subtle: rgba(0, 0, 0, 0.08);
  --avid-stroke-normal: rgba(0, 0, 0, 0.14);
  --avid-stroke-intense: rgba(0, 0, 0, 0.22);
  --avid-stroke-focus: #0075C9;

  /* Inputs */
  --avid-input-fill: #FFFFFF;
  --avid-input-stroke: rgba(0, 0, 0, 0.18);
  --avid-input-stroke-hover: rgba(0, 0, 0, 0.3);

  /* Hover / selection */
  --avid-hover-bg: rgba(0, 0, 0, 0.04);
  --avid-active-bg: rgba(0, 0, 0, 0.06);

  /* Shadows */
  --avid-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --avid-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --avid-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --avid-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Radii */
  --avid-radius-xs: 3px;
  --avid-radius-s: 4px;
  --avid-radius-m: 6px;
  --avid-radius-l: 10px;
  --avid-radius-xl: 14px;

  /* Spacing */
  --avid-spacing-xxs: 4px;
  --avid-spacing-xs: 6px;
  --avid-spacing-s: 8px;
  --avid-spacing-m: 16px;
  --avid-spacing-l: 24px;
  --avid-spacing-xl: 32px;
  --avid-spacing-xxl: 48px;

  /* Code */
  --avid-code-bg: #F6F7F9;
  --avid-code-border: rgba(0, 0, 0, 0.08);
  --avid-code-text: #1a1a1a;
  --avid-code-inline-bg: rgba(0, 0, 0, 0.05);
  --avid-code-inline-text: #c7254e;
}

/* --- 1b. Dark mode (explicit) ------------------------------------------- */

[data-theme="dark"] {
  --avid-surface-canvas: #0D0D0D;
  --avid-surface-primary: #161616;
  --avid-surface-secondary: #1A1A1A;
  --avid-surface-raised: #222222;
  --avid-surface-scrim: rgba(0, 0, 0, 0.7);
  --avid-surface-inset: #1A1A1A;

  --avid-content-primary: rgba(255, 255, 255, 0.88);
  --avid-content-secondary: rgba(255, 255, 255, 0.62);
  --avid-content-tertiary: rgba(255, 255, 255, 0.44);
  --avid-content-disabled: rgba(255, 255, 255, 0.28);

  --avid-accent: #3D9FE0;
  --avid-accent-hover: #5BB3EC;
  --avid-accent-pressed: #2B8DD0;
  --avid-accent-text: #FFFFFF;
  --avid-accent-subtle: rgba(61, 159, 224, 0.1);
  --avid-accent-subtle-hover: rgba(61, 159, 224, 0.18);

  --avid-stroke-subtle: rgba(255, 255, 255, 0.08);
  --avid-stroke-normal: rgba(255, 255, 255, 0.12);
  --avid-stroke-intense: rgba(255, 255, 255, 0.2);
  --avid-stroke-focus: #3D9FE0;

  --avid-input-fill: rgba(255, 255, 255, 0.04);
  --avid-input-stroke: rgba(255, 255, 255, 0.12);
  --avid-input-stroke-hover: rgba(255, 255, 255, 0.22);

  --avid-hover-bg: rgba(255, 255, 255, 0.05);
  --avid-active-bg: rgba(255, 255, 255, 0.08);

  --avid-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --avid-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --avid-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --avid-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  --avid-code-bg: #1A1D21;
  --avid-code-border: rgba(255, 255, 255, 0.06);
  --avid-code-text: rgba(255, 255, 255, 0.85);
  --avid-code-inline-bg: rgba(255, 255, 255, 0.08);
  --avid-code-inline-text: #f0a0b8;

  color-scheme: dark;
}

/* --- 1c. OS dark preference (flash prevention) -------------------------- */

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) {
    --avid-surface-canvas: #0D0D0D;
    --avid-surface-primary: #161616;
    --avid-surface-secondary: #1A1A1A;
    --avid-surface-raised: #222222;
    --avid-surface-scrim: rgba(0, 0, 0, 0.7);
    --avid-surface-inset: #1A1A1A;
    --avid-content-primary: rgba(255, 255, 255, 0.88);
    --avid-content-secondary: rgba(255, 255, 255, 0.62);
    --avid-content-tertiary: rgba(255, 255, 255, 0.44);
    --avid-content-disabled: rgba(255, 255, 255, 0.28);
    --avid-accent: #3D9FE0;
    --avid-accent-hover: #5BB3EC;
    --avid-accent-pressed: #2B8DD0;
    --avid-accent-text: #FFFFFF;
    --avid-accent-subtle: rgba(61, 159, 224, 0.1);
    --avid-accent-subtle-hover: rgba(61, 159, 224, 0.18);
    --avid-stroke-subtle: rgba(255, 255, 255, 0.08);
    --avid-stroke-normal: rgba(255, 255, 255, 0.12);
    --avid-stroke-intense: rgba(255, 255, 255, 0.2);
    --avid-stroke-focus: #3D9FE0;
    --avid-input-fill: rgba(255, 255, 255, 0.04);
    --avid-input-stroke: rgba(255, 255, 255, 0.12);
    --avid-input-stroke-hover: rgba(255, 255, 255, 0.22);
    --avid-hover-bg: rgba(255, 255, 255, 0.05);
    --avid-active-bg: rgba(255, 255, 255, 0.08);
    --avid-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --avid-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --avid-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --avid-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --avid-code-bg: #1A1D21;
    --avid-code-border: rgba(255, 255, 255, 0.06);
    --avid-code-text: rgba(255, 255, 255, 0.85);
    --avid-code-inline-bg: rgba(255, 255, 255, 0.08);
    --avid-code-inline-text: #f0a0b8;
    color-scheme: dark;
  }
}

/* ==========================================================================
   2. Smooth Transitions
   ========================================================================== */

body,
.navbar-inverse,
header,
footer,
.card,
.jumbotron,
.landing .toolkits > .row,
table, th, td, thead,
.white_content,
.search-input,
pre, code,
#return-to-top,
.bs-docs-container,
.menu-follow,
.audio-btn,
.devguide-btn,
.navbar-btn {
  transition: background-color 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

/* ==========================================================================
   3. Base Elements
   ========================================================================== */

body {
  background-color: var(--avid-surface-canvas);
  color: var(--avid-content-primary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Headings ----------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  color: var(--avid-content-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--avid-stroke-subtle);
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  margin-top: 32px;
  margin-bottom: 12px;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  margin-top: 24px;
  margin-bottom: 8px;
}

h4 {
  font-size: 16px;
  line-height: 1.4;
  margin-top: 20px;
  margin-bottom: 6px;
}

/* --- Paragraphs --------------------------------------------------------- */

p {
  margin-bottom: 12px;
  color: var(--avid-content-secondary);
}

/* --- Links -------------------------------------------------------------- */

a {
  color: var(--avid-accent);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--avid-accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--avid-stroke-focus);
  outline-offset: 2px;
  border-radius: var(--avid-radius-xs);
}

/* --- Code --------------------------------------------------------------- */

code,
pre {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
}

pre {
  background: var(--avid-code-bg);
  border: 1px solid var(--avid-code-border);
  color: var(--avid-code-text);
  border-radius: var(--avid-radius-m);
  padding: 16px 20px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

code {
  background: var(--avid-code-inline-bg);
  color: var(--avid-code-inline-text);
  padding: 2px 6px;
  border-radius: var(--avid-radius-xs);
  border: none;
  font-size: 0.88em;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: inherit;
}

/* --- Horizontal rules --------------------------------------------------- */

hr {
  border: none;
  border-top: 1px solid var(--avid-stroke-subtle);
  margin: 24px 0;
}

/* --- Images ------------------------------------------------------------- */

img {
  max-width: 100%;
  border-radius: var(--avid-radius-s);
}

/* --- Selection ---------------------------------------------------------- */

::selection {
  background: var(--avid-accent-subtle-hover);
  color: var(--avid-content-primary);
}


/* ==========================================================================
   4. Navbar
   ========================================================================== */

.navbar-inverse {
  background: var(--avid-surface-raised) !important;
  background-image: none !important;
  border: none !important;
  border-bottom: 1px solid var(--avid-stroke-subtle) !important;
  box-shadow: var(--avid-shadow-xs);
  padding: 0 !important;
  margin-bottom: 0;
  min-height: 0;
}

/* Flex container for navbar alignment */
.navbar-inverse .container {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-inverse .navbar-header {
  display: flex;
  align-items: center;
  float: none !important;
  margin: 0;
  padding: 0;
}

.navbar-inverse .navbar-header .navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
  margin-right: 12px;
  height: auto;
}

.navbar-inverse .search-box {
  margin: 0 !important;
  padding-left: 0 !important;
}

.navbar-inverse .navbar-nav {
  display: flex !important;
  align-items: center;
  float: none !important;
  margin: 0;
  margin-left: auto;
}

.navbar-inverse .navbar-nav > li {
  float: none !important;
  display: flex;
  align-items: center;
}

.navbar-inverse .navbar-btn {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 12px;
  flex-shrink: 0;
}

/* Logo */
#logo {
  filter: none;
  width: 72px;
  opacity: 0.9;
  transition: opacity 0.2s ease, filter 0.25s ease;
}

#logo:hover {
  opacity: 1;
}

[data-theme="dark"] #logo {
  filter: invert(100%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) #logo {
    filter: invert(100%);
  }
}

/* Nav links */
.nav-link {
  color: var(--avid-content-secondary) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 6px 12px !important;
  border-radius: var(--avid-radius-s);
  transition: color 0.15s ease, background-color 0.15s ease;
  line-height: 1.4 !important;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--avid-content-primary) !important;
  background-color: var(--avid-hover-bg);
  text-decoration: none !important;
}

/* CTA button in navbar */
.navbar-btn {
  color: var(--avid-accent) !important;
  border: 1px solid var(--avid-accent) !important;
  background: transparent !important;
  border-radius: var(--avid-radius-m) !important;
  font-weight: 500;
  font-size: 13px;
  padding: 5px 14px !important;
  transition: all 0.15s ease;
}

.navbar-btn:hover {
  color: var(--avid-accent-text) !important;
  background: var(--avid-accent) !important;
  border-color: var(--avid-accent) !important;
}

.navbar-btn:active:focus {
  color: var(--avid-accent-text) !important;
  background: var(--avid-accent-pressed) !important;
  border-color: var(--avid-accent-pressed) !important;
}

/* Search input */
.search-input {
  background: var(--avid-input-fill);
  border: 1px solid var(--avid-input-stroke);
  color: var(--avid-content-primary);
  border-radius: var(--avid-radius-m);
  font-family: Inter, sans-serif;
  font-size: 13px;
  height: 32px;
  padding: 4px 12px 4px 32px;
}

.search-input::placeholder {
  color: var(--avid-content-tertiary);
}

.search-input:hover {
  border-color: var(--avid-input-stroke-hover);
}

.search-input:focus {
  border-color: var(--avid-stroke-focus);
  box-shadow: 0 0 0 3px var(--avid-accent-subtle);
  outline: none;
}

.search-box {
  margin: 0;
  padding-left: 0;
  width: 240px;
}


/* ==========================================================================
   5. Header / Hero
   ==========================================================================
   Compact, modern hero. No giant padding. Clear hierarchy.
   -------------------------------------------------------------------------- */

header {
  background: var(--avid-accent) !important;
  background-image: none !important;
  padding: 28px 0 24px !important;
  margin-bottom: 0 !important;
}

header h1 {
  color: var(--avid-accent-text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
  border: none;
  line-height: 1.3;
}

header p,
header .lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px !important;
  font-weight: 400;
  margin: 6px 0 0 0;
  line-height: 1.5;
}


/* ==========================================================================
   6. Content Area
   ========================================================================== */

.bs-docs-container {
  background: transparent;
  padding-top: 24px;
}

article.page {
  color: var(--avid-content-primary);
  max-width: 820px;
}

article.page p {
  line-height: 1.7;
}

article.page li {
  margin-bottom: 4px;
  line-height: 1.6;
}

article.page li + li {
  margin-top: 2px;
}

/* --- Tables ------------------------------------------------------------- */

table {
  background: var(--avid-surface-raised);
  border: 1px solid var(--avid-stroke-normal);
  border-radius: var(--avid-radius-m);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  width: 100%;
}

thead {
  background: var(--avid-surface-inset);
}

th {
  background: var(--avid-surface-inset);
  border: none;
  border-bottom: 1px solid var(--avid-stroke-normal);
  color: var(--avid-content-primary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 10px 14px;
}

/* Adjacent th cells get a left separator */
th + th {
  border-left: 1px solid var(--avid-stroke-subtle);
}

td {
  border: none;
  border-bottom: 1px solid var(--avid-stroke-subtle);
  color: var(--avid-content-primary);
  padding: 10px 14px;
  font-size: 14px;
  vertical-align: top;
}

td + td {
  border-left: 1px solid var(--avid-stroke-subtle);
}

/* No bottom border on last row */
tr:last-child td {
  border-bottom: none;
}

/* Subtle stripe */
tbody tr:nth-child(even) {
  background: var(--avid-hover-bg);
}

/* Gutter column for code line numbers */
td.gutter {
  width: 50px;
  color: var(--avid-content-tertiary);
  background: var(--avid-surface-inset);
  user-select: none;
}

/* CTMS-specific styled tokens */
.ctmshint,
.ctmsnew {
  background-color: var(--avid-accent-subtle);
  border: 1px solid var(--avid-accent);
  border-left: 3px solid var(--avid-accent);
  color: var(--avid-content-primary);
  padding: 10px 14px;
  border-radius: var(--avid-radius-s);
  margin: 12px 0;
}


/* ==========================================================================
   7. Landing Page — Jumbotron & Toolkit Cards
   ==========================================================================
   The jumbotron becomes a compact intro strip.
   Toolkit rows become real cards with clear affordance.
   -------------------------------------------------------------------------- */

/* --- Jumbotron → Compact intro ------------------------------------------ */

.jumbotron {
  background: var(--avid-surface-raised);
  border: 1px solid var(--avid-stroke-subtle);
  border-radius: var(--avid-radius-l);
  padding: 20px 24px !important;
  margin: 20px 0 24px !important;
  box-shadow: var(--avid-shadow-xs);
}

.jumbotron h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--avid-content-primary);
  margin: 0 0 4px 0;
  padding: 0;
  border: none;
  letter-spacing: 0;
}

.jumbotron p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--avid-content-secondary);
  margin: 0;
}

.jumbotron .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.jumbotron .row > [class*="col-"] {
  padding: 12px 16px;
  border-right: 1px solid var(--avid-stroke-subtle);
}

.jumbotron .row > [class*="col-"]:last-child {
  border-right: none;
}

/* --- Toolkit section headings ------------------------------------------- */

.landing .toolkits h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--avid-content-primary);
  margin: 32px 0 6px 0;
  padding: 0;
  border: none;
}

.landing .toolkits h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--avid-content-tertiary);
  margin: 24px 0 10px 0;
  padding: 0;
}

/* --- Toolkit rows → Cards ----------------------------------------------- */

.landing .toolkits > .row {
  background: var(--avid-surface-raised);
  border: 1px solid var(--avid-stroke-subtle);
  border-radius: var(--avid-radius-l);
  padding: 16px 20px !important;
  margin-bottom: 10px !important;
  box-shadow: var(--avid-shadow-xs);
  transition: border-color 0.15s ease,
              box-shadow 0.15s ease,
              background-color 0.25s ease;
  border-top: 1px solid var(--avid-stroke-subtle) !important;
}

.landing .toolkits > .row:hover[onclick] {
  border-color: var(--avid-accent) !important;
  box-shadow: 0 0 0 1px var(--avid-accent), var(--avid-shadow-sm);
  background-color: var(--avid-surface-raised);
  cursor: pointer;
}

/* Card titles */
.landing .toolkits > .row h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
}

/* Clickable cards: title in accent blue to signal interactivity */
.landing .toolkits > .row[onclick] h4,
.landing .toolkits > .row[onclick] h4 a {
  color: var(--avid-accent);
}

.landing .toolkits > .row[onclick] h4 a:hover {
  color: var(--avid-accent-hover);
  text-decoration: none;
}

/* Non-clickable cards: title in primary text */
.landing .toolkits > .row:not([onclick]) h4,
.landing .toolkits > .row:not([onclick]) h4 a {
  color: var(--avid-content-primary);
}

/* Card description text */
.landing .toolkits > .row p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--avid-content-secondary);
  margin: 0;
}

/* Sub-links row within cards (Apply, Documentation, Examples, Forum) */
.landing .toolkits > .row .row {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 8px 0 0 0 !important;
  margin: 0 !important;
  transform: none;
}

.landing .toolkits > .row .row:hover {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
  transform: none;
}

.landing .toolkits > .row .row a {
  font-size: 13px;
  font-weight: 500;
}

/* --- Audio SDK button --------------------------------------------------- */

.audio-btn {
  background-color: var(--avid-accent) !important;
  border-color: var(--avid-accent) !important;
  color: var(--avid-accent-text) !important;
  border-radius: var(--avid-radius-m) !important;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 15px !important;
  padding: 10px 24px !important;
  transition: all 0.15s ease;
}

.audio-btn:hover {
  background-color: var(--avid-accent-hover) !important;
  border-color: var(--avid-accent-hover) !important;
  color: var(--avid-accent-text) !important;
}

/* Center box for the audio button */
.center-box {
  margin: 16px 0 8px 0;
}

/* Dev guide button */
.devguide-btn {
  background-color: var(--avid-accent);
  border-color: var(--avid-accent);
  border-radius: var(--avid-radius-m);
  font-family: Inter, sans-serif;
  font-weight: 500;
}

.devguide-btn:hover {
  background-color: var(--avid-accent-hover);
  border-color: var(--avid-accent-hover);
  color: #fff;
}

/* --- Landing container spacing ------------------------------------------ */

.container.landing {
  padding-bottom: 32px;
}


/* ==========================================================================
   8. Sidebar TOC
   ========================================================================== */

.menu-follow {
  background: transparent;
  padding: 0;
  margin-top: 24px;
  border-left: 2px solid var(--avid-stroke-subtle);
  padding-left: 0;
}

.menu-follow ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-follow li {
  margin: 0;
}

.menu-follow a {
  display: block;
  color: var(--avid-content-tertiary);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.4;
  padding: 4px 12px;
  border-radius: 0 var(--avid-radius-s) var(--avid-radius-s) 0;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}

.menu-follow a:hover {
  color: var(--avid-accent);
  background-color: var(--avid-accent-subtle);
  text-decoration: none;
}

.toc {
  margin-top: 16px;
}


/* ==========================================================================
   9. Footer
   ========================================================================== */

footer {
  background: var(--avid-surface-canvas);
  border-top: none;
  margin-top: 0;
  padding: 16px 0 40px;
}

footer hr {
  border-color: var(--avid-stroke-subtle);
  margin: 0 0 12px 0;
}

footer a {
  color: var(--avid-content-tertiary);
  font-weight: 400;
  font-size: 13px;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--avid-content-primary);
  text-decoration: none;
}

footer p,
footer span,
footer .copyright,
footer .col-md-6 {
  color: var(--avid-content-tertiary);
  font-size: 13px;
}


/* ==========================================================================
   10. Search Overlay
   ========================================================================== */

.white_content {
  background-color: var(--avid-surface-raised);
  border: 1px solid var(--avid-stroke-normal);
  border-radius: var(--avid-radius-xl);
  box-shadow: var(--avid-shadow-lg);
  padding: 24px;
}

.black_overlay {
  background-color: var(--avid-surface-scrim);
}

[data-theme="dark"] .black_overlay {
  background-color: rgba(0, 0, 0, 0.75);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) .black_overlay {
    background-color: rgba(0, 0, 0, 0.75);
  }
}

.search-result-item {
  padding: 10px 14px;
  border-radius: var(--avid-radius-m);
  margin-bottom: 4px;
  transition: background-color 0.15s ease;
}

.search-result-item:hover {
  background-color: var(--avid-hover-bg);
}

.search-result-p {
  color: var(--avid-content-secondary);
  font-family: Inter, sans-serif;
  font-size: 14px;
}


/* ==========================================================================
   11. Cards & Miscellaneous
   ========================================================================== */

.card {
  background: var(--avid-surface-raised);
  border: 1px solid var(--avid-stroke-subtle);
  border-radius: var(--avid-radius-m);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--avid-stroke-normal);
  box-shadow: var(--avid-shadow-sm);
}

.card-link {
  color: var(--avid-content-primary);
}

.card-link:hover,
.card-link:focus {
  color: var(--avid-accent);
  text-decoration: none;
}

/* Details / summary */
summary {
  color: var(--avid-accent);
  font-family: Inter, sans-serif;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--avid-radius-s);
  transition: background-color 0.15s ease;
}

summary:hover {
  background-color: var(--avid-accent-subtle);
}

summary:focus {
  outline: none;
}

summary:focus-visible {
  outline: 2px solid var(--avid-stroke-focus);
  outline-offset: 2px;
}

/* Search term highlight */
mark {
  background-color: var(--avid-accent-subtle-hover);
  color: inherit;
  padding: 1px 3px;
  border-radius: var(--avid-radius-xs);
}

/* Legacy purple overrides → accent */
.qs_border {
  border-color: var(--avid-accent);
}

.card-header .accordion-toggle:after,
.card-header .accordion-toggle.collapsed:after {
  color: var(--avid-accent);
}


/* ==========================================================================
   12. Back-to-Top Button
   ========================================================================== */

#return-to-top {
  background: var(--avid-surface-raised);
  border: 1px solid var(--avid-stroke-normal);
  box-shadow: var(--avid-shadow-md);
  width: 40px;
  height: 40px;
  border-radius: var(--avid-radius-l);
}

#return-to-top i {
  border-color: var(--avid-content-secondary);
  border-width: 0 2.5px 2.5px 0;
  padding: 3px;
}

#return-to-top:hover {
  background: var(--avid-hover-bg);
  border-color: var(--avid-stroke-intense);
}

#return-to-top:hover i {
  border-color: var(--avid-accent);
  top: -3px;
}


/* ==========================================================================
   13. Theme Toggle
   ==========================================================================
   Sun/moon sliding pill, adapted from Sound Set Editor.
   -------------------------------------------------------------------------- */

.avid-theme-toggle-wrapper {
  display: flex;
  align-items: center;
  margin: 0 0 0 10px;
  float: none !important;
}

.avid-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 52px;
  height: 28px;
  padding: 0 5px;
  background-color: var(--avid-surface-inset);
  border: 1px solid var(--avid-stroke-normal);
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .avid-theme-toggle {
  background-color: #1A2332;
  border-color: rgba(255, 255, 255, 0.12);
}

.avid-theme-toggle:hover {
  border-color: var(--avid-stroke-intense);
  box-shadow: 0 0 0 3px var(--avid-accent-subtle);
}

[data-theme="dark"] .avid-theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(61, 159, 224, 0.15);
}

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

/* Sun / Moon icons */
.avid-theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 2;
  color: var(--avid-content-disabled);
  transition: color 0.25s ease;
}

[data-theme="dark"] .avid-theme-icon {
  color: rgba(255, 255, 255, 0.3);
}

.avid-theme-icon--active {
  color: #FFFFFF;
}

[data-theme="dark"] .avid-theme-icon--active {
  color: #FFFFFF;
}

/* Sliding pill */
.avid-theme-pill {
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: var(--avid-accent);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.25s ease,
              box-shadow 0.25s ease;
}

.avid-theme-pill--dark {
  left: calc(100% - 24px);
  background: #3D9FE0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
              0 0 8px rgba(61, 159, 224, 0.25);
}


/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media only screen and (max-width: 995px) {
  .menu-follow {
    display: none;
  }

  .jumbotron .row > [class*="col-"] {
    border-right: none;
    border-bottom: 1px solid var(--avid-stroke-subtle);
    padding: 10px 16px;
  }

  .jumbotron .row > [class*="col-"]:last-child {
    border-bottom: none;
  }
}

@media only screen and (max-width: 768px) {
  header {
    padding: 20px 0 16px !important;
  }

  header h1 {
    font-size: 20px;
  }

  header .lead {
    font-size: 14px !important;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 19px;
  }

  .jumbotron {
    padding: 16px !important;
  }

  .landing .toolkits > .row {
    padding: 14px 16px !important;
  }

  .avid-theme-toggle-wrapper {
    margin-left: 4px;
  }
}
