/* =============================================================
   CTS Risk vs Cost Calculator — styles (v2: stepped wizard)
   Uses CSS variables from styles.css. Class names are prefixed
   cts-calc- to avoid collisions.
   ============================================================= */

.cts-calc {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* ============== Header ============== */
.cts-calc-header {
  text-align: center;
  margin-bottom: 28px;
}
.cts-calc-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 14px;
}
.cts-calc-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cts-calc-grad {
  background: linear-gradient(90deg, #3B82F6 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cts-calc-subtitle {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.6;
}
.cts-calc-header-disclaimer {
  font-size: 0.74rem;
  color: var(--text-3);
  max-width: 780px;
  margin: 14px auto 0;
  line-height: 1.55;
  font-style: italic;
}

/* ============== Example banner ============== */
.cts-calc-example-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.13) 0%, rgba(6,182,212,0.10) 100%);
  border: 1.5px solid rgba(59,130,246,0.45);
  border-radius: var(--radius);
  padding: 14px 22px;
  margin: 0 auto 24px;
  max-width: 800px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text);
  transition: opacity 0.35s ease;
}
.cts-calc-example-banner strong {
  color: var(--accent-2);
}
.cts-calc-example-cta {
  color: var(--text-2);
  margin-left: 4px;
}
.cts-calc-example-banner-fade {
  opacity: 0;
}

/* ============== Progress bar ============== */
.cts-calc-progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 0 auto 32px;
  max-width: 720px;
  padding: 0 20px;
}
.cts-calc-progress-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-family: inherit;
  flex-shrink: 0;
}
.cts-calc-progress-dot:disabled {
  cursor: not-allowed;
}
.cts-calc-progress-num {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-2);
  border: 2px solid var(--border);
  border-radius: 50%;
  color: var(--text-3);
  font-size: 0.95rem;
  font-weight: 800;
  transition: all 0.25s ease;
}
.cts-calc-progress-dot.active .cts-calc-progress-num {
  background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  border-color: var(--accent-2);
  color: white;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}
.cts-calc-progress-dot.completed .cts-calc-progress-num {
  background: rgba(34,197,94,0.18);
  border-color: rgba(34,197,94,0.5);
  color: #34D399;
}
.cts-calc-progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.cts-calc-progress-dot.active .cts-calc-progress-label {
  color: var(--text);
}
.cts-calc-progress-dot.completed .cts-calc-progress-label {
  color: var(--text-2);
}
.cts-calc-progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 19px 4px 0;
  align-self: flex-start;
}
@media (max-width: 760px) {
  .cts-calc-progress-label { display: none; }
  .cts-calc-progress { padding: 0 8px; }
}

/* ============== Layout ============== */
.cts-calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 980px) {
  .cts-calc-layout { grid-template-columns: 1fr; }
}

/* ============== Stage (left column) ============== */
.cts-calc-stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.cts-calc-step {
  display: none;
  animation: ctsFadeIn 0.3s ease;
}
.cts-calc-step.active {
  display: block;
}
@keyframes ctsFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cts-calc-step-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.cts-calc-step-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.cts-calc-step-help {
  font-size: 0.95rem;
  color: var(--text-2);
  margin: 0 0 22px;
  line-height: 1.55;
}

.cts-calc-field {
  margin-bottom: 22px;
}
.cts-calc-field:last-child { margin-bottom: 0; }
.cts-calc-field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.cts-calc-field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.cts-calc-field-row label {
  margin-bottom: 0;
}
.cts-calc-output {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.cts-calc-field-note {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 8px;
  font-style: italic;
}

/* Range slider */
.cts-calc input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-card-2);
  border-radius: 4px;
  outline: none;
  margin-top: 10px;
}
.cts-calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 4px 12px rgba(59,130,246,0.5);
}
.cts-calc input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg-card);
}
.cts-calc-range-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 600;
}

/* Select dropdown */
.cts-calc select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%2394A3B8' d='M2 4l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.cts-calc select:hover, .cts-calc select:focus {
  border-color: var(--accent);
  outline: none;
}

