/* ============================= */
/* GitHub-Inspired Theme Styling */
/* ============================= */

/* ========================================
   CONTENT WIDTH OVERRIDES
   ======================================== */

/* Desktop - Much wider content area */
@media screen and (min-width: 1220px) {
  /* Main grid container */
  .md-grid {
    max-width: 90% !important;
    margin: 0 auto !important;
  }

  /* Main content area */
  .md-content {
    max-width: none !important;
  }

  .md-content__inner {
    margin: 0 !important;
    padding: 2.4rem 2rem !important;
    max-width: none !important;
  }

  /* Main layout container */
  .md-main__inner {
    max-width: 90% !important;
    margin: 0 auto !important;
  }

  /* Typography container */
  .md-typeset {
    max-width: none !important;
  }

  /* Remove max-width from article */
  article.md-content__inner {
    max-width: none !important;
  }

  /* Header and footer width */
  .md-header__inner {
    max-width: 90% !important;
    margin: 0 auto !important;
  }

  .md-footer-meta__inner {
    max-width: 90% !important;
    margin: 0 auto !important;
  }
}

/* Even wider for very large screens */
@media screen and (min-width: 1600px) {
  .md-grid,
  .md-main__inner,
  .md-header__inner,
  .md-footer-meta__inner {
    max-width: 1800px !important;
  }
}

/* Tablet - Responsive width */
@media screen and (min-width: 960px) and (max-width: 1219px) {
  .md-grid {
    max-width: 94% !important;
    margin: 0 auto !important;
  }

  .md-main__inner {
    max-width: 94% !important;
    margin: 0 auto !important;
  }

  .md-content__inner {
    margin: 0 !important;
    padding: 2.4rem 1.5rem !important;
    max-width: none !important;
  }
}

/* Small tablet */
@media screen and (min-width: 768px) and (max-width: 959px) {
  .md-content__inner {
    margin: 0 !important;
    padding: 2.4rem 1rem !important;
  }
}

/* Mobile - Keep default responsive behavior */
@media screen and (max-width: 767px) {
  .md-content__inner {
    margin: 0 !important;
    padding: 1.5rem 0.8rem !important;
  }
}

/* Ensure architecture diagrams use full available width */
.architecture-diagram {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Adjust code blocks and tables for wider content */
.md-typeset pre {
  max-width: none !important;
}

.md-typeset table {
  max-width: none !important;
  width: auto !important;
  display: table !important;
}

.md-typeset__scrollwrap {
  max-width: none !important;
}

.md-typeset__table {
  max-width: none !important;
}

/* Fix any overflow issues */
.md-typeset {
  overflow-x: visible !important;
}

/* ========================================
   END CONTENT WIDTH OVERRIDES
   ======================================== */

/* Dark Theme Colors (GitHub Dark) */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #161b22;
  --md-primary-fg-color--light: #1f2428;
  --md-primary-fg-color--dark: #0d1117;

  --md-accent-fg-color: #58a6ff;
  --md-accent-fg-color--transparent: #58a6ff1a;

  --md-default-bg-color: #0d1117;
  --md-default-bg-color--light: #161b22;
  --md-default-bg-color--lighter: #1c2128;
  --md-default-bg-color--lightest: #262c36;

  --md-default-fg-color: #c9d1d9;
  --md-default-fg-color--light: #8b949e;
  --md-default-fg-color--lighter: #6e7681;
  --md-default-fg-color--lightest: #484f58;

  --md-code-bg-color: #161b22;
  --md-code-fg-color: #c9d1d9;
  --md-code-hl-color: #388bfd26;

  --md-typeset-color: #c9d1d9;
  --md-typeset-a-color: #58a6ff;

  --md-admonition-bg-color: #161b22;
  --md-footer-bg-color: #0d1117;
  --md-footer-bg-color--dark: #090c10;

  --md-shadow-z1: 0 0 0 1px #30363d;
  --md-shadow-z2: 0 0 0 1px #30363d;
  --md-shadow-z3: 0 0 0 1px #30363d;
}

/* Light Theme Colors (GitHub Light) */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #24292f;
  --md-primary-fg-color--light: #32383f;
  --md-primary-fg-color--dark: #1b1f23;

  --md-accent-fg-color: #0969da;
  --md-accent-fg-color--transparent: #0969da1a;

  --md-default-bg-color: #ffffff;
  --md-default-bg-color--light: #f6f8fa;
  --md-default-bg-color--lighter: #f3f4f6;
  --md-default-bg-color--lightest: #eff1f3;

  --md-default-fg-color: #24292f;
  --md-default-fg-color--light: #57606a;
  --md-default-fg-color--lighter: #6e7781;
  --md-default-fg-color--lightest: #8c959f;

  --md-code-bg-color: #f6f8fa;
  --md-code-fg-color: #24292f;
  --md-code-hl-color: #fff8c5;

  --md-typeset-color: #24292f;
  --md-typeset-a-color: #0969da;

  --md-admonition-bg-color: #f6f8fa;
  --md-footer-bg-color: #24292f;
  --md-footer-bg-color--dark: #1b1f23;

  --md-shadow-z1: 0 1px 3px rgba(31, 35, 40, 0.12);
  --md-shadow-z2: 0 3px 6px rgba(31, 35, 40, 0.15);
  --md-shadow-z3: 0 8px 24px rgba(31, 35, 40, 0.18);

  /* Fix for header in light mode */
  --md-header-bg-color: #f6f8fa;
  --md-header-fg-color: #24292f;
}

