/* Rate Calculator — tool-specific styles. Loaded only on this tool's pages. */

.rc-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cf-text-primary, #111827);
}

.rc-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
}
.rc-subtitle { color: var(--cf-text-secondary, #6b7280); margin: 0 0 24px; }

.rc-stepper {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.rc-step {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 6px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.rc-step:disabled { cursor: not-allowed; }
.rc-step.done { background: #ddd6fe; color: #4F46E5; }
.rc-step.active { background: #4F46E5; color: white; }

.rc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.rc-card-title { font-size: 20px; font-weight: 600; margin: 0 0 18px; }

.rc-field {
  display: block;
  margin-bottom: 14px;
}
.rc-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rc-input, .rc-slider {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
}
.rc-slider { padding: 0; }

.rc-subtotal {
  padding: 10px 12px;
  background: #f9fafb;
  border-left: 3px solid #4F46E5;
  border-radius: 4px;
  margin: 12px 0;
}

.rc-actions { display: flex; gap: 18px; margin-top: 18px; align-items: center; flex-wrap: wrap; }
.rc-actions-secondary {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.rc-btn-primary, .rc-btn-secondary, .rc-btn-ghost, .rc-btn-danger {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.rc-btn-primary { background: #4F46E5; color: #fff; }
.rc-btn-secondary { background: #fff; color: #4F46E5; border-color: #4F46E5; }
.rc-btn-ghost { background: transparent; color: #6b7280; }
.rc-btn-danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.rc-btn-primary:disabled { background: #c7d2fe; cursor: not-allowed; }
.rc-link { color: #4F46E5; text-decoration: none; font-size: 14px; }

/* Quiet text-link variant — used in .rc-actions-secondary so the action
   row has a single visual primary (Download) and the rest read as utilities. */
.rc-link-quiet {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 8px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
  font-family: inherit;
}
.rc-link-quiet:hover { color: #111827; background: rgba(0,0,0,0.04); }
.rc-link-quiet:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
}
.rc-actions-sep {
  color: #d1d5db;
  font-size: 14px;
  user-select: none;
  padding: 0 2px;
}

/* Section divider — gives the archetype CTA its own beat after the
   recommendations text. Subtler than a card boundary, stronger than a margin. */
.rc-section-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 28px 0 24px;
}

.rc-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 24px; }
.rc-trio-card {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #fff;
  border-radius: 10px;
  padding: 18px;
}
.rc-trio-card .rc-label { color: rgba(255,255,255,.85); }
.rc-rate { font-size: 26px; font-weight: 700; display: block; margin: 6px 0 4px; }
.rc-formula { font-size: 11px; opacity: 0.85; }

.rc-annual {
  margin: -8px 0 20px;
  font-size: 14px;
  color: #4b5563;
  text-align: center;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #4F46E5;
}
.rc-annual strong { color: #111827; font-weight: 700; }

.rc-region-grid {
  margin: 20px 0;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.rc-region-grid h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.rc-region-grid table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rc-region-grid th {
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rc-region-grid td {
  padding: 8px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}
.rc-region-grid tr.is-current {
  background: #eef2ff;
}
.rc-region-grid tr.is-current td {
  font-weight: 600;
  color: #1e1b4b;
}
.rc-region-grid small {
  color: #6b7280;
  font-weight: 400;
}
.rc-pos {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.rc-pos-below { background: #fee2e2; color: #991b1b; }
.rc-pos-low { background: #fef3c7; color: #92400e; }
.rc-pos-market { background: #d1fae5; color: #065f46; }
.rc-pos-premium { background: #ede9fe; color: #5b21b6; }
.rc-pos-gap {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}
.rc-region-caption {
  margin: 12px 0 0;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.rc-annual-projects, .rc-annual-savings {
  margin: 8px 0 0;
  font-size: 13px;
  color: #4b5563;
}
.rc-annual-projects strong, .rc-annual-savings strong {
  color: #111827;
}

.rc-archetype-cta {
  margin: 24px 0 16px;
  padding: 20px 24px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #4F46E5;
}
.rc-archetype-cta h4 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}
.rc-archetype-cta p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
}
.rc-archetype-cta a.rc-btn-primary {
  display: inline-block;
  padding: 9px 18px;
  background: #4F46E5;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
.rc-archetype-cta a.rc-btn-primary:hover {
  background: #4338ca;
}
.rc-archetype-cta--undercharger { border-left-color: #f59e0b; background: #fffbeb; }
.rc-archetype-cta--market { border-left-color: #10b981; background: #ecfdf5; }
.rc-archetype-cta--premium { border-left-color: #7c3aed; background: #f5f3ff; }

.rc-help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.rc-band-wrap { margin: 18px 0; }
.rc-band-title { font-size: 13px; color: #374151; margin-bottom: 8px; }
.rc-band-track {
  position: relative;
  height: 26px;
  border-radius: 13px;
  background: linear-gradient(90deg, #fee2e2 0%, #fef3c7 35%, #d1fae5 65%, #c7d2fe 100%);
}
.rc-band-marker {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 38px;
  background: #111827;
  border-radius: 2px;
}
.rc-band-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #6b7280;
  margin-top: 6px;
}
.rc-band-caption {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 13px;
}

.rc-recommendations { margin: 18px 0; }
.rc-recommendations ol { padding-left: 20px; }
.rc-recommendations li { margin-bottom: 8px; }

.rc-cta-card {
  margin: 28px 0;
  padding: 18px 22px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.rc-table { width: 100%; border-collapse: collapse; }
.rc-table th, .rc-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f3f4f6; }
.rc-table th { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }

.rc-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}
.rc-pill-warning { background: #fef3c7; color: #92400e; }

.rc-banner {
  padding: 12px 16px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  margin-bottom: 18px;
  font-size: 14px;
}

.rc-error {
  padding: 14px 18px;
  background: #fee2e2;
  border-left: 3px solid #ef4444;
  color: #991b1b;
  border-radius: 4px;
}

.rc-disclosure {
  margin-top: 24px;
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.5;
}

.rc-empty {
  text-align: center;
  padding: 48px 18px;
  border: 2px dashed #e5e7eb;
  border-radius: 10px;
}
.rc-breadcrumbs {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
}
.rc-card-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 18px 0;
  font-size: 13px;
}
.rc-card-meta dt { color: #6b7280; }
.rc-card-meta dd { margin: 0; }

@media (max-width: 600px) {
  .rc-trio { grid-template-columns: 1fr; }
  .rc-actions { flex-wrap: wrap; }
}
