.calc-page {
  --calc-red: #e81e1e;
  --calc-orange: #ff7a00;
  --calc-yellow: #ffc400;
  --calc-earth: #b8752d;
  --calc-deep: #2d0b07;
  --calc-ink: #25110d;
  --calc-muted: #74564f;
  --calc-line: #ecd3c5;
  --calc-paper: #fffdf9;
  --calc-soft: #fff5ed;
  color: var(--calc-ink);
  background: #fffaf4;
}

.calc-page button,
.calc-page input {
  font: inherit;
}

.calc-page button,
.calc-page label {
  -webkit-tap-highlight-color: transparent;
}

.calc-page section[id] {
  scroll-margin-top: 86px;
}

.calc-container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.calc-header {
  min-height: 72px;
}

.calc-page .nav-toggle {
  width: 44px;
  height: 44px;
}

.calc-brand-logo {
  width: 178px;
  height: auto;
  object-fit: contain;
}

.calc-hero {
  position: relative;
  padding: 78px 0 52px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 196, 0, 0.28), transparent 18rem),
    linear-gradient(145deg, #2a0805 0%, #70140e 55%, #b52815 100%);
}

.calc-hero::after {
  content: "";
  position: absolute;
  right: -62px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 48px solid rgba(255, 122, 0, 0.13);
  border-radius: 50%;
}

.calc-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
}

.calc-hero .section-kicker {
  color: #ffd679;
}

.calc-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.calc-hero-lead {
  max-width: 760px;
  margin-top: 18px;
  color: rgba(255, 242, 231, 0.82);
  font-size: 17px;
  line-height: 1.8;
}

.hero-note {
  padding: 20px;
  border: 1px solid rgba(255, 196, 0, 0.28);
  border-radius: 14px;
  background: rgba(39, 7, 4, 0.34);
  backdrop-filter: blur(10px);
}

.hero-note span,
.hero-note strong {
  display: block;
}

.hero-note span {
  color: #ffd679;
  font-size: 12px;
  font-weight: 800;
}

.hero-note strong {
  margin-top: 8px;
  font-size: 20px;
}

.hero-note p {
  margin-top: 10px;
  color: rgba(255, 242, 231, 0.75);
  font-size: 14px;
  line-height: 1.7;
}

.calc-disclaimer {
  position: relative;
  z-index: 2;
  margin-top: -18px;
  padding: 18px 20px;
  border: 1px solid #f0c568;
  border-radius: 14px;
  color: #59390f;
  background: #fff7d9;
  box-shadow: 0 14px 32px rgba(91, 35, 16, 0.12);
  font-size: 14px;
  line-height: 1.75;
}

.calc-disclaimer strong {
  color: #9b2c11;
}

.calc-section,
.scenario-section,
.site-check-section,
.consult-section {
  padding: 62px 0;
}

.calculator-layout {
  display: grid;
  gap: 20px;
}

.calculator-card,
.results-card,
.site-check-form,
.contact-card {
  border: 1px solid var(--calc-line);
  border-radius: 18px;
  background: var(--calc-paper);
  box-shadow: 0 18px 50px rgba(101, 34, 15, 0.1);
}

.calculator-card {
  padding: 22px 18px;
}

.block-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--calc-line);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--calc-red), var(--calc-orange));
  font-size: 13px;
  font-weight: 800;
}

.block-heading p,
.results-topline p {
  color: var(--calc-red);
  font-size: 12px;
  font-weight: 800;
}

.block-heading h2,
.results-topline h2 {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.35;
}

.calc-fieldset {
  padding: 22px 0 0;
  margin: 0;
  border: 0;
}

.calc-fieldset + .calc-fieldset {
  margin-top: 22px;
  border-top: 1px solid var(--calc-line);
}

.calc-fieldset legend {
  padding: 0;
  font-size: 17px;
  font-weight: 800;
}

.field-explainer {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--calc-earth);
  border-radius: 0 10px 10px 0;
  color: var(--calc-muted);
  background: #fff8ed;
  font-size: 13px;
  line-height: 1.65;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.option-pill {
  position: relative;
  cursor: pointer;
}

.option-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-pill > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 56px;
  padding: 10px;
  border: 1px solid var(--calc-line);
  border-radius: 12px;
  color: var(--calc-ink);
  background: #fff;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.option-pill strong {
  font-size: 15px;
}

.option-pill small {
  color: var(--calc-muted);
  font-size: 11px;
}

.option-pill input:checked + span {
  border-color: var(--calc-red);
  color: #8d160e;
  background: #fff1ea;
  box-shadow: 0 0 0 3px rgba(232, 30, 30, 0.1);
}