/* ============================= */
/* Theme Toggle Icon Fix */
/* ============================= */

/* Ensure theme toggle button is always visible */
.md-header__button.md-icon[for="__palette_1"],
.md-header__button.md-icon[for="__palette_2"] {
  color: var(--md-primary-bg-color) !important;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.md-header__button.md-icon[for="__palette_1"]:hover,
.md-header__button.md-icon[for="__palette_2"]:hover {
  opacity: 1;
}

/* Dark mode toggle icon */
[data-md-color-scheme="slate"] .md-header__button.md-icon {
  color: #c9d1d9 !important;
}

/* Light mode toggle icon - ensure visibility */
[data-md-color-scheme="default"] .md-header__button.md-icon {
  color: #57606a !important;
}

/* ============================= */
/* Left Sidebar Navigation - Enhanced */
/* ============================= */

/* Clean sidebar styling */
.md-sidebar {
  border-right: 1px solid var(--md-default-fg-color--lightest);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

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

/* Main navigation container */
.md-sidebar--primary .md-sidebar__scrollwrap {
  padding: 0.5rem 0;
}

/* Better navigation hierarchy */
.md-nav--primary .md-nav__title,
.md-nav__title {
  font-weight: 700;
  color: var(--md-default-fg-color);
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  margin-bottom: 0.2rem;
}

/* Navigation items */
.md-nav__item {
  padding: 0;
  margin: 0.05rem 0;
}

/* Navigation links - improved */
.md-nav--primary .md-nav__link,
.md-nav__link {
  padding: 0.35rem 0.8rem !important;
  font-size: 0.82rem !important;
  border-radius: 6px;
  margin: 0.1rem 0.4rem;
  transition: all 0.25s ease;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
  font-weight: 400;
  position: relative;
  display: flex;
  align-items: center;
}

/* Hover effect */
.md-nav--primary .md-nav__link:hover,
.md-nav__link:hover {
  background: linear-gradient(90deg, var(--md-default-bg-color--lighter) 0%, var(--md-default-bg-color--light) 100%);
  transform: translateX(2px);
  color: var(--md-accent-fg-color);
}

/* Active link styling */
.md-nav--primary .md-nav__link--active,
.md-nav__link--active {
  background: linear-gradient(90deg, var(--md-accent-fg-color--transparent) 0%, transparent 100%);
  color: var(--md-accent-fg-color);
  font-weight: 500 !important;
}

/* Nested navigation - parent items */
.md-nav__item--nested > .md-nav__link {
  font-weight: 500 !important;
  color: var(--md-default-fg-color);
  background-color: var(--md-default-bg-color--light);
  margin-top: 0.3rem;
  margin-bottom: 0.1rem;
}

/* Nested navigation - expanded indicator */
.md-nav__item--nested > .md-nav__link::after {
  content: "▼";
  position: absolute;
  right: 0.8rem;
  font-size: 0.6rem;
  opacity: 0.5;
  transition: transform 0.3s;
}

.md-nav__item--nested > .md-nav__link[aria-expanded="false"]::after {
  transform: rotate(-90deg);
}

/* Nested navigation container - NO INDENTATION */
.md-nav__item--nested .md-nav {
  margin-left: 0 !important;
  padding-left: 0 !important;
  margin-bottom: 0.3rem;
}

/* Nested items - NO LEFT PADDING */
.md-nav__item--nested .md-nav__link {
  font-size: 0.78rem !important;
  padding: 0.3rem 0.6rem !important;
  margin: 0.05rem 0.2rem;
}

/* Remove all hierarchy indicators from navigation items */
.md-nav__item--nested > .md-nav > .md-nav__list > .md-nav__item > .md-nav__link::before,
.md-nav__item--nested > .md-nav > .md-nav__list > .md-nav__item .md-nav__item--nested > .md-nav > .md-nav__list > .md-nav__item > .md-nav__link::before,
.md-nav__item--nested > .md-nav__link::before {
  content: "" !important;
}

/* ============================= */
/* FORCE COMPLETE REMOVAL OF ALL NAVIGATION INDENTATION */
/* ============================= */

/* Remove ALL padding and margins from navigation lists */
.md-nav__list {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Remove ALL indentation from nested navigation items */
.md-nav__item .md-nav__item {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Remove ALL indentation from navigation links */
.md-nav__item .md-nav__link {
  padding-left: 0.6rem !important;
  margin-left: 0 !important;
}

/* Force nested list containers to have zero left spacing */
.md-nav--primary .md-nav__list .md-nav__list {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Override Material theme default indentation */
.md-nav__list .md-nav__list {
  padding-left: 0 !important;
}

.md-nav__list .md-nav__list .md-nav__list {
  padding-left: 0 !important;
}

/* Ensure primary navigation has no indentation */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Force all navigation items to align left */
.md-sidebar--primary .md-nav__item {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.md-sidebar--primary .md-nav__link {
  margin-left: 0 !important;
}

/* Section separators for main nav items */
.md-nav--primary > .md-nav__list > .md-nav__item:not(:first-child) {
  border-top: 1px solid var(--md-default-fg-color--lightest);
  padding-top: 0.3rem;
  margin-top: 0.3rem;
}

/* External links indicator */
.md-nav__link[href^="http"]::after {
  content: " ↗";
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.2rem;
}

/* Improve scrollbar in sidebar */
.md-sidebar__scrollwrap::-webkit-scrollbar {
  width: 6px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-track {
  background: var(--md-default-bg-color);
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--lighter);
  border-radius: 3px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
  background: var(--md-default-fg-color--light);
}

/* Table of contents (right sidebar) improvements - OPTIMIZED SIZING */
.md-sidebar--secondary .md-toc__link,
.md-nav--secondary .md-toc__link {
  padding: 0.25rem 0.45rem !important;
  font-size: 0.82rem !important;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  line-height: 1.4 !important;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
  font-weight: 400 !important;
}

.md-sidebar--secondary .md-toc__link--active,
.md-nav--secondary .md-toc__link--active {
  border-left-color: var(--md-accent-fg-color);
  color: var(--md-accent-fg-color);
  font-weight: 500 !important;
  background-color: var(--md-accent-fg-color--transparent);
}

.md-sidebar--secondary .md-toc__link:hover,
.md-nav--secondary .md-toc__link:hover {
  color: var(--md-accent-fg-color);
  background-color: var(--md-default-bg-color--lighter);
}

/* Ensure proper spacing between TOC items */
.md-nav--secondary .md-nav__item {
  margin: 0.06rem 0 !important;
  padding: 0 !important;
}

/* Reduce TOC title font size as well */
.md-nav--secondary .md-nav__title {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em !important;
  color: var(--md-default-fg-color--light);
  padding: 0.4rem 0.4rem !important;
}

/* Make nested TOC items even smaller */
.md-nav--secondary .md-nav__item .md-nav__item .md-toc__link,
.md-sidebar--secondary .md-nav__item .md-nav__item .md-toc__link {
  font-size: 0.78rem !important;
  padding-left: 1rem !important;
}

/* Improve TOC container styling */
.md-sidebar--secondary {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

/* Add subtle divider above TOC */
.md-nav--secondary {
  border-top: 1px solid var(--md-default-fg-color--lightest);
  padding-top: 0.5rem !important;
}

/* Force all TOC text to be smaller */
.md-sidebar--secondary *,
.md-nav--secondary * {
  font-size: inherit !important;
}

/* Override any MkDocs default TOC font sizes */
.md-nav--secondary label,
.md-nav--secondary span {
  font-size: 0.82rem !important;
}

/* ============================= */
/* Content Area Enhancements */
/* ============================= */

/* Better header styling */
.md-header {
  box-shadow: var(--md-shadow-z1);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

[data-md-color-scheme="default"] .md-header {
  background-color: var(--md-header-bg-color);
}

/* Code blocks with better contrast */
.md-typeset pre {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
}

.md-typeset code {
  padding: 0.15em 0.3em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Inline code in light mode fix */
[data-md-color-scheme="default"] .md-typeset code {
  background-color: rgba(175, 184, 193, 0.2);
  color: #0550ae;
}

/* Tables with better borders */
.md-typeset table {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  overflow: hidden;
}

.md-typeset table th {
  background-color: var(--md-default-bg-color--light);
  font-weight: 600;
}

/* ============================= */
/* Admonitions */
/* ============================= */

.md-typeset .admonition {
  border-radius: 6px;
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: none;
}

.md-typeset .admonition-title {
  border-radius: 6px 6px 0 0;
  font-weight: 500;
}

/* Success admonition */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: #3fb950;
}

.md-typeset .success > .admonition-title {
  background-color: #3fb9501a;
}

/* ============================= */
/* Search improvements */
/* ============================= */

.md-search__form {
  border-radius: 6px;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.md-search__input {
  font-size: 0.85rem;
}

/* ============================= */
/* Mobile Responsive Improvements */
/* ============================= */

@media screen and (max-width: 76.1875em) {
  .md-nav__link {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

/* ============================= */
/* TL;DR Section Styling */
/* ============================= */

.tldr-section {
  background-color: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.tldr-section h2 {
  color: var(--md-accent-fg-color);
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.tldr-section code {
  display: block;
  margin: 0.5rem 0;
}

.advanced-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--md-accent-fg-color);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.advanced-link:hover {
  opacity: 0.9;
  color: white;
}

/* ============================= */
/* Typography Improvements */
/* ============================= */

.md-typeset {
  line-height: 1.6;
}

.md-typeset h1 {
  font-weight: 600;
  color: var(--md-default-fg-color);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.3rem;
  margin-bottom: 1.5rem;
}

.md-typeset h2 {
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin-top: 2rem;
}

.md-typeset h3 {
  font-weight: 500;
  color: var(--md-default-fg-color--light);
}

/* Key features list styling */
.key-features {
  list-style: none;
  padding-left: 0;
}

.key-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.key-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #3fb950;
  font-weight: bold;
}

/* ============================= */
/* Hide "Made with Material for MkDocs" */
/* ============================= */

/* Hide only MkDocs attribution links */
.md-footer-meta [href*="mkdocs"],
.md-footer-meta [href*="squidfunk"],
.md-footer-meta a[href*="material"],
a[href*="mkdocs.org"],
a[href*="mkdocs-material"],
a[title*="Material for MkDocs"],
a[title*="MkDocs"] {
  display: none !important;
}

/* Show copyright and license */
.md-footer-copyright {
  display: block !important;
  visibility: visible !important;
}

.md-footer-meta__inner {
  visibility: visible !important;
  height: auto !important;
}

/* ============================= */
/* Kodachi Architecture Styles   */
/* ============================= */

/* Architecture Component Variables */
:root, [data-md-color-scheme="default"] {
  /* Light theme architecture colors */
  --arch-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --arch-card-bg: rgba(255, 255, 255, 0.95);
  --arch-card-border: #e5e7eb;
  --arch-card-hover: rgba(102, 126, 234, 0.3);
  --arch-status-complete: #10b981;
  --arch-status-progress: #ef4444;
  --arch-text-primary: #2c3e50;
  --arch-text-secondary: #7f8c8d;
  --arch-accent-blue: #667eea;
  --arch-accent-purple: #764ba2;
  --arch-flow-bg: #f0f4f8;
  --arch-tier-free: #6b7280;
  --arch-tier-premium: #3b82f6;
  --arch-tier-enterprise: #a855f7;
  --arch-master-gradient: linear-gradient(135deg, #667eea, #764ba2);
}

[data-md-color-scheme="slate"] {
  /* Dark theme architecture colors - Elegant & Premium */
  --arch-primary-gradient: linear-gradient(135deg, #1a1b3a 0%, #6b46c1 100%);
  --arch-card-bg: rgba(17, 24, 39, 0.95);
  --arch-card-border: #374151;
  --arch-card-hover: rgba(139, 92, 246, 0.25);
  --arch-status-complete: #10b981;
  --arch-status-progress: #f87171;
  --arch-text-primary: #f3f4f6;
  --arch-text-secondary: #9ca3af;
  --arch-text-muted: #6b7280;
  --arch-accent-blue: #818cf8;
  --arch-accent-purple: #a78bfa;
  --arch-flow-bg: rgba(31, 41, 55, 0.8);
  --arch-tier-free: #94a3b8;
  --arch-tier-premium: #60a5fa;
  --arch-tier-enterprise: #c084fc;
  --arch-master-gradient: linear-gradient(135deg, #000000, #374151);
}

/* Architecture Container */
.architecture-diagram {
  background: var(--md-default-bg-color);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--md-shadow-z2);
  margin-bottom: 30px;
}

.diagram-section {
  margin-bottom: 40px;
}

.section-title {
  background: var(--arch-primary-gradient);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 1.3em;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Deployments Grid */
.deployments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.deployment-card {
  background: linear-gradient(145deg, var(--arch-card-bg), var(--md-default-bg-color));
  border: 2px solid var(--arch-card-border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Enhanced dark theme deployment cards */
[data-md-color-scheme="slate"] .deployment-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(17, 24, 39, 0.95));
  border-color: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(10px);
}

.deployment-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--arch-card-hover);
  border-color: var(--arch-accent-blue);
}

/* Dark theme hover with elegant glow */
[data-md-color-scheme="slate"] .deployment-card:hover {
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35),
              inset 0 0 30px rgba(139, 92, 246, 0.08);
  border-color: var(--arch-accent-purple);
}

.deployment-card h3 {
  color: var(--arch-text-primary);
  margin-bottom: 10px;
  font-size: 1.3em;
  font-weight: 600;
}

.deployment-card .description {
  color: var(--arch-text-secondary);
  font-size: 0.9em;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Phase Badges */
.phase-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
  margin-top: 10px;
  position: relative;
}

/* Consistent style for ALL completed badges - white bg with green border */
.phase-complete,
.phase-complete-alt,
.phase-complete-alt-light,
.phase-complete-inline {
  background: white !important;
  color: var(--arch-status-complete) !important;
  border: 2px solid var(--arch-status-complete) !important;
}

/* Dark theme completed badges - elegant dark green */
[data-md-color-scheme="slate"] .phase-complete,
[data-md-color-scheme="slate"] .phase-complete-alt,
[data-md-color-scheme="slate"] .phase-complete-alt-light,
[data-md-color-scheme="slate"] .phase-complete-inline {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 2px solid #10b981 !important;
}

/* For inline completed badge in section title */
.phase-complete-inline {
  font-size: 0.75em;
  padding: 3px 8px;
  border-radius: 12px;
  margin: 0;
}

.phase-progress {
  background: var(--arch-status-progress);
  color: white;
  border: 2px solid var(--arch-status-progress);
}

/* Dark theme progress badges - elegant dark coral */
[data-md-color-scheme="slate"] .phase-progress {
  background: rgba(248, 113, 113, 0.15) !important;
  color: #f87171 !important;
  border: 2px solid #f87171 !important;
}

/* Status Indicators */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  animation: pulse 2s infinite;
}

.status-complete {
  background: var(--arch-status-complete);
}

.status-progress {
  background: var(--arch-status-progress);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 10px transparent;
    opacity: 0.7;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    opacity: 1;
  }
}

/* Flow Diagram */
.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0;
}

.flow-box {
  background: var(--arch-card-bg);
  border: 3px solid var(--arch-accent-blue);
  border-radius: 12px;
  padding: 20px 30px;
  margin: 10px;
  box-shadow: 0 4px 15px var(--arch-card-hover);
  transition: transform 0.3s ease;
  text-align: center;
}

/* Elegant dark theme flow boxes */
[data-md-color-scheme="slate"] .flow-box {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(17, 24, 39, 0.95));
  border-color: var(--arch-accent-purple);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3),
              inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.flow-box:hover {
  transform: scale(1.05);
}

[data-md-color-scheme="slate"] .flow-box:hover {
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.45),
              inset 0 0 30px rgba(139, 92, 246, 0.1);
}

.flow-box h3 {
  color: var(--arch-text-primary);
  margin-bottom: 10px;
  font-size: 1.2em;
}

.flow-box p {
  color: var(--arch-text-secondary);
  margin: 5px 0;
  font-size: 0.9em;
}

/* Proper list styling for flow boxes */
.flow-box ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  text-align: left;
}

.flow-box ul li {
  color: var(--arch-text-secondary);
  margin: 8px 0;
  padding-left: 25px;
  position: relative;
  line-height: 1.4;
  font-size: 0.9em;
}

.flow-box ul li:before {
  content: "•";
  position: absolute;
  left: 10px;
  color: var(--arch-accent-blue);
  font-weight: bold;
}

/* Special styling for the note */
.flow-box .note {
  color: var(--arch-accent-blue);
  margin-top: 10px;
  font-style: italic;
  font-size: 0.9em;
}

.flow-arrow {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 20px solid var(--arch-accent-blue);
  margin: 10px;
}

/* Master Node Section */
.master-node-section {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: center;
  margin: 30px 0;
}

.master-node {
  background: var(--arch-master-gradient);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px var(--arch-card-hover);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

/* Add subtle glow effect for dark theme */
[data-md-color-scheme="slate"] .master-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 70%);
  pointer-events: none;
}

.master-node h3 {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: white;
}

.master-node ul {
  list-style: none;
  text-align: left;
  padding: 0;
  margin-top: 20px;
}

.master-node li {
  margin: 8px 0;
  padding-left: 20px;
  position: relative;
  color: white;
}

.master-node li:before {
  content: "▶";
  position: absolute;
  left: 0;
  color: white;
}

/* Side Services */
.side-service {
  background: var(--arch-flow-bg);
  border: 2px solid var(--arch-card-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.side-service:hover {
  transform: translateY(-3px);
}

.side-service h4 {
  color: var(--arch-text-primary);
  margin-bottom: 10px;
  font-size: 1.1em;
}

.side-service p {
  color: var(--arch-text-secondary);
  font-size: 0.9em;
  margin-top: 10px;
}

/* Connection Flow */
.connection-flow {
  background: var(--arch-flow-bg);
  border-radius: 12px;
  padding: 25px;
  margin-top: 30px;
  text-align: center;
}

.connection-flow h3 {
  color: var(--arch-text-primary);
  margin-bottom: 20px;
}

.flow-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.flow-step {
  background: var(--arch-card-bg);
  padding: 15px 25px;
  border-radius: 25px;
  box-shadow: 0 3px 10px var(--md-shadow-z1);
  font-weight: bold;
  color: var(--arch-accent-blue);
  border: 2px solid var(--arch-accent-blue);
}

.flow-connector {
  font-size: 1.5em;
  color: var(--arch-accent-blue);
}

/* VPS Tiers */
.vps-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.tier-card {
  background: var(--arch-card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 2px solid var(--arch-card-border);
  transition: all 0.3s ease;
  position: relative;
}

/* Premium dark theme tier cards */
[data-md-color-scheme="slate"] .tier-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(17, 24, 39, 0.95));
  border-color: rgba(139, 92, 246, 0.15);
}

.tier-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--md-shadow-z3);
}

[data-md-color-scheme="slate"] .tier-card:hover {
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3),
              inset 0 0 25px rgba(139, 92, 246, 0.05);
}

.tier-free {
  border-top: 4px solid var(--arch-tier-free);
}

.tier-premium {
  border-top: 4px solid var(--arch-tier-premium);
}

.tier-enterprise {
  border-top: 4px solid var(--arch-tier-enterprise);
}

.tier-card h4 {
  color: var(--arch-text-primary);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.tier-card ul {
  list-style: none;
  color: var(--arch-text-secondary);
  padding: 0;
}

.tier-card li {
  margin: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9em;
}

.tier-card li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--arch-accent-blue);
}

.tier-card .tier-label {
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
  font-size: 0.95em;
}

.tier-free .tier-label {
  color: var(--arch-tier-free);
}

.tier-premium .tier-label {
  color: var(--arch-tier-premium);
}

.tier-enterprise .tier-label {
  color: var(--arch-tier-enterprise);
}

/* Section Title with Badge */
.section-title-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title-flex .phase-badge {
  font-size: 0.75em;
  padding: 3px 8px;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .deployments-grid {
    grid-template-columns: 1fr;
  }

  .master-node-section {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .flow-steps {
    flex-direction: column;
  }

  .vps-tiers {
    grid-template-columns: 1fr;
  }

  .flow-connector {
    transform: rotate(90deg);
  }
}

/* ============================= */
/* Source Code Viewer Modal */
/* ============================= */

/* Source viewer icon styling */
.source-viewer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  opacity: 1;
  background: transparent;
  border: 1px solid transparent;
}

.source-viewer-icon:hover {
  opacity: 1;
  background: var(--md-accent-fg-color--transparent);
  border-color: var(--md-accent-fg-color);
  transform: scale(1.1);
}

.source-viewer-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: all 0.2s ease;
}

