.calc-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.6rem, 7vw, 6.6rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    linear-gradient(115deg, rgb(10 25 39 / 96%), rgb(20 53 76 / 92%)),
    url("/assets/images/industrial-sectional-door.webp") center 42% / cover;
  color: #fff;
}

.calc-hero::after {
  position: absolute;
  inset: auto -6rem -11rem auto;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgb(124 203 255 / 27%);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgb(124 203 255 / 4%), 0 0 0 8rem rgb(124 203 255 / 3%);
  content: "";
}

.calc-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.33fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 5rem);
}

.calc-hero .eyebrow {
  color: #8bd1ff;
}

.calc-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.35rem, 5.8vw, 5.4rem);
  line-height: 0.99;
  letter-spacing: -0.058em;
}

.calc-hero .hero-copy {
  color: rgb(235 246 254 / 78%);
}

.calc-proof {
  display: grid;
  gap: 0.2rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 1.15rem;
  background: rgb(255 255 255 / 9%);
  padding: 1.35rem;
  backdrop-filter: blur(14px);
}

.calc-proof strong {
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.calc-proof span {
  font-size: 0.86rem;
  font-weight: 800;
}

.calc-proof small {
  margin-top: 0.55rem;
  color: rgb(255 255 255 / 67%);
  line-height: 1.5;
}

.calc-hero__button {
  width: max-content;
  margin-top: 1.25rem;
}

.calc-section {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.calc-mode-switch {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: -1.6rem;
}

.calc-mode-switch a {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.8rem;
  border: 1px solid #d5e0e7;
  border-radius: 1rem;
  background: #fff;
  color: #23384a;
  padding: 1rem 1.1rem;
  box-shadow: 0 14px 35px rgb(21 43 59 / 10%);
}

.calc-mode-switch a:hover,
.calc-mode-switch a:focus-visible {
  border-color: #6ba8ce;
  transform: translateY(-2px);
}

.calc-mode-switch a.is-active {
  border-color: #2f7db1;
  background: linear-gradient(135deg, #eef8ff, #fff);
}

.calc-mode-switch a > span {
  grid-row: 1 / 3;
  color: #2f7db1;
  font-size: 0.72rem;
  font-weight: 900;
}

.calc-mode-switch strong,
.calc-mode-switch small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.calc-mode-switch strong {
  font-size: 0.9rem;
}

.calc-mode-switch small {
  margin-top: 0.15rem;
  color: #687987;
  font-size: 0.7rem;
}

.calc-trust-strip {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: -1.6rem;
  border: 1px solid #d5e0e7;
  border-radius: 1rem;
  background: #d5e0e7;
  box-shadow: 0 14px 35px rgb(21 43 59 / 10%);
}

.calc-trust-strip > li {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
  background: #fff;
  padding: 1rem 1.1rem;
}

.calc-trust-strip strong,
.calc-trust-strip small {
  overflow-wrap: anywhere;
}

.calc-trust-strip strong {
  color: #23384a;
  font-size: 0.82rem;
}

.calc-trust-strip small {
  color: #687987;
  font-size: 0.68rem;
}

.section-inner--workbench {
  width: min(1540px, calc(100% - 2rem));
}

.price-calc-layout {
  display: grid;
  grid-template-columns: minmax(390px, 0.78fr) minmax(620px, 1.22fr);
  align-items: start;
  gap: 1.3rem;
}

.calc-card {
  border: 1px solid #dbe3e9;
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 18px 45px rgb(20 42 58 / 8%);
}

.calc-form {
  padding: clamp(1.15rem, 3vw, 2rem);
}

.calc-form-submit {
  width: 100%;
  margin-top: 22px;
}

.calc-card__head,
.calc-step__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.calc-card__head {
  margin-bottom: 1.4rem;
}

.calc-card h2,
.calc-card h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.calc-card h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.calc-card h3 {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.step-kicker {
  margin: 0 0 0.18rem;
  color: #547087;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.step-note,
.selected-count,
.live-dot {
  color: #617284;
  font-size: 0.73rem;
  font-weight: 800;
}

.step-note,
.selected-count {
  border: 1px solid #dce5eb;
  border-radius: 999px;
  background: #f6f8fa;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border-radius: 999px;
  background: #e9f7f0;
  color: #1c704d;
  padding: 0.43rem 0.62rem;
  white-space: nowrap;
}

.live-dot i {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #2a9b6c;
  box-shadow: 0 0 0 0.24rem rgb(42 155 108 / 13%);
}

.field {
  display: grid;
  gap: 0.42rem;
  color: #334558;
  font-size: 0.81rem;
  font-weight: 800;
}

.field--strong {
  margin-bottom: 1rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd9e0;
  border-radius: 0.72rem;
  background: #fff;
  color: #17212d;
  padding: 0.68rem 0.8rem;
  font-weight: 700;
}

.field textarea {
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #8ca5b7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #2f7db1;
  box-shadow: 0 0 0 3px rgb(47 125 177 / 11%);
  outline: 0;
}

.calc-step,
.catalog-controls {
  margin-top: 1rem;
  border: 1px solid #e0e7ec;
  border-radius: 1rem;
  background: #fbfcfd;
  padding: clamp(1rem, 2.5vw, 1.35rem);
}

.calc-step__title {
  margin-bottom: 1rem;
}

.input-grid,
.option-filters {
  display: grid;
  gap: 0.8rem;
}

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

.input-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.8rem;
}

.dimension-cell {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.8rem;
  border-radius: 0.72rem;
  background: #eef6fb;
  color: #275c7f;
  padding: 0.68rem 0.8rem;
  font-size: 0.79rem;
  font-weight: 800;
}

.dimension-cell.is-error {
  background: #fff1ee;
  color: #973c2c;
}

.text-button {
  border: 0;
  background: transparent;
  color: #276d9c;
  padding: 0.2rem;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.measurement-tip,
.compat-note,
.fire-drive-note {
  margin-bottom: 0.9rem;
  border-left: 3px solid #2f7db1;
  border-radius: 0 0.6rem 0.6rem 0;
  background: #edf6fc;
  color: #3e5668;
  padding: 0.78rem 0.85rem;
  font-size: 0.78rem;
}

.measurement-tip p {
  margin: 0;
}

.lift-picker {
  min-width: 0;
  margin: 1rem 0 0;
  border: 0;
  padding: 0;
}

.lift-picker legend {
  margin-bottom: 0.7rem;
  color: #2f4253;
  font-size: 0.82rem;
  font-weight: 900;
}

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

.lift-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  border: 1px solid #d7e0e6;
  border-radius: 0.8rem;
  background: #fff;
  padding: 0.78rem;
  cursor: pointer;
}

.lift-option:has(input:checked) {
  border-color: #2f7db1;
  box-shadow: 0 0 0 2px rgb(47 125 177 / 11%);
}

.lift-option.is-disabled {
  background: #f2f4f6;
  color: #7c8790;
  cursor: not-allowed;
}

.lift-option input {
  margin-top: 0.2rem;
  accent-color: #2f7db1;
}

.lift-option__copy {
  display: grid;
  gap: 0.12rem;
}

.lift-option__copy strong {
  font-size: 0.82rem;
}

.lift-option__copy small {
  color: #6f7f8c;
  font-size: 0.69rem;
  line-height: 1.4;
}

.lift-option__price {
  color: #276d9c;
  font-size: 0.72rem;
  font-weight: 900;
}

.recommend-tag {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  background: #e9f7f0;
  color: #19704c;
  padding: 0.13rem 0.38rem;
  font-size: 0.61rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-help {
  margin: 0.65rem 0 0;
  color: #6d7a86;
  font-size: 0.72rem;
}

.switch-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid #dbe4ea;
  border-radius: 0.8rem;
  background: #fff;
  padding: 0.85rem;
  cursor: pointer;
}

.switch-line input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  accent-color: #2f7db1;
}

.switch-line span {
  display: grid;
}

.switch-line strong {
  font-size: 0.84rem;
}

.switch-line small {
  color: #6b7985;
  font-size: 0.7rem;
}

#drive-picker {
  margin-top: 0.8rem;
}

.visual-wicket {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.glazing-controls {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.glazing-controls[hidden],
.glazing-config[hidden] {
  display: none !important;
}

.glazing-config {
  display: grid;
  gap: 0.75rem;
  border: 1px solid #d7e3ea;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #f7fbfd, #fff);
  padding: 0.85rem;
}

.panel-picker {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.panel-picker legend {
  margin-bottom: 0.48rem;
  color: #4e6171;
  font-size: 0.72rem;
  font-weight: 800;
}

.panel-picker > small {
  display: block;
  margin-top: 0.45rem;
  color: #71808b;
  font-size: 0.66rem;
  line-height: 1.45;
}

.panel-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 0.45rem;
}

.panel-choice {
  min-width: 0;
  display: grid;
  place-items: center;
  border: 1px solid #cfdce4;
  border-radius: 0.65rem;
  background: #fff;
  color: #385267;
  padding: 0.62rem 0.4rem;
  cursor: pointer;
}

.panel-choice:has(input:checked) {
  border-color: #2f7db1;
  background: #eaf6fd;
  color: #195b88;
  box-shadow: inset 0 0 0 1px #2f7db1;
}

.panel-choice:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.46;
}

.panel-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.panel-choice span {
  text-align: center;
  font-size: 0.69rem;
  font-weight: 900;
}

.window-placement-list {
  display: grid;
  gap: 0.48rem;
}

.window-placement-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}

.window-placement-row strong {
  color: #3e5669;
  font-size: 0.72rem;
}

.window-placement-row select {
  min-width: 0;
}

.visual-wicket[hidden],
#visual-wicket-position[hidden] {
  display: none !important;
}

.compat-note {
  margin: 0.65rem 0 0;
}

.compat-note.is-warning,
.fire-drive-note {
  border-left-color: #d18a37;
  background: #fff8ea;
  color: #735124;
}

.option-filters {
  margin-bottom: 0.85rem;
}

.option-list,
.catalog-list {
  max-height: 520px;
  display: grid;
  gap: 0.55rem;
  overflow: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}

.option-row,
.catalog-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #dce4e9;
  border-radius: 0.78rem;
  background: #fff;
  padding: 0.72rem;
}

