.tm-quote-shell {
  --tm-form-ink: var(--tm-ink, #050505);
  --tm-form-graphite: var(--tm-graphite, #111315);
  --tm-form-steel: var(--tm-steel, #315778);
  --tm-form-orange: var(--tm-orange, #f25a00);
  --tm-form-mist: var(--tm-mist, #f1f2f3);
  --tm-form-muted: #656a70;
  background: #fff;
  color: var(--tm-form-graphite);
  font-family: var(--tm-font, 'Montserrat', Arial, sans-serif);
  margin-inline: auto;
  max-width: 1180px;
  width: 100%;
}

.tm-quote-shell,
.tm-quote-shell *,
.tm-quote-shell *::before,
.tm-quote-shell *::after {
  box-sizing: border-box;
}

.tm-quote-shell--home {
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
}

.tm-quote-intro {
  border-bottom: 1px solid #d9dcdf;
  padding: clamp(28px, 4vw, 52px);
}

.tm-quote-intro h2 {
  color: var(--tm-form-ink);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.08;
  margin: 0 0 16px;
  max-width: 820px;
}

.tm-quote-intro > p:last-child {
  color: var(--tm-form-muted);
  font-size: 1rem;
  margin: 0;
  max-width: 780px;
}

.tm-quote-kicker {
  color: var(--tm-form-orange);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.tm-quote-form,
.tm-quote-form fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.tm-quote-form > fieldset[disabled] {
  opacity: 0.72;
}

.tm-quote-section {
  background: #fff;
  border-bottom: 1px solid #d9dcdf;
  padding: clamp(28px, 4vw, 52px);
}

.tm-quote-section[hidden],
.tm-field[hidden] {
  display: none !important;
}

.tm-quote-section__head {
  align-items: flex-start;
  display: grid;
  gap: 18px;
  grid-template-columns: 48px minmax(0, 1fr);
  margin-bottom: 28px;
}

.tm-quote-section__head h3 {
  color: var(--tm-form-ink);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.18;
  margin: 0 0 6px;
}

.tm-quote-section__head p {
  color: var(--tm-form-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0;
}

.tm-form-step {
  align-items: center;
  background: var(--tm-form-ink);
  color: #fff;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  letter-spacing: 0.08em;
  width: 42px;
}

.tm-form-notice {
  align-items: flex-start;
  background: #fff4ed;
  border-left: 4px solid var(--tm-form-orange);
  display: flex;
  flex-direction: column;
  font-size: 0.9375rem;
  gap: 3px;
  line-height: 1.5;
  margin: 0;
  padding: 18px clamp(20px, 4vw, 52px);
}

.tm-form-notice--test {
  background: #eef5fa;
  border-color: var(--tm-form-steel);
}

.tm-form-notice--muted {
  background: var(--tm-form-mist);
  border-color: #a7abb0;
  padding: 20px;
}

.tm-form-errors {
  background: #fff0ee;
  border-left: 4px solid #ba2b20;
  color: #751b15;
  display: none;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.5;
  padding: 16px clamp(20px, 4vw, 52px);
}

.tm-form-errors.is-visible {
  display: block;
}

.tm-scenario-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tm-scenario-card {
  cursor: pointer;
  display: block;
  margin: 0;
  min-width: 0;
  position: relative;
}

.tm-scenario-card input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.tm-scenario-card__body {
  background: #fff;
  border: 1px solid #cfd3d6;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 128px;
  padding: 22px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tm-scenario-card__body::before {
  border: 2px solid #8d9298;
  border-radius: 50%;
  content: '';
  height: 18px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 18px;
}

.tm-scenario-card__body strong {
  color: var(--tm-form-ink);
  font-size: 1rem;
  line-height: 1.3;
  padding-right: 24px;
}

.tm-scenario-card__body > span {
  color: var(--tm-form-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.tm-scenario-card:hover .tm-scenario-card__body {
  border-color: var(--tm-form-steel);
  transform: translateY(-2px);
}

.tm-scenario-card input:focus-visible + .tm-scenario-card__body {
  outline: 3px solid var(--tm-form-orange);
  outline-offset: 3px;
}

.tm-scenario-card input:checked + .tm-scenario-card__body {
  border-color: var(--tm-form-orange);
  box-shadow: inset 4px 0 0 var(--tm-form-orange);
}

.tm-scenario-card input:checked + .tm-scenario-card__body::before {
  background: radial-gradient(circle, var(--tm-form-orange) 0 4px, transparent 5px);
  border-color: var(--tm-form-orange);
}

.tm-field-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tm-field {
  min-width: 0;
}

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

.tm-field > label,
.tm-choice-field > legend {
  color: var(--tm-form-graphite);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
}

.tm-required-mark {
  color: var(--tm-form-orange);
  display: none;
}

.tm-field.is-required .tm-required-mark {
  display: inline;
}

.tm-field input,
.tm-field textarea {
  appearance: none;
  background: #fff;
  border: 1px solid #aeb3b8;
  border-radius: 0;
  color: var(--tm-form-ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  min-height: 52px;
  padding: 13px 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.tm-field textarea {
  min-height: 118px;
  resize: vertical;
}

.tm-field input::placeholder,
.tm-field textarea::placeholder {
  color: #777d83;
  opacity: 1;
}

.tm-field input:hover,
.tm-field textarea:hover {
  border-color: #6f757b;
}

.tm-field input:focus,
.tm-field textarea:focus {
  border-color: var(--tm-form-orange);
  box-shadow: 0 0 0 3px rgba(242, 90, 0, 0.14);
  outline: 0;
}

.tm-field input[aria-invalid='true'],
.tm-field textarea[aria-invalid='true'] {
  border-color: #ba2b20;
}

.tm-field-error {
  color: #a3261d;
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.45;
  min-height: 1.2em;
  padding-top: 5px;
}

.tm-choice-field {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 24px !important;
}

.tm-choice-field > legend {
  flex: 0 0 100%;
}

.tm-choice-field label,
.tm-quote-shell .tm-consent {
  align-items: flex-start;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9375rem;
  gap: 10px;
  line-height: 1.5;
  margin: 0;
}

.tm-choice-field input,
.tm-quote-shell .tm-consent input {
  accent-color: var(--tm-form-orange);
  flex: 0 0 auto;
  height: 20px;
  margin: 1px 0 0;
  width: 20px !important;
}

.tm-quote-shell .tm-consent {
  display: inline-flex !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  margin-top: 24px;
  max-width: 820px;
}

.tm-quote-shell .tm-consent a {
  color: var(--tm-form-steel);
  text-underline-offset: 3px;
}

.tm-file-drop {
  align-items: center;
  background: #f7f8f9;
  border: 2px dashed #aeb3b8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 190px;
  padding: 28px;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.tm-file-drop:hover,
.tm-file-drop.is-dragging,
.tm-file-drop:focus-within {
  background: #fff4ed;
  border-color: var(--tm-form-orange);
}

.tm-file-drop input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.tm-file-drop__icon {
  align-items: center;
  background: var(--tm-form-orange);
  color: #fff;
  display: inline-flex;
  font-size: 1.5rem;
  font-weight: 500;
  height: 42px;
  justify-content: center;
  line-height: 1;
  width: 42px;
}

.tm-file-drop strong {
  color: var(--tm-form-ink);
  font-size: 1rem;
}

.tm-file-drop > span:last-of-type {
  color: var(--tm-form-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 620px;
}

.tm-file-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.tm-file-list:empty {
  display: none;
}

.tm-file-list li {
  align-items: center;
  background: var(--tm-form-mist);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
  padding: 12px 14px;
}

.tm-file-list li > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tm-file-list strong {
  color: var(--tm-form-ink);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-file-list li span span {
  color: var(--tm-form-muted);
  font-size: 0.875rem;
}

.tm-file-remove {
  background: transparent;
  border: 0;
  color: #92251d;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tm-honeypot {
  left: -9999px !important;
  position: absolute !important;
}

.tm-form-submit {
  align-items: center;
  background: var(--tm-form-ink);
  color: #fff;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(210px, auto) minmax(0, 1fr);
  padding: clamp(28px, 4vw, 52px);
}

.tm-form-submit > p {
  color: #c8cbce;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  max-width: 620px;
}

.tm-submit-button {
  align-items: center;
  background: var(--tm-form-orange);
  border: 1px solid var(--tm-form-orange);
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 750;
  gap: 10px;
  justify-content: center;
  min-height: 54px;
  padding: 14px 22px;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.tm-submit-button:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
  color: var(--tm-form-ink);
}

.tm-probe-button {
  background: #315778;
  border-color: #315778;
}

.tm-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.tm-submit-spinner {
  animation: tm-spin 700ms linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  border-top-color: #fff;
  display: none;
  height: 16px;
  width: 16px;
}

.tm-submit-button.is-busy .tm-submit-spinner {
  display: inline-block;
}

.tm-confirmation {
  background: #fff;
  border-left: 4px solid var(--tm-orange, #f25a00);
  color: var(--tm-graphite, #111315);
  margin: 24px 0;
  padding: 24px;
}

.tm-confirmation p {
  margin: 0;
}

.tm-confirmation__label {
  color: #656a70;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tm-confirmation__number {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.tm-confirmation__test {
  color: #315778;
  font-size: 0.875rem;
  margin-top: 8px !important;
}

@keyframes tm-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .tm-scenario-grid,
  .tm-field-grid {
    grid-template-columns: 1fr;
  }

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

  .tm-form-submit {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .tm-submit-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .tm-quote-intro,
  .tm-quote-section,
  .tm-form-submit {
    padding-left: 20px;
    padding-right: 20px;
  }

  .tm-quote-section__head {
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .tm-form-step {
    height: 36px;
    width: 36px;
  }

  .tm-scenario-card__body {
    min-height: 0;
    padding: 18px;
  }

  .tm-file-drop {
    min-height: 170px;
    padding: 22px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-quote-shell *,
  .tm-quote-shell *::before,
  .tm-quote-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