/* Light theme - container and icon styling */
[data-md-color-scheme="default"] .source-viewer-icon {
  opacity: 1 !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-md-color-scheme="default"] .source-viewer-icon:hover {
  opacity: 1 !important;
  background: var(--md-accent-fg-color--transparent) !important;
  border-color: var(--md-accent-fg-color) !important;
  transform: scale(1.1);
}

[data-md-color-scheme="default"] .source-viewer-icon svg[stroke] {
  stroke: #000000 !important;
  width: 24px !important;
  height: 24px !important;
  stroke-width: 3 !important;
  opacity: 1 !important;
  fill: none !important;
}

/* Ensure CONSISTENT sizing for ALL SVGs in light theme - matching dark theme exactly */
[data-md-color-scheme="default"] .source-viewer-icon svg {
  stroke: #000000 !important;
  width: 24px !important;
  height: 24px !important;
  stroke-width: 3 !important;
  opacity: 1 !important;
  fill: none !important;
}

/* Additional high-specificity override for light theme global SVG rule */
[data-md-color-scheme="default"] span.source-viewer-icon svg[stroke] {
  stroke-width: 3 !important;
  stroke: #000000 !important;
}

/* ULTIMATE OVERRIDE - Fix light theme opacity issue for currentColor SVGs */
[data-md-color-scheme="default"] span.source-viewer-icon svg[stroke="currentColor"] {
  opacity: 1 !important;
  stroke: #000000 !important;
  stroke-width: 3 !important;
  width: 24px !important;
  height: 24px !important;
  fill: none !important;
}

