/* ========================================
   CALIFORNIA VIRTUAL PRACTICE HUB
   Shared Styles & Components
   ======================================== */

:root {
  /* Primary Theme - Professional Blue + Tech Teal */
  --vp-primary: #1e40af;
  --vp-primary-dark: #1e3a8a;
  --vp-primary-light: #3b82f6;
  --vp-accent: #0891b2;
  --vp-accent-light: #06b6d4;

  /* Status Colors */
  --vp-success: #10b981;
  --vp-success-light: #d1fae5;
  --vp-warning: #f59e0b;
  --vp-warning-light: #fef3c7;
  --vp-danger: #ef4444;
  --vp-danger-light: #fee2e2;
  --vp-info: #3b82f6;
  --vp-info-light: #dbeafe;

  /* Neutrals */
  --vp-dark: #0f172a;
  --vp-dark-lighter: #1e293b;
  --vp-gray-50: #f8fafc;
  --vp-gray-100: #f1f5f9;
  --vp-gray-200: #e2e8f0;
  --vp-gray-300: #cbd5e1;
  --vp-gray-400: #94a3b8;
  --vp-gray-500: #64748b;
  --vp-gray-600: #475569;
  --vp-gray-700: #334155;
  --vp-gray-800: #1e293b;

  /* Callout Colors */
  --callout-default-bg: #f0fdf4;
  --callout-default-border: #10b981;
  --callout-default-text: #166534;
  --callout-redflag-bg: #fef2f2;
  --callout-redflag-border: #ef4444;
  --callout-redflag-text: #991b1b;
  --callout-tactical-bg: #faf5ff;
  --callout-tactical-border: #a855f7;
  --callout-tactical-text: #6b21a8;
  --callout-citation-bg: #eff6ff;
  --callout-citation-border: #3b82f6;
  --callout-citation-text: #1e40af;
  --callout-insight-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --callout-tech-bg: #f1f5f9;
  --callout-tech-border: #94a3b8;
  --callout-tech-text: #475569;
}

/* ========================================
   HUB BAR - Appears on every page
   ======================================== */
.hub-bar {
  background: linear-gradient(135deg, var(--vp-primary) 0%, var(--vp-accent) 100%);
  padding: 10px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hub-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.hub-bar-title:hover {
  opacity: 0.9;
}

.hub-bar-icon {
  font-size: 1.25rem;
}

.hub-bar-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  font-weight: 400;
}

.hub-bar-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hub-bar-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}

.hub-bar-btn:hover {
  background: rgba(255,255,255,0.25);
}

.hub-bar-btn.active {
  background: white;
  color: var(--vp-primary);
}

/* ========================================
   HUB MINI NAV - Sidebar/Drawer
   ======================================== */
.hub-nav {
  background: white;
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 140px;
}

.hub-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vp-gray-500);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hub-nav-item {
  margin-bottom: 4px;
}

.hub-nav-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--vp-gray-700);
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.hub-nav-link:hover {
  background: var(--vp-gray-50);
  color: var(--vp-primary);
}

.hub-nav-link.active {
  background: var(--vp-info-light);
  color: var(--vp-primary);
  border-left-color: var(--vp-primary);
  font-weight: 600;
}

.hub-nav-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hub-nav-text {
  flex: 1;
}

.hub-nav-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--vp-gray-500);
  margin-top: 2px;
}

/* Hub Progress Indicator */
.hub-progress {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--vp-gray-200);
  text-align: center;
}

.hub-progress-text {
  font-size: 0.75rem;
  color: var(--vp-gray-500);
}

.hub-progress-text strong {
  color: var(--vp-primary);
}

/* ========================================
   PAGE TABS - Main content organization
   ======================================== */
.page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--vp-gray-200);
  margin-bottom: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-tab {
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--vp-gray-500);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.page-tab:hover {
  color: var(--vp-primary);
  background: var(--vp-gray-50);
}

