.calculator-page {
  padding-bottom: 12px;
}

.calculator-hero {
  padding-bottom: 126px;
}

.calculator-shell {
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.calculator-panel,
.calculator-result-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(34, 23, 72, 0.08);
}

.calculator-panel {
  display: grid;
}

.calculator-step {
  padding: 30px 32px 32px;
  border-bottom: 1px solid #eee8fb;
}

.calculator-step:last-child {
  border-bottom: 0;
}

.calculator-step-label,
.calculator-result-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #de1526;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calculator-step h2,
.calculator-result-card h2 {
  margin: 0 0 10px;
  color: #070014;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
}

.calculator-step p,
.calculator-result-card p {
  margin: 0 0 20px;
  max-width: 68ch;
  color: #4d5161;
  font-size: 16px;
  line-height: 1.55;
}

.calculator-area-selector {
  display: grid;
  gap: 18px;
}

.calculator-area-search {
  margin: 0;
}

.calculator-area-search > span:first-child {
  font-size: 15px;
}

.calculator-area-search small {
  margin-top: -2px;
  color: #6f7688;
  font-size: 13px;
  line-height: 1.4;
}

.calculator-search-control {
  position: relative;
  display: block;
}

.calculator-search-control::before,
.calculator-search-control::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.calculator-search-control::before {
  top: 18px;
  left: 18px;
  width: 14px;
  height: 14px;
  border: 2px solid #de1526;
  border-radius: 999px;
}

.calculator-search-control::after {
  top: 34px;
  left: 33px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: #de1526;
  transform: rotate(45deg);
  transform-origin: left center;
}

.calculator-area-search input[type="search"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 58px;
  padding: 15px 18px 15px 52px;
  border: 1px solid #e4def4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(7, 0, 20, 0.05);
  color: #070014;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.calculator-area-search input[type="search"]::placeholder {
  color: #8b93a4;
  opacity: 1;
}

.calculator-area-search input[type="search"]:focus {
  outline: none;
  border-color: #de1526;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(222, 21, 38, 0.1), 0 14px 28px rgba(7, 0, 20, 0.07);
}

.calculator-area-search input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.calculator-area-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calculator-area-result {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid #e4def4;
  border-radius: 12px;
  background: #fbfaff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calculator-area-result:hover {
  border-color: #d2c7f5;
  background: #f8f5ff;
}

.calculator-area-result.is-selected {
  border-color: #de1526;
  background: #fff7f8;
}

.calculator-area-result span {
  color: #070014;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-area-result small,
.calculator-area-empty {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.4;
}

.calculator-area-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed #d2c7f5;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-selected-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calculator-selected-area {
  padding: 8px 10px;
  border: 1px solid #f0d4d8;
  border-radius: 999px;
  background: #fff7f8;
  color: #de1526;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
}