[data-md-color-scheme="default"] .source-viewer-icon:hover svg {
  stroke: #0969da !important;
  opacity: 1;
}

/* Dark theme - container and icon styling */
[data-md-color-scheme="slate"] .source-viewer-icon {
  opacity: 1 !important;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

[data-md-color-scheme="slate"] .source-viewer-icon:hover {
  opacity: 1 !important;
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: var(--arch-accent-purple) !important;
  transform: scale(1.1);
}

[data-md-color-scheme="slate"] .source-viewer-icon svg {
  stroke: #ffffff !important;
  width: 24px !important;
  height: 24px !important;
  stroke-width: 3 !important;
  opacity: 1 !important;
  fill: none !important;
}

[data-md-color-scheme="slate"] .source-viewer-icon:hover svg {
  stroke: #a78bfa;
  opacity: 1;
}

/* Modal overlay */
.source-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.source-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal container */
.source-modal {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  width: 95vw;
  max-width: 1200px;
  max-height: 90vh;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.source-modal-overlay.active .source-modal {
  transform: scale(1);
}

/* Modal header */
.source-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-bg-color--light);
  border-radius: 12px 12px 0 0;
}

.source-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-modal-title svg {
  width: 18px;
  height: 18px;
  fill: var(--md-accent-fg-color);
}