/* Radio cards (used in posture, insurance, IT staff) */
.cts-calc-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cts-calc-radio-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cts-calc-radio-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) {
  .cts-calc-radio-grid,
  .cts-calc-radio-grid-3,
  .cts-calc-radio-grid-2 { grid-template-columns: 1fr; }
}
.cts-calc-radio {
  display: block;
  cursor: pointer;
  position: relative;
}
.cts-calc-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cts-calc-radio-content {
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.18s ease;
}
.cts-calc-radio:hover .cts-calc-radio-content {
  border-color: rgba(59,130,246,0.5);
}
.cts-calc-radio input[type="radio"]:checked + .cts-calc-radio-content {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(59,130,246,0.13) 0%, rgba(6,182,212,0.09) 100%);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.16);
}
.cts-calc-radio-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.cts-calc-radio-sub {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 3px;
}
.cts-calc-radio-compact .cts-calc-radio-content {
  padding: 12px 14px;
}

/* Toggles */
.cts-calc-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 760px) {
  .cts-calc-toggles { grid-template-columns: 1fr; }
}
.cts-calc-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.cts-calc-toggle:hover { border-color: rgba(59,130,246,0.4); }
.cts-calc-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cts-calc-toggle-track {
  flex-shrink: 0;
  width: 36px;
  height: 22px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  position: relative;
  margin-top: 2px;
  transition: all 0.2s ease;
}
.cts-calc-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-3);
  border-radius: 50%;
  transition: all 0.2s ease;
}
.cts-calc-toggle input:checked + .cts-calc-toggle-track {
  background: linear-gradient(90deg, #3B82F6 0%, #06B6D4 100%);
  border-color: var(--accent);
}
.cts-calc-toggle input:checked + .cts-calc-toggle-track .cts-calc-toggle-thumb {
  transform: translateX(14px);
  background: white;
}
.cts-calc-toggle-text { display: block; flex: 1; min-width: 0; }
.cts-calc-toggle-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.cts-calc-toggle-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
  line-height: 1.4;
}

/* Step nav buttons */
.cts-calc-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.cts-calc-nav-back, .cts-calc-nav-next {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.cts-calc-nav-back {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.cts-calc-nav-back:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
}
.cts-calc-nav-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cts-calc-nav-next {
  background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  color: white;
  border: none;
  box-shadow: 0 6px 20px rgba(59,130,246,0.35);
}
.cts-calc-nav-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(59,130,246,0.5);
}

/* ============== Results (right column, sticky on desktop) ============== */
.cts-calc-results {
  position: sticky;
  top: 100px;
}
@media (max-width: 980px) {
  .cts-calc-results {
    position: relative;
    top: auto;
  }
}

/* Mobile pill */
.cts-calc-mobile-pill {
  display: none;
}
@media (max-width: 980px) {
  .cts-calc-mobile-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: linear-gradient(135deg, rgba(34,197,94,0.13) 0%, rgba(6,182,212,0.10) 100%);
    border: 2px solid rgba(34,197,94,0.45);
    border-radius: var(--radius);
    padding: 14px 18px;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 16px;
    text-align: left;
  }
  .cts-calc-pill-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-2);
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  .cts-calc-pill-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #34D399;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
  }
  .cts-calc-pill-arrow {
    color: var(--text-3);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
  }
  .cts-calc-mobile-pill.expanded .cts-calc-pill-arrow {
    transform: rotate(180deg);
  }
  .cts-calc-results-body {
    display: none;
  }
  .cts-calc-results-body.mobile-expanded {
    display: flex;
  }
}

.cts-calc-results-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 980px) {
  .cts-calc-results-body { gap: 14px; }
}