.page-tab.active {
  color: var(--vp-primary);
  border-bottom-color: var(--vp-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   CALLOUT BOXES - 6 Types
   ======================================== */

/* Base callout */
.callout {
  padding: 20px 24px;
  border-radius: 12px;
  margin: 24px 0;
  border-left: 4px solid;
}

.callout-icon {
  font-size: 1.25rem;
  margin-right: 8px;
}

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

.callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.callout p + p {
  margin-top: 12px;
}

/* Default - Green checkmark */
.callout-default {
  background: var(--callout-default-bg);
  border-color: var(--callout-default-border);
  color: var(--callout-default-text);
}

/* Red Flag - Warning/Danger */
.callout-redflag {
  background: var(--callout-redflag-bg);
  border-color: var(--callout-redflag-border);
  color: var(--callout-redflag-text);
}

/* Tactical Option - Purple */
.callout-tactical {
  background: var(--callout-tactical-bg);
  border-color: var(--callout-tactical-border);
  color: var(--callout-tactical-text);
}

/* Citation Anchor - Blue */
.callout-citation {
  background: var(--callout-citation-bg);
  border-color: var(--callout-citation-border);
  color: var(--callout-citation-text);
}

.callout-citation a {
  color: inherit;
  font-weight: 600;
}

/* Practitioner Insight - Dark gradient */
.callout-insight {
  background: var(--callout-insight-bg);
  border-color: var(--vp-accent);
  color: white;
  border-radius: 16px;
  border-left-width: 0;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.callout-insight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--vp-accent) 0%, var(--vp-primary) 100%);
}

.callout-insight .callout-title {
  color: var(--vp-accent-light);
}

.callout-insight p {
  color: rgba(255,255,255,0.9);
}

/* Tech Note - Gray */
.callout-tech {
  background: var(--callout-tech-bg);
  border-color: var(--callout-tech-border);
  color: var(--callout-tech-text);
}

.callout-tech code {
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ========================================
   FOLDABLE CARDS - Collapsible sections
   ======================================== */
.foldable-card {
  background: white;
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  margin: 16px 0;
  overflow: hidden;
}

.foldable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  background: var(--vp-gray-50);
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.foldable-header:hover {
  background: var(--vp-gray-100);
}

.foldable-card.open .foldable-header {
  border-bottom-color: var(--vp-gray-200);
}

.foldable-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--vp-gray-800);
}

.foldable-icon {
  font-size: 1.25rem;
}

.foldable-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.foldable-badge.default { background: var(--callout-default-bg); color: var(--callout-default-text); }
.foldable-badge.warning { background: var(--vp-warning-light); color: #92400e; }
.foldable-badge.checklist { background: var(--vp-info-light); color: var(--vp-primary); }

.foldable-toggle {
  font-size: 0.8rem;
  color: var(--vp-gray-400);
  transition: transform 0.3s;
}

.foldable-card.open .foldable-toggle {
  transform: rotate(180deg);
}

.foldable-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.foldable-card.open .foldable-content {
  padding: 20px;
  max-height: 2000px;
}

/* ========================================
   CHECKLIST - Printable checklists
   ======================================== */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--vp-gray-100);
}

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

.checklist-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--vp-gray-300);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.checklist-item.checked .checklist-check {
  background: var(--vp-success);
  border-color: var(--vp-success);
  color: white;
}

.checklist-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--vp-gray-700);
}

.checklist-item.checked .checklist-text {
  text-decoration: line-through;
  color: var(--vp-gray-400);
}

/* ========================================
   SCRIPT BANK - Copy to clipboard
   ======================================== */
.script-bank {
  background: var(--vp-dark);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}

.script-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.script-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vp-gray-300);
  display: flex;
  align-items: center;
  gap: 8px;
}

.script-title-icon {
  font-size: 1rem;
}