.option-row.is-selected,
.catalog-row.is-selected {
  border-color: #5c9dc7;
  background: #f5fbff;
}

.option-row.is-unpriced,
.catalog-row.is-unpriced {
  background: #f5f6f7;
}

.option-row > input,
.catalog-row > input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #2f7db1;
}

.option-copy,
.catalog-copy {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.option-copy strong,
.catalog-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.38;
}

.option-copy small,
.catalog-copy small {
  color: #73808b;
  font-size: 0.65rem;
}

.option-price,
.catalog-price {
  display: grid;
  justify-items: end;
  gap: 0.28rem;
  color: #244f6c;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: right;
}

.quantity-input {
  width: 76px;
  min-height: 34px;
  border: 1px solid #cfd9e0;
  border-radius: 0.55rem;
  padding: 0.35rem 0.45rem;
  text-align: right;
}

.empty-list {
  border: 1px dashed #cfd9e0;
  border-radius: 0.8rem;
  color: #6d7b87;
  padding: 1.2rem;
  font-size: 0.8rem;
  text-align: center;
}

.calc-summary {
  position: static;
  overflow: hidden;
}

.calc-3d {
  display: grid;
  gap: 0.85rem;
  border-bottom: 1px solid #dce5eb;
  background: linear-gradient(180deg, #f8fbfd, #eef4f7);
  padding: 1rem;
}

.calc-3d[hidden] {
  display: none !important;
}

.calc-3d__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.calc-3d__head h2 {
  font-size: 1.2rem;
}

.calc-viewer-shell {
  height: clamp(620px, 68vh, 780px);
  min-height: 620px;
  border-radius: 0.9rem;
  box-shadow: 0 16px 38px rgb(20 40 55 / 13%);
}

.calc-viewer-poster {
  gap: 0.8rem;
  padding: 1.1rem;
}

.calc-viewer-poster .poster-scene {
  width: min(330px, 82vw);
}

.calc-viewer-poster p {
  max-width: 320px;
  font-size: 0.72rem;
}

.calc-viewer-hud {
  top: 0.65rem;
  left: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calc-viewer-hud > div {
  min-width: 104px;
  padding: 0.42rem 0.52rem;
}

.calc-view-presets {
  top: auto;
  right: 0.65rem;
  bottom: 8.4rem;
}

.calc-view-presets button {
  padding: 0.42rem 0.5rem;
  font-size: 0.6rem;
}

.calc-viewer-toolbar {
  right: 0.65rem;
  bottom: 0.65rem;
  left: 0.65rem;
  gap: 0.4rem;
}

/* Interactive 3D controls must stay hidden until the WebGL viewer is loaded. */
.calc-viewer-hud[hidden],
.calc-view-presets[hidden],
.calc-viewer-toolbar[hidden],
.dimension-overlay[hidden] {
  display: none !important;
}

.calc-viewer-toolbar .viewer-actions {
  max-width: 100%;
  display: flex;
  overflow-x: auto;
}

.calc-viewer-toolbar .button,
.calc-viewer-toolbar .icon-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

#calc-toggle-wicket {
  border-color: #b47d1f;
  background: #fff5df;
  color: #6f4a0a;
}

.calc-3d__note {
  margin: 0;
  color: #607381;
  font-size: 0.7rem;
  line-height: 1.5;
}

.summary-top {
  display: grid;
  gap: 0.42rem;
  background:
    radial-gradient(circle at 100% 0, rgb(87 178 234 / 21%), transparent 40%),
    #172a3a;
  color: #fff;
  padding: 1.45rem;
}

.summary-badge {
  width: max-content;
  border-radius: 999px;
  background: rgb(76 190 139 / 17%);
  color: #9de4c5;
  padding: 0.28rem 0.52rem;
  font-size: 0.68rem;
  font-weight: 900;
}

.summary-badge.is-error {
  background: rgb(240 163 74 / 17%);
  color: #ffd094;
}

.summary-total {
  margin-top: 0.3rem;
  font-size: clamp(2rem, 4.3vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.summary-caption {
  margin: 0;
  color: rgb(255 255 255 / 65%);
  font-size: 0.76rem;
}

.summary-warning {
  margin: 1rem 1rem 0;
  border-radius: 0.72rem;
  background: #fff3e4;
  color: #795128;
  padding: 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.breakdown {
  display: grid;
  gap: 0;
  padding: 0.75rem 1.15rem;
}

.breakdown-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  border-bottom: 1px solid #e6ebef;
  padding: 0.72rem 0;
  font-size: 0.76rem;
}

.breakdown-line:last-child {
  border-bottom: 0;
}

.breakdown-line span {
  color: #586876;
}

.breakdown-line strong {
  text-align: right;
}

.breakdown-line small {
  display: block;
  grid-column: 1 / -1;
  margin-top: -0.52rem;
  color: #84909a;
}

.summary-actions {
  display: grid;
  gap: 0.55rem;
  padding: 0 1.15rem 1rem;
}

.quote-cart {
  display: grid;
  gap: 0.7rem;
  margin: 0 1.15rem 1rem;
  border: 1px solid #d7e2e9;
  border-radius: 1rem;
  background: #f8fbfc;
  padding: 0.9rem;
}

.quote-cart__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.quote-cart__head h3 {
  font-size: 1rem;
}

.quote-cart__head > span {
  border-radius: 999px;
  background: #e8f3f9;
  color: #276486;
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.quote-cart__help {
  margin: 0;
  color: #637581;
  font-size: 0.68rem;
  line-height: 1.5;
}

.quote-cart__list {
  display: grid;
  gap: 0.48rem;
}

.quote-cart__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.6rem;
  border: 1px solid #dce6eb;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.68rem;
}

.quote-cart__item strong,
.quote-cart__item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-cart__item strong {
  font-size: 0.72rem;
}

.quote-cart__item small {
  grid-column: 1;
  color: #70808b;
  font-size: 0.63rem;
  line-height: 1.4;
}

.quote-cart__item-price {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  text-align: right;
  color: #1d607f;
  font-size: 0.7rem;
  font-weight: 900;
}

.quote-cart__remove {
  grid-column: 1 / -1;
  justify-self: end;
  border: 0;
  background: transparent;
  color: #a34b42;
  padding: 0.15rem;
  font-size: 0.64rem;
  font-weight: 800;
}

.quote-cart__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 0.7rem;
  border-top: 1px solid #dbe5ea;
  padding-top: 0.68rem;
  font-size: 0.68rem;
}

.quote-cart__footer[hidden] {
  display: none !important;
}

.quote-cart__footer strong {
  color: #195f87;
  font-size: 0.86rem;
}

.quote-cart__footer .text-button {
  grid-column: 1 / -1;
  justify-self: start;
}

.summary-source {
  display: grid;
  gap: 0.25rem;
  border-top: 1px solid #e1e7eb;
  background: #f7f9fa;
  padding: 1rem 1.15rem;
  font-size: 0.7rem;
}

.summary-source span {
  color: #61707c;
}

.offer-note {
  margin: 0;
  background: #f7f9fa;
  color: #77838d;
  padding: 0 1.15rem 1.15rem;
  font-size: 0.64rem;
}

.calc-method {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.calc-method h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.summary-actions .button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.5;
}

.doc-dialog {
  width: min(560px, calc(100% - 1.5rem));
  max-height: min(90vh, 900px);
  margin: auto;
  overflow: auto;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  color: #17212d;
  padding: 0;
  box-shadow: 0 30px 90px rgb(9 25 37 / 32%);
}

.doc-dialog--wide {
  width: min(920px, calc(100% - 1.5rem));
}

.doc-dialog::backdrop {
  background: rgb(10 26 38 / 68%);
  backdrop-filter: blur(4px);
}

.doc-form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1rem, 3vw, 2rem);
}