/* Risk panel */
.cts-calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cts-calc-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.cts-calc-panel-risk::before {
  background: linear-gradient(90deg, #DC2626 0%, #F97316 100%);
}
.cts-calc-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cts-calc-panel-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(220,38,38,0.15);
  color: #F87171;
  border: 1px solid rgba(220,38,38,0.4);
}
.cts-calc-panel-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}
.cts-calc-panel-sub {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 2px;
}
.cts-calc-stats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cts-calc-stats li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.cts-calc-stats li:last-child {
  border-bottom: none;
}
.cts-calc-stat-label {
  font-size: 0.8rem;
  color: var(--text-2);
  flex: 1;
}
.cts-calc-stat-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cts-calc-stat-warn { color: #F87171; }
.cts-calc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 2px solid var(--border);
  font-size: 0.95rem;
  font-weight: 900;
}
.cts-calc-total-risk span:last-child {
  color: #F87171;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}

/* Side-by-side tier results */
.cts-calc-tier-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 460px) {
  .cts-calc-tier-results { grid-template-columns: 1fr; }
}
.cts-calc-tier-result {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  text-align: center;
  transition: all 0.25s ease;
}
.cts-calc-tier-best-badge {
  display: none;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #34D399 0%, #06B6D4 100%);
  color: #042920;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(34,197,94,0.45);
}
.cts-calc-tier-result.cts-calc-best {
  border-color: rgba(34,197,94,0.55);
  background: linear-gradient(135deg, rgba(34,197,94,0.10) 0%, rgba(6,182,212,0.08) 100%);
  box-shadow: 0 8px 28px rgba(34,197,94,0.18);
}
.cts-calc-tier-result.cts-calc-best .cts-calc-tier-best-badge {
  display: block;
}
.cts-calc-tier-result-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
}
.cts-calc-tier-result-tag {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
}
.cts-calc-tier-result-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0;
  font-size: 0.7rem;
  color: var(--text-2);
}
.cts-calc-tier-result-meta strong {
  color: var(--accent-2);
  font-weight: 800;
}
.cts-calc-tier-result-cost,
.cts-calc-tier-result-savings {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.cts-calc-tier-result-cost .lbl,
.cts-calc-tier-result-savings .lbl {
  font-size: 0.62rem;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.cts-calc-tier-result-cost .val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cts-calc-tier-result-savings .val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #34D399;
  font-variant-numeric: tabular-nums;
}
.cts-calc-tier-result-savings {
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  margin-top: 14px;
  width: 100%;
}

/* Big savings card */
.cts-calc-savings {
  background: linear-gradient(135deg, rgba(34,197,94,0.13) 0%, rgba(6,182,212,0.10) 100%);
  border: 2px solid rgba(34,197,94,0.4);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cts-calc-savings::before {
  content: '';
  position: absolute;
  inset: -50% -50% auto auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(34,197,94,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.cts-calc-savings-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: var(--text-2);
  text-transform: uppercase;
  position: relative;
}
.cts-calc-savings-value {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  margin: 6px 0 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  position: relative;
  color: var(--text-3);
}
.cts-calc-savings-value.cts-calc-pos {
  background: linear-gradient(90deg, #34D399 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cts-calc-savings-note {
  font-size: 0.92rem;
  color: var(--text-2);
  font-weight: 600;
  position: relative;
}
.cts-calc-savings-disclaimer {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 12px;
  font-style: italic;
  position: relative;
}

/* CTAs */
.cts-calc-cta-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .cts-calc-cta-row { grid-template-columns: 1fr; }
}
.cts-calc-cta-secondary,
.cts-calc-cta-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  transition: all 0.18s ease;
  line-height: 1.35;
}
.cts-calc-cta-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.cts-calc-cta-secondary:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.cts-calc-cta-primary {
  background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  color: white;
  border: none;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}
.cts-calc-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59,130,246,0.5);
}
.cts-calc-cta-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}
.cts-calc-cta-text {
  font-size: 0.88rem;
}
.cts-calc-cta-text strong {
  font-size: 1rem;
  display: inline-block;
}
.cts-calc-cta-trust {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.2px;
}