.source-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Copy button - compact and theme-integrated like Material Design */
.source-modal-btn.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--md-default-fg-color--light);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.source-modal-btn.copy-btn:hover {
  background: var(--md-default-bg-color--lighter);
  color: var(--md-accent-fg-color);
  transform: scale(1.05);
}

.source-modal-btn.copy-btn:active {
  transform: scale(0.95);
}

/* Dark theme copy button */
[data-md-color-scheme="slate"] .source-modal-btn.copy-btn {
  color: var(--md-default-fg-color--light);
}

[data-md-color-scheme="slate"] .source-modal-btn.copy-btn:hover {
  background: var(--md-default-bg-color--lighter);
  color: var(--arch-accent-purple);
}

/* Copied state - success animation */
.source-modal-btn.copy-btn.copied {
  background: var(--md-accent-fg-color);
  color: white;
  transform: scale(1.1);
}

[data-md-color-scheme="slate"] .source-modal-btn.copy-btn.copied {
  background: var(--arch-accent-purple);
}

.source-modal-btn.copy-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: all 0.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Icon animation for copy success */
.source-modal-btn.copy-btn.copied .copy-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

.source-modal-btn.copy-btn.copied .check-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Default icon states */
.source-modal-btn.copy-btn .copy-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.source-modal-btn.copy-btn .check-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

