/* FranchiseIntel - Report Styles */

:root {
  --navy-900: #0a1628;
  --navy-800: #0f2140;
  --navy-700: #152d54;
  --gold-400: #d4a843;
  --gold-500: #c49a2e;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
}

/* Report container */
.report-container {
  max-width: 900px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Report header */
.report-header {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  border-radius: 16px;
  padding: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.report-header::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand logo placeholder */
.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold-400);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Key metrics row */
.key-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.metric-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-400);
}
.metric-label {
  font-size: 0.75rem;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* Report section */
.report-section {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 1.5rem;
}
.report-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--slate-100);
}
.report-section-title .section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--navy-900);
  color: var(--gold-400);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--slate-200);
}
.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--navy-900);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table .total-row td {
  font-weight: 700;
  border-top: 2px solid var(--slate-200);
  padding-top: 0.85rem;
}

/* Bar chart row (horizontal bars for Item 7) */
.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--slate-100);
}
.bar-chart-row:last-child {
  border-bottom: none;
}
.bar-label {
  width: 180px;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--navy-900);
  font-weight: 500;
}
.bar-track {
  flex: 1;
  height: 24px;
  background: var(--slate-100);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--navy-700), var(--navy-500));
  position: absolute;
  left: 0;
  top: 0;
  transition: width 0.6s ease;
}
.bar-fill-range {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(42, 77, 128, 0.3), var(--navy-500));
  position: absolute;
  top: 0;
  transition: all 0.6s ease;
}
.bar-values {
  width: 160px;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.85rem;
  color: var(--slate-500);
  font-weight: 600;
}
.bar-chart-row.total-bar .bar-label {
  font-weight: 700;
}
.bar-chart-row.total-bar .bar-fill-range {
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.3), var(--gold-500));
}
.bar-chart-row.total-bar .bar-values {
  color: var(--navy-900);
  font-weight: 700;
}

/* Executive Summary Cards */
.executive-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}
.executive-card {
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--slate-200);
}
.executive-card-indicator {
  width: 4px;
  flex-shrink: 0;
}
.executive-card-content {
  padding: 0.85rem 1rem;
  flex: 1;
}
.executive-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.executive-card-text {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.4;
}
.executive-card-green {
  background: var(--green-100);
  border-color: rgba(34, 197, 94, 0.2);
}
.executive-card-green .executive-card-indicator { background: var(--green-500); }
.executive-card-green .executive-card-title { color: #16a34a; }
.executive-card-amber {
  background: var(--amber-100);
  border-color: rgba(245, 158, 11, 0.2);
}
.executive-card-amber .executive-card-indicator { background: var(--amber-500); }
.executive-card-amber .executive-card-title { color: #b45309; }
.executive-card-red {
  background: var(--red-100);
  border-color: rgba(239, 68, 68, 0.2);
}
.executive-card-red .executive-card-indicator { background: var(--red-500); }
.executive-card-red .executive-card-title { color: #dc2626; }

/* Fee comparison */
.fee-comparison {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.fee-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--slate-100);
  border-radius: 10px;
}
.fee-name {
  width: 120px;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--navy-900);
  font-size: 0.9rem;
}
.fee-bar-container {
  flex: 1;
}
.fee-bar {
  height: 10px;
  background: var(--slate-200);
  border-radius: 5px;
  position: relative;
  margin-bottom: 0.35rem;
}
.fee-bar-brand {
  height: 100%;
  border-radius: 5px;
  background: var(--navy-700);
  position: absolute;
  top: 0;
  left: 0;
}
.fee-bar-avg {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 16px;
  background: var(--gold-500);
}
.fee-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--slate-400);
  position: relative;
}
.fee-value-display {
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 700;
  color: var(--navy-900);
  font-size: 1rem;
}

