.trc-calculator,
.trc-calculator * {
  box-sizing: border-box;
}

.trc-calculator {
  --trc-accent: #f52f46;
  --trc-blue: #2860ff;
  --trc-text: #061229;
  --trc-muted: #9199ad;
  --trc-border: #d5dbe5;
  --trc-surface: #fbfcfe;
  width: min(1080px, calc(100% - 32px));
  margin: 40px auto;
  padding: 24px 24px 30px;
  color: var(--trc-text);
  background: rgba(250, 251, 253, 0.98);
  border: 1px solid #e2e6ed;
  border-radius: 24px;
  box-shadow: 0 28px 54px rgba(30, 42, 66, 0.14);
  font-family: "Poppins", "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.trc-calculator button,
.trc-calculator input,
.trc-calculator select {
  font: inherit;
}

.trc-calculator button,
.trc-calculator a {
  -webkit-tap-highlight-color: transparent;
}

.trc-stepper {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

.trc-stepper__item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  color: #566078;
  background: none;
  border: 0;
  cursor: default;
}

.trc-stepper__number {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #536079;
  background: #fff;
  border: 1px solid #cfd6e1;
  border-radius: 50%;
  transition: 0.22s ease;
}

.trc-stepper__item.is-active .trc-stepper__number {
  color: #fff;
  background: var(--trc-accent);
  border-color: var(--trc-accent);
  font-weight: 700;
}

.trc-stepper__item.is-complete {
  cursor: pointer;
}

.trc-stepper__label {
  white-space: nowrap;
}

.trc-stepper__line {
  flex: 1 1 70px;
  min-width: 28px;
  height: 1.5px;
  margin: 0 11px;
  background: #cfd5df;
}

.trc-panel {
  animation: trc-panel-in 0.25s ease both;
}

.trc-panel[hidden] {
  display: none !important;
}

@keyframes trc-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.trc-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 12px;
  padding: 4px 11px;
  color: var(--trc-accent);
  background: #f3f8ff;
  border: 1px solid #d6e7ff;
  border-radius: 999px;
  font-size: 12px;
}

.trc-calculator h2,
.trc-calculator h3,
.trc-calculator p {
  margin-top: 0;
}

.trc-calculator h2 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.trc-calculator h3 {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 700;
}

.trc-intro,
.trc-note {
  color: var(--trc-muted);
  font-size: 12px;
}

.trc-intro {
  margin-bottom: 17px;
}

.trc-note {
  margin: 14px 0 0;
}

.trc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.trc-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #070f21;
  font-size: 13px;
}

.trc-field--full {
  grid-column: 1 / -1;
}

.trc-field input,
.trc-field select {
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  color: #0a1428;
  background: #fff;
  border: 1px solid var(--trc-border);
  border-radius: 12px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trc-field select {
  padding-right: 34px;
}

.trc-field input::placeholder {
  color: #b0b6c3;
  opacity: 1;
}

.trc-field input:hover,
.trc-field select:hover {
  border-color: #aeb8c8;
}

.trc-field input:focus,
.trc-field select:focus,
.trc-phone:focus-within {
  border-color: var(--trc-blue);
  box-shadow: 0 0 0 1px var(--trc-blue);
}

.trc-field input.is-invalid,
.trc-field select.is-invalid {
  border-color: var(--trc-accent);
  box-shadow: 0 0 0 1px var(--trc-accent);
}

.trc-field small {
  min-height: 16px;
  color: var(--trc-muted);
  font-size: 11px;
}

.trc-phone {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  overflow: hidden;
  height: 40px;
  background: #fff;
  border: 1px solid var(--trc-border);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trc-phone select,
.trc-phone input {
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 0;
}

.trc-phone select {
  padding-left: 10px;
  border-right: 1px solid #e2e5eb;
}

.trc-phone select:focus,
.trc-phone input:focus {
  box-shadow: none;
}

.trc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.trc-actions--end {
  justify-content: flex-end;
}

.trc-actions--results {
  justify-content: flex-start;
  margin-top: 44px;
}

.trc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.trc-btn:hover {
  transform: translateY(-1px);
}

.trc-btn:focus-visible,
.trc-cta a:focus-visible,
.trc-cta button:focus-visible,
.trc-year-tabs button:focus-visible {
  outline: 3px solid rgba(40, 96, 255, 0.25);
  outline-offset: 2px;
}

.trc-btn--primary {
  color: #fff;
  background: var(--trc-accent);
  border: 1px solid var(--trc-accent);
  box-shadow: 0 9px 22px rgba(245, 47, 70, 0.24), 9px 12px 26px rgba(55, 39, 220, 0.15);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--trc-accent) 24%, transparent), 9px 12px 26px rgba(55, 39, 220, 0.15);
}

.trc-btn--primary:hover {
  color: #fff;
  filter: brightness(0.97);
  box-shadow: 0 12px 25px rgba(245, 47, 70, 0.34);
  box-shadow: 0 12px 25px color-mix(in srgb, var(--trc-accent) 34%, transparent);
}