/* Close button - theme-integrated with proper colors */
.source-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--md-default-fg-color--light);
}

.source-modal-close:hover {
  background: var(--md-default-bg-color--lighter);
  color: var(--md-default-fg-color);
  transform: scale(1.05);
}

.source-modal-close:active {
  transform: scale(0.95);
}

/* Dark theme close button */
[data-md-color-scheme="slate"] .source-modal-close {
  color: var(--md-default-fg-color--light);
}

[data-md-color-scheme="slate"] .source-modal-close:hover {
  background: var(--md-default-bg-color--lighter);
  color: var(--md-default-fg-color);
}

.source-modal-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: all 0.2s ease;
}

/* Modal content */
.source-modal-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Gradient fade indicators for scrollable content */
.source-modal-content::before,
.source-modal-content::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.source-modal-content::before {
  top: 0;
  background: linear-gradient(to bottom, var(--md-code-bg-color), transparent);
}

.source-modal-content::after {
  bottom: 0;
  background: linear-gradient(to top, var(--md-code-bg-color), transparent);
}

/* Show fade indicators when content is scrolled */
.source-modal-content.scrolled-top::before {
  opacity: 1;
}

.source-modal-content.scrolled-bottom::after {
  opacity: 1;
}

.source-code-container {
  height: 100%;
  max-height: calc(90vh - 120px); /* Account for header */
  overflow: auto !important;
  padding: 0;
  position: relative;
  scroll-behavior: smooth;
  display: block;
  box-sizing: border-box;
}

/* Force scrollbar visibility and styling - MAXIMUM SPECIFICITY */
.source-modal .source-code-container {
  overflow-y: scroll !important;
  overflow-x: auto !important;
}

/* Custom scrollbar styling for source code container - HIGH SPECIFICITY */
.source-modal .source-code-container::-webkit-scrollbar {
  width: 14px !important;
  height: 14px !important;
  background: transparent;
  -webkit-appearance: none;
}