/* Risk indicators */
.risk-flag {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}
.risk-flag:last-child {
  margin-bottom: 0;
}
.risk-flag.risk-high {
  background: var(--red-100);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.risk-flag.risk-medium {
  background: var(--amber-100);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.risk-flag.risk-low {
  background: var(--green-100);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.risk-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.risk-high .risk-icon {
  background: var(--red-500);
  color: #fff;
}
.risk-medium .risk-icon {
  background: var(--amber-500);
  color: #fff;
}
.risk-low .risk-icon {
  background: var(--green-500);
  color: #fff;
}
.risk-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.risk-high .risk-title { color: var(--red-500); }
.risk-medium .risk-title { color: var(--amber-500); }
.risk-low .risk-title { color: #16a34a; }
.risk-desc {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.4;
}

/* Deal breaker cards */
@keyframes dealBreakerSlideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.deal-breakers-section {
  border-color: rgba(239, 68, 68, 0.25);
}

.deal-breaker-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  border-left: 4px solid;
  animation: dealBreakerSlideIn 0.4s ease both;
}
.deal-breaker-card:last-child {
  margin-bottom: 0;
}

.deal-breaker-critical {
  background: #fef2f2;
  border-left-color: #dc2626;
  border-top: 1px solid rgba(239, 68, 68, 0.12);
  border-right: 1px solid rgba(239, 68, 68, 0.12);
  border-bottom: 1px solid rgba(239, 68, 68, 0.12);
}
.deal-breaker-warning {
  background: #fffbeb;
  border-left-color: #d97706;
  border-top: 1px solid rgba(245, 158, 11, 0.15);
  border-right: 1px solid rgba(245, 158, 11, 0.15);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.deal-breaker-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.deal-breaker-critical .deal-breaker-icon {
  background: #dc2626;
  color: #fff;
}
.deal-breaker-warning .deal-breaker-icon {
  background: #d97706;
  color: #fff;
}

.deal-breaker-content {
  flex: 1;
  min-width: 0;
}
.deal-breaker-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.deal-breaker-critical .deal-breaker-title {
  color: #b91c1c;
}
.deal-breaker-warning .deal-breaker-title {
  color: #92400e;
}
.deal-breaker-explanation {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.5;
}

.deal-breaker-ask {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}
.deal-breaker-ask-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-400);
  margin-bottom: 0.25rem;
}
.deal-breaker-ask-text {
  font-size: 0.85rem;
  color: var(--navy-900);
  font-style: italic;
  line-height: 1.4;
}

/* ==========================================
   FDDIntel Score Badge & Breakdown
   ========================================== */

/* Score badge in report header */
.score-badge-header {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.score-ring-fill {
  transition: stroke-dasharray 0.8s ease;
}
.score-badge-green .score-ring-fill { stroke: #22c55e; }
.score-badge-blue .score-ring-fill { stroke: #3b82f6; }
.score-badge-amber .score-ring-fill { stroke: #f59e0b; }
.score-badge-red .score-ring-fill { stroke: #ef4444; }
.score-badge-value {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}
.score-badge-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.score-badge-green .score-badge-label { color: #86efac; }
.score-badge-blue .score-badge-label { color: #93c5fd; }
.score-badge-amber .score-badge-label { color: #fcd34d; }
.score-badge-red .score-badge-label { color: #fca5a5; }

/* Inline score badge in section title */
.score-inline-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}
.score-inline-green { background: var(--green-100); color: #16a34a; }
.score-inline-blue { background: #dbeafe; color: #2563eb; }
.score-inline-amber { background: var(--amber-100); color: #b45309; }
.score-inline-red { background: var(--red-100); color: #dc2626; }

/* Score breakdown grid: radar chart + progress bars */
.score-breakdown-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: center;
}
.score-radar-container {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
}
.score-radar-container canvas {
  max-height: 280px;
}

/* Dimension progress bars */
.score-dimensions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.score-dim-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.score-dim-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-900);
}
.score-dim-bar-track {
  flex: 1;
  height: 8px;
  background: var(--slate-100);
  border-radius: 4px;
  overflow: hidden;
}
.score-dim-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.score-dim-fill-green { background: #22c55e; }
.score-dim-fill-blue { background: #3b82f6; }
.score-dim-fill-amber { background: #f59e0b; }
.score-dim-fill-red { background: #ef4444; }
.score-dim-value {
  width: 44px;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-500);
}

/* ==========================================
   Investment Calculator
   ========================================== */

/* Calculator section: distinct background to differentiate from other sections */
.calc-section {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf4 100%);
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 1.5rem;
}

/* Two-column layout: inputs on left, results on right */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Input panel */
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Individual input group: label + slider/input + value display */
.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.calc-input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calc-input-label span:first-child {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-900);
}
.calc-input-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-500);
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  min-width: 60px;
  text-align: center;
}

/* Custom range slider - track */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--slate-200);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
/* Webkit (Chrome, Safari, Edge) track fill */
.calc-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--slate-200);
}
/* Webkit thumb */
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  margin-top: -7px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.calc-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.4);
  transform: scale(1.1);
}
.calc-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}
/* Firefox track */
.calc-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--slate-200);
  border: none;
}
/* Firefox thumb */
.calc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.calc-slider::-moz-range-thumb:hover {
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.4);
}
/* Focus state */
.calc-slider:focus {
  outline: none;
}
.calc-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2), 0 1px 4px rgba(0, 0, 0, 0.2);
}
.calc-slider:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2), 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Currency/number text input within calculator */
.calc-text-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy-900);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-text-input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.15);
}