.doc-form__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e1e8ed;
  padding-bottom: 1rem;
}

.doc-form__head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.doc-form__close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #d8e1e7;
  border-radius: 0.7rem;
  background: #f5f7f9;
  color: #32485a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.doc-form__lead,
.doc-form__privacy,
.doc-form__hint,
.doc-form__status {
  margin: 0;
  overflow-wrap: anywhere;
}

.doc-form__lead {
  color: #526777;
  font-size: 0.83rem;
  line-height: 1.6;
}

.doc-form__privacy,
.doc-form__hint {
  color: #6c7d89;
  font-size: 0.7rem;
  line-height: 1.55;
}

.doc-form__privacy a {
  color: #236f9f;
}

.doc-form__status {
  min-height: 1.25rem;
  color: #8a4935;
  font-size: 0.78rem;
  font-weight: 700;
}

.doc-fieldset {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  margin: 0;
  border: 1px solid #dce5eb;
  border-radius: 0.9rem;
  padding: 1rem;
}

.doc-fieldset legend {
  padding-inline: 0.35rem;
  color: #29495f;
  font-size: 0.82rem;
  font-weight: 900;
}

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

.doc-field--wide {
  grid-column: 1 / -1;
}

.doc-client-switch,
.doc-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.doc-client-switch label,
.doc-checks label,
.doc-consent {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #d8e2e8;
  border-radius: 0.75rem;
  background: #f7fafb;
  padding: 0.75rem;
  font-size: 0.77rem;
  font-weight: 800;
}

