/* A short pre-visit check, not a score or a vehicle diagnosis. */
.tsi-check {
  --check-violet: #5955ef;
  --check-dark: #403abb;
  --check-ink: #242137;
  --check-muted: #6b657f;
  --check-space: clamp(19px, 3vw, 30px);
  margin: 2.5rem 0;
  padding: 0;
  overflow: hidden;
  color: var(--check-ink);
  background: #fff;
  border: 1px solid #e5e0fa;
  border-radius: 28px;
  box-shadow: 0 14px 45px #403abb0b, 0 3px 9px #403abb05;
  font-family: 'Onest', sans-serif;
  scroll-margin-top: 112px;
}
.tsi-check *, .tsi-check *::before, .tsi-check *::after { box-sizing: border-box; }
.tsi-check [hidden] { display: none !important; }
.tsi-check__intro {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px var(--check-space) 29px;
  color: #fff;
  background: var(--check-violet);
  border-radius: 0 0 38px 0;
  box-shadow: inset 0 1px 0 #ffffff45, inset 0 -1px 0 #403abb2b;
}
.tsi-check__intro > div { position: relative; flex: 1; min-width: 0; z-index: 1; }
.tsi-check .tsi-check__intro h2 {
  max-width: 390px;
  margin: 0 0 10px;
  padding: 0;
  color: #fff;
  font-size: clamp(23px, 2.4vw, 29px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.tsi-check .tsi-check__intro p { margin: 0; color: #efedff; font-size: 13px; line-height: 1.55; }
.tsi-check .tsi-check__sticker {
  display: block;
  flex: 0 0 106px;
  width: 106px;
  height: 106px;
  max-width: 106px;
  margin: 0 -5px 0 0;
  object-fit: contain;
  transform: rotate(7deg);
  filter: drop-shadow(0 7px 9px #28235e35);
}
.tsi-check [data-tsi-check] { margin: 0; padding: 8px var(--check-space) 0; }
.tsi-check__fields { display: block; }
.tsi-check .tsi-check__field { position: relative; min-width: 0; margin: 0; padding: 21px 0; border: 0; border-bottom: 1px solid #eeebf8; }
.tsi-check__field::after { content: ''; display: table; clear: both; }
.tsi-check .tsi-check__field legend { float: left; width: 40%; margin: 0; padding: 11px 14px 0 0; color: var(--check-ink); font-size: 14px; font-weight: 600; line-height: 1.5; }
.tsi-check .tsi-check__hint { display: block; margin-top: 4px; color: var(--check-muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.tsi-check__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-left: 42%; padding: 4px; border: 1px solid #ece8f8; border-radius: 16px; background: #f7f5fc; }
.tsi-check__choice { position: relative; display: block; min-width: 0; margin: 0; }
.tsi-check__choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.tsi-check__choice span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 5px; color: #645e77; background: transparent; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 500; line-height: 1.35; text-align: center; transition: color 160ms, background 160ms, box-shadow 160ms; }
.tsi-check__choice input:hover + span { background: #ede9fa; color: var(--check-dark); }
.tsi-check__choice input:checked + span { color: #fff; background: var(--check-violet); border-color: #5149d7; box-shadow: 0 2px 5px #403abb18, inset 0 1px 0 #ffffff36; font-weight: 650; }
.tsi-check__choice input:focus-visible + span,
.tsi-check button:focus-visible,
.tsi-check a:focus-visible { outline: 3px solid var(--check-violet); outline-offset: 4px; }
.tsi-check .tsi-check__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; }
.tsi-check button[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 51px;
  margin: 0;
  padding: 6px 6px 6px 17px;
  border: 1px solid #4843cb;
  border-radius: 15px;
  background: var(--check-violet);
  box-shadow: inset 0 1px 1px #ffffff50, inset 0 -3px 3px #33299435, 0 4px 9px #5145bb1c;
  color: #fff;
  font: 600 13px/1.4 'Onest', sans-serif;
  cursor: pointer;
  transition: background 180ms, box-shadow 180ms, transform 180ms;
  -webkit-tap-highlight-color: transparent;
}
.tsi-check button[type='submit']:hover { background: #514ce7; box-shadow: inset 0 1px 1px #ffffff50, inset 0 -3px 3px #33299435, 0 6px 15px #5145bb29; }
.tsi-check button[type='submit']:active { transform: translateY(1px); }
.tsi-check__submit-icon { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; color: var(--check-violet); background: #fff; border: 1px solid #ffffff80; border-radius: 10px; box-shadow: 0 1px 3px #33299420; }
.tsi-check .tsi-check__submit-icon svg { display: block; width: 19px; height: 19px; max-width: 19px; max-height: 19px; }
.tsi-check .tsi-check__progress { margin: 0; color: var(--check-muted); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.tsi-check [data-check-count] { color: var(--check-dark); font-weight: 650; font-variant-numeric: tabular-nums; }
.tsi-check [data-tsi-check-result] { margin: 23px var(--check-space) 0; padding: 19px 20px; border: 1px solid #e2dcfa; border-radius: 17px; background: #f4f2ff; }
.tsi-check [data-tsi-check-result][data-priority='refusal'],
.tsi-check [data-tsi-check-result][data-priority='concern'] { border-color: #edd7c6; background: #fff6ee; }
.tsi-check [data-check-title] { margin: 0 0 8px; color: var(--check-ink); font-size: 19px; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; }
.tsi-check [data-check-title]:focus { outline: none; }
.tsi-check [data-check-advice] { margin: 0; color: #514b63; font-size: 13px; line-height: 1.65; }
.tsi-check [data-check-link] { display: inline-flex; align-items: center; min-height: 44px; margin: 6px 0 -7px; color: #4841c5; border: 0; font-size: 12px; font-weight: 650; line-height: 1.5; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tsi-check .tsi-check__note { margin: 15px var(--check-space) 22px; color: var(--check-muted); font-size: 11px; line-height: 1.65; }
.tsi-check noscript p { margin: 0 var(--check-space) 25px; font-size: 13px; line-height: 1.6; }
@media (max-width: 600px) {
  .tsi-check { margin: 2rem 0; border-radius: 23px; }
  .tsi-check__intro { gap: 5px; padding-top: 24px; padding-bottom: 25px; border-bottom-right-radius: 31px; }
  .tsi-check .tsi-check__intro h2 { max-width: 265px; font-size: 23px; }
  .tsi-check .tsi-check__intro p { font-size: 12px; }
  .tsi-check .tsi-check__sticker { flex-basis: 80px; width: 80px; height: 92px; max-width: 80px; margin-right: -7px; }
  .tsi-check .tsi-check__field { padding: 16px 0; }
  .tsi-check .tsi-check__field legend { float: left; width: 100%; padding: 0 0 10px; font-size: 13px; }
  .tsi-check .tsi-check__hint { display: block; margin: 3px 0 0; font-size: 11px; }
  .tsi-check__choices { clear: both; margin-left: 0; }
  .tsi-check__choice span { font-size: 12px; }
  .tsi-check .tsi-check__footer { padding-top: 18px; }
  .tsi-check button[type='submit'] { font-size: 12px; gap: 12px; padding-left: 13px; }
  .tsi-check .tsi-check__progress { font-size: 10px; }
  .tsi-check [data-tsi-check-result] { padding: 17px; }
}
@media (max-width: 360px) {
  .tsi-check { --check-space: 15px; }
  .tsi-check .tsi-check__intro h2 { font-size: 22px; }
  .tsi-check .tsi-check__sticker { flex-basis: 56px; width: 56px; height: 80px; max-width: 56px; margin-right: -8px; }
  .tsi-check .tsi-check__footer { flex-wrap: wrap; justify-content: center; gap: 9px; }
  .tsi-check button[type='submit'] { width: 100%; }
  .tsi-check .tsi-check__hint { display: block; margin: 3px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tsi-check__choice span, .tsi-check button[type='submit'] { transition: none; }
}