/* Select input within calculator (e.g., loan term) */
.calc-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy-900);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}
.calc-select:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.15);
}

/* Loan fields sub-group (indented, with subtle left border) */
.calc-loan-fields {
  padding-left: 1rem;
  border-left: 2px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Results panel: dashboard-style metric cards */
.calc-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Results metric cards grid */
.calc-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

/* Individual result card */
.calc-result-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-align: center;
  transition: border-color 0.15s ease;
}
.calc-result-card:hover {
  border-color: var(--slate-300);
}
.calc-result-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.2;
}
.calc-result-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* Highlighted / hero result card (e.g., net cash flow, payback) */
.calc-result-card-hero {
  background: var(--navy-900);
  border-color: var(--navy-700);
  grid-column: 1 / -1;
}
.calc-result-card-hero .calc-result-value {
  color: var(--gold-400);
  font-size: 1.5rem;
}
.calc-result-card-hero .calc-result-label {
  color: var(--slate-300);
}

/* Positive/negative result value coloring */
.calc-result-positive {
  color: var(--green-500) !important;
}
.calc-result-negative {
  color: var(--red-500) !important;
}

/* Calculator chart container */
.calc-chart-container {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.5rem;
}
.calc-chart-container canvas {
  max-height: 220px;
}

/* Calculator disclaimer */
.calc-disclaimer {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--slate-400);
  line-height: 1.5;
}

/* ==========================================
   Brand Comparison Page
   ========================================== */

/* Page-level container */
.compare-container {
  max-width: 1000px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Brand selector bar */
.compare-selector {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 1.5rem;
}
.compare-selector-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

/* Selected brand pills */
.compare-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.compare-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--navy-900);
  color: #fff;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}
.compare-brand-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--slate-300);
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  line-height: 1;
}
.compare-brand-pill-remove:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Search input within selector */
.compare-search-wrapper {
  position: relative;
  max-width: 400px;
}
.compare-search-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: var(--slate-100);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy-900);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.compare-search-input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.15);
  background: #fff;
}
.compare-search-input::placeholder {
  color: var(--slate-400);
}
.compare-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--slate-400);
  pointer-events: none;
}

/* Search results dropdown */
.compare-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}
.compare-search-result-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.1s ease;
  border-bottom: 1px solid var(--slate-100);
}
.compare-search-result-item:last-child {
  border-bottom: none;
}
.compare-search-result-item:hover {
  background: var(--slate-100);
}
.compare-search-result-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
}
.compare-search-result-meta {
  font-size: 0.7rem;
  color: var(--slate-400);
  margin-top: 0.1rem;
}

/* Comparison data table (row = metric, column = brand) */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 1.5rem;
}
.compare-table thead th {
  padding: 1rem 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.9rem;
  border-bottom: 2px solid var(--slate-200);
  background: var(--slate-100);
}
.compare-table thead th:first-child {
  text-align: left;
  color: var(--slate-500);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.compare-table tbody td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--slate-100);
  color: var(--navy-900);
  font-weight: 500;
}
.compare-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--slate-500);
  font-size: 0.8rem;
}
.compare-table tbody tr:last-child td {
  border-bottom: none;
}
.compare-table tbody tr:hover td {
  background: rgba(10, 22, 40, 0.015);
}