.option-pill input:focus-visible + span {
  outline: 3px solid rgba(255, 122, 0, 0.28);
  outline-offset: 2px;
}

.option-wide {
  grid-column: 1 / -1;
}

.custom-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--calc-muted);
  font-size: 13px;
  font-weight: 700;
}

.custom-field[hidden] {
  display: none;
}

.input-with-unit {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 48px;
  border: 1px solid var(--calc-line);
  border-radius: 12px;
  background: #fff;
}

.input-with-unit:focus-within {
  border-color: var(--calc-orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.input-with-unit input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  outline: 0;
  color: var(--calc-ink);
  background: transparent;
}

.input-with-unit em {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--calc-muted);
  font-size: 13px;
  font-style: normal;
}

.rate-grid {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--calc-line);
}

.rate-grid > label,
.fixed-assumption {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: var(--calc-soft);
}

.rate-grid > label > span:first-child,
.fixed-assumption > span {
  font-size: 13px;
  font-weight: 800;
}

.rate-grid small,
.fixed-assumption small {
  color: var(--calc-muted);
  font-size: 11px;
  line-height: 1.55;
}

.compact-input {
  min-height: 42px;
}

.fixed-assumption strong {
  font-size: 22px;
}

.results-card {
  align-self: start;
  overflow: hidden;
}

.results-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
}

.results-topline > span {
  padding: 7px 9px;
  border-radius: 999px;
  color: #7c3d10;
  background: #fff1cd;
  font-size: 11px;
  font-weight: 700;
}

.result-highlight {
  padding: 24px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 196, 0, 0.24), transparent 12rem),
    linear-gradient(135deg, #6b100b, #c32316 70%, #e46813);
}

.result-highlight span,
.result-highlight small {
  display: block;
  color: rgba(255, 244, 231, 0.75);
}

.result-highlight span {
  font-size: 13px;
  font-weight: 700;
}

.result-highlight strong {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(34px, 10vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.result-highlight small {
  font-size: 11px;
}

.result-list {
  margin: 0;
  padding: 8px 20px 0;
}

.result-list > div {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--calc-line);
}

.result-list dt {
  color: var(--calc-muted);
  font-size: 13px;
}

.result-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.result-list .annual-row {
  border-bottom: 0;
}

.result-list .annual-row dd {
  color: var(--calc-red);
  font-size: 19px;
}

.formula-note {
  margin: 10px 20px 20px;
  padding: 14px;
  border-radius: 12px;
  color: #5f4821;
  background: #fff7df;
}

.formula-note strong {
  font-size: 13px;
}

.formula-note p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.65;
}

.scenario-section {
  background: #fff3e9;
}

.calc-section-heading p:not(.section-kicker),
.site-check-intro > p:not(.section-kicker),
.consult-copy > p:not(.section-kicker) {
  margin-top: 14px;
  color: var(--calc-muted);
  line-height: 1.75;
}

.scenario-grid-calc {
  display: grid;
  gap: 14px;
}

.scenario-card-calc {
  padding: 20px;
  border: 1px solid var(--calc-line);
  border-top: 4px solid var(--calc-earth);
  border-radius: 14px;
  background: #fffdf9;
}

.scenario-card-calc.reference {
  border-top-color: var(--calc-orange);
}

.scenario-card-calc.better {
  border-top-color: var(--calc-red);
}

.scenario-card-calc > span {
  display: block;
  color: var(--calc-muted);
  font-size: 12px;
  font-weight: 700;
}

.scenario-card-calc > strong {
  display: block;
  margin-top: 6px;
  font-size: 21px;
}

.scenario-card-calc dl {
  margin: 16px 0 0;
}

.scenario-card-calc dl div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--calc-line);
}

.scenario-card-calc dt {
  color: var(--calc-muted);
  font-size: 12px;
}

.scenario-card-calc dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.site-check-section {
  background: #fffaf4;
}

.site-check-layout {
  display: grid;
  gap: 24px;
}

.site-check-result {
  margin-top: 24px;
  padding: 18px;
  border-left: 4px solid var(--calc-earth);
  border-radius: 0 14px 14px 0;
  background: #fff5e6;
}

.site-check-result.status-ready {
  border-left-color: #3d8a52;
  background: #edf8ef;
}

.site-check-result.status-stop {
  border-left-color: var(--calc-red);
  background: #fff0ed;
}

.site-check-result span,
.site-check-result strong {
  display: block;
}

.site-check-result span {
  color: var(--calc-muted);
  font-size: 12px;
}