.source-modal .source-code-container::-webkit-scrollbar-track {
  background: var(--md-code-bg-color) !important;
  border-radius: 7px;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.source-modal .source-code-container::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--light) !important;
  border-radius: 7px;
  border: 2px solid var(--md-code-bg-color);
  transition: background 0.2s ease;
  min-height: 20px;
}

.source-modal .source-code-container::-webkit-scrollbar-thumb:hover {
  background: var(--md-accent-fg-color) !important;
}

.source-modal .source-code-container::-webkit-scrollbar-corner {
  background: var(--md-code-bg-color) !important;
}

/* Dark theme scrollbar - HIGH SPECIFICITY */
[data-md-color-scheme="slate"] .source-modal .source-code-container::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--light) !important;
}

[data-md-color-scheme="slate"] .source-modal .source-code-container::-webkit-scrollbar-thumb:hover {
  background: var(--arch-accent-purple) !important;
}

[data-md-color-scheme="slate"] .source-modal .source-code-container::-webkit-scrollbar-track {
  background: var(--md-code-bg-color) !important;
  border-color: var(--md-default-fg-color--lightest);
}

/* Firefox scrollbar styling - HIGH SPECIFICITY */
.source-modal .source-code-container {
  scrollbar-width: auto !important;
  scrollbar-color: var(--md-default-fg-color--light) var(--md-code-bg-color) !important;
}

[data-md-color-scheme="slate"] .source-modal .source-code-container {
  scrollbar-color: var(--md-default-fg-color--light) var(--md-code-bg-color) !important;
}

.source-code-pre {
  margin: 0;
  padding: 20px 24px;
  background: var(--md-code-bg-color);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--md-code-fg-color);
  white-space: pre;
  border: none;
  border-radius: 0;
  min-height: 100%;
  box-sizing: border-box;
  overflow: visible;
}

/* Loading state */
.source-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--md-default-fg-color--light);
  flex-direction: column;
  gap: 12px;
}

.source-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--md-default-fg-color--lightest);
  border-top: 2px solid var(--md-accent-fg-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error state */
.source-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--md-default-fg-color--light);
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.source-error svg {
  width: 32px;
  height: 32px;
  fill: #ef4444;
}

/* Responsive design */
@media (max-width: 768px) {
  .source-modal {
    width: 98vw;
    max-height: 95vh;
    min-height: 400px;
    margin: 10px;
  }

  .source-modal-header {
    padding: 16px 20px;
  }

  .source-modal-title {
    font-size: 1rem;
  }

  .source-modal-btn.copy-btn {
    width: 32px;
    height: 32px;
  }

  .source-modal-btn.copy-btn svg {
    width: 16px;
    height: 16px;
  }

  .source-modal-close {
    width: 32px;
    height: 32px;
  }

  .source-modal-close svg {
    width: 18px;
    height: 18px;
  }

  .source-code-pre {
    padding: 16px 20px;
    font-size: 12px;
    line-height: 1.4;
  }

  /* Adjust scrollbar for mobile */
  .source-modal .source-code-container::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
  }

  .source-modal .source-code-container {
    max-height: calc(95vh - 100px) !important;
    overflow-y: scroll !important;
    overflow-x: auto !important;
  }
}