/* Best/worst value cell highlighting */
.compare-cell-best {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  font-weight: 700;
}
.compare-cell-worst {
  background: rgba(239, 68, 68, 0.06);
  color: #dc2626;
  font-weight: 600;
}

/* Brand column header with link */
.compare-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.compare-brand-header-name {
  font-weight: 700;
  color: var(--navy-900);
}
.compare-brand-header-name a {
  color: var(--navy-900);
  text-decoration: none;
  transition: color 0.15s ease;
}
.compare-brand-header-name a:hover {
  color: var(--gold-500);
}
.compare-brand-header-category {
  font-size: 0.7rem;
  color: var(--slate-400);
  font-weight: 500;
}

/* Radar chart container */
.compare-radar-container {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}
.compare-radar-container canvas {
  max-height: 350px;
  margin: 0 auto;
}
.compare-radar-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* Share button */
.compare-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
  transition: all 0.15s ease;
}
.compare-share-btn:hover {
  background: var(--slate-200);
  border-color: var(--slate-300);
}
.compare-share-btn.copied {
  background: var(--green-100);
  border-color: rgba(34, 197, 94, 0.3);
  color: #16a34a;
}

/* Empty state: no brands selected */
.compare-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border: 2px dashed var(--slate-200);
  border-radius: 14px;
  margin-top: 1.5rem;
}
.compare-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--slate-400);
}
.compare-empty-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}
.compare-empty-subtext {
  font-size: 0.85rem;
  color: var(--slate-400);
}

/* Comparison table (existing report page - category comparison) */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.comparison-table th {
  text-align: left;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 0.75rem;
  border-bottom: 2px solid var(--slate-200);
}
.comparison-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--slate-100);
}
.comparison-table tr.highlight td {
  background: rgba(212, 168, 67, 0.06);
  font-weight: 600;
}
.comparison-table .brand-highlight {
  color: var(--navy-800);
  font-weight: 700;
}

/* Chart containers */
.chart-container {
  position: relative;
  width: 100%;
  max-height: 320px;
  margin: 1rem 0;
}
.chart-container canvas {
  max-height: 320px;
}

/* Confidence badge */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}
.confidence-high {
  background: var(--green-100);
  color: #16a34a;
}
.confidence-medium {
  background: var(--amber-100);
  color: #b45309;
}

/* ==========================================
   Similar Brands Section
   ========================================== */

/* Horizontal scroll container */
.similar-brands-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
/* Hide scrollbar but keep functionality */
.similar-brands-scroll::-webkit-scrollbar {
  height: 4px;
}
.similar-brands-scroll::-webkit-scrollbar-track {
  background: var(--slate-100);
  border-radius: 2px;
}
.similar-brands-scroll::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 2px;
}
.similar-brands-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* Individual similar brand card */
.similar-brand-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 160px;
}
.similar-brand-card:hover {
  border-color: var(--gold-400);
  box-shadow: 0 6px 20px rgba(10, 22, 40, 0.08);
  transform: translateY(-3px);
}

/* Card header: brand name + category */
.similar-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
}
.similar-brand-card:hover .similar-brand-name {
  color: var(--gold-500);
}

/* Card metrics row */
.similar-brand-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
}
.similar-brand-metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.similar-brand-metric-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-900);
}
.similar-brand-metric-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Card footer: badges row */
.similar-brand-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Item 19 indicator dot */
.similar-brand-item19 {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--slate-400);
}
.similar-brand-item19-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.similar-brand-item19-dot.available {
  background: var(--green-500);
}
.similar-brand-item19-dot.unavailable {
  background: var(--slate-300);
}

/* "Compare these brands" button */
.similar-brands-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--navy-900);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.similar-brands-compare-btn:hover {
  background: var(--navy-700);
  box-shadow: 0 4px 12px rgba(10, 22, 40, 0.2);
}
.similar-brands-compare-btn svg {
  width: 14px;
  height: 14px;
}

/* Report footer */
.report-footer {
  background: var(--navy-900);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 1.5rem;
  text-align: center;
  color: #fff;
}
.report-footer a {
  color: var(--gold-400);
  text-decoration: none;
  font-weight: 600;
}
.report-footer a:hover {
  text-decoration: underline;
}

