/* Calculator carousel shell and mobile layout */
:root {
  --calc-shell-fade-solid: rgba(248, 251, 255, 0.98);
  --calc-shell-selected-shadow: 2px 5px 9px rgba(31, 74, 166, 0.12), 1px 1px 3px rgba(15, 23, 42, 0.055);
}

/* Mobile entry cards: keep the calculator start options readable and stacked. */
@media (max-width: 768px) {
  .calc-entry-actions,
  .calc-manager-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .calc-question-block {
    min-height: 0;
    padding: 0.88rem !important;
  }

  .calc-question-head {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .calc-question-title {
    font-size: 1.42rem;
    line-height: 1.14;
  }

  .calc-question-lead {
    font-size: 0.82rem;
    line-height: 1.42;
  }

  .calc-step1-top,
  .calc-step1-followup {
    grid-template-columns: 1fr;
    gap: 0.62rem;
  }

  .calc-step1-box {
    padding: 0.72rem;
  }

  .calc-dimensions-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .calc-dimension-field {
    gap: 0.28rem;
  }

  .calc-dimension-label {
    line-height: 1.2;
  }

  .calc-dimension-field input {
    min-height: 2.65rem;
    font-size: 16px;
    padding-right: 2.4rem;
  }

  .calc-custom-input,
  .calc-floor-select {
    font-size: 16px;
  }

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

  .calc-metric-item {
    padding: 0.46rem 0.5rem;
  }

  .calc-metric-label {
    white-space: normal;
    line-height: 1.3;
  }

  .calc-metric-value {
    line-height: 1.2;
  }

  .calc-subsection-title-accent {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    align-items: center;
    line-height: 1.22;
    border-radius: 16px;
  }

  .calc-step-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .calc-step-actions-summary,
  .calc-nav-btn,
  .calc-next-btn {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .calc-entry-option,
  .calc-manager-option {
    width: 100%;
  }

  .calc-entry-option {
    grid-template-columns: 4rem minmax(0, 1fr) !important;
    min-height: 5.25rem;
    padding: 0.8rem 0.9rem !important;
    border-radius: 14px;
  }

  .calc-entry-option-primary {
    padding-top: 1.08rem !important;
  }

  .calc-entry-option-copy {
    min-width: 0;
  }

  .calc-entry-option-title,
  .calc-entry-option-note {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .calc-entry-option-title {
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .calc-entry-option-note {
    font-size: 0.74rem;
    line-height: 1.32;
  }

  .calc-entry-visual {
    min-height: 3.95rem;
  }

  .calc-entry-badges {
    top: -0.38rem;
    right: 0.62rem;
    flex-direction: row;
    align-items: center;
    gap: 0.26rem;
  }

  .calc-entry-badge {
    min-height: 1.18rem;
    font-size: 0.58rem;
    padding-inline: 0.42rem;
  }
}

/* Narrow phones need a denser badge lane to avoid title collisions. */
@media (max-width: 420px) {
  .calc-entry-option {
    grid-template-columns: 3.3rem minmax(0, 1fr) !important;
    padding-inline: 0.68rem !important;
  }

  .calc-question-title {
    font-size: 1.3rem;
  }

  .calc-question-lead {
    font-size: 0.78rem;
  }

  .calc-step1-box {
    padding: 0.64rem;
  }

  .calc-entry-option-primary {
    padding-top: 1rem !important;
  }

  .calc-entry-option-title {
    font-size: 0.82rem;
    line-height: 1.18;
  }

  .calc-entry-option-note {
    font-size: 0.7rem;
    line-height: 1.28;
  }

  .calc-entry-option-primary .calc-entry-badges {
    top: -0.34rem;
    right: 0.5rem;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .calc-entry-option-primary .calc-entry-badge {
    min-height: 1.08rem;
    padding-inline: 0.28rem;
    font-size: 0.49rem;
    letter-spacing: 0.03em;
  }

  .calc-metric-item {
    padding: 0.4rem 0.42rem;
  }
}

.calc-scroll-shell,
.calc-step1-scroll-shell {
  display: block;
  position: relative;
  overflow: visible;
}

.calc-scroll-viewport {
  display: block;
  overflow: visible;
}

.calc-scroll-shell::before,
.calc-scroll-shell::after,
.calc-step1-scroll-shell::before,
.calc-step1-scroll-shell::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  bottom: 0.78rem;
  width: 1.15rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.calc-scroll-shell::before,
.calc-step1-scroll-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--calc-shell-fade-solid) 0%, rgba(248, 251, 255, 0) 100%);
}

.calc-scroll-shell::after,
.calc-step1-scroll-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--calc-shell-fade-solid) 0%, rgba(248, 251, 255, 0) 100%);
}

