@font-face {
      font-family: "BWT Cyr";
      src: url("./fonts/BWT Cyr-Regular.ttf") format("truetype");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }
    @font-face {
      font-family: "BWT Cyr";
      src: url("./fonts/BWT Cyr-Headline.ttf") format("truetype");
      font-weight: 700;
      font-style: normal;
      font-display: swap;
    }
    :root {
      --bwt-dark-blue: #00174b;
      --bwt-pink: #ff88bd;
      --bwt-light-gray: #f6f6f6;
      --bwt-gray: #d9d9d9;
      --bwt-white: #ffffff;
      /* Исходные серые поясняющие тексты сохраняем серыми */
      --bwt-muted: #667085;
    }
    .bwt-public-questionnaire,
    .bwt-public-questionnaire * {
      box-sizing: border-box;
    }
    /* ==========================================================
       ОСНОВНОЙ КОНТЕЙНЕР
       Визуально повторяет контейнер калькулятора.
    ========================================================== */
    .bwt-public-questionnaire {
      width: 100%;
      max-width: 1340px;
      margin: 0 auto;
      padding: 0;
      font-family: "BWT Cyr", sans-serif;
      color: var(--bwt-dark-blue);
      background: var(--bwt-white);
      font-size: 16px;
      line-height: 1.4;
    }
    /* ==========================================================
       HERO
    ========================================================== */
    .bwt-q-hero {
      width: 100%;
      margin: 0 0 30px;
      padding: 0;
    }
    .bwt-q-title {
      width: 100%;
      margin: 0;
      color: var(--bwt-dark-blue);
      line-height: 1.3;
      font-weight: 700;
      text-align: center;
    }
    /* Изначально серый текст оставляем серым */
    .bwt-q-lead {
      width: 80%;
      max-width: 80%;
      margin: 14px auto 0;
      color: var(--bwt-muted);
      font-size: 24px;
      line-height: 1.3;
      font-weight: 400;
      text-align: center;
    }
    /* ==========================================================
       ОБЩАЯ КАРТОЧКА
       overflow не используем, чтобы sticky работал корректно.
    ========================================================== */
    .bwt-q-shell {
      width: 100%;
      border: 0;
      border-radius: 10px;
      background: var(--bwt-white);
      box-shadow: 1px 2px 10px 0 rgba(0, 23, 75, 0.10);
    }
    .bwt-q-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 430px;
      gap: 0;
      align-items: start;
    }
    /* ==========================================================
       ЛЕВАЯ ЧАСТЬ — ФОРМА
    ========================================================== */
    .bwt-q-main {
      min-width: 0;
      padding: 30px;
      border-right: 1px solid rgba(217, 217, 217, 0.25);
      background: var(--bwt-white);
    }
    .bwt-q-section {
      min-width: 0;
      margin: 0 0 30px;
      padding: 0 0 30px;
      border: 0;
      border-bottom: 1px solid rgba(217, 217, 217, 0.25);
    }
    .bwt-q-section:last-of-type {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: 0;
    }
    .bwt-q-section-head {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 20px;
    }
    .bwt-q-num {
      flex: 0 0 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: var(--bwt-dark-blue);
      color: var(--bwt-white);
      font-size: 14px;
      line-height: 1;
      font-weight: 400;
    }
    /* Legend / заголовки секций — визуальный уровень h3 */
    .bwt-q-section-title {
      margin: 0;
      color: var(--bwt-dark-blue);
      font-family: "BWT Cyr", sans-serif;
      font-size: 24px;
      line-height: 1.3;
      font-weight: 700;
    }
    /* Серые поясняющие тексты сохраняем серыми */
    .bwt-q-section-note,
    .bwt-q-help {
      color: var(--bwt-muted);
    }
    .bwt-q-section-note {
      max-width: 760px;
      margin: 6px 0 0;
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
    }
    /* ==========================================================
       СЕТКА ПОЛЕЙ
    ========================================================== */
    .bwt-q-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px 14px;
    }
    .bwt-q-fields.is-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .bwt-q-field {
      display: block;
      min-width: 0;
    }
    .bwt-q-field.is-wide {
      grid-column: 1 / -1;
    }
    .bwt-q-label {
      display: flex;
      gap: 6px;
      margin-bottom: 8px;
      color: var(--bwt-dark-blue);
      font-size: 14px;
      line-height: 1.4;
      font-weight: 700;
    }
    .bwt-q-required {
      color: var(--bwt-pink);
      font-weight: 400;
    }
    /* ==========================================================
       INPUT / SELECT / TEXTAREA
       Стиль как у полей калькулятора.
    ========================================================== */
    .bwt-q-input,
    .bwt-q-select,
    .bwt-q-textarea {
      width: 100%;
      border: 1px solid var(--bwt-gray);
      border-radius: 10px;
      background: var(--bwt-white);
      color: var(--bwt-dark-blue);
      font-family: "BWT Cyr", sans-serif;
      font-size: 16px;
      line-height: 1.3;
      font-weight: 400;
      outline: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }
    .bwt-q-input,
    .bwt-q-select {
      height: 54px;
      padding: 0 14px;
    }
    .bwt-q-input {
      -moz-appearance: textfield;
    }
    .bwt-q-input::-webkit-outer-spin-button,
    .bwt-q-input::-webkit-inner-spin-button {
      margin: 0;
      -webkit-appearance: none;
    }
    .bwt-q-select {
      padding-right: 46px;
      appearance: none;
      -webkit-appearance: none;
      background-image:
        linear-gradient(45deg, transparent 50%, var(--bwt-dark-blue) 50%),
        linear-gradient(135deg, var(--bwt-dark-blue) 50%, transparent 50%);
      background-position:
        calc(100% - 24px) 50%,
        calc(100% - 18px) 50%;
      background-size: 6px 6px, 6px 6px;
      background-repeat: no-repeat;
    }
    .bwt-q-select::-ms-expand {
      display: none;
    }
    .bwt-q-textarea {
      min-height: 110px;
      padding: 14px;
      resize: vertical;
      line-height: 1.4;
    }
    .bwt-q-input:focus,
    .bwt-q-select:focus,
    .bwt-q-textarea:focus {
      border-color: var(--bwt-dark-blue);
      box-shadow: 0 0 0 1px var(--bwt-dark-blue);
    }
    /* Недоступные поля: визуально серые и явно выключенные */
    .bwt-q-input:disabled,
    .bwt-q-select:disabled,
    .bwt-q-textarea:disabled {
      color: var(--bwt-muted);
      background: var(--bwt-light-gray);
      border-color: var(--bwt-gray);
      cursor: not-allowed;
      opacity: 1;
    }
    .bwt-q-field.is-disabled .bwt-q-label {
      color: var(--bwt-muted);
    }
    .bwt-q-help {
      width: 92%;
      max-width: 420px;
      margin: 8px 0 0;
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
      word-break: normal;
      overflow-wrap: normal;
      hyphens: none;
    }
    /* ==========================================================
       ЧЕКБОКСЫ / ВАРИАНТЫ
    ========================================================== */
    .bwt-q-inline-options {
      display: flex;
      flex-wrap: wrap;
      gap: 18px;
      margin-top: 8px;
    }
    .bwt-q-circle-toggle {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      width: fit-content;
      min-height: 40px;
      margin: 2px 0 0;
      color: var(--bwt-dark-blue);
      font-size: 16px;
      line-height: 1.4;
      font-weight: 400;
      cursor: pointer;
    }
    .bwt-q-inline-options .bwt-q-circle-toggle {
      margin: 0;
    }
    .bwt-q-circle-toggle input {
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: var(--bwt-dark-blue);
      cursor: pointer;
    }
    .bwt-q-choice-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .bwt-q-choice-grid.is-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    /* ==========================================================
       НАЗНАЧЕНИЕ БАССЕЙНА
       Нейтральный вариант без карточек и фоновой заливки.
       Чекбокс визуально повторяет обычный checkbox "Круглая чаша".
    ========================================================== */
    .bwt-q-choice {
      position: relative;
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: var(--bwt-dark-blue);
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
      cursor: pointer;
    }
    .bwt-q-choice:hover {
      background: transparent;
      color: var(--bwt-dark-blue);
    }
    .bwt-q-choice input {
      position: static;
      width: 18px;
      height: 18px;
      margin: 0;
      opacity: 1;
      pointer-events: auto;
      accent-color: var(--bwt-dark-blue);
      cursor: pointer;
      flex: 0 0 18px;
    }
    /* Старый декоративный квадрат больше не используется */
    .bwt-q-mark {
      display: none;
    }
    .bwt-q-choice:has(input:checked) {
      border: 0;
      background: transparent;
      color: var(--bwt-dark-blue);
    }
    /* ==========================================================
       ВАЛИДАЦИЯ
    ========================================================== */
    .bwt-q-shell.is-submitted .bwt-q-input:invalid,
    .bwt-q-shell.is-submitted .bwt-q-select:invalid,
    .bwt-q-shell.is-submitted .bwt-q-textarea:invalid,
    .bwt-q-input.is-invalid,
    .bwt-q-select.is-invalid,
    .bwt-q-textarea.is-invalid {
      border-color: var(--bwt-pink);
      background: var(--bwt-white);
      box-shadow: 0 0 0 1px var(--bwt-pink);
    }
    .bwt-q-field.is-invalid-field .bwt-q-label {
      color: var(--bwt-pink);
    }
    /* Локальное сервисное сообщение для обязательных групп */
    .bwt-q-group-error {
      display: none;
      margin: 8px 0 0;
      color: var(--bwt-pink);
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
    }
    .bwt-q-group-error.is-visible {
      display: block;
    }
    /* ==========================================================
       ПРАВАЯ СВОДКА
       На desktop следует за пользователем при скролле.
    ========================================================== */
    .bwt-q-aside {
      position: sticky;
      top: 20px;
      align-self: start;
      display: flex;
      flex-direction: column;
      width: 100%;
      padding: 30px;
      background: var(--bwt-light-gray);
    }
    /* "Сводка по бассейну" — тот же визуальный уровень h3 */
    .bwt-q-summary-title {
      margin: 0 0 10px;
      color: var(--bwt-dark-blue);
      font-family: "BWT Cyr", sans-serif;
      font-size: 24px;
      line-height: 1.3;
      font-weight: 700;
    }
    /* Серый текст в сводке остаётся серым */
    .bwt-q-summary-text,
    .bwt-q-note,
    .bwt-q-file-note,
    .bwt-q-consent {
      color: var(--bwt-muted);
    }
    /* Обязательное согласие на обработку персональных данных */
    .bwt-q-consent-check {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      cursor: pointer;
    }
    .bwt-q-consent-check input {
      flex: 0 0 18px;
      width: 18px;
      height: 18px;
      margin: 1px 0 0;
      accent-color: var(--bwt-dark-blue);
      cursor: pointer;
    }
    .bwt-q-consent-check.is-invalid {
      color: var(--bwt-pink);
    }
    .bwt-q-summary-text {
      margin: 0 0 18px;
      font-size: 14px;
      line-height: 1.5;
      font-weight: 400;
    }
    .bwt-q-metrics {
      display: grid;
      gap: 0;
      margin: 0 0 18px;
    }
    .bwt-q-metric {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 0;
      border-bottom: 1px solid rgba(217, 217, 217, 0.25);
      color: var(--bwt-muted);
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
    }
    .bwt-q-metric strong {
      color: var(--bwt-dark-blue);
      font-size: 16px;
      line-height: 1.4;
      font-weight: 700;
      text-align: right;
    }
    .bwt-q-note {
      padding: 14px 16px;
      border: 1px solid var(--bwt-gray);
      border-radius: 10px;
      background: var(--bwt-white);
      font-size: 14px;
      line-height: 1.5;
      font-weight: 400;
    }
    /* ==========================================================
       ПРИКРЕПЛЕНИЕ ФАЙЛОВ
    ========================================================== */
    .bwt-q-attachment {
      display: grid;
      gap: 8px;
      margin-top: 20px;
    }
    .bwt-q-file-input {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
    }
    .bwt-q-file-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 40px;
      min-height: 40px;
      padding: 0 16px;
      border: 1px solid var(--bwt-dark-blue);
      border-radius: 8px;
      background: var(--bwt-white);
      color: var(--bwt-dark-blue);
      font-family: "BWT Cyr", sans-serif;
      font-size: 16px;
      line-height: 1.3;
      font-weight: 400;
      white-space: nowrap;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }
    .bwt-q-file-btn:hover {
      border-color: var(--bwt-dark-blue);
      background: var(--bwt-dark-blue);
      color: var(--bwt-white);
    }
    .bwt-q-file-icon {
      flex: 0 0 16px;
      width: 16px;
      height: 16px;
      margin-right: 6px;
      background: currentColor;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 1 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") center / contain no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 1 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") center / contain no-repeat;
    }
    .bwt-q-file-note {
      margin: 0;
      font-size: 14px;
      line-height: 1.4;
      font-weight: 400;
    }
    /* ==========================================================
       CTA
       Кнопка КП всегда остаётся видимой внизу sticky-панели.
    ========================================================== */
    .bwt-q-actions {
      display: grid;
      gap: 10px;
      margin-top: 20px;
    }
    .bwt-q-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: auto;
      min-height: 40px;
      padding: 10px 16px;
      border: 1px solid var(--bwt-dark-blue);
      border-radius: 8px;
      background: var(--bwt-dark-blue);
      color: var(--bwt-white);
      font-family: "BWT Cyr", sans-serif;
      font-size: 16px;
      line-height: 1.3;
      font-weight: 400;
      text-decoration: none;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }
    .bwt-q-btn:hover {
      border-color: var(--bwt-dark-blue);
      background: var(--bwt-white);
      color: var(--bwt-dark-blue);
    }
    /* Кнопка "Распечатать" скрыта */
    #printForm {
      display: none !important;
    }
    .bwt-q-consent {
      margin: 14px 0 0;
      font-size: 14px;
      line-height: 1.5;
      font-weight: 400;
    }
    /* ==========================================================
       1200–1459px
    ========================================================== */
    @media (min-width: 1200px) and (max-width: 1459px) {
      .bwt-public-questionnaire {
        max-width: 1170px;
      }
      .bwt-q-section-title,
      .bwt-q-summary-title,
      .bwt-q-lead {
        font-size: 20px;
      }
      .bwt-q-grid {
        grid-template-columns: minmax(0, 1fr) 400px;
      }
    }
    /* ==========================================================
       992–1199px
    ========================================================== */
    @media (min-width: 992px) and (max-width: 1199px) {
      .bwt-public-questionnaire {
        max-width: 990px;
      }
      .bwt-q-section-title,
      .bwt-q-summary-title,
      .bwt-q-lead {
        font-size: 18px;
      }
      .bwt-q-grid {
        grid-template-columns: minmax(0, 1fr) 360px;
      }
      .bwt-q-main,
      .bwt-q-aside {
        padding: 26px;
      }
    }
    /* ==========================================================
       ДО 991px
       Sticky отключается, сводка идёт после формы.
    ========================================================== */
    @media (max-width: 991px) {
      .bwt-q-grid {
        grid-template-columns: 1fr;
      }
      .bwt-q-main {
        border-right: 0;
        border-bottom: 1px solid rgba(217, 217, 217, 0.25);
      }
      .bwt-q-aside {
        position: static;
        top: auto;
      }
      .bwt-q-btn,
      .bwt-q-file-btn {
        width: 100%;
      }
    }
    /* ==========================================================
       768–991px
    ========================================================== */
    @media (min-width: 768px) and (max-width: 991px) {
      .bwt-public-questionnaire {
        max-width: 640px;
      }
      .bwt-q-section-title,
      .bwt-q-summary-title,
      .bwt-q-lead {
        font-size: 18px;
      }
      .bwt-q-fields.is-3,
      .bwt-q-choice-grid.is-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    /* ==========================================================
       576–767px
    ========================================================== */
    @media (min-width: 576px) and (max-width: 767px) {
      .bwt-public-questionnaire {
        max-width: 540px;
      }
     
      .bwt-q-section-title,
      .bwt-q-summary-title,
      .bwt-q-lead {
        font-size: 16px;
      }
      .bwt-q-main,
      .bwt-q-aside {
        padding: 24px;
      }
      .bwt-q-fields,
      .bwt-q-fields.is-3,
      .bwt-q-choice-grid,
      .bwt-q-choice-grid.is-3 {
        grid-template-columns: 1fr;
      }
    }
    /* ==========================================================
       425–575px
    ========================================================== */
    @media (min-width: 425px) and (max-width: 575px) {
      .bwt-public-questionnaire {
        width: 100%;
        max-width: 575px;
      }
      
      .bwt-q-section-title,
      .bwt-q-summary-title,
      .bwt-q-lead {
        font-size: 16px;
      }
      .bwt-q-main,
      .bwt-q-aside {
        padding: 20px;
      }
      .bwt-q-fields,
      .bwt-q-fields.is-3,
      .bwt-q-choice-grid,
      .bwt-q-choice-grid.is-3 {
        grid-template-columns: 1fr;
      }
      .bwt-q-btn,
      .bwt-q-file-btn {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
      }
      .bwt-q-metric {
        flex-wrap: wrap;
      }
    }
    /* ==========================================================
       320–424px
    ========================================================== */
    @media (min-width: 320px) and (max-width: 424px) {
      .bwt-public-questionnaire {
        width: 100%;
        max-width: 424px;
      }
 
      .bwt-q-section-title,
      .bwt-q-summary-title,
      .bwt-q-lead {
        font-size: 16px;
      }
      .bwt-q-main,
      .bwt-q-aside {
        padding: 20px 16px;
      }
      .bwt-q-fields,
      .bwt-q-fields.is-3,
      .bwt-q-choice-grid,
      .bwt-q-choice-grid.is-3 {
        grid-template-columns: 1fr;
      }
      .bwt-q-btn,
      .bwt-q-file-btn {
        padding: 10px 8px;
        font-size: 14px;
      }
      .bwt-q-metric {
        flex-direction: column;
        gap: 6px;
      }
      .bwt-q-metric strong {
        text-align: left;
      }
    }
/* custom */
.bwt-q-errors{
  color: red;
  font-size: 14px;
}
.bwt-q-input:focus, .bwt-q-select:focus, .bwt-q-textarea:focus{
      border-color: var(--bwt-dark-blue) !important;
}
.bwt-public-questionnaire {
  font-family: "Cyr", sans-serif;
}
.bwt-q-section-title{
  font-family: "Cyr", sans-serif;
}
.bwt-q-input,
.bwt-q-select,
.bwt-q-textarea{
  font-family: "Cyr", sans-serif;
}
.bwt-q-summary-title{
  font-family: "Cyr", sans-serif;
}
.bwt-q-file-btn{
  font-family: "Cyr", sans-serif;
}
.bwt-q-btn{
  font-family: "Cyr", sans-serif;
}
.bwt-q-consent-check{
  align-items: center;
}
.bwt-q-consent-check a{
  text-decoration: underline;
  color: var(--bwt-dark-blue);
}
.bwt-q-consent-check a:hover{
  text-decoration: none;
}