/* Print styles */
@media print {
  body {
    background: #fff;
    margin: 0;
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-container {
    max-width: 100%;
    padding: 0;
  }
  .report-header {
    border-radius: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-section {
    break-inside: avoid;
    border: 1px solid #ddd;
    border-radius: 0;
    margin-top: 1rem;
    page-break-inside: avoid;
  }
  .report-footer {
    border-radius: 0;
  }
  .no-print {
    display: none !important;
  }
  .chart-container {
    max-height: 280px;
  }
  .risk-flag, .fee-item, .metric-box, .executive-card, .deal-breaker-card, .deal-breaker-ask, .score-badge-header, .score-inline-badge, .score-dim-bar-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .deal-breaker-card {
    animation: none;
  }
  .score-breakdown-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Calculator: hide interactive elements in print, show static results */
  .calc-section {
    background: #f8fafc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .calc-slider {
    display: none;
  }
  .calc-result-card, .calc-result-card-hero, .calc-chart-container {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* Comparison page: hide selector in print, show data only */
  .compare-selector {
    display: none;
  }
  .compare-table, .compare-cell-best, .compare-cell-worst {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .compare-share-btn {
    display: none;
  }
  /* Similar brands: wrap for print instead of scroll */
  .similar-brands-scroll {
    flex-wrap: wrap;
    overflow: visible;
  }
  .similar-brand-card {
    flex: 0 0 calc(33.33% - 0.75rem);
  }
  .similar-brands-compare-btn {
    display: none;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .report-header {
    padding: 1.5rem;
    border-radius: 0;
  }
  .report-section {
    padding: 1.25rem;
    border-radius: 10px;
  }
  .key-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .bar-label {
    width: 100px;
    font-size: 0.75rem;
  }
  .bar-values {
    width: 120px;
    font-size: 0.75rem;
  }
  .fee-item {
    flex-wrap: wrap;
  }
  .fee-name {
    width: 100%;
  }
  .comparison-table {
    font-size: 0.75rem;
  }

  /* Score: stack vertically on mobile */
  .score-badge-header {
    width: 64px;
    height: 64px;
  }
  .score-badge-value {
    font-size: 1.2rem;
  }
  .score-badge-label {
    font-size: 0.5rem;
  }
  .score-breakdown-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .score-radar-container {
    max-width: 220px;
    margin: 0 auto;
  }
  .score-dim-label {
    width: 110px;
    font-size: 0.75rem;
  }

  /* Calculator: stack vertically on mobile */
  .calc-section {
    padding: 1.25rem;
  }
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .calc-results-grid {
    grid-template-columns: 1fr 1fr;
  }
  .calc-result-value {
    font-size: 1rem;
  }
  .calc-result-card-hero .calc-result-value {
    font-size: 1.25rem;
  }

  /* Comparison page: stack on mobile */
  .compare-container {
    padding: 0 1rem;
  }
  .compare-selector {
    padding: 1rem;
  }
  .compare-search-wrapper {
    max-width: 100%;
  }
  .compare-table {
    font-size: 0.75rem;
  }
  .compare-table thead th {
    padding: 0.65rem 0.5rem;
    font-size: 0.75rem;
  }
  .compare-table tbody td {
    padding: 0.6rem 0.5rem;
  }
  .compare-radar-container {
    padding: 1rem;
  }
  .compare-radar-container canvas {
    max-height: 250px;
  }

  /* Similar brands: partial card peek on mobile */
  .similar-brand-card {
    flex: 0 0 240px;
  }
  .similar-brand-name {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .key-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .bar-chart-row {
    flex-wrap: wrap;
  }
  .bar-label, .bar-values {
    width: 100%;
    text-align: left;
  }
  .bar-track {
    width: 100%;
  }
  /* Comparison page: tighter spacing on very small screens */
  .compare-table {
    font-size: 0.7rem;
  }
  .compare-table thead th {
    padding: 0.5rem 0.35rem;
    font-size: 0.7rem;
  }
  .compare-table tbody td {
    padding: 0.5rem 0.35rem;
  }
  .compare-brand-pill {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
}
