.topoff-form {
  width: 100%;
  display: grid;
  gap: 22px;
  padding: 34px;
  border: 1px solid var(--tof-line);
  border-radius: 8px;
  background: var(--tof-white);
  box-shadow: 0 10px 28px rgba(0, 43, 104, 0.08);
}

.topoff-form__row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.topoff-form__intro {
  margin: 0;
  padding: 18px 20px;
  border-left: 4px solid var(--tof-blue);
  border-radius: 8px;
  background: #F7FBFF;
  color: var(--tof-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

.topoff-form__label {
  display: block;
  color: var(--tof-text);
  font-weight: 900;
  line-height: 1.6;
}

.topoff-form__required,
.topoff-form__optional {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  vertical-align: middle;
}

.topoff-form__required {
  background: var(--tof-blue);
  color: var(--tof-white);
}

.topoff-form__optional {
  background: var(--tof-light);
  color: var(--tof-sub);
}

.topoff-form__control,
.topoff-form input[type="text"],
.topoff-form input[type="email"],
.topoff-form input[type="tel"],
.topoff-form input[type="url"],
.topoff-form select,
.topoff-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--tof-line);
  border-radius: 8px;
  background: var(--tof-white);
  color: var(--tof-text);
  font: inherit;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.topoff-form__textarea,
.topoff-form textarea {
  min-height: 168px;
  resize: vertical;
}

.topoff-form__control:focus,
.topoff-form input:focus,
.topoff-form select:focus,
.topoff-form textarea:focus {
  outline: none;
  border-color: var(--tof-blue);
  box-shadow: 0 0 0 4px rgba(0, 104, 217, 0.12);
}

.topoff-form__file,
.topoff-form input[type="file"] {
  width: 100%;
  padding: 14px;
  border: 1px dashed #AFC7E6;
  border-radius: 8px;
  background: #F8FCFF;
  color: var(--tof-text);
}

.topoff-form__note,
.topoff-form__help,
.topoff-form__counter,
.topoff-form__recaptcha-note,
.tof-form-note-text {
  margin: 0;
  color: var(--tof-sub);
  font-size: 13px;
  line-height: 1.8;
}

.topoff-form__counter {
  text-align: right;
  font-weight: 800;
}

.topoff-form__counter.is-error {
  color: #B42318;
}

.topoff-form__privacy {
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--tof-bg);
  color: var(--tof-text);
  font-size: 14px;
  line-height: 1.7;
}

.topoff-form__privacy a {
  color: var(--tof-main);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topoff-form .wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  margin: 0 14px 10px 0;
}

.topoff-form .wpcf7-list-item label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.topoff-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--tof-blue);
}

.topoff-form__submit {
  display: flex;
  justify-content: center;
}

.topoff-form__button,
.topoff-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 56px;
  padding: 14px 28px;
  border: 1px solid var(--tof-blue);
  border-radius: 8px;
  background: var(--tof-blue);
  color: var(--tof-white);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 104, 217, 0.2);
}

.topoff-form__button:hover,
.topoff-form input[type="submit"]:hover {
  background: #0058C3;
}

.topoff-form .wpcf7-not-valid-tip,
.wpcf7-not-valid-tip {
  margin-top: 6px;
  color: #B42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.topoff-form .wpcf7-not-valid,
.topoff-form .topoff-form__control.wpcf7-not-valid {
  border-color: #D92D20;
  background: #FFF8F7;
}

.topoff-form__field-error {
  margin: 6px 0 0;
  color: #B42318;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
}

.topoff-form .wpcf7-response-output,
.wpcf7 .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 18px 20px;
  border: 1px solid #DCE7F5 !important;
  border-radius: 14px;
  background: #F6FAFF;
  color: #0B1F3A;
  font-weight: 800;
  line-height: 1.7;
  box-shadow: 0 8px 22px rgba(0, 43, 104, 0.06);
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: #9FE7D0 !important;
  background: #ECFFF8;
  color: #006B52;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
  border-color: #F6C36D !important;
  background: #FFFAEB;
  color: #B54708;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  border-color: #F1B4B4 !important;
  background: #FFF5F5;
  color: #9F1C16;
}

.topoff-confirm {
  display: grid;
  gap: 22px;
  padding: 34px;
  border: 1px solid var(--tof-line);
  border-radius: 8px;
  background: var(--tof-white);
  box-shadow: 0 10px 28px rgba(0, 43, 104, 0.08);
}

.topoff-confirm__title {
  margin: 0;
  color: var(--tof-text);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.45;
}