.site-check-result strong {
  margin-top: 7px;
  font-size: 20px;
}

.site-check-result p {
  margin-top: 8px;
  color: var(--calc-muted);
  font-size: 13px;
  line-height: 1.65;
}

.site-check-form {
  overflow: hidden;
}

.check-question {
  padding: 20px 18px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--calc-line);
}

.check-question:last-child {
  border-bottom: 0;
}

.check-question legend {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  font-weight: 800;
  line-height: 1.55;
}

.check-question legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #fff;
  background: var(--calc-earth);
  font-size: 11px;
}

.check-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.check-options label {
  position: relative;
  cursor: pointer;
}

.check-options input {
  position: absolute;
  opacity: 0;
}

.check-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--calc-line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.check-options input:checked + span {
  border-color: var(--calc-orange);
  color: #8d2a0c;
  background: #fff0e6;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.check-options input:focus-visible + span {
  outline: 3px solid rgba(255, 122, 0, 0.28);
  outline-offset: 2px;
}

.cost-warning {
  padding: 26px 0;
  color: #fff;
  background: var(--calc-deep);
}

.cost-warning .calc-container {
  display: grid;
  gap: 8px;
}

.cost-warning strong {
  color: #ffd679;
}

.cost-warning p {
  color: rgba(255, 242, 231, 0.78);
  font-size: 14px;
  line-height: 1.75;
}

.consult-section {
  background:
    radial-gradient(circle at 0% 100%, rgba(255, 196, 0, 0.12), transparent 20rem),
    #fff5ed;
}

.consult-layout {
  display: grid;
  gap: 26px;
}

.prep-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.prep-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--calc-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.prep-list span {
  color: var(--calc-red);
  font-size: 11px;
}

.contact-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 24px;
  border: 2px dashed #d8a77f;
  border-radius: 14px;
  color: var(--calc-muted);
  background:
    linear-gradient(45deg, rgba(232, 30, 30, 0.035) 25%, transparent 25%, transparent 75%, rgba(232, 30, 30, 0.035) 75%),
    linear-gradient(45deg, rgba(232, 30, 30, 0.035) 25%, #fff 25%, #fff 75%, rgba(232, 30, 30, 0.035) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
  text-align: center;
}

.qr-placeholder strong {
  margin: 8px 0;
  color: var(--calc-red);
  font-size: 30px;
}

.qr-placeholder small {
  max-width: 190px;
  line-height: 1.6;
}

.contact-details > img {
  width: 205px;
  height: auto;
  margin-bottom: 18px;
}

.contact-details dl {
  margin: 0;
}

.contact-details dl div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--calc-line);
}

.contact-details dt {
  color: var(--calc-muted);
  font-size: 12px;
}

.contact-details dd {
  margin: 0;
  font-weight: 800;
  line-height: 1.55;
}

.copy-button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--calc-red), var(--calc-orange));
  font-weight: 800;
  cursor: pointer;
}

.copy-button:disabled {
  color: #8b746b;
  background: #e9dfd9;
  cursor: not-allowed;
}

.copy-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--calc-red);
  font-size: 12px;
}

.calc-footer {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.calc-footer .footer-links a {
  min-height: 44px;
}

@media (min-width: 700px) {
  .calc-container {
    width: min(1160px, calc(100% - 64px));
  }

  .calc-hero {
    padding: 104px 0 68px;
  }

  .calc-hero-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: end;
  }

  .calculator-card {
    padding: 30px;
  }

  .option-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .utilization-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .option-wide {
    grid-column: auto;
  }

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

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

  .contact-card {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: center;
    padding: 24px;
  }
}

@media (min-width: 980px) {
  .calculator-layout {
    grid-template-columns: minmax(0, 1.16fr) minmax(370px, 0.84fr);
    align-items: start;
  }

  .results-card {
    position: sticky;
    top: 92px;
  }

  .site-check-layout,
  .consult-layout {
    grid-template-columns: 0.78fr 1.22fr;
    align-items: start;
  }

  .site-check-intro,
  .consult-copy {
    position: sticky;
    top: 100px;
  }
}

@media (max-width: 680px) {
  .calc-page section[id] {
    scroll-margin-top: 76px;
  }

  .calc-header {
    min-height: 66px;
  }

  .calc-brand-logo {
    width: 155px;
  }

  .calc-hero h1 {
    font-size: 36px;
  }

  .calc-section-heading h2,
  .site-check-intro h2,
  .consult-copy h2 {
    font-size: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .calc-page *,
  .calc-page *::before,
  .calc-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