.doc-client-switch input,
.doc-checks input,
.doc-consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #2f7db1;
}

.doc-client-section[hidden],
.doc-dialog [hidden] {
  display: none !important;
}

.doc-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.doc-format-choices {
  width: min(100%, 31rem);
  border: 1px solid #cbd9e2;
  border-radius: 0.85rem;
  background: #f7fafc;
  padding: 0.65rem;
}

.doc-format-choices summary {
  cursor: pointer;
  color: #1f4d78;
  font-size: 0.8rem;
  font-weight: 900;
}

.doc-format-choices[open] summary { margin-bottom: 0.65rem; }

.doc-format-choices .doc-download {
  display: inline-flex;
  margin: 0 0.45rem 0.45rem 0;
  border: 0;
}

.doc-download {
  border-radius: 0.7rem;
  background: #e4f4ee;
  color: #176348;
  padding: 0.7rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-decoration: none;
}

.method-grid article {
  border-top: 2px solid #2f7db1;
  background: #f5f8fa;
  padding: 1.25rem;
}

.method-grid article > span {
  color: #2f7db1;
  font-size: 0.72rem;
  font-weight: 900;
}

.method-grid h3 {
  margin: 0.7rem 0 0.45rem;
  font-size: 1.05rem;
}

.method-grid p {
  margin: 0;
  color: #63717e;
  font-size: 0.8rem;
}

