.calc-hero {
  color: #fff;
  background:
    radial-gradient(ellipse at 83% 35%, #207ee773, transparent 52%),
    linear-gradient(112deg, #073366 0%, #084997 57%, #1269d5 100%);
  overflow: hidden;
}
.calc-hero-inner {
  min-height: 292px;
  display: grid;
  grid-template-columns: 49% 51%;
  position: relative;
  align-items: center;
}
.calc-intro {
  position: relative;
  z-index: 1;
  padding-block: 33px 36px;
}
.calc-intro h1 {
  margin: 11px 0 12px;
  font-size: clamp(3rem, 4.25vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.calc-intro .eyebrow {
  color: #cce8ff;
}
.calc-intro em {
  color: var(--gold);
  font-weight: 400;
}
.calc-intro > p:last-child {
  max-width: 48ch;
  font-size: 1.02rem;
  line-height: 1.5;
  color: #e4f2ff;
}
.calc-art {
  position: absolute;
  right: -0.5%;
  height: 100%;
  width: 53%;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 9%,
    #000 97%,
    transparent
  );
}
.calc-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  animation: art-entry 0.85s ease-out;
}
@keyframes art-entry {
  from {
    opacity: 0.35;
    transform: translateY(8px) scale(1.025);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.calc-paper {
  --calc-accent: #1269d5;
  --calc-rule: #c9dced;
  --calc-positive: #006c63;
  --calc-negative: #a4283e;
  background: #f5f9ff;
  color: var(--ink);
  padding: clamp(26px, 3vw, 48px) 0 clamp(55px, 5vw, 86px);
}
.sim-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.55fr);
  grid-template-areas: "controls summary" "controls chart";
  align-items: start;
  grid-template-rows: auto 1fr;
  gap: 17px 22px;
}
.sim-card,
.result-band {
  border-radius: 14px;
  border: 1px solid var(--calc-rule);
}
.sim-card {
  padding: clamp(21px, 2.1vw, 32px);
  background: #fff;
  box-shadow: 0 4px 17px #07336609;
}
.inputs {
  grid-area: controls;
  min-width: 0;
}
.input-heading,
.projection-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sim-card h2 {
  font-size: clamp(1.6rem, 2.05vw, 2.12rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 600;
  padding: 6px 0 6px 4px;
}
.reset .icon {
  width: 14px;
  height: 14px;
}
.reset:hover,
.simulate-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.field-label,
.cost-fields label {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 650;
}
.field-label {
  display: block;
  margin: 22px 0 7px;
}
.outlet-picker,
.money-input {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #809cb9;
  border-radius: 7px;
  background: #fff;
  position: relative;
}
.outlet-picker {
  min-height: 58px;
  background: #f5f9ff;
}
.outlet-picker img {
  height: 46px;
  width: 49px;
  object-fit: contain;
  position: absolute;
  left: 7px;
  pointer-events: none;
}
.outlet-picker select {
  width: 100%;
  min-height: 56px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  font: 600 0.99rem var(--sans);
  appearance: none;
  padding: 0 34px 0 64px;
  cursor: pointer;
}
.outlet-picker > .icon {
  position: absolute;
  right: 12px;
  pointer-events: none;
  width: 16px;
  height: 16px;
}
select:focus-visible,
.calc-paper input:focus-visible,
.table-scroll:focus-visible {
  outline: 2px solid var(--calc-accent);
  outline-offset: 2px;
}
.preset-field {
  border: 0;
  padding: 0;
  margin: 21px 0 0;
  min-width: 0;
}
.preset-field legend {
  margin: 0 0 7px;
  padding: 0;
}
.presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  background: #edf5ff;
  border: 1px solid var(--calc-rule);
  border-radius: 8px;
}
.presets button {
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 7px 3px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.presets button[aria-pressed="true"] {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
  box-shadow: 0 2px 5px #07336624;
}
.presets button:hover:not([aria-pressed="true"]) {
  background: #d5e8fc;
}
.money-input {
  padding: 0 11px;
  gap: 7px;
}
.money-input > span:first-child,
.money-input > span:last-child:not(.money-display) {
  font-size: 0.91rem;
  color: var(--muted);
}
.money-input input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  background: transparent;
  color: var(--ink);
  font: 500 0.96rem var(--sans);
  border: 0;
  outline: none !important;
  -moz-appearance: textfield;
  appearance: textfield;
}
.money-input input::-webkit-inner-spin-button,
.money-input input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.money-input:focus-within {
  box-shadow: 0 0 0 2px var(--calc-accent);
  border-color: var(--calc-accent);
}
.formatted-field input:not(:focus) {
  color: transparent;
}
.money-input .money-display {
  position: absolute;
  left: 39px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.2;
}
.formatted-field input:focus + .money-display {
  display: none;
}
.revenue-input input,
.revenue-input .money-display {
  font-size: 1.15rem;
  font-weight: 650;
}
.revenue-range {
  --filled: 20%;
  display: block;
  width: 100%;
  margin: 10px 0 0;
  height: 21px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  accent-color: var(--calc-accent);
}
.revenue-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--calc-accent) var(--filled),
    #cbdcf0 var(--filled)
  );
}
.revenue-range::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: #cbdcf0;
}
.revenue-range::-moz-range-progress {
  background: var(--calc-accent);
  height: 4px;
}
.revenue-range::-webkit-slider-thumb {
  appearance: none;
  border-radius: 50%;
  height: 17px;
  width: 17px;
  margin-top: -6.5px;
  background: var(--calc-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #1661a7;
}
.range-limits {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.cost-settings,
.receipt {
  border-top: 1px solid var(--calc-rule);
  margin-top: 20px;
}
.cost-settings summary,
.receipt summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--gold-dark);
  padding: 15px 0 0;
  font-size: 0.91rem;
  font-weight: 650;
}
.cost-settings summary > span,
.receipt summary > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cost-settings .icon,
.receipt .icon {
  width: 16px;
  height: 16px;
}
.chev {
  transition: transform 0.25s;
}
details[open] > summary .chev {
  transform: rotate(180deg);
}
.cost-fields {
  display: grid;
  gap: 5px;
  margin-top: 15px;
}
.cost-fields label {
  font-size: 0.85rem;
  margin-top: 6px;
}
.cost-fields > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}
.invalid-msg,
.noscript {
  font-size: 0.89rem;
  color: var(--calc-negative);
  margin-top: 13px;
}
.result-jump {
  display: none;
}
.result-band {
  grid-area: summary;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  column-gap: 18px;
  padding: clamp(20px, 1.8vw, 28px) clamp(22px, 2.1vw, 32px);
  background: linear-gradient(112deg, #dcecff, #f2f8ff);
  border-color: #a5c7ec;
  position: relative;
  overflow: hidden;
}
.primary-result h2 {
  font: 650 0.92rem var(--sans);
  color: var(--night);
  display: flex;
  align-items: center;
  gap: 6px;
}
.primary-result h2 .icon {
  width: 17px;
  height: 17px;
}
.big-payback {
  font-family: var(--serif);
  letter-spacing: -0.05em;
  line-height: 1.1;
  white-space: nowrap;
}
.big-payback #payback-value {
  display: inline-block;
  font-size: clamp(3rem, 4.15vw, 4.35rem);
  color: var(--gold-dark);
}
.big-payback #payback-unit {
  font-style: italic;
  font-size: 1.6rem;
  color: var(--gold-dark);
}
.side-results {
  display: grid;
  gap: 8px;
  border-left: 1px solid #9dbfe4;
  padding-left: clamp(14px, 2vw, 30px);
}
.side-results div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.side-results dt {
  font-size: 0.81rem;
  color: var(--muted);
}
.side-results dd {
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--ink);
  white-space: nowrap;
}
.side-results #monthly-profit {
  color: var(--calc-positive);
}
.no-payback .big-payback {
  white-space: normal;
}
.no-payback .big-payback #payback-value {
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  color: var(--calc-negative);
  margin-top: 5px;
}
.no-payback .side-results #monthly-profit {
  color: var(--calc-negative);
}
#loss-message {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--calc-negative);
  margin-top: 10px;
}
.projection {
  grid-area: chart;
  min-width: 0;
}
.chart-key {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.81rem;
}
.chart-key i {
  width: 16px;
  height: 3px;
  background: var(--calc-positive);
  border-radius: 5px;
}
.chart-intro {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
}
.projection payback-chart {
  display: block;
}
.projection payback-chart[hidden] {
  display: none;
}
.receipt {
  margin-top: 15px;
}
.receipt dl {
  margin: 13px 0 0;
}
.receipt dl > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.receipt dl > div[data-key="profit"] {
  font-weight: 700;
  border-top: 1px solid var(--calc-rule);
  padding-top: 7px;
  color: var(--ink);
}
.receipt > p {
  font-size: 0.87rem;
  color: var(--muted);
  margin-top: 10px;
}
.compare {
  padding-top: clamp(45px, 5.3vw, 82px);
}
.compare-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 22px;
}
.compare-heading .eyebrow {
  color: var(--gold-dark);
}
.compare-heading h2 {
  margin-top: 10px;
  line-height: 1.06;
  font-size: clamp(2.2rem, 3.65vw, 3.7rem);
  letter-spacing: -0.045em;
}
.compare-heading em {
  color: var(--gold-dark);
}
.compare-heading > p {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 37ch;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--calc-rule);
  border-radius: 11px;
  background: #fff;
}
.table-scroll table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}
.table-scroll th,
.table-scroll td {
  padding: 12px 20px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--calc-rule);
}
.table-scroll thead th {
  color: #fff;
  background: var(--night);
}
.table-scroll th:first-child {
  text-align: left;
}
.table-scroll tbody th {
  font-weight: 500;
}
.table-scroll tbody tr:nth-child(even) {
  background: #f3f8fe;
}
.table-scroll tr[data-key="profit"],
.table-scroll tr[data-key="payback"] {
  background: #dcecff !important;
  color: var(--night);
  font-weight: 700;
}
.table-scroll tr[data-key="profit"] th,
.table-scroll tr[data-key="payback"] th {
  font-weight: 700;
}
.table-scroll tr:last-child > * {
  border: 0;
}
.method {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 100ch;
}
.method strong {
  color: var(--ink);
}
.sr-only {
  position: absolute;
  height: 1px;
  width: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1080px) and (min-width: 761px) {
  .calc-hero-inner {
    min-height: 265px;
  }
  .sim-workspace {
    grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.27fr);
    gap: 14px;
  }
  .side-results div {
    display: block;
  }
  .side-results dd {
    font-size: 0.94rem;
  }
  .side-results {
    gap: 5px;
  }
  .calc-intro > p:last-child {
    font-size: 0.96rem;
  }
  .chart-key {
    display: none;
  }
  .result-band {
    gap: 8px;
  }
  .inputs .reset {
    font-size: 0.8rem;
  }
}
@media (max-width: 760px) {
  .calc-hero-inner {
    min-height: 245px;
    grid-template-columns: 59% 41%;
  }
  .calc-intro {
    padding-block: 26px;
  }
  .calc-intro h1 {
    font-size: clamp(2.8rem, 7.4vw, 3.8rem);
  }
  .calc-intro > p:last-child {
    font-size: 0.94rem;
  }
  .calc-art {
    width: 45%;
    height: 100%;
    right: -20px;
    mask-image: linear-gradient(90deg, transparent, #000 22%);
  }
  .calc-art img {
    object-fit: contain;
    object-position: right center;
  }
  .sim-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "summary" "controls" "chart";
    gap: 14px;
  }
  .sim-card {
    padding: 21px;
  }
  .result-band {
    padding: 17px 20px;
  }
  .side-results div {
    display: block;
  }
  .side-results {
    gap: 3px;
  }
  .side-results dt {
    font-size: 0.78rem;
  }
  .side-results dd {
    font-size: 0.94rem;
  }
  .big-payback #payback-value {
    font-size: 2.9rem;
  }
  .big-payback #payback-unit {
    font-size: 1.2rem;
  }
  .field-label {
    margin-top: 17px;
  }
  .preset-field {
    margin-top: 17px;
  }
  .result-jump {
    display: inline-block;
    color: var(--gold-dark);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-top: 16px;
  }
  .compare-heading {
    display: block;
  }
  .compare-heading > p {
    margin-top: 12px;
    max-width: 52ch;
  }
  .table-scroll th,
  .table-scroll td {
    padding: 10px 13px;
  }
  .table-scroll table {
    font-size: 0.88rem;
  }
  .table-scroll th:first-child {
    position: sticky;
    left: 0;
    background: #f3f8fe;
    box-shadow: 1px 0 var(--calc-rule);
  }
  .table-scroll thead th:first-child {
    background: var(--night);
  }
  .table-scroll tr[data-key="payback"] th,
  .table-scroll tr[data-key="profit"] th {
    background: #dcecff;
  }
  .chart-key {
    font-size: 0.74rem;
  }
  .primary-result h2 {
    font-size: 0.85rem;
  }
}
@media (max-width: 470px) {
  .calc-hero-inner {
    min-height: 0;
    display: block;
  }
  .calc-intro {
    padding: 25px 0 17px;
  }
  .calc-intro h1 {
    font-size: clamp(2.57rem, 9vw, 3rem);
    max-width: 90%;
    margin-top: 13px;
  }
  .calc-intro > p:last-child {
    max-width: 69%;
    font-size: 0.88rem;
  }
  .calc-art {
    width: 55%;
    height: 73%;
    bottom: 0;
    right: -32px;
    mask-image: linear-gradient(90deg, transparent, #000 29%);
    opacity: 0.9;
  }
  .calc-art img {
    object-position: 29% center;
  }
  .calc-intro h1,
  .calc-intro > p:last-child {
    text-shadow: 0 1px 7px #07336655;
  }
  .calc-paper {
    padding-top: 18px;
  }
  .sim-card {
    padding: 18px;
  }
  .result-band {
    padding: 16px;
    grid-template-columns: 1.15fr 0.85fr;
  }
  .side-results {
    padding-left: 13px;
  }
  .chart-key {
    display: none;
  }
  .projection-heading h2,
  .input-heading h2 {
    font-size: 1.53rem;
  }
  .chart-intro {
    font-size: 0.88rem;
  }
  .table-scroll tbody th:first-child,
  .table-scroll thead th:first-child {
    max-width: 138px;
    white-space: normal;
    min-width: 102px;
  }
  .calc-intro .eyebrow {
    font-size: 0.65rem;
  }
}
@media (max-width: 355px) {
  .primary-result h2 {
    gap: 4px;
    font-size: 0.76rem;
  }
  .side-results dd {
    font-size: 0.85rem;
  }
  .calc-art {
    opacity: 0.55;
  }
  .big-payback #payback-value {
    font-size: 2.65rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .calc-art img {
    animation: none;
  }
}

@media (min-width: 761px) and (max-width: 940px) {
  .outlet-picker img {
    width: 40px;
  }
  .outlet-picker select {
    padding-left: 50px;
    padding-right: 24px;
    font-size: 0.91rem;
  }
  .outlet-picker > .icon {
    right: 7px;
  }
}
@media (max-width: 470px) {
  .calc-intro h1 {
    max-width: 100%;
    font-size: clamp(2.23rem, 9.3vw, 2.85rem);
  }
  .calc-intro > p:last-child {
    max-width: 55%;
  }
  .calc-art {
    width: 45%;
    height: 53%;
    right: -5px;
    bottom: 7px;
    opacity: 1;
    mask-image: linear-gradient(90deg, transparent, #000 13%);
  }
  .calc-art img {
    object-fit: contain;
    object-position: right center;
  }
}
