/* ===================================================
   css/guide.css — Premium Modern UI for Guide & Manual
   Maharashtra CHS Maintenance Calculator
   =================================================== */

/* ---------- Reading Progress Bar ---------- */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #10b981);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

/* ---------- Layout Architecture ---------- */
.guide-layout-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  position: relative;
}

@media (max-width: 1080px) {
  .guide-layout-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 16px 16px 80px;
  }
}

/* ---------- Sticky Navigation Sidebar ---------- */
.guide-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(20, 23, 40, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
  transition: var(--transition);
}

[data-theme="light"] .guide-sidebar {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.08);
}

.guide-sidebar::-webkit-scrollbar {
  width: 5px;
}
.guide-sidebar::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}

.sidebar-header {
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-1);
  font-weight: 700;
}

.nav-category {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-category-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  padding: 8px 10px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}
.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}
[data-theme="light"] .sidebar-link:hover {
  background: rgba(99, 102, 241, 0.08);
}
.sidebar-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.05));
  font-weight: 600;
  border-left: 3px solid var(--accent-1);
}
[data-theme="light"] .sidebar-link.active {
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.12);
}
.sidebar-link .icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-link .text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-link .badge-num {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.6;
}

.sidebar-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Main Content Area ---------- */
.guide-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- Hero Section Ultra-Premium ---------- */
.guide-hero-v2 {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(20, 23, 40, 0.85) 0%, rgba(26, 30, 56, 0.7) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 44px 36px 36px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .guide-hero-v2 {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 243, 255, 0.9) 100%);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.guide-hero-v2::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}
.guide-hero-v2::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.hero-pill-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.guide-hero-v2 h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}
[data-theme="light"] .guide-hero-v2 h1 {
  background: linear-gradient(135deg, #1e1b4b 30%, #4338ca 70%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guide-hero-v2 p.lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

/* Search Box Container */
.hero-search-wrapper {
  max-width: 680px;
  margin: 0 0 20px;
  position: relative;
  z-index: 2;
}
.hero-search-box {
  display: flex;
  align-items: center;
  background: rgba(13, 15, 26, 0.75);
  border: 1.5px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  padding: 6px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}
[data-theme="light"] .hero-search-box {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}
.hero-search-box:focus-within {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 10px 28px rgba(0, 0, 0, 0.35);
}
.hero-search-icon {
  font-size: 18px;
  color: var(--text-muted);
  margin-right: 12px;
}
.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  padding: 8px 0;
}
.hero-search-input::placeholder {
  color: var(--text-muted);
}
.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 6px;
  display: none;
}
.search-clear-btn:hover {
  color: var(--text-primary);
}
.search-kbd-shortcut {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-left: 8px;
}

/* Quick Search Tags */
.quick-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.quick-tag-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.quick-tag-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-theme="light"] .quick-tag-btn {
  background: rgba(99, 102, 241, 0.06);
}
.quick-tag-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-1px);
}

/* Hero Key Stats / Value Metrics */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.hero-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
[data-theme="light"] .hero-stat-card {
  background: rgba(255, 255, 255, 0.6);
}
.hero-stat-icon {
  font-size: 22px;
}
.hero-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.hero-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

/* Category Filter Bar */
.category-filter-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.category-filter-nav::-webkit-scrollbar {
  display: none;
}
.cat-pill-btn {
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-pill-btn:hover {
  border-color: var(--accent-1);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.cat-pill-btn.active {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* ---------- Section Card Redesign ---------- */
.guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  scroll-margin-top: 88px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
}
[data-theme="light"] .guide-section {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.05);
}
.guide-section:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.guide-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.section-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.guide-section-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}
.guide-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}
.guide-section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 3px;
}
.section-copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.section-copy-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.1);
}

/* Section Subheadings */
.section-subheading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 5-Step Visual Process Timeline ---------- */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.timeline-step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
[data-theme="light"] .timeline-step-card {
  background: rgba(245, 247, 255, 0.8);
}
.timeline-step-card:hover {
  border-color: var(--accent-1);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}
.step-card-num {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-card-icon {
  font-size: 20px;
  margin-bottom: 8px;
}
.step-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.step-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ---------- Modernized Tables ---------- */
.table-responsive-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 20px 0;
  background: rgba(13, 15, 26, 0.4);
}
[data-theme="light"] .table-responsive-container {
  background: #fafbff;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.guide-table th {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
  padding: 13px 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.guide-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
  line-height: 1.55;
}
.guide-table tr:last-child td {
  border-bottom: none;
}
.guide-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
[data-theme="light"] .guide-table tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