.calculator-area-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.calculator-area-head p {
  margin: 0;
  color: #6f7688;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.calculator-check,
.calculator-city-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.calculator-check input,
.calculator-city-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.calculator-check span {
  color: #070014;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-region-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calculator-region-item {
  border: 1px solid #e4def4;
  border-radius: 12px;
  background: #fbfaff;
  overflow: hidden;
}

.calculator-region-item[open] {
  border-color: #d2c7f5;
  background: #ffffff;
}

.calculator-region-item summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.calculator-region-item summary::-webkit-details-marker {
  display: none;
}

.calculator-region-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calculator-region-title input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.calculator-region-title span {
  min-width: 0;
  color: #070014;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-region-count {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.calculator-city-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  padding: 2px 14px 14px 37px;
}

.calculator-city-check {
  align-items: flex-start;
}

.calculator-city-check input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.calculator-city-check span {
  min-width: 0;
  color: #2c2940;
  font-size: 13px;
  line-height: 1.35;
}

.calculator-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.calculator-option {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 54px;
  padding: 14px 14px 13px 38px;
  border: 1px solid #e4def4;
  border-radius: 10px;
  background: #fbfaff;
  cursor: pointer;
}

.calculator-option:hover {
  border-color: #d2c7f5;
  background: #f8f5ff;
}

.calculator-option:has(input:disabled) {
  opacity: 0.48;
  cursor: not-allowed;
}

.calculator-option input {
  position: absolute;
  top: 17px;
  left: 14px;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.calculator-option:has(input:checked) {
  border-color: #de1526;
  background: #fff7f8;
  box-shadow: 0 8px 18px rgba(222, 21, 38, 0.08);
}

.calculator-option span {
  min-width: 0;
  color: #070014;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
}

.calculator-option small {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
}

.calculator-period-note {
  margin-top: -4px !important;
  color: #6f7688 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.calculator-budget-slider,
.calculator-period-slider {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-budget-slider-head,
.calculator-budget-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calculator-budget-slider-head span {
  color: #070014;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-budget-slider-head output {
  color: #de1526;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
}

.calculator-budget-slider input[type="range"],
.calculator-period-slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.calculator-budget-scale span {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
}

.calculator-recommend-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 18px;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
  color: #070014;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  cursor: pointer;
}

.calculator-recommend-button.is-active {
  border-color: #de1526;
  background: #fff7f8;
  box-shadow: 0 8px 18px rgba(222, 21, 38, 0.08);
}

.calculator-recommendation-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid #f4c9cf;
  border-radius: 12px;
  background: #fff7f8;
  color: #74303a;
  font-size: 13px;
  line-height: 1.45;
}

.calculator-result-card {
  position: sticky;
  top: 24px;
  padding: 28px 28px 30px;
}

.calculator-empty-guide {
  margin-top: 14px;
  border-radius: 12px;
}

.calculator-empty-guide {
  padding: 14px 16px;
  border: 1px dashed #d2c7f5;
  background: #fbfaff;
}

.calculator-empty-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #4d5161;
  font-size: 13px;
  line-height: 1.45;
}

.calculator-metrics {
  display: grid;
  gap: 12px;
  margin: 22px 0 18px;
}

.calculator-metrics div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-metrics dt {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.calculator-metrics dd {
  margin: 0;
  color: #070014;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
}

.calculator-note {
  padding: 14px 16px;
  border: 1px solid #f0d4d8;
  border-radius: 12px;
  background: #fff7f8;
  color: #71313b;
  font-size: 13px;
  line-height: 1.5;
}

.calculator-production-cost {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-production-cost span {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  text-transform: uppercase;
}

.calculator-production-cost strong {
  color: #070014;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}

.calculator-production-cost p {
  margin: 2px 0 4px;
  color: #4d5161;
  font-size: 13px;
  line-height: 1.45;
}

.calculator-production-cost a {
  color: #de1526;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

.calculator-coverage {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eee8fb;
}

.calculator-coverage h3 {
  margin: 0;
  color: #070014;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-coverage-map {
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-coverage p {
  margin: 0;
  color: #6f7688;
  font-size: 12px;
  line-height: 1.45;
}

.calculator-help-text {
  margin: -4px 0 16px !important;
  color: #6f7688 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.calculator-stations {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eee8fb;
}

.calculator-stations h3 {
  margin: 0 0 12px;
  color: #070014;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-stations ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calculator-stations li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #eee8fb;
  border-radius: 10px;
  background: #fbfaff;
}

.calculator-stations strong {
  color: #070014;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-stations span {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
}

.calculator-stations small {
  color: #4d5161;
  font-size: 12px;
  line-height: 1.45;
}

.calculator-stations p {
  margin: 12px 0 0;
  color: #6f7688;
  font-size: 12px;
  line-height: 1.45;
}

.calculator-cta {
  margin-top: 18px;
}

.calculator-lead-section {
  margin-top: 34px;
}

.calculator-lead-card {
  padding: 30px 32px 32px;
}

.calculator-lead-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.calculator-lead-summary div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-lead-summary span {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  text-transform: uppercase;
}

.calculator-lead-summary strong {
  color: #070014;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.calculator-lead-form {
  margin-top: 0;
}

.calculator-seo-section,
.calculator-faq-section {
  margin-top: 26px;
}

.calculator-seo-card {
  padding: 30px 32px 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(34, 23, 72, 0.06);
}

.calculator-seo-card h2 {
  margin: 0 0 18px;
  color: #070014;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
}

.calculator-seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.calculator-seo-grid article {
  display: grid;
  gap: 8px;
  align-content: start;
}

.calculator-seo-grid h3 {
  margin: 0;
  color: #070014;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-seo-grid p,
.calculator-faq-list p {
  margin: 0;
  color: #4d5161;
  font-size: 15px;
  line-height: 1.6;
}

.calculator-faq-list {
  display: grid;
  gap: 10px;
}

.calculator-faq-list details {
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.calculator-faq-list summary {
  cursor: pointer;
  padding: 15px 16px;
  color: #070014;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.calculator-faq-list details[open] summary {
  padding-bottom: 8px;
}

.calculator-faq-list p {
  padding: 0 16px 16px;
}

.debug-area-list {
  display: grid;
  gap: 8px;
}

.debug-area-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #eee8fb;
  border-radius: 10px;
  background: #fbfaff;
  color: #2c2940;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.debug-area-list a:hover {
  border-color: #d2c7f5;
  background: #f8f5ff;
}

.debug-area-list a.is-active {
  border-color: #de1526;
  background: #fff7f8;
  color: #de1526;
  font-weight: 600;
}

.debug-panel {
  overflow: hidden;
}

.debug-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.debug-metrics div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #eee8fb;
  border-radius: 12px;
  background: #fbfaff;
}

.debug-metrics strong {
  color: #6f7688;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  text-transform: uppercase;
}

.debug-metrics span {
  min-width: 0;
  color: #070014;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.debug-table-wrap {
  overflow-x: auto;
}

.debug-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.debug-table th,
.debug-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee8fb;
  color: #2c2940;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  vertical-align: top;
}

.debug-table th {
  background: #fbfaff;
  color: #6f7688;
  font-weight: 600;
}

.debug-note {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
  color: #6f7688 !important;
  font-size: 13px !important;
}

@media (max-width: 900px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .calculator-shell {
    margin-top: -22px;
  }

  .calculator-result-card {
    position: static;
  }

  .calculator-region-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-seo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calculator-hero {
    padding-bottom: 88px;
  }

  .calculator-layout {
    gap: 18px;
  }

  .calculator-step,
  .calculator-result-card {
    padding: 22px 18px 24px;
    border-radius: 14px;
  }

  .calculator-step h2,
  .calculator-result-card h2 {
    font-size: 23px;
  }

  .calculator-step p,
  .calculator-result-card p {
    font-size: 15px;
    line-height: 1.5;
  }

  .calculator-area-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .calculator-area-head p {
    text-align: left;
  }

  .calculator-region-list,
  .calculator-area-results,
  .calculator-options {
    grid-template-columns: 1fr;
  }

  .calculator-option {
    min-height: 50px;
    padding: 13px 14px 12px 38px;
  }

  .calculator-metrics dd {
    font-size: 19px;
  }

  .debug-metrics {
    grid-template-columns: 1fr;
  }

  .calculator-lead-card,
  .calculator-seo-card {
    padding: 22px 18px 24px;
  }

  .calculator-lead-summary {
    grid-template-columns: 1fr;
  }

  .calculator-seo-card h2 {
    font-size: 23px;
  }
}