@media (max-width: 1180px) {
  .price-calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-summary {
    position: static;
  }

  .calc-viewer-shell {
    height: min(72vh, 680px);
    min-height: 540px;
  }
}

@media (max-width: 720px) {
  .calc-hero__grid,
  .method-grid,
  .calc-mode-switch,
  .calc-trust-strip {
    grid-template-columns: 1fr;
  }

  .calc-proof {
    max-width: 360px;
  }

  .input-grid--3,
  .lift-grid {
    grid-template-columns: 1fr;
  }

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

  .input-grid--dimensions > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .input-grid--2,
  .option-filters {
    grid-template-columns: 1fr;
  }

  .calc-form {
    padding: 0.8rem;
  }

  .calc-mode-switch {
    margin-top: -0.8rem;
  }

  .calc-trust-strip {
    margin-top: -0.8rem;
  }

  .calc-viewer-shell {
    height: 620px;
    min-height: 620px;
  }

  .calc-viewer-hud {
    right: 0.55rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calc-viewer-hud > div {
    min-width: 0;
    padding: 0.34rem;
  }

  .calc-viewer-hud strong {
    font-size: 0.54rem;
  }

  .calc-view-presets {
    right: 0.5rem;
    bottom: 10.8rem;
    left: 0.5rem;
    justify-content: center;
  }

  .calc-viewer-toolbar .viewer-actions {
    width: 100%;
  }

  .calc-card__head {
    align-items: flex-start;
  }

  .live-dot {
    white-space: normal;
  }

  .option-row,
  .catalog-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .option-price,
  .catalog-price {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .quantity-input {
    width: 92px;
  }

  .doc-grid,
  .doc-client-switch,
  .doc-checks {
    grid-template-columns: 1fr;
  }

  .doc-field--wide {
    grid-column: auto;
  }
}

/* v10: единый бренд, облегчённая визуализация и услуги в основном расчёте */
.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(23, 33, 45, 0.2);
}

.calc-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.calc-mode-picker label {
  position: relative;
  cursor: pointer;
}

.calc-mode-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calc-mode-picker span {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  background: #f5f7f9;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.calc-mode-picker small {
  color: #627585;
  line-height: 1.35;
}

.calc-mode-picker input:checked + span {
  border-color: #17212d;
  background: #17212d;
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 33, 45, 0.18);
}

