@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf9;
  --border: #e2e8f0;
  --border-active: #10b981;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent-primary: #10b981;
  --accent-secondary: #059669;
  --accent-green: #10b981;
  --accent-red: #dc2626;
  --accent-amber: #d97706;
  --accent-blue: #2563eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 0 3px rgba(16,185,129,0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* ============ HEADER ============ */
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1px;
}

.header-brand h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.back-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.back-link:hover { color: var(--accent-primary); }

/* ============ HERO ============ */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 24px 48px;
  text-align: center;
}

.hero h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero h2 .accent {
  color: var(--accent-primary);
}

.hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.hero-cta:hover {
  background: var(--accent-secondary);
  box-shadow: var(--shadow);
}

/* ============ TAB NAVIGATION ============ */
.tab-nav-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.tab-btn.active { background: var(--accent-primary); color: #ffffff; font-weight: 600; }

/* ============ MAIN CONTENT ============ */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.tool-section { display: none; }
.tool-section.active { display: block; animation: fadeIn 0.3s ease; }

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

.section-header {
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 720px;
}

/* ============ CARDS & GRID ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ============ FORM CONTROLS ============ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6a84' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

/* ============ BUTTONS ============ */
.btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover { border-color: var(--text-muted); background: var(--bg-card-hover); }

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ SCENARIO BUTTONS ============ */
.scenario-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.scenario-btn {
  padding: 8px 16px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.scenario-btn:hover {
  background: rgba(16,185,129,0.15);
  border-color: var(--accent-primary);
}

.scenario-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
}

/* ============ TOGGLE SWITCH ============ */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-wrap:last-child { border-bottom: none; }

.toggle-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #ffffff;
}

/* ============ TABLE ============ */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table th:hover { color: var(--text-primary); }

.data-table th.sorted-asc::after { content: ' \2191'; color: var(--accent-primary); }
.data-table th.sorted-desc::after { content: ' \2193'; color: var(--accent-primary); }

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

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

.data-table .rate-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--accent-primary);
}

.data-table .network-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.network-visa {
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
}

.network-mastercard {
  background: rgba(16,185,129,0.12);
  color: var(--accent-secondary);
}

/* Expandable rows */
.expand-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.expand-btn:hover { color: var(--accent-primary); background: rgba(16,185,129,0.08); }
.expand-btn.expanded { transform: rotate(90deg); }

.expand-row { display: none; }
.expand-row.visible { display: table-row; }

.expand-row td {
  padding: 16px 16px 16px 48px;
  background: var(--bg-secondary);
}

.expand-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.expand-content h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.expand-content ul {
  list-style: none;
  font-size: 12px;
  color: var(--text-secondary);
}

.expand-content ul li {
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}

.expand-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* ============ SEARCH & FILTERS ============ */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-bar .form-group {
  margin-bottom: 0;
  min-width: 160px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap .form-input {
  padding-left: 36px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.result-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ============ STATUS BADGES ============ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-pass {
  background: rgba(34,197,94,0.12);
  color: var(--accent-green);
}

.badge-warn {
  background: rgba(16,185,129,0.12);
  color: var(--accent-amber);
}

.badge-fail {
  background: rgba(239,68,68,0.12);
  color: var(--accent-red);
}

.badge-info {
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}

/* ============ PRODUCT INSIGHT ============ */
.product-insight {
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(5,150,105,0.02));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  position: relative;
}

.product-insight::before {
  content: 'PRODUCT INSIGHT';
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--bg-primary);
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--accent-primary);
}

.product-insight p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ VALIDATION RESULTS ============ */
.validation-list {
  list-style: none;
}

.validation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.validation-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.validation-icon.pass { background: rgba(34,197,94,0.15); color: var(--accent-green); }
.validation-icon.warn { background: rgba(16,185,129,0.15); color: var(--accent-amber); }
.validation-icon.fail { background: rgba(239,68,68,0.15); color: var(--accent-red); }

.validation-field {
  font-weight: 500;
  color: var(--text-primary);
}

.validation-detail {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}

/* ============ COST DISPLAY ============ */
.cost-display {
  text-align: center;
  padding: 24px;
}

