/* start.css — the "Talk to an expert" questionnaire (/start/). Built on site.css tokens and classes. */

/* The questionnaire: a white sheet on a grey band, under the centred hero. */
.start-sec {
  position: relative;
  background: var(--canvas);
}
@media (min-width: 901px) {
  .start-wrap {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  }
}
.start-card {
  min-height: 440px;
  padding: clamp(22px, 3.4vw, 44px);
  gap: 0;
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 1px var(--hair), 0 30px 60px -36px rgba(0, 0, 0, 0.25);
}
.start-aside {
  position: sticky;
  top: calc(var(--bar-h) + 24px);
}
.start-noscript {
  font-weight: 600;
}
.js .start-card:not(.is-ready)::before {
  content: '';
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
}

/* ── Progress ─────────────────────────────────────────────────────────── */
.st-top {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(22px, 3vw, 30px);
}
.st-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.st-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transform-origin: left center;
  transform: scaleX(0.04);
  transition: transform 0.5s var(--ease);
}
.st-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}
.st-restart {
  background: none;
  border: 0;
  padding: 2px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  cursor: pointer;
}
.st-restart:hover {
  color: var(--coral);
  text-decoration-color: currentColor;
}

/* ── The question ─────────────────────────────────────────────────────── */
.st-form {
  display: grid;
  gap: 0;
}
.st-in {
  animation: st-in 0.32s var(--ease) both;
}
@keyframes st-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.st-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.st-legend {
  float: left; /* lets the legend take margins and wrap like a normal block */
  width: 100%;
  padding: 0;
  margin: 0 0 8px;
}
.st-legend + * {
  clear: both;
}
.st-q {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.032em;
  outline: none;
  overflow-wrap: anywhere;
}
.start-card .st-hint {
  color: var(--ink-3);
  font-size: 16px;
  margin: 0 0 6px;
}
.start-card .st-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 6px 0 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.35;
}
.st-flag + .st-form {
  margin-top: 14px;
}
.st-opts,
.st-chips,
.st-fields {
  margin-top: 20px;
}
.st-legend-pop + .st-chips {
  margin-top: 10px;
}

/* Option cards: the whole card is the label, the native control is kept for keyboards and screen readers. */
.st-opts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 10px;
}
.st-opts-wide {
  grid-template-columns: 1fr;
}
.st-opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s var(--ease);
}
.st-opt:hover {
  border-color: #a1a1a6;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.3);
}
.st-opt:active {
  transform: scale(0.995);
}
.st-opt input,
.st-chip input,
.st-consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.st-box {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #fff;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.st-box .i {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.2s var(--ease);
}
input[type='radio'] + .st-box {
  border-radius: 50%;
}
input[type='radio'] + .st-box::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.15s, transform 0.2s var(--ease);
}
.st-opt:has(input:checked) {
  border-color: var(--coral);
  background: #fffaf8;
  box-shadow: 0 0 0 1px var(--coral) inset;
}
input:checked + .st-box {
  background: var(--coral);
  border-color: var(--coral);
}
input:checked + .st-box .i,
input[type='radio']:checked + .st-box::after {
  opacity: 1;
  transform: none;
}
.st-opt:has(input:focus-visible),
.st-chip:has(input:focus-visible),
.st-consent:has(input:focus-visible) {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}
.st-txt {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.st-t {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.st-d {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
}
.st-pop {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0 0 9px;
  border-radius: 50%;
  background: var(--coral-bright);
  vertical-align: 0.12em;
}

/* Chips: compact toggles for long lists of names (systems). */
.start-card .st-legend-pop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}
.st-legend-pop i,
.st-chip.is-pop > span::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral-bright);
}
.st-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.st-chip {
  position: relative;
  cursor: pointer;
}
.st-chip > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.st-chip.is-pop > span::before {
  flex: none;
}
.st-chip > span .i {
  display: none;
}
.st-chip:hover > span {
  border-color: #a1a1a6;
}
.st-chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.st-chip input:checked + span .i {
  display: inline-block;
}
.st-chip.is-pop input:checked + span::before {
  display: none;
}

/* Text fields (site.css .form styles the inputs). */
.st-fields {
  gap: 14px;
}
.st-fields label {
  gap: 7px;
}
.st-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.st-optional {
  font-weight: 400;
  color: var(--ink-3);
}
.st-note {
  margin-top: 18px;
}
.st-fields input::placeholder,
.st-fields textarea::placeholder {
  color: #8e8e93;
}
.st-fields textarea {
  min-height: 112px;
}
.st-fields [aria-invalid='true'] {
  border-color: var(--break);
  box-shadow: 0 0 0 4px rgba(224, 83, 63, 0.12);
}
.st-ferr {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--break);
}
.st-ferr:empty {
  display: none;
}
.st-other[hidden] {
  display: none;
}