.calc-mode-picker input:checked + span small {
  color: rgba(255, 255, 255, 0.72);
}

.calc-mode-picker input:focus-visible + span {
  outline: 3px solid rgba(47, 125, 177, 0.32);
  outline-offset: 2px;
}

.service-fields {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  background: #fbfcfd;
}

.service-checks[hidden] {
  display: none;
}

.service-fields[hidden] {
  display: none;
}

.service-checks {
  margin: 0;
}

.service-checks label.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.button--small {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.button--max {
  border-color: #5b59e8;
  color: #4341bf;
}

.poster-scene--2d {
  position: relative;
  width: min(86%, 420px);
  min-height: 210px;
  margin: 0 auto 12px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #cfe2ee 0 50%, #d8d0c4 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(23, 33, 45, 0.08);
}

.poster-scene--2d .poster-wall {
  position: relative;
  width: 82%;
  height: 78%;
  margin-bottom: 10%;
  padding: 13% 11% 0;
  background: linear-gradient(135deg, #ece9e3, #c9c6c0);
  box-shadow: 0 16px 24px rgba(23, 33, 45, 0.18);
}

.poster-scene--2d .poster-gate {
  --gate-color: #e8ebed;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  width: 100%;
  height: 88%;
  overflow: hidden;
  border: 4px solid #3f4b54;
  border-bottom-width: 6px;
  background: var(--gate-color);
  transform-origin: 50% 0;
  transition: transform 520ms cubic-bezier(.22,.8,.28,1), opacity 320ms ease;
}

.poster-scene--2d .poster-gate > span {
  position: relative;
  display: block;
  border-bottom: 1px solid rgba(23, 33, 45, 0.24);
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(0,0,0,.06));
}

.poster-scene--2d .poster-gate > span.is-panoramic {
  background:
    linear-gradient(90deg, transparent 0 23%, #53636c 23% 26%, transparent 26% 49%, #53636c 49% 52%, transparent 52% 75%, #53636c 75% 78%, transparent 78%),
    linear-gradient(150deg, rgba(185,232,255,.78), rgba(54,112,145,.72));
  box-shadow: inset 0 0 0 3px #58666f;
}

.poster-window-row {
  position: absolute;
  inset: 18% 5%;
  display: flex;
  align-items: stretch;
  justify-content: space-evenly;
  gap: 4%;
}

.poster-window-row i {
  min-width: 0;
  flex: 1 1 0;
  max-width: 23%;
  border: 2px solid #465760;
  border-radius: 2px;
  background: linear-gradient(145deg, rgba(190,235,255,.92), rgba(60,116,145,.86));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

.poster-scene--2d .poster-wicket {
  position: absolute;
  left: 12%;
  bottom: 0;
  width: 27%;
  height: 76%;
  border: 2px solid #2e3942;
  background: var(--gate-color);
  background: color-mix(in srgb, var(--gate-color), #000 6%);
  opacity: 0;
  transform-origin: 0 50%;
  transition: transform 420ms ease, opacity 180ms ease;
}

.poster-scene--2d.has-wicket .poster-wicket { opacity: 1; }
.poster-scene--2d.wicket-center .poster-wicket { left: 36.5%; }
.poster-scene--2d.wicket-right .poster-wicket { left: 61%; }
.poster-scene--2d.is-wicket-open .poster-wicket { transform: perspective(220px) rotateY(-58deg); }
.poster-scene--2d.is-open:not(.is-sliding) .poster-gate { transform: translateY(-78%); }

.poster-scene--2d .poster-track {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 8%;
  height: 4px;
  border-radius: 999px;
  background: #6d7478;
  opacity: 0;
}

.poster-scene--2d.is-sliding .poster-track { opacity: 1; }
.poster-scene--2d.is-sliding.is-open .poster-gate { transform: translateX(72%); }

.poster-dimensions {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(23, 33, 45, 0.84);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

@media (max-width: 680px) {
  .window-placement-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .quote-cart {
    margin-inline: 0.8rem;
  }
  .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .calc-mode-picker {
    grid-template-columns: 1fr;
  }

  .calc-mode-picker span {
    min-height: 0;
  }

  .poster-scene--2d {
    width: 100%;
    min-height: 190px;
  }
}

/* v10.9: мобильный режим, выбор нагрузки 3D и безопасная загрузка фото */
.viewer-quality {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 0.6rem;
  background: rgb(14 34 48 / 74%);
  color: #fff;
  padding: 0.25rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
}

.viewer-quality select {
  width: auto;
  min-height: 30px;
  border: 0;
  border-radius: 0.4rem;
  background: #fff;
  color: #173247;
  padding: 0.25rem 1.55rem 0.25rem 0.45rem;
  font: inherit;
}

.button--photo {
  border-color: #3e8f72;
  background: #eef9f5;
  color: #176348;
}

.opening-photo-field small {
  color: #6c7d89;
  font-size: 0.68rem;
  line-height: 1.45;
}

.opening-photo-field input[type="file"] {
  min-height: 48px;
  border: 1px dashed #9bb7c8;
  border-radius: 0.7rem;
  background: #f4f9fb;
  padding: 0.65rem;
}

.opening-photo-preview {
  overflow: hidden;
  border: 1px solid #d7e3ea;
  border-radius: 0.85rem;
  background: #eef3f6;
}

.opening-photo-preview img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.doc-consent a {
  color: #236f9f;
}

.pwa-install {
  position: fixed;
  z-index: 80;
  right: max(0.9rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: #17212d;
  color: #fff;
  padding: 0.72rem 1rem;
  box-shadow: 0 12px 34px rgb(8 24 35 / 28%);
  font: 800 0.72rem/1.1 Manrope, sans-serif;
  cursor: pointer;
}

.pwa-install[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .section-inner--workbench {
    width: min(100% - 0.8rem, 1540px);
  }

  .calc-card {
    border-radius: 1rem;
  }

  .calc-viewer-shell {
    height: min(66svh, 520px);
    min-height: 430px;
  }

  .calc-viewer-toolbar {
    right: 0.4rem;
    bottom: max(0.4rem, env(safe-area-inset-bottom));
    left: 0.4rem;
    max-height: 42%;
    overflow-y: auto;
  }

  .calc-viewer-toolbar .button,
  .calc-viewer-toolbar .icon-action {
    min-height: 42px;
  }

  .calc-view-presets {
    bottom: 9.8rem;
  }

  .calc-summary .summary-top {
    position: sticky;
    z-index: 8;
    top: 68px;
    box-shadow: 0 10px 24px rgb(20 42 58 / 12%);
  }

  .summary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0.8rem;
  }

  .summary-actions .button {
    min-height: 48px;
    height: auto;
    padding-inline: 0.6rem;
    white-space: normal;
  }

  .summary-actions #download-proposal,
  .summary-actions #create-contract,
  .summary-actions #upload-opening-photo {
    grid-column: 1 / -1;
  }

  .doc-dialog,
  .doc-dialog--wide {
    width: calc(100% - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
    border-radius: 1rem;
  }

  .doc-form {
    padding: 0.85rem;
  }

  .doc-form__close {
    width: 46px;
    height: 46px;
  }

  .pwa-install {
    right: 0.6rem;
    bottom: max(0.6rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 410px) {
  .summary-actions {
    grid-template-columns: 1fr;
  }

  .summary-actions #download-proposal,
  .summary-actions #create-contract,
  .summary-actions #upload-opening-photo {
    grid-column: auto;
  }

  .calc-viewer-shell {
    height: min(62svh, 470px);
    min-height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install,
  .opening-photo-preview img {
    scroll-behavior: auto;
    transition: none;
  }
}