.topoff-confirm__lead {
  margin: 0;
  color: var(--tof-sub);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.topoff-confirm__list {
  display: grid;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--tof-line);
  border-radius: 8px;
}

.topoff-confirm__item {
  display: grid;
  grid-template-columns: minmax(160px, 28%) minmax(0, 1fr);
  border-top: 1px solid var(--tof-line);
}

.topoff-confirm__item:first-child {
  border-top: 0;
}

.topoff-confirm__label,
.topoff-confirm__value {
  margin: 0;
  padding: 16px 18px;
  line-height: 1.8;
}

.topoff-confirm__label {
  background: #F7FBFF;
  color: var(--tof-main);
  font-size: 14px;
  font-weight: 900;
}

.topoff-confirm__value {
  color: var(--tof-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.topoff-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.topoff-confirm__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 54px;
  padding: 13px 24px;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.topoff-confirm__button--back {
  border: 1px solid var(--tof-line);
  background: var(--tof-white);
  color: var(--tof-main);
}

.topoff-confirm__button--submit {
  border: 1px solid var(--tof-blue);
  background: var(--tof-blue);
  color: var(--tof-white);
  box-shadow: 0 10px 22px rgba(0, 104, 217, 0.2);
}

.topoff-confirm__button--back:hover {
  border-color: var(--tof-blue);
  background: #F7FBFF;
}

.topoff-confirm__button--submit:hover {
  background: #0058C3;
}

.tof-flow-box {
  margin: 0 0 24px;
  padding: 22px;
  border: 1px solid #C9DDF5;
  border-radius: 8px;
  background: #F8FCFF;
}

.tof-flow-box h3 {
  margin: 0 0 14px;
  color: var(--tof-main);
  font-size: 18px;
  font-weight: 900;
}

.tof-flow-box ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}

.tof-flow-box li {
  display: grid;
  gap: 8px;
  list-style: none;
  color: var(--tof-text);
  font-weight: 800;
  line-height: 1.6;
}

.tof-flow-box li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tof-blue);
  color: var(--tof-white);
  font-size: 13px;
}

.tof-flow-box p {
  margin: 16px 0 0;
  color: var(--tof-sub);
  font-size: 14px;
  line-height: 1.8;
}

.tof-material-grid,
.tof-download-file-grid,
.tof-gallery-grid {
  display: grid;
  gap: 18px;
}

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

.tof-material-card,
.tof-download-file-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--tof-line);
  border-radius: 8px;
  background: var(--tof-white);
  box-shadow: 0 8px 22px rgba(0, 43, 104, 0.07);
}

.tof-material-card h3,
.tof-download-file-card h3 {
  margin: 0;
  color: var(--tof-text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.55;
}

.tof-material-card p,
.tof-download-file-card p {
  margin: 0;
  color: var(--tof-sub);
  font-size: 14px;
  line-height: 1.8;
}

.tof-download-files,
.tof-article-gallery,
.tof-article-faq,
.tof-related-links {
  margin-top: 42px;
}

.tof-download-file-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tof-download-file-card {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
}

.tof-download-file-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--tof-light);
  color: var(--tof-blue);
  font-size: 12px;
  font-weight: 900;
}

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

.tof-gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--tof-line);
  border-radius: 8px;
  object-fit: cover;
}

.tof-skill-sheet__actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.tof-footer__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tof-footer__cta .tof-footer__outline {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .tof-flow-box ol,
  .tof-material-grid,
  .tof-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .topoff-form {
    padding: 22px;
  }

  .topoff-form__intro {
    padding: 16px;
  }

  .topoff-form__submit,
  .topoff-form__button,
  .topoff-form input[type="submit"] {
    width: 100%;
  }

  .topoff-confirm {
    padding: 22px;
  }

  .topoff-confirm__item {
    grid-template-columns: 1fr;
  }

  .topoff-confirm__label {
    padding-bottom: 8px;
  }

  .topoff-confirm__value {
    padding-top: 8px;
  }

  .topoff-confirm__actions,
  .topoff-confirm__button {
    width: 100%;
  }

  .topoff-form .wpcf7-list-item {
    display: flex;
    margin: 0 0 10px;
  }

  .tof-flow-box ol,
  .tof-material-grid,
  .tof-download-file-grid,
  .tof-gallery-grid {
    grid-template-columns: 1fr;
  }

  .tof-download-file-card {
    grid-template-columns: 1fr;
  }

  .tof-skill-sheet__actions {
    justify-items: stretch;
  }
}
