/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --border: #e2e6ed;
  --text: #1a1d23;
  --text-secondary: #5f6775;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff4ff;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --gold: #f59e0b;
  --silver: #6b7280;
  --bronze: #b45309;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: white;
  padding: 40px 0 32px;
  text-align: center;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-link:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

.nav-link.active {
  color: white;
  background: rgba(255,255,255,0.15);
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.logo span {
  font-weight: 400;
  opacity: 0.85;
}

.tagline {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 400;
}

/* Steps */
.step {
  padding: 28px 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Inputs */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.input-group label small {
  color: var(--text-secondary);
  font-weight: 400;
}

.input-with-prefix {
  position: relative;
}

.input-with-prefix .prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  pointer-events: none;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
}

.input-with-prefix input {
  padding-left: 38px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Toggle Bar */
.toggle-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  user-select: none;
}

.toggle-label small {
  color: var(--text-secondary);
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  width: 38px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.toggle-label input:checked + .toggle-switch {
  background: var(--primary);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(16px);
}

/* Method Grid */
.method-section {
  margin-bottom: 24px;
}

.method-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.method-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.method-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.method-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.method-card .method-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.method-card .method-detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.method-card .method-check {
  float: right;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.2s;
}

.method-card.selected .method-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Radio Cards */
.payoff-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-card:hover {
  border-color: var(--primary);
}

.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.radio-card input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-card-content {
  display: flex;
  flex-direction: column;
}

.radio-card-content strong {
  font-size: 0.9rem;
}

.radio-card-content span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-add {
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  width: 100%;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Custom Form */
.custom-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 12px;
}

.custom-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.custom-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* Results */
.result-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.2s;
}

.result-card:first-child {
  border-color: var(--success);
  box-shadow: var(--shadow-lg);
}

.result-rank {
  position: absolute;
  top: -10px;
  left: 16px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rank-1 { background: var(--success); color: white; }
.rank-2 { background: var(--primary); color: white; }
.rank-3 { background: var(--silver); color: white; }
.rank-4, .rank-5 { background: var(--border); color: var(--text-secondary); }

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.result-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.result-type {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.result-cost {
  text-align: right;
}

.result-total {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.result-savings {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 500;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.detail-value.good { color: var(--success); }
.detail-value.warning { color: var(--warning); }
.detail-value.danger { color: var(--danger); }

.result-notes {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--warning-light);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--warning);
}

.result-notes.good-note {
  background: var(--success-light);
  color: var(--success);
}

/* Payoff Comparison */
.comparison-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 14px;
}

.payoff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.payoff-table thead {
  background: #f1f3f7;
}

.payoff-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.payoff-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.payoff-table tr.best-row td {
  background: var(--success-light);
  font-weight: 600;
}

/* Custom method tag */
.custom-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 10px;
  margin-right: 8px;
  font-size: 0.85rem;
}

.custom-tag .remove-custom {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

/* Slider */
.slider-group {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.slider-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  margin-bottom: 14px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

.slider-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.preset-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Scenario table inside result card */
.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 12px;
}

.scenario-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.scenario-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f3f7;
}

.scenario-table tr.scenario-highlight td {
  background: var(--primary-light);
  font-weight: 600;
}

.scenario-table tr.scenario-danger td {
  color: var(--danger);
}

.scenario-table .scenario-label {
  font-weight: 500;
}

/* Availability badge */
.availability-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  margin-top: 4px;
}

.avail-anywhere { background: var(--success-light); color: var(--success); }
.avail-partner { background: var(--warning-light); color: var(--warning); }
.avail-both { background: #eff4ff; color: var(--primary); }

/* Annual rewards & fee advice */
.annual-rewards-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.annual-rewards-header {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.annual-rewards-header small {
  font-weight: 400;
  color: var(--text-secondary);
}

.annual-rewards-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.annual-rewards-stats span {
  color: var(--text-secondary);
}

.annual-rewards-stats strong {
  color: var(--success);
}

.fee-advice {
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 6px;
  line-height: 1.4;
}

.fee-advice.good-note {
  background: var(--success-light);
  color: var(--success);
}

.fee-advice.result-notes {
  background: var(--warning-light);
  color: var(--warning);
}

/* Affiliate apply button */
.btn-apply {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--success);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
  text-align: center;
}

.btn-apply:hover {
  background: #047857;
}

/* FTC Disclosure */
.disclosure {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: #f1f3f7;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Credit Score CTA */
.cta-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--primary-light);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 20px;
}

.cta-box strong {
  font-size: 0.95rem;
}

.cta-box span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

/* Empty state hints */
.empty-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
  grid-column: 1 / -1;
  padding: 8px 0;
}

/* Utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
  .header { padding: 28px 0 24px; }
  .logo { font-size: 1.4rem; }
  .method-grid { grid-template-columns: 1fr; }
  .custom-form-grid { grid-template-columns: 1fr; }
  .result-header { flex-direction: column; gap: 8px; }
  .result-cost { text-align: left; }
  .result-details { grid-template-columns: 1fr 1fr; }
  .payoff-table { font-size: 0.75rem; }
  .payoff-table th, .payoff-table td { padding: 8px 10px; }
}

/* Tier headings */
.tier-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 4px;
  padding-top: 20px;
}

.tier-heading:first-child {
  margin-top: 0;
  padding-top: 0;
}

.tier-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

/* Scroll to results animation */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card {
  animation: slideIn 0.3s ease-out;
}

.result-card:nth-child(2) { animation-delay: 0.05s; }
.result-card:nth-child(3) { animation-delay: 0.1s; }
.result-card:nth-child(4) { animation-delay: 0.15s; }
.result-card:nth-child(5) { animation-delay: 0.2s; }

/* Input Row Layout */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .input-row {
    grid-template-columns: 1fr;
  }
}

/* Months Slider */
.months-display {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.months-slider {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.months-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Quick Estimate */
.quick-estimate {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.estimate-row:last-of-type {
  margin-bottom: 0.375rem;
}

.estimate-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.estimate-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.estimate-note {
  font-size: 0.6875rem;
  color: #64748b;
  font-style: italic;
  margin-top: 0.375rem;
  padding-top: 0.375rem;
  border-top: 1px solid #bae6fd;
}

.select-large {
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

/* Collapsible Section */
.step-header.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-header.collapsible h2 {
  flex: 1;
  margin: 0;
}

.step-header.collapsible h2 span.selected-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: none;
  margin-left: 0.5rem;
}

.btn-expand {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-expand:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.methods-content {
  overflow: hidden;
  transition: all 0.3s ease;
}

.methods-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.methods-content:not(.collapsed) {
  max-height: 2000px;
  opacity: 1;
  padding-top: 1rem;
}

/* Best Match Section */
.best-match-section {
  margin: 1.5rem 0 2rem;
}

.best-match-card {
  background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%);
  border: 2px solid var(--success);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.best-match-card .result-card {
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  animation: none;
}

.best-match-card .result-card:first-child {
  border: none;
}

.best-match-why {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--success-light);
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

/* New Card Option */
.new-card-option {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  border: 2px solid #3b82f6;
  border-radius: var(--radius);
}

.new-card-option .tier-heading {
  margin-top: 0;
  padding-top: 0;
  color: #1e40af;
}

.new-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Alternatives Section */
.alternatives-section {
  margin: 2rem 0;
}

.alternatives-section .tier-heading {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Other Periods Section */
.other-periods-section {
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}

.other-periods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.period-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.period-card.selected {
  border-color: var(--success);
  background: var(--success-light);
}

.period-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.period-months {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}

.period-cost {
  font-weight: 700;
  font-size: 1rem;
  color: var(--success);
}

.period-cost.has-interest {
  color: var(--warning);
}

.period-best {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.period-payment {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Compact Results for Mobile */
@media (max-width: 600px) {
  .best-match-card {
    padding: 1rem;
  }
  
  .best-match-card .result-card {
    padding: 0;
  }
  
  .best-match-card .result-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .best-match-card .result-cost {
    text-align: left;
  }
  
  .best-match-card .result-total {
    font-size: 1.5rem;
  }
  
  .best-match-card .result-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .new-card-option {
    padding: 1rem;
  }
  
  .new-card-option .result-card {
    padding: 0.75rem 0;
  }
  
  .alternatives-section .result-card {
    padding: 0.875rem;
  }
  
  .alternatives-section .result-header {
    flex-direction: column;
    gap: 0.375rem;
  }
  
  .alternatives-section .result-cost {
    text-align: left;
  }
  
  .alternatives-section .result-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding-top: 0.625rem;
    margin-top: 0.5rem;
  }
  
  .other-periods-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .period-card {
    padding: 0.625rem;
  }
  
  .scenario-table {
    font-size: 0.7rem;
  }
  
  .scenario-table th,
  .scenario-table td {
    padding: 4px 6px;
  }
}

/* Credit Card APR Display */
.apr-comparison {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.apr-comparison .apr-label {
  color: var(--text-secondary);
}

.apr-comparison .apr-value {
  font-weight: 700;
  color: var(--danger);
}

.apr-comparison .apr-vs {
  color: var(--text-secondary);
}

.apr-comparison .apr-bnpl {
  font-weight: 600;
  color: var(--success);
}

/* Quick Summary Cards (keeping for reference, now Best Match) */
.best-match-section {
  margin: 1.5rem 0 2rem;
}