/* Consent */
.st-consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--canvas);
  cursor: pointer;
}
.st-consent-t {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.st-consent-t a {
  color: var(--coral);
  font-weight: 500;
}
.st-ferr-consent {
  display: block;
  margin-top: 8px;
}

/* ── Errors, actions ──────────────────────────────────────────────────── */
.start-card .st-error {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--break);
}
.start-card .st-error:empty {
  display: none;
}
.has-error .st-opts,
.has-error .st-chips {
  animation: st-shake 0.32s;
}
@keyframes st-shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.st-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.st-next {
  margin-left: auto;
  min-width: 150px;
}
.st-next[disabled],
.st-back[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.st-back .i,
.btn.st-back:hover .i:last-child {
  transform: none;
}
.st-back:hover .i:first-child {
  transform: translateX(-3px);
}
.is-sending .st-next .i {
  animation: st-nudge 0.9s ease-in-out infinite;
}
@keyframes st-nudge {
  50% {
    transform: translateX(4px);
  }
}
.start-card .st-careers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  font-size: 15px;
  color: var(--ink-3);
}
.st-careers .link-arrow {
  font-size: 15px;
}

/* ── Recap ────────────────────────────────────────────────────────────── */
.st-done {
  display: grid;
  gap: 14px;
  animation: st-in 0.4s var(--ease) both;
}
.st-done-ico {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--ok-soft);
  color: var(--ok);
  margin-bottom: 4px;
}
.st-done-warn {
  background: var(--break-soft);
  color: var(--break);
}
.start-card .st-done-lead {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.st-ref {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 16px 18px;
  border: 1px dashed rgba(196, 64, 43, 0.35);
  border-radius: 16px;
  background: #fffaf8;
}
.st-ref span {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}
.st-ref strong {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}
.st-warn p {
  color: inherit;
  font-size: inherit;
}
.st-warn {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--break-soft);
  color: #8f2e21;
  font-size: 15px;
  font-weight: 500;
}
.st-mail {
  justify-self: start;
  white-space: normal;
  text-align: left;
}
.st-answers {
  border-top: 1px solid var(--line-2);
  padding-top: 6px;
  margin-top: 4px;
}
.st-answers summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.st-answers summary::-webkit-details-marker {
  display: none;
}
.st-answers summary .i {
  color: var(--ink-3);
  transition: transform 0.2s var(--ease);
}
.st-answers[open] summary .i {
  transform: rotate(180deg);
}
.st-answers dl {
  display: grid;
  gap: 0;
  margin: 4px 0 0;
}
.st-answers dl > div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 4px 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 15px;
}
.st-answers dt {
  font-weight: 500;
  color: var(--ink-3);
}
.st-answers dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.st-dd-note {
  display: block;
  margin-top: 3px;
  color: var(--ink-2);
  font-style: italic;
}
.st-pre {
  white-space: pre-line;
}
.st-actions-done {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}
.st-again {
  font-size: 15px;
}

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .start-aside {
    position: static;
  }
}
@media (max-width: 640px) {
  .start-card {
    min-height: 0;
    border-radius: 22px;
  }
  .st-opt {
    padding: 14px;
    gap: 12px;
  }
  .st-actions {
    position: sticky;
    bottom: 0;
    margin: 22px calc(-1 * clamp(22px, 3.4vw, 40px)) calc(-1 * clamp(22px, 3.4vw, 40px));
    padding: 14px clamp(22px, 3.4vw, 40px) calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-2);
    border-radius: 0 0 22px 22px;
  }
  .st-actions-done {
    position: static;
    margin: 10px 0 0;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
  }
  .st-next {
    min-width: 0;
    flex: 1;
    white-space: normal;
    text-align: center;
  }
  /* Back becomes a round icon button: the main action keeps the room. Its word stays for screen readers. */
  .st-back {
    flex: none;
    width: 52px;
    height: 52px;
    padding: 0;
  }
  .st-back-t {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .st-answers dl > div {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-in,
  .st-done,
  .has-error .st-opts,
  .has-error .st-chips,
  .is-sending .st-next .i {
    animation: none;
  }
  .st-bar i {
    transition: none;
  }
}