/* Formula Box Enhanced */
.formula-box-v2 {
  background: rgba(10, 12, 22, 0.85);
  border: 1px dashed rgba(52, 211, 153, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12.5px;
  color: #34d399;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
[data-theme="light"] .formula-box-v2 {
  background: #f0fdf4;
  border-color: rgba(16, 185, 129, 0.4);
  color: #047857;
}
.formula-text {
  flex: 1;
}
.formula-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s;
}
.formula-copy-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- Callouts Enhanced ---------- */
.callout {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid transparent;
  display: flex;
  gap: 14px;
}
.callout-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.callout-body {
  flex: 1;
}
.callout-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  border-left: 4px solid var(--info);
  color: var(--text-primary);
}
.callout-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  border-left: 4px solid var(--success);
  color: var(--text-primary);
}
.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  border-left: 4px solid var(--warning);
  color: var(--text-primary);
}

/* ---------- Interactive Formula Playground Card ---------- */
.formula-playground {
  background: linear-gradient(135deg, rgba(20, 23, 40, 0.95), rgba(15, 18, 32, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .formula-playground {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.08);
}
.playground-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.playground-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.playground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.calc-field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.calc-field-group input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
[data-theme="light"] .calc-field-group input {
  background: #f8f9ff;
  border-color: #cbd5e1;
}
.calc-field-group input:focus {
  border-color: var(--accent-1);
}
.playground-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
[data-theme="light"] .playground-results {
  background: #f0f4ff;
}
.result-stat-box {
  display: flex;
  flex-direction: column;
}
.result-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.result-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-2);
  margin-top: 2px;
}

/* ---------- Vehicle Parking Interactive Cards ---------- */
.parking-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.parking-tier-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  transition: all 0.2s;
}
[data-theme="light"] .parking-tier-card {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.parking-tier-card:hover {
  border-color: var(--accent-1);
  transform: translateY(-2px);
}
.parking-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.parking-tier-icon {
  font-size: 28px;
}
.parking-rate-badge {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 12px;
  font-weight: 700;
}
.parking-tier-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.parking-tier-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Common Disputes Accordion System ---------- */
.disputes-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}
.dispute-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
[data-theme="light"] .dispute-item {
  background: #ffffff;
}
.dispute-item.open {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.dispute-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
}
.dispute-trigger:hover {
  background: rgba(255, 255, 255, 0.02);
}
.dispute-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.dispute-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  flex-shrink: 0;
}
.dispute-question {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}
.dispute-chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.dispute-item.open .dispute-chevron {
  transform: rotate(180deg);
  color: var(--accent-1);
}
.dispute-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid transparent;
}
[data-theme="light"] .dispute-answer {
  background: #f8faff;
}
.dispute-item.open .dispute-answer {
  max-height: 500px;
  border-top-color: var(--border);
}
.dispute-answer-content {
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.dispute-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  margin-bottom: 8px;
}

/* ---------- Case Study Visual Breakdown Bar ---------- */
.case-study-visual {
  background: rgba(20, 23, 40, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 20px 0;
}
[data-theme="light"] .case-study-visual {
  background: #ffffff;
}
.breakdown-bar-container {
  height: 24px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  margin: 12px 0 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.bar-segment {
  height: 100%;
  transition: opacity 0.2s;
  cursor: pointer;
  position: relative;
}
.bar-segment:hover {
  opacity: 0.85;
}
.bar-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ---------- Floating Mobile Drawer & Back-to-Top ---------- */
.mobile-toc-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--accent-1);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  cursor: pointer;
  z-index: 999;
  align-items: center;
  gap: 8px;
}
@media (max-width: 1080px) {
  .guide-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    z-index: 1000;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .guide-sidebar.open {
    transform: translateX(0);
  }
  .mobile-toc-toggle {
    display: inline-flex;
  }
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
}
.sidebar-backdrop.active {
  display: block;
}

.back-top-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  z-index: 998;
}
.back-top-btn:hover {
  background: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}

/* Toast Notification */
.guide-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(13, 15, 26, 0.95);
  color: #fff;
  border: 1px solid var(--accent-1);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.guide-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Print Optimization */
@media print {
  .site-header, .guide-sidebar, .mobile-toc-toggle, .back-top-btn,
  .hero-search-wrapper, .quick-tags-row, .category-filter-nav,
  .section-copy-btn, .formula-copy-btn, .formula-playground,
  .site-footer a, #readingProgressBar {
    display: none !important;
  }
  .guide-layout-wrapper {
    display: block !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .guide-content {
    gap: 20px !important;
  }
  .guide-section {
    break-inside: avoid;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
    padding: 20px !important;
    margin-bottom: 24px !important;
  }
  .guide-section-title {
    color: #000 !important;
  }
  .guide-table th {
    background: #f0f0f0 !important;
    color: #000 !important;
  }
  .guide-table td {
    color: #222 !important;
    border-color: #eee !important;
  }
  .formula-box-v2 {
    background: #f8f8f8 !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  body::before {
    display: none !important;
  }
}