/* ============== Sources accordion ============== */
.cts-calc-sources {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cts-calc-sources-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.cts-calc-sources-toggle:hover { background: var(--bg-card-2); }
.cts-calc-sources-arrow {
  font-size: 1rem;
  color: var(--text-3);
  transition: transform 0.25s ease;
}
.cts-calc-sources-toggle.open .cts-calc-sources-arrow {
  transform: rotate(180deg);
}
.cts-calc-sources-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.cts-calc-sources-body.open {
  max-height: 2400px;
}
.cts-calc-sources-intro {
  padding: 0 22px;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
}
.cts-calc-sources-list {
  margin: 0;
  padding: 8px 22px 8px 44px;
}
.cts-calc-sources-list li {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: 10px;
  line-height: 1.5;
}
.cts-calc-sources-list li strong {
  color: var(--text);
}
.cts-calc-sources-fineprint {
  padding: 12px 22px 22px;
  font-size: 0.76rem;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.55;
  margin: 0;
}
.cts-calc-sources-fineprint strong {
  color: var(--text-2);
}

/* ============== Modal ============== */
.cts-calc-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cts-calc-modal[hidden] {
  display: none;
}
.cts-calc-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.cts-calc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,12,20,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cts-calc-modal-dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 36px 28px;
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s ease;
}
.cts-calc-modal.open .cts-calc-modal-dialog {
  transform: translateY(0) scale(1);
}
@media (max-width: 600px) {
  .cts-calc-modal-dialog {
    padding: 28px 22px 22px;
  }
}
.cts-calc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}
.cts-calc-modal-close:hover {
  border-color: var(--accent);
  color: var(--text);
}
.cts-calc-modal-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.cts-calc-modal-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.cts-calc-modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-2);
  margin: 0 0 18px;
  line-height: 1.55;
}
.cts-calc-modal-summary {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.cts-calc-modal-summary-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.cts-calc-modal-summary-text {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}
.cts-calc-modal-edit {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: 10px;
  font-family: inherit;
}
.cts-calc-modal-edit:hover {
  text-decoration: underline;
}
.cts-calc-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cts-calc-modal-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .cts-calc-modal-field-row { grid-template-columns: 1fr; }
}
.cts-calc-modal-field {
  display: flex;
  flex-direction: column;
}
.cts-calc-modal-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 5px;
}
.cts-calc-modal-field .req {
  color: #F87171;
}
.cts-calc-modal-field .opt {
  color: var(--text-3);
  font-weight: 500;
}
.cts-calc-modal-field input,
.cts-calc-modal-field textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.18s ease;
}
.cts-calc-modal-field input:focus,
.cts-calc-modal-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.cts-calc-modal-field textarea {
  resize: vertical;
}
.cts-calc-modal-submit {
  background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  color: white;
  border: none;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
  transition: all 0.18s ease;
}
.cts-calc-modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59,130,246,0.55);
}
.cts-calc-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.cts-calc-modal-fineprint {
  font-size: 0.74rem;
  color: var(--text-3);
  text-align: center;
  margin: 4px 0 0;
  font-style: italic;
}

/* Modal success */
.cts-calc-modal-success {
  text-align: center;
  padding: 20px 0;
}
.cts-calc-modal-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  border: 2px solid rgba(34,197,94,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #34D399;
  margin: 0 auto 20px;
}
.cts-calc-modal-success h3 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 10px;
}
.cts-calc-modal-success p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 20px;
}
.cts-calc-modal-success-phone {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-2);
  text-decoration: none;
  margin-bottom: 24px;
}
.cts-calc-modal-success-close {
  background: var(--bg-card-2);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cts-calc-modal-success-close:hover {
  border-color: var(--accent);
}

/* Pre-fill banner for the contact form (used by script.js) */
.cts-calc-prefill-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(34,197,94,0.13) 0%, rgba(6,182,212,0.10) 100%);
  border: 1.5px solid rgba(34,197,94,0.4);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--text);
}
.cts-calc-prefill-banner strong {
  color: #34D399;
}