.script-copy-btn {
  background: var(--vp-primary);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.script-copy-btn:hover {
  background: var(--vp-primary-light);
}

.script-copy-btn.copied {
  background: var(--vp-success);
}

.script-content {
  padding: 16px 20px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

/* ========================================
   WORKFLOW TOGGLE - Protocol selector
   ======================================== */
.workflow-toggle {
  background: var(--vp-gray-50);
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.workflow-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vp-gray-600);
  margin-bottom: 12px;
}

.workflow-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.workflow-option {
  padding: 10px 20px;
  background: white;
  border: 2px solid var(--vp-gray-200);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--vp-gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.workflow-option:hover {
  border-color: var(--vp-primary);
  color: var(--vp-primary);
}

.workflow-option.active {
  background: var(--vp-primary);
  border-color: var(--vp-primary);
  color: white;
}

.workflow-result {
  background: white;
  border: 1px solid var(--vp-gray-200);
  border-radius: 8px;
  padding: 16px;
  display: none;
}

.workflow-result.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ========================================
   FOR REFERRING COUNSEL CARD
   ======================================== */
.counsel-card {
  background: linear-gradient(135deg, var(--vp-dark) 0%, var(--vp-dark-lighter) 100%);
  border-radius: 16px;
  padding: 32px;
  margin: 40px 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.counsel-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.counsel-card-icon {
  font-size: 2rem;
}

.counsel-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.counsel-card-subtitle {
  font-size: 0.9rem;
  color: var(--vp-gray-400);
}

.counsel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.counsel-section h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vp-accent);
  margin-bottom: 12px;
}

.counsel-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.counsel-section li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--vp-gray-300);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.counsel-section li:last-child {
  border-bottom: none;
}

.counsel-check {
  color: var(--vp-success);
}

.counsel-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.counsel-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.counsel-btn-primary {
  background: linear-gradient(135deg, var(--vp-primary) 0%, var(--vp-accent) 100%);
  color: white;
}

.counsel-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.4);
}

.counsel-btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.counsel-btn-secondary:hover {
  background: rgba(255,255,255,0.15);
}

/* ========================================
   END OF PAGE ROUTING CARDS
   ======================================== */
.hub-routing {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--vp-gray-200);
}

.hub-routing-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vp-gray-500);
  margin-bottom: 20px;
}

.hub-routing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.hub-routing-card {
  background: white;
  border: 2px solid var(--vp-gray-200);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s;
}

.hub-routing-card:hover {
  border-color: var(--vp-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.hub-routing-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hub-routing-card-icon {
  font-size: 1.5rem;
}

.hub-routing-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--vp-gray-800);
}

.hub-routing-card-desc {
  font-size: 0.85rem;
  color: var(--vp-gray-500);
  line-height: 1.5;
}

/* ========================================
   DEADLINE CALCULATOR WIDGET
   ======================================== */
.deadline-calc {
  background: var(--vp-gray-50);
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.deadline-calc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--vp-gray-800);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deadline-calc-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.deadline-calc-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vp-gray-600);
  margin-bottom: 6px;
}

.deadline-calc-field select,
.deadline-calc-field input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--vp-gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--vp-gray-700);
  background: white;
}

.deadline-calc-field select:focus,
.deadline-calc-field input:focus {
  outline: none;
  border-color: var(--vp-primary);
}

.deadline-calc-result {
  background: white;
  border: 2px solid var(--vp-success);
  border-radius: 8px;
  padding: 16px;
  display: none;
}

.deadline-calc-result.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.deadline-calc-result h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vp-success);
  margin-bottom: 12px;
}

.deadline-calc-result ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.deadline-calc-result li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--vp-gray-100);
  font-size: 0.9rem;
}

.deadline-calc-result li:last-child {
  border-bottom: none;
}

.deadline-date {
  font-weight: 700;
  color: var(--vp-primary);
}

/* ========================================
   PRINT STYLES
   ======================================== */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--vp-gray-100);
  color: var(--vp-gray-700);
  border: 1px solid var(--vp-gray-300);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.print-btn:hover {
  background: var(--vp-gray-200);
}