.cost-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-primary);
}

.cost-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.cost-breakdown {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============ WATERFALL / TIER CASCADE ============ */
.waterfall {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 20px 0;
}

.waterfall-tier {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  opacity: 0.4;
}

.waterfall-tier.active {
  opacity: 1;
  border: 1px solid var(--border);
}

.waterfall-tier.current {
  opacity: 1;
  border: 1px solid var(--accent-primary);
  background: rgba(16,185,129,0.06);
}

.waterfall-tier-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

.waterfall-tier-rate {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent-primary);
}

.waterfall-tier-cost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  min-width: 80px;
  text-align: right;
}

.waterfall-arrow {
  text-align: center;
  color: var(--accent-red);
  font-size: 18px;
  padding: 4px 0;
}

/* ============ COMPARISON CARDS ============ */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.comparison-card.best {
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(34,197,94,0.1);
}

.comparison-card .card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.comparison-card .card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cost-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.cost-line .cost-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.cost-line.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.cost-line.total .cost-value {
  color: var(--accent-primary);
  font-size: 16px;
}

.savings-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
}

.savings-positive {
  background: rgba(34,197,94,0.12);
  color: var(--accent-green);
}

.savings-negative {
  background: rgba(239,68,68,0.12);
  color: var(--accent-red);
}

/* ============ PROGRESS / SCORE ============ */
.score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.score-ring svg {
  transform: rotate(-90deg);
}

.score-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.score-ring .ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
}

/* ============ LINE ITEM EDITOR ============ */
.line-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.line-items-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.line-items-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}

.line-items-table .form-input {
  padding: 6px 8px;
  font-size: 12px;
}

.line-items-table .remove-btn {
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.line-items-table .remove-btn:hover {
  background: rgba(239,68,68,0.12);
}

/* ============ SLIDER ============ */
.slider-group {
  margin: 16px 0;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.slider-group .slider-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

/* ============ CHART CONTAINER ============ */
.chart-container {
  position: relative;
  height: 300px;
  margin: 20px 0;
}

/* ============ TOUR PROMPT ============ */
.tour-prompt {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.5s ease 1.5s forwards;
}

.tour-prompt.dismissed {
  opacity: 0 !important;
  transform: translateY(20px) !important;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.tour-prompt-content {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(16,185,129,0.1);
  max-width: 460px;
  position: relative;
}

.tour-prompt-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.tour-prompt-close:hover { color: var(--text-primary); }

.tour-prompt-icon {
  width: 40px;
  height: 40px;
  background: rgba(16,185,129,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.tour-prompt h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.tour-prompt p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tour-prompt .btn { flex-shrink: 0; }

@media (max-width: 560px) {
  .tour-prompt { left: 16px; right: 16px; bottom: 16px; }
  .tour-prompt-content { max-width: unset; }
}

/* ============ GUIDED TOUR ============ */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  display: none;
}

.tour-overlay.active { display: block; }

.tour-spotlight {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.6);
  border-radius: var(--radius);
  z-index: 1000;
  transition: all 0.4s ease;
  pointer-events: none;
}

.tour-tooltip {
  position: fixed;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius);
  padding: 24px;
  z-index: 1001;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.tour-tooltip h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent-primary);
}

.tour-tooltip p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.tour-progress {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tour-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tour-nav .btn { flex: 1; text-align: center; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-inner p + p {
  margin-top: 8px;
}

.footer-inner .attribution {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero h2 { font-size: 28px; }
  .hero { padding: 40px 24px 32px; }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

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

  .filter-bar { flex-direction: column; }
  .filter-bar .form-group { min-width: unset; width: 100%; }
  .search-input-wrap { min-width: unset; width: 100%; }

  .expand-content { grid-template-columns: 1fr; }

  .section-header h2 { font-size: 20px; }

  .tab-btn { padding: 8px 14px; font-size: 12px; }
}

@media (max-width: 480px) {
  .hero h2 { font-size: 24px; }
  .header-inner { padding: 0 16px; }
  main { padding: 20px 16px 60px; }
  .tab-nav-wrapper { padding: 0 16px; }
  .card { padding: 16px; }
}

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
