.calculator-main {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1rem, 4vw, 2rem) clamp(4rem, 8vw, 7rem);
}

.calculator-hero {
  max-width: 920px;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.calculator-hero h1 {
  max-width: 880px;
  margin-top: 0.55rem;
  font-size: clamp(3.4rem, 8vw, 7rem);
}

.calculator-hero .hero-deck {
  max-width: 780px;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(25rem, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.calculator-panel,
.results-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 7, 7, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.calculator-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.panel-heading {
  margin-bottom: 1.5rem;
}

.panel-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.panel-heading p {
  margin: 0.65rem 0 0;
  color: #aaa;
  line-height: 1.6;
}

.input-section + .input-section {
  margin-top: 1.7rem;
  padding-top: 1.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-section h3 {
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.calculator-field {
  display: grid;
  gap: 0.42rem;
}

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

.calculator-field label {
  color: #dedede;
  font-size: 0.78rem;
  font-weight: 800;
}

.input-wrap {
  position: relative;
}

.input-wrap span {
  position: absolute;
  top: 50%;
  color: #777;
  font-size: 0.82rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap .prefix {
  left: 0.8rem;
}

.input-wrap .suffix {
  right: 0.8rem;
}

.calculator-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  outline: none;
  background: #101010;
  color: #fff;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.input-wrap.has-prefix input {
  padding-left: 1.7rem;
}

.input-wrap.has-suffix input {
  padding-right: 2rem;
}

.calculator-field input:focus {
  border-color: #ff2929;
  box-shadow: 0 0 0 3px rgba(255, 41, 41, 0.12);
}

.field-help {
  color: #777;
  font-size: 0.7rem;
  line-height: 1.4;
}

.calculator-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

.reset-button {
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: transparent;
  color: #bbb;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.reset-button:hover {
  border-color: #ff2929;
  color: #fff;
}

.results-panel {
  position: sticky;
  top: 108px;
  overflow: hidden;
}

.result-primary {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 31, 31, 0.16), rgba(255, 255, 255, 0.025));
}

.result-primary span,
.result-card span {
  display: block;
  color: #999;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-primary strong {
  display: block;
  margin-top: 0.45rem;
  color: #69dc83;
  font-size: clamp(3.7rem, 8vw, 6.8rem);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.result-primary strong.is-negative {
  color: #ff3b34;
}

.result-primary p {
  margin: 0.8rem 0 0;
  color: #aaa;
  line-height: 1.55;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-card {
  min-width: 0;
  padding: 1.25rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-card:nth-child(3n) {
  border-right: 0;
}

.result-card strong {
  display: block;
  margin-top: 0.45rem;
  color: #f5f5f5;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-variant-numeric: tabular-nums;
}

.breakdown {
  padding: 1.5rem;
}

.breakdown h3 {
  font-size: 0.86rem;
  text-transform: uppercase;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #aaa;
  font-size: 0.82rem;
}

.breakdown-row strong {
  color: #eee;
  font-variant-numeric: tabular-nums;
}

.breakdown-row.total {
  color: #fff;
  font-weight: 900;
}

.results-funnel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.3rem);
  border: 1px solid rgba(255, 41, 41, 0.55);
  border-radius: 8px;
  background: linear-gradient(110deg, rgba(255, 31, 31, 0.14), rgba(255, 255, 255, 0.025));
}

.results-funnel-card h2 {
  max-width: 760px;
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.02;
}

.results-funnel-card p:not(.eyebrow) {
  max-width: 760px;
  margin: 0.75rem 0 0;
  color: #bbb;
  line-height: 1.55;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-top: 1rem;
}

.mini-actions .button {
  min-height: 42px;
  padding-inline: 1rem;
  font-size: 0.78rem;
}

.mini-actions .text-link {
  color: #ff4747;
  font-size: 0.82rem;
  font-weight: 900;
}

.calculator-disclaimer {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 2px solid #ff2929;
  background: rgba(255, 35, 35, 0.055);
  color: #999;
  font-size: 0.75rem;
  line-height: 1.6;
}

.calculator-lead {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(255, 41, 41, 0.5);
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(255, 31, 31, 0.12), rgba(255, 255, 255, 0.025));
}

.calculator-lead h2 {
  max-width: 680px;
  margin-top: 0.5rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
}

.calculator-lead p,
.calculator-lead li {
  color: #bbb;
  line-height: 1.65;
}

.calculator-lead ul {
  display: grid;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  padding-left: 1.2rem;
}

.calculator-lead-form {
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.76);
}

.calculator-lead-form h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.lead-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.calculator-field select,
.calculator-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  outline: none;
  background: #101010;
  color: #fff;
  font: inherit;
}

.calculator-field textarea {
  min-height: 104px;
  resize: vertical;
}

.calculator-field select:focus,
.calculator-field textarea:focus {
  border-color: #ff2929;
  box-shadow: 0 0 0 3px rgba(255, 41, 41, 0.12);
}

.calculator-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  margin: 1rem 0;
  color: #cfcfcf;
  font-size: 0.82rem;
  line-height: 1.45;
}

.calculator-checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: #ff2929;
}

.lead-note {
  margin: 0.9rem 0 0;
  color: #888;
  font-size: 0.72rem;
  line-height: 1.5;
}

.lead-note a {
  color: #ff4747;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calculator-content {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(2rem, 7vw, 6rem);
  margin-top: clamp(4rem, 9vw, 8rem);
  padding-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.calculator-content-intro {
  align-self: start;
}

.calculator-content-body {
  max-width: 760px;
}

.calculator-content-body section + section {
  margin-top: clamp(3.5rem, 7vw, 5.25rem);
}

.calculator-content-body h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
}

.calculator-content-body h3 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.08;
}

.calculator-content-body p,
.calculator-content-body li {
  color: #bbb;
  line-height: 1.8;
}

.calculator-content-body p {
  margin: 1rem 0 0;
}

.calculator-content-body h2 + h3 {
  margin-top: 1.4rem;
}

.calculator-content-body h3 + p {
  margin-top: 0;
}

.calculator-content-body ul {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.calculator-content-body a {
  color: #ff4747;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calculator-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: 2rem;
  border: 1px solid #ff1c1c;
  border-radius: 8px;
  background: linear-gradient(110deg, rgba(255, 16, 16, 0.13), rgba(255, 16, 16, 0.025));
}

.calculator-cta p {
  max-width: 700px;
  margin: 0.65rem 0 0;
  color: #bbb;
  line-height: 1.6;
}

.calculator-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
  min-width: 260px;
}

@media (max-width: 960px) {
  .calculator-shell,
  .calculator-lead,
  .calculator-content {
    grid-template-columns: 1fr;
  }

  .results-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .input-grid,
  .result-grid,
  .lead-form-grid {
    grid-template-columns: 1fr;
  }

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

  .result-card {
    border-right: 0;
  }

  .results-funnel-card,
  .calculator-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .calculator-cta-actions,
  .calculator-cta .button {
    width: 100%;
  }

  .calculator-cta-actions {
    justify-content: stretch;
  }

  .results-funnel-card .mini-actions,
  .mini-actions .button,
  .mini-actions .text-link {
    width: 100%;
  }
}