.trc-btn--primary:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.trc-btn--secondary {
  color: #081126;
  background: #fff;
  border: 1px solid #ced5e0;
}

.trc-btn--secondary:hover {
  color: #081126;
  background: #f7f9fc;
}

.trc-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.trc-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.trc-result-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0 16px;
}

.trc-result-card {
  display: flex;
  min-height: 110px;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px 18px;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 30px rgba(26, 29, 43, 0.16);
}

.trc-result-card span,
.trc-result-card small {
  font-size: 12px;
}

.trc-result-card strong {
  display: block;
  margin: 4px 0;
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.trc-result-card--roi {
  background: linear-gradient(135deg, #4c3b42, #a2617a);
}

.trc-result-card--break-even {
  background: linear-gradient(135deg, #ff4245, #651329);
}

.trc-result-card--profit {
  background: linear-gradient(135deg, #9c5cff, #d13cb4);
}

.trc-result-card--ltv {
  background: linear-gradient(135deg, #ff792f, #ef4775);
}

.trc-result-main {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}

.trc-box {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #dce1e9;
  border-radius: 18px;
}

.trc-box__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trc-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  color: #244dff;
  background: #f3f6ff;
  border: 1px solid #ccd7ff;
  border-radius: 999px;
  font-size: 11px;
}

.trc-chart {
  min-height: 276px;
}

.trc-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.trc-year-tabs {
  display: inline-flex;
  padding: 3px;
  background: #f4f6f9;
  border: 1px solid #dce1e8;
  border-radius: 999px;
}

.trc-year-tabs button {
  min-width: 52px;
  padding: 5px 8px;
  color: #596279;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
}

.trc-year-tabs button.is-active {
  color: #1550ff;
  background: #fff;
  box-shadow: 0 1px 5px rgba(33, 43, 63, 0.17);
}

.trc-box dl {
  margin: 0;
}

.trc-box dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 8px;
  font-size: 12px;
}

.trc-box dt,
.trc-box dd {
  margin: 0;
}

.trc-box dd {
  text-align: right;
}

.trc-box dd.is-green { color: #04a838; font-weight: 700; }
.trc-box dd.is-red { color: #f22c35; font-weight: 700; }
.trc-box dd.is-blue { color: #1e59ff; font-weight: 700; }
.trc-box dd.is-purple { color: #812aff; font-weight: 700; }

.trc-totals,
.trc-summary {
  margin-top: 14px;
}

.trc-totals dl > div {
  padding-block: 6px;
}

.trc-summary h3 {
  margin-bottom: 8px;
}

.trc-summary p {
  margin-bottom: 0;
  font-size: 12px;
}

.trc-cta {
  width: min(720px, calc(100% - 60px));
  margin: 30px auto 0;
  padding: 25px 32px;
  color: #fff;
  background: linear-gradient(110deg, #2364ff, #5e39ff 48%, #d319ef);
  border-radius: 18px;
  box-shadow: 0 24px 34px rgba(38, 42, 64, 0.25);
}

.trc-cta h3 {
  margin-bottom: 5px;
  font-size: 19px;
}

.trc-cta p {
  margin-bottom: 16px;
  font-size: 13px;
}

.trc-cta a,
.trc-cta button {
  display: flex;
  width: 100%;
  min-height: 41px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.trc-cta__primary {
  margin-bottom: 8px;
  color: #244dff;
  background: #fff;
  border: 1px solid #fff;
}

.trc-cta__primary:hover {
  color: #244dff;
  background: #f7f8ff;
}

.trc-cta__secondary {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.trc-cta__secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .trc-stepper__label {
    display: none;
  }

  .trc-stepper__line {
    margin-inline: 8px;
  }

  .trc-result-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trc-result-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .trc-calculator {
    width: min(100% - 20px, 1080px);
    margin: 20px auto;
    padding: 18px 14px 22px;
    border-radius: 18px;
  }

  .trc-stepper {
    margin-bottom: 17px;
  }

  .trc-stepper__item {
    gap: 0;
  }

  .trc-stepper__number {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 12px;
  }

  .trc-stepper__line {
    min-width: 8px;
    margin-inline: 5px;
  }

  .trc-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .trc-field--full {
    grid-column: auto;
  }

  .trc-actions {
    margin-top: 20px;
  }

  .trc-result-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trc-result-card {
    min-height: 100px;
  }

  .trc-box {
    padding: 13px;
  }

  .trc-box__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .trc-breakdown .trc-box__heading {
    align-items: stretch;
  }

  .trc-year-tabs {
    align-self: flex-start;
  }

  .trc-chart {
    min-height: 220px;
  }

  .trc-cta {
    width: 100%;
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trc-calculator *,
  .trc-calculator *::before,
  .trc-calculator *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