@media (max-width: 1024px) {
  .calc-question-block {
    border-color: rgba(36, 88, 199, 0.14) !important;
    box-shadow: none !important;
    overflow: visible;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) {
    isolation: isolate;
    overflow: visible;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding-inline-start: var(--calc-carousel-anchor-left, 0.9rem);
    scroll-padding-inline-end: var(--calc-carousel-anchor-right, 0.9rem);
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.42rem 0.9rem 2.2rem;
    margin: 0 -0.78rem -1.6rem;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport[data-calc-option-count="2"] {
    scroll-snap-type: x mandatory;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport::-webkit-scrollbar {
    display: none;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.65rem;
    min-width: 100%;
    width: max-content;
    overflow: visible !important;
    scroll-snap-type: none;
    scrollbar-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track::before,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track::before,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid::before {
    content: "";
    flex: 0 0 var(--calc-carousel-edge-start, 0px);
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track::after,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track::after,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid::after {
    content: "";
    flex: 0 0 var(--calc-carousel-edge-end, 0px);
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track::-webkit-scrollbar,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track::-webkit-scrollbar,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid::-webkit-scrollbar {
    display: none;
  }

  .calc-step .calc-choice.is-selected,
  .calc-step .calc-option-tile.is-selected,
  .calc-step .calc-tariff-card.is-selected,
  .calc-step .extra-option.is-selected,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track > .calc-choice.is-selected,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track > .calc-option-tile.is-selected,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid > .calc-choice.is-selected,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid > .calc-option-tile.is-selected,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track > .calc-tariff-card.is-selected,
  .calc-step .extra-option.calc-choice.calc-option-tile.is-selected {
    position: relative;
    z-index: var(--z-calc-option-hover) !important;
    transform: none !important;
    border-color: rgba(31, 74, 166, 0.44) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(248, 251, 255, 0.99) 100%) !important;
    box-shadow: var(--calc-shell-selected-shadow) !important;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell).is-scrollable:not(.is-at-start)::before,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell).is-scrollable:not(.is-at-end)::after {
    opacity: 1;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell):has(> .calc-scroll-viewport > .calc-tariff-track)::before,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell):has(> .calc-scroll-viewport > .calc-tariff-track)::after {
    display: none;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track > .calc-tariff-card,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track > .calc-choice,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track > .calc-option-tile,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid > .calc-choice,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid > .calc-option-tile {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport[data-calc-option-count="2"] > .calc-tariff-track > .calc-tariff-card,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport[data-calc-option-count="2"] > .calc-option-track > .calc-choice,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport[data-calc-option-count="2"] > .calc-option-track > .calc-option-tile,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport[data-calc-option-count="2"] > .calc-option-track-grid > .calc-choice,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport[data-calc-option-count="2"] > .calc-option-track-grid > .calc-option-tile {
    scroll-snap-stop: always;
  }
}

@media (max-width: 768px) {
  .calc-step {
    --calc-mobile-density: 0.85;
  }

  .calc-question-block {
    padding: 0.82rem !important;
  }

  .calc-step-actions {
    gap: 0.56rem;
    margin-top: 0.82rem;
  }

  .calc-nav-btn,
  .calc-next-btn {
    min-height: 2.5rem;
    border-radius: 10px;
    font-size: 0.79rem;
    white-space: nowrap;
  }

  .calc-geometry-card {
    grid-template-columns: 1fr;
    gap: 0.82rem;
    align-items: start;
  }

  .calc-geometry-stage {
    min-height: 0;
    padding: 0.58rem 0.42rem 0.72rem;
  }

  .calc-geometry-svg {
    max-width: 18rem;
    margin-inline: auto;
  }

  .calc-geometry-copy {
    gap: 0.42rem;
  }

  .calc-geometry-title,
  .calc-geometry-note {
    display: block;
    max-width: 100%;
  }

  .calc-geometry-title {
    font-size: 0.98rem;
  }

  .calc-geometry-note {
    font-size: 0.8rem;
    line-height: 1.5;
  }
}

@media (max-width: 420px) {
  .calc-geometry-stage {
    padding-inline: 0.34rem;
  }
}

/* Responsive radio-card architecture for calculator steps 1-5. */
@media (max-width: 1024px) {
  .section-shell-calculator .section-lead[data-i18n="home.calculator.lead"] {
    text-align: center;
    margin-inline: auto;
  }

  .calc-step {
    --calc-mobile-card-width: 13rem;
    --calc-mobile-card-min-height: 3.5rem;
    --calc-mobile-card-gap: 0.52rem;
    --calc-mobile-card-pad-y: 0.52rem;
    --calc-mobile-card-pad-left: 0.64rem;
    --calc-mobile-card-pad-right: 0.64rem;
    --calc-mobile-tooltip-size: 1.12rem;
    --calc-mobile-tooltip-offset: 5px;
    --calc-mobile-tooltip-gap: 0.42rem;
    --calc-mobile-tooltip-column: calc(var(--calc-mobile-tooltip-size) + (var(--calc-mobile-tooltip-offset) * 2) + var(--calc-mobile-tooltip-gap));
    --calc-mobile-title-tooltip-offset: 0.38rem;
    --calc-mobile-title-tooltip-slot: calc(var(--calc-mobile-tooltip-size) + (var(--calc-mobile-title-tooltip-offset) * 2));
    --calc-mobile-badge-tooltip-width: 14.8rem;
    --calc-mobile-option-font-size: 0.86rem;
    --calc-mobile-note-font-size: 0.68rem;
    --calc-mobile-badge-font-size: 0.46rem;
  }

  .calc-step .calc-tariff-card,
  .calc-step .calc-choice,
  .calc-step .calc-option-tile {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: var(--calc-mobile-card-width) !important;
    max-width: none !important;
    min-height: var(--calc-mobile-card-min-height) !important;
    height: auto !important;
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: var(--calc-mobile-card-gap) !important;
    padding: var(--calc-mobile-card-pad-y) var(--calc-mobile-card-pad-right) var(--calc-mobile-card-pad-y) var(--calc-mobile-card-pad-left) !important;
    border-radius: 12px !important;
  }

  .calc-step .calc-tariff-card input[type="radio"],
  .calc-step .calc-option-tile input[type="radio"],
  .calc-step .calc-choice input[type="radio"] {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
  }

  .calc-step .calc-option-head,
  .calc-step .calc-tariff-head {
    position: static;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0.36rem;
    width: max-content;
    min-width: max-content;
    max-width: none;
  }

  .calc-step .calc-option-head:has(.calc-inline-info),
  .calc-step .calc-tariff-head:has(.calc-inline-info) {
    padding-right: var(--calc-mobile-tooltip-column);
  }

  .calc-step .calc-tariff-title-wrap,
  .calc-step .calc-option-main {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 0.36rem;
    flex: 0 0 auto;
    min-width: max-content;
    width: max-content;
    max-width: none;
  }

  .calc-step .calc-tariff-body,
  .calc-step .calc-option-tile-body {
    display: grid;
    align-content: center;
    justify-items: start;
    row-gap: 0.08rem;
    align-self: center;
    flex: 0 0 auto !important;
    min-width: max-content !important;
    width: max-content !important;
    max-width: none;
    overflow: visible !important;
    text-align: left;
  }

  .calc-step .calc-option-main,
  .calc-step .calc-tariff-title,
  .calc-step .calc-tariff-note,
  .calc-step .calc-option-tile-copy {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left;
  }

  .calc-step .calc-tariff-title,
  .calc-step .calc-option-head .font-bold,
  .calc-step .calc-option-main .font-bold {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap !important;
    font-size: var(--calc-mobile-option-font-size) !important;
    line-height: 1.18 !important;
  }

  .calc-step .calc-tariff-note,
  .calc-step .calc-option-tile-copy {
    margin-top: 0.08rem;
    font-size: var(--calc-mobile-note-font-size) !important;
    line-height: 1.24 !important;
  }

  .calc-step .calc-option-main i,
  .calc-step .calc-inline-info,
  .calc-step .calc-tag-mini,
  .calc-step .calc-tariff-badge {
    flex: 0 0 auto;
  }

  .calc-step :is(.calc-tariff-card, .calc-choice, .calc-option-tile) .calc-inline-info {
    position: absolute !important;
    top: var(--calc-mobile-tooltip-offset);
    right: var(--calc-mobile-tooltip-offset);
    width: var(--calc-mobile-tooltip-size);
    height: var(--calc-mobile-tooltip-size);
    margin: 0 !important;
    transform: none !important;
    z-index: calc(var(--z-calc-tooltip-trigger) + 1);
  }

  .calc-step :is(.calc-tariff-card, .calc-choice, .calc-option-tile) [data-calc-tooltip-target] {
    position: static !important;
  }

  .calc-step .calc-option-main {
    align-items: center !important;
  }

  .calc-step .calc-tag-mini,
  .calc-step .calc-tariff-badge {
    max-width: none;
    font-size: var(--calc-mobile-badge-font-size);
    min-height: 0.88rem;
    padding-inline: 0.26rem;
    line-height: 1;
    white-space: nowrap;
  }

  .calc-step .calc-tag-mini-recommended {
    border-color: #2458c7 !important;
    background: linear-gradient(180deg, #2f6ae5 0%, #2458c7 100%) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  .calc-step .calc-tariff-card:has(.calc-tariff-badge),
  .calc-step .calc-choice:has(.calc-tag-mini),
  .calc-step .calc-option-tile:has(.calc-tag-mini) {
    min-width: max(var(--calc-mobile-card-width), 13.8rem) !important;
  }

  .calc-step .calc-tariff-card:has(.calc-inline-info):has(.calc-tariff-badge),
  .calc-step .calc-choice:has(.calc-inline-info):has(.calc-tag-mini),
  .calc-step .calc-option-tile:has(.calc-inline-info):has(.calc-tag-mini) {
    width: max-content !important;
    min-width: max(var(--calc-mobile-card-width), var(--calc-mobile-badge-tooltip-width)) !important;
  }

  .calc-step .calc-option-tile:has([data-i18n="home.calculator.step5.property_type_house"]) {
    min-width: max(var(--calc-mobile-card-width), 14.1rem) !important;
  }
}

/* Final mobile cleanup: compact scale and consistent left alignment for steps 1-5. */
@media (max-width: 768px) {
  .section-shell-calculator .section-lead[data-i18n="home.calculator.lead"] {
    text-align: center;
    margin-inline: auto;
  }

  /* Tighten the calculator shell on mobile so carousels have more usable width. */
  .section-shell.section-shell-soft.section-shell-calculator {
    padding: 0.625rem;
  }

  .section-shell.section-shell-soft.section-shell-calculator .section-heading,
  .section-shell.section-shell-soft.section-shell-calculator .calc-progress {
    padding-inline: 0.125rem;
  }

  .calc-step {
    /* Reserve a small horizontal gutter so selected shadows never clip on the viewport edge. */
    --calc-carousel-shadow-gutter: 0.75rem;
    --calc-mobile-card-width: 12.7rem;
    --calc-mobile-card-min-height: 3.5rem;
    --calc-mobile-card-gap: 0.52rem;
    --calc-mobile-card-pad-y: 0.52rem;
    --calc-mobile-card-pad-left: 0.64rem;
    --calc-mobile-card-pad-right: 0.64rem;
    --calc-mobile-tooltip-size: 1.12rem;
    --calc-mobile-tooltip-offset: 5px;
    --calc-mobile-tooltip-gap: 0.42rem;
    --calc-mobile-tooltip-column: calc(var(--calc-mobile-tooltip-size) + (var(--calc-mobile-tooltip-offset) * 2) + var(--calc-mobile-tooltip-gap));
    --calc-mobile-title-tooltip-offset: 0.38rem;
    --calc-mobile-title-tooltip-slot: calc(var(--calc-mobile-tooltip-size) + (var(--calc-mobile-title-tooltip-offset) * 2));
    --calc-mobile-badge-tooltip-width: 14.8rem;
    --calc-mobile-option-font-size: 0.84rem;
    --calc-mobile-note-font-size: 0.62rem;
    --calc-mobile-badge-font-size: 0.44rem;
  }

  .section-shell-calculator .section-heading,
  .section-shell-calculator .section-title,
  .section-shell-calculator .section-lead,
  .calc-progress,
  .calc-progress-meta,
  .calc-total-line,
  .calc-total-secondary.is-empty,
  .calc-question-head,
  .calc-question-title,
  .calc-question-lead,
  .calc-option-hint,
  .calc-step-feedback {
    text-align: left;
  }

  .section-shell-calculator .section-title,
  .section-shell-calculator .section-lead,
  .calc-question-title,
  .calc-question-lead,
  .calc-option-hint,
  .calc-total-secondary.is-empty,
  .calc-step-feedback {
    margin-inline: 0;
    max-width: none;
    text-wrap: pretty;
  }

  .calc-question-block {
    min-height: 0;
    padding: 0.82rem !important;
    border-radius: 16px !important;
  }

  .calc-question-head {
    justify-content: flex-start;
    gap: 0.36rem;
    margin-bottom: 0.3rem;
  }

  .calc-question-title {
    width: 100%;
    font-size: clamp(1.12rem, 4.2vw, 1.28rem);
    line-height: 1.08;
  }

  .calc-question-lead {
    margin-bottom: 0.72rem;
    font-size: 0.74rem;
    line-height: 1.38;
  }

  .calc-step1-box {
    padding: 0.62rem;
  }

  .calc-dimensions-grid {
    gap: 0.42rem;
  }

  .calc-dimension-field {
    gap: 0.24rem;
  }

  .calc-dimension-field span {
    font-size: 0.72rem;
  }

  .calc-dimension-field input {
    min-height: 2.45rem;
    font-size: 16px;
    padding: 0.4rem 2.2rem 0.4rem 0.56rem;
  }

  .calc-custom-input,
  .calc-floor-select {
    font-size: 16px;
  }

  .calc-dimension-unit {
    right: 0.62rem;
    font-size: 0.68rem;
  }

  .calc-dimension-hint {
    margin-top: 0.36rem;
    font-size: 0.69rem;
    line-height: 1.32;
  }

  .calc-step .calc-subsection {
    margin-top: 0.72rem;
  }

  .calc-subsection-title-accent {
    --calc-title-tooltip-slot: 1.45rem;
    --calc-title-inline-start: 0.58rem;
    --calc-title-inline-end: 0.58rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.38rem;
    width: fit-content;
    max-width: 100%;
    min-height: 2.05rem;
    margin: 0 0 0.55rem;
    padding: 0.28rem calc(var(--calc-title-inline-end) + var(--calc-title-tooltip-slot)) 0.28rem var(--calc-title-inline-start);
    border-radius: 999px;
    font-size: 0.67rem;
    line-height: 1.18;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left;
  }

  .calc-subsection-title-accent > [data-i18n] {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
    text-wrap: pretty;
    overflow-wrap: break-word;
    text-align: left;
  }

  .calc-subsection-title-accent > :is(.calc-inline-info, .calc-help) {
    position: absolute !important;
    top: 50%;
    right: var(--calc-title-inline-end);
    margin: 0 !important;
    transform: translateY(-50%) !important;
  }

  .calc-option-hint {
    margin-inline: 0;
  }

  /* Pull the shell outward while keeping the first visible card aligned to the subsection title. */
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) {
    margin-inline: calc(-1 * var(--calc-carousel-shadow-gutter));
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport {
    padding: 0.12rem var(--calc-carousel-shadow-gutter) 0.95rem !important;
    margin: 0 0 -0.18rem !important;
    scroll-padding-inline-start: var(--calc-carousel-anchor-left, 0px);
    scroll-padding-inline-end: var(--calc-carousel-anchor-right, 0px);
    scroll-behavior: smooth;
  }

  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-tariff-track,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track,
  .calc-step :where(.calc-scroll-shell, .calc-step1-scroll-shell) > .calc-scroll-viewport > .calc-option-track-grid {
    gap: 0.54rem;
  }

  .calc-photo-row {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .calc-repair-calendar {
    grid-template-columns: 1fr;
  }

  .calc-repair-month {
    padding: 0.66rem;
  }

  .calc-repair-day {
    min-height: 2.15rem;
    font-size: 0.74rem;
  }

  .calc-auto-socket-actions {
    flex-direction: column;
  }

  .calc-auto-socket-actions > * {
    width: 100%;
  }

  .calc-metrics-grid {
    gap: 0.42rem;
  }

  .calc-metric-item {
    min-height: 3rem;
    padding: 0.34rem 0.42rem;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    gap: 0.14rem;
  }

  .calc-metric-label {
    justify-content: flex-start;
    font-size: 0.61rem;
    line-height: 1.18;
  }

  .calc-metric-value {
    font-size: 0.82rem;
    line-height: 1.05;
  }

  .calc-geometry-copy,
  .calc-photo-callout {
    gap: 0.28rem;
    text-align: left;
  }

  .calc-geometry-title,
  .calc-photo-callout-title {
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .calc-geometry-note,
  .calc-photo-callout-note {
    font-size: 0.74rem;
    line-height: 1.34;
  }

  .calc-step-actions {
    gap: 0.56rem;
    margin-top: 0.82rem;
  }

  .calc-nav-btn,
  .calc-next-btn {
    min-height: 2.5rem;
    border-radius: 10px;
    font-size: 0.79rem;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .calc-step {
    --calc-mobile-card-width: 12.05rem;
    --calc-mobile-option-font-size: 0.82rem;
  }

  .calc-question-title {
    font-size: 1.06rem;
  }

  .calc-question-lead,
  .calc-option-hint {
    font-size: 0.71rem;
  }

  .calc-subsection-title-accent {
    max-width: 100%;
    font-size: 0.64rem;
    --calc-title-inline-start: 0.52rem;
    --calc-title-inline-end: 0.52rem;
    padding-inline-start: var(--calc-title-inline-start);
    padding-inline-end: calc(var(--calc-title-inline-end) + var(--calc-title-tooltip-slot));
  }
}

@media (max-width: 360px) {
  .calc-step {
    --calc-mobile-card-width: 11.55rem;
    --calc-mobile-option-font-size: 0.78rem;
  }

  .calc-step .calc-tariff-title,
  .calc-step .calc-option-main .font-bold {
    font-size: var(--calc-mobile-option-font-size) !important;
  }

  .calc-step .calc-tariff-note,
  .calc-step .calc-option-tile-copy {
    font-size: 0.61rem !important;
  }

  .calc-step .calc-tag-mini,
  .calc-step .calc-tariff-badge {
    font-size: 0.42rem;
  }
}

@media (max-width: 340px) {
  .calc-step {
    --calc-mobile-card-width: 11.15rem;
    --calc-mobile-option-font-size: 0.74rem;
  }

  .calc-step .calc-tag-mini,
  .calc-step .calc-tariff-badge {
    font-size: 0.37rem;
    padding-inline: 0.24rem;
  }
}

@media (max-width: 767.98px) {
  .calc-dimension-field input,
  .calc-custom-input,
  .calc-floor-select {
    font-size: 16px !important;
  }

}

/* Floating summary dock: overrides above rules (compact helper strip) */
.calc-summary-dock-panel.is-docked .calc-nav-btn,
.calc-summary-dock-panel.is-docked .calc-next-btn {
  width: auto !important;
  min-width: 0 !important;
}

.calc-summary-dock-panel.is-docked .calc-next-btn.btn-primary-wide {
  min-height: 2.05rem !important;
  padding-inline: 0.5rem !important;
  font-size: 0.72rem !important;
}