/* Syntax highlighting for shell scripts */
.source-code-pre .comment { color: #6a737d; }
.source-code-pre .string { color: #032f62; }
.source-code-pre .keyword { color: #d73a49; font-weight: 600; }
.source-code-pre .variable { color: #6f42c1; }
.source-code-pre .number { color: #005cc5; }

/* Dark theme syntax highlighting */
[data-md-color-scheme="slate"] .source-code-pre .comment { color: #8b949e; }
[data-md-color-scheme="slate"] .source-code-pre .string { color: #a5d6ff; }
[data-md-color-scheme="slate"] .source-code-pre .keyword { color: #ff7b72; font-weight: 600; }
[data-md-color-scheme="slate"] .source-code-pre .variable { color: #ffa657; }
[data-md-color-scheme="slate"] .source-code-pre .number { color: #79c0ff; }

/* ============================= */
/* Security & Privacy OS Comparison Table */
/* ============================= */

.comparison-section {
  background: var(--bg-secondary);
  border-radius: 12px;
  margin: 40px 0;
  border: 1px solid var(--border-accent);
  padding: 30px;
}

.comparison-intro {
  padding: 0 0 25px 0;
  color: var(--text-primary);
  line-height: 1.8;
  text-align: center;
  font-size: 0.85rem;
}

.comparison-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.comparison-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.comparison-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f6f8fa;
}

.comparison-table th {
  background: #f6f8fa;
  color: #24292f;
  font-weight: 600;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 2px solid #d0d7de;
  border-right: 1px solid #d0d7de;
  white-space: nowrap;
  min-width: 120px;
  text-shadow: none;
}

.comparison-table th:first-child {
  min-width: 180px;
  position: sticky;
  left: 0;
  z-index: 11;
  box-shadow: 2px 0 4px var(--shadow-secondary);
}

.comparison-table td {
  padding: 10px;
  border-bottom: 1px solid #d0d7de;
  border-right: 1px solid #d0d7de;
  color: #57606a;
  font-size: 0.72rem;
  background: #ffffff;
}

.comparison-table td:first-child {
  font-weight: 600;
  color: #24292f;
  background: #ffffff;
  position: sticky;
  left: 0;
  z-index: 5;
  box-shadow: 2px 0 4px rgba(0,0,0,0.05);
  white-space: nowrap;
}

.comparison-table tbody tr:hover {
  background: #f6f8fa;
}

.comparison-table tbody tr:hover td {
  background: #f6f8fa;
}

.comparison-table tbody tr:hover td:first-child {
  background: #f6f8fa;
}

/* Dark theme adjustments */
[data-md-color-scheme="slate"] .comparison-table thead {
  background: #161b22;
}

[data-md-color-scheme="slate"] .comparison-table th {
  background: #161b22;
  color: #c9d1d9;
  border-bottom: 2px solid #30363d;
  border-right: 1px solid #30363d;
}

[data-md-color-scheme="slate"] .comparison-table td {
  background: #0d1117;
  color: #8b949e;
  border-bottom: 1px solid #30363d;
  border-right: 1px solid #30363d;
}

[data-md-color-scheme="slate"] .comparison-table td:first-child {
  background: #0d1117;
  color: #c9d1d9;
  box-shadow: 2px 0 4px rgba(0,0,0,0.3);
}

[data-md-color-scheme="slate"] .comparison-table th:first-child {
  box-shadow: 2px 0 4px rgba(0,0,0,0.3);
}

[data-md-color-scheme="slate"] .comparison-table tbody tr:hover {
  background: #161b22;
}

[data-md-color-scheme="slate"] .comparison-table tbody tr:hover td {
  background: #161b22;
}

[data-md-color-scheme="slate"] .comparison-table tbody tr:hover td:first-child {
  background: #161b22;
}

.comparison-note {
  padding: 25px 0 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  border-top: 1px solid var(--border-secondary);
  font-size: 0.75rem;
  margin: 0;
}

.comparison-note strong {
  color: var(--color-blue);
}

/* Table icon styling */
.comparison-table .icon-yes,
.comparison-table .icon-no,
.comparison-table .icon-partial,
.comparison-table .icon-info {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 4px;
}

.comparison-table .icon-yes {
  fill: var(--color-green);
}

.comparison-table .icon-no {
  fill: var(--color-red);
}

.comparison-table .icon-partial {
  fill: var(--color-orange);
}

.comparison-table .icon-info {
  fill: var(--color-blue);
}

/* Responsive mobile */
@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.75rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px 6px;
    min-width: 100px;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child {
    min-width: 140px;
  }

  .comparison-table .icon-yes,
  .comparison-table .icon-no,
  .comparison-table .icon-partial,
  .comparison-table .icon-info {
    width: 16px;
    height: 16px;
  }
}

/* ============================= */
/* Footer License Icon - Inline */
/* ============================= */

.md-footer-license__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-default-fg-color--light);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.md-footer-license__link:hover {
  color: var(--md-accent-fg-color);
  background-color: var(--md-accent-fg-color--transparent);
}

.md-footer-license__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: middle;
}

.md-footer-license__text {
  font-weight: 500;
  font-size: 0.85rem;
}

/* Dark theme adjustments */
[data-md-color-scheme="slate"] .md-footer-license__link {
  color: var(--md-default-fg-color--light);
}

[data-md-color-scheme="slate"] .md-footer-license__link:hover {
  color: var(--arch-accent-purple);
  background-color: rgba(139, 92, 246, 0.15);
}

/* ============================= */
/* License Page Styling */
/* ============================= */

#license-container {
  min-height: 400px;
  padding: 20px 0;
}

.license-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--md-default-fg-color--light);
  gap: 16px;
}

.license-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--md-default-fg-color--lightest);
  border-top: 3px solid var(--md-accent-fg-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.license-content {
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 30px;
  line-height: 1.8;
  color: var(--md-default-fg-color);
}

.license-content h1 {
  color: var(--md-default-fg-color);
  border-bottom: 2px solid var(--md-default-fg-color--lightest);
  padding-bottom: 12px;
  margin-bottom: 24px;
  font-size: 2rem;
}

.license-content h2 {
  color: var(--md-default-fg-color);
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.license-content h3 {
  color: var(--md-default-fg-color--light);
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.license-content p {
  margin-bottom: 16px;
}

.license-content a {
  color: var(--md-accent-fg-color);
  text-decoration: underline;
}

.license-content a:hover {
  opacity: 0.8;
}

.license-content code {
  background: var(--md-default-bg-color--light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.license-content ul,
.license-content ol {
  margin: 16px 0;
  padding-left: 30px;
}

.license-content li {
  margin-bottom: 8px;
}

.license-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--md-default-fg-color--light);
  gap: 16px;
}

.license-error svg {
  color: #ef4444;
  margin-bottom: 8px;
}

.license-error h3 {
  color: var(--md-default-fg-color);
  margin: 0;
  font-size: 1.5rem;
}

.license-error p {
  margin: 8px 0;
  line-height: 1.6;
}

.license-error a {
  color: var(--md-accent-fg-color);
  text-decoration: underline;
}

.license-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  text-align: center;
  color: var(--md-default-fg-color--light);
  font-size: 0.9rem;
}

.license-footer a {
  color: var(--md-accent-fg-color);
  text-decoration: none;
}

.license-footer a:hover {
  text-decoration: underline;
}

/* Dark theme license content */
[data-md-color-scheme="slate"] .license-content {
  background: rgba(30, 41, 59, 0.5);
  border-color: var(--md-default-fg-color--lightest);
}

[data-md-color-scheme="slate"] .license-content code {
  background: rgba(17, 24, 39, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .license-content {
    padding: 20px;
  }

  .license-content h1 {
    font-size: 1.5rem;
  }

  .license-content h2 {
    font-size: 1.2rem;
  }

  .license-content h3 {
    font-size: 1rem;
  }
}