@media print {
  .hub-bar,
  .hub-nav,
  .page-tabs,
  .counsel-card,
  .hub-routing,
  .print-btn,
  .script-copy-btn,
  .foldable-toggle {
    display: none !important;
  }

  .foldable-content {
    max-height: none !important;
    padding: 16px !important;
  }

  .tab-content {
    display: block !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .callout {
    break-inside: avoid;
    border: 1px solid #ccc;
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 900px) {
  .hub-bar-inner {
    flex-direction: column;
    text-align: center;
  }

  .hub-bar-nav {
    justify-content: center;
  }

  .hub-nav {
    position: static;
  }

  .page-tabs {
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }

  .page-tab {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

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

  .counsel-cta {
    flex-direction: column;
  }

  .counsel-btn {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .hub-bar {
    padding: 8px 16px;
  }

  .hub-bar-title {
    font-size: 0.85rem;
  }

  .hub-bar-subtitle {
    display: none;
  }

  .foldable-header {
    padding: 14px 16px;
  }

  .foldable-title {
    font-size: 0.9rem;
  }

  .script-content {
    font-size: 0.8rem;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none; }
.visible { display: block; }

/* ========================================
   ENHANCED VISUAL PRESENTATION
   Tooltips, Headers, Separators & More
   ======================================== */

/* --- TOOLTIP SYSTEM --- */
.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted var(--vp-primary);
  color: var(--vp-primary);
  font-weight: 500;
}

.tooltip::before,
.tooltip::after {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  position: absolute;
  z-index: 100;
}

.tooltip::before {
  content: attr(data-tip);
  background: var(--vp-dark);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  width: max-content;
  max-width: 280px;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.tooltip::after {
  content: '';
  border: 8px solid transparent;
  border-top-color: var(--vp-dark);
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
}

.tooltip:hover::before,
.tooltip:hover::after {
  visibility: visible;
  opacity: 1;
}

/* Tooltip positioned below */
.tooltip-below::before {
  bottom: auto;
  top: calc(100% + 10px);
}

.tooltip-below::after {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: var(--vp-dark);
}

/* --- ENHANCED SECTION HEADERS --- */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--vp-gray-200);
}

.section-header h2,
.section-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2 .emoji,
.section-header h3 .emoji,
h2 .emoji,
h3 .emoji {
  font-size: 1.1em;
  filter: grayscale(0);
}

h2.with-emoji,
h3.with-emoji {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Section numbering badge */
.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--vp-primary) 0%, var(--vp-accent) 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- KEY TAKEAWAYS BOX --- */
.key-takeaways {
  background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 24px 28px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.key-takeaways::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.key-takeaways-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-takeaways ul {
  margin: 0;
  padding-left: 20px;
}

.key-takeaways li {
  color: #78350f;
  padding: 6px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.key-takeaways li::marker {
  color: #f59e0b;
}

/* --- QUICK REFERENCE CARD --- */
.quick-ref {
  background: white;
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  padding: 0;
  margin: 24px 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.quick-ref-header {
  background: linear-gradient(135deg, var(--vp-gray-50) 0%, var(--vp-gray-100) 100%);
  padding: 16px 20px;
  border-bottom: 1px solid var(--vp-gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-ref-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--vp-gray-800);
}

.quick-ref-body {
  padding: 20px;
}

.quick-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.quick-ref-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--vp-gray-50);
  border-radius: 8px;
}

.quick-ref-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.quick-ref-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vp-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-ref-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--vp-gray-800);
}

/* --- VISUAL SEPARATORS --- */
.divider {
  height: 1px;
  background: var(--vp-gray-200);
  margin: 32px 0;
}

.divider-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--vp-primary) 0%, var(--vp-accent) 50%, transparent 100%);
  margin: 40px 0;
}

.divider-dotted {
  border: none;
  border-top: 2px dotted var(--vp-gray-300);
  margin: 32px 0;
}

/* --- CONTENT SECTION BACKGROUNDS --- */
.content-section {
  padding: 32px;
  margin: 24px -32px;
  border-radius: 0;
}

.content-section-light {
  background: var(--vp-gray-50);
  border-top: 1px solid var(--vp-gray-100);
  border-bottom: 1px solid var(--vp-gray-100);
}

.content-section-accent {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.05) 0%, rgba(30, 64, 175, 0.05) 100%);
  border-left: 4px solid var(--vp-accent);
}

/* --- HIGHLIGHT BOX --- */
.highlight-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid var(--vp-primary-light);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.highlight-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--vp-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.highlight-box p {
  color: var(--vp-primary-dark);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- WARNING/DANGER BANNER --- */
.warning-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid var(--vp-danger);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.warning-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-banner-content h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--callout-redflag-text);
}

.warning-banner-content p {
  margin: 0;
  color: var(--callout-redflag-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- TIP/SUCCESS BANNER --- */
.tip-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid var(--vp-success);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.tip-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-banner-content h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--callout-default-text);
}

.tip-banner-content p {
  margin: 0;
  color: var(--callout-default-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- STAT CARDS --- */
.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.stat-card {
  flex: 1;
  min-width: 150px;
  background: white;
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--vp-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--vp-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--vp-gray-600);
  font-weight: 500;
}

/* --- STEP-BY-STEP LIST --- */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.step-item {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--vp-gray-100);
}

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

.step-item::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--vp-primary) 0%, var(--vp-accent) 100%);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.step-content h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--vp-gray-800);
}

.step-content p {
  margin: 0;
  color: var(--vp-gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- INLINE BADGES --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-primary {
  background: var(--vp-info-light);
  color: var(--vp-primary);
}

.badge-success {
  background: var(--vp-success-light);
  color: #166534;
}

.badge-warning {
  background: var(--vp-warning-light);
  color: #92400e;
}

.badge-danger {
  background: var(--vp-danger-light);
  color: #991b1b;
}

.badge-purple {
  background: #f3e8ff;
  color: #7c3aed;
}

/* --- ENHANCED TABLE STYLING --- */
.styled-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--vp-gray-200);
}

.styled-table thead {
  background: linear-gradient(135deg, var(--vp-gray-50) 0%, var(--vp-gray-100) 100%);
}

.styled-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vp-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--vp-gray-200);
}

.styled-table td {
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--vp-gray-700);
  border-bottom: 1px solid var(--vp-gray-100);
}

.styled-table tbody tr:last-child td {
  border-bottom: none;
}

.styled-table tbody tr:hover {
  background: var(--vp-gray-50);
}

/* --- ICON TEXT COMBINATIONS --- */
.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-text .icon {
  font-size: 1.1em;
}

/* --- ACCORDION ENHANCED --- */
.accordion-group {
  border: 1px solid var(--vp-gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}

.accordion-item {
  border-bottom: 1px solid var(--vp-gray-200);
}

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

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--vp-gray-800);
  text-align: left;
  transition: all 0.2s;
}

.accordion-trigger:hover {
  background: var(--vp-gray-50);
}

.accordion-trigger .icon {
  margin-right: 12px;
  font-size: 1.2rem;
}

.accordion-arrow {
  font-size: 0.8rem;
  color: var(--vp-gray-400);
  transition: transform 0.3s;
}

.accordion-item.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-panel {
  max-height: 1000px;
}

.accordion-content {
  padding: 20px;
  background: var(--vp-gray-50);
  border-top: 1px solid var(--vp-gray-200);
}

/* --- PRINT: Hide new decorative elements --- */
@media print {
  .tooltip::before,
  .tooltip::after,
  .stat-card:hover,
  .divider-accent {
    display: none !important;
  }

  .content-section {
    margin: 16px 0;
    padding: 16px;
    background: none !important;
    border: 1px solid #ccc;
  }
}
