/* RTN Global v2 — guided contact form */
.wizard {
  position: relative;
  background: #fff; color: var(--ink);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 40px 80px -30px rgb(8 6 60 / 0.6);
  display: grid; gap: 22px;
  min-height: 560px; align-content: start;
}
.wizard fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* progress */
.wz-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: wz; }
.wz-progress li { counter-increment: wz; display: grid; gap: 8px; font-size: 12px; font-weight: 700; color: var(--mute); }
.wz-progress li::before { content: ""; height: 4px; border-radius: 4px; background: var(--paper-2); transition: background-color 300ms var(--ease); }
.wz-progress li.is-done::before, .wz-progress li.is-current::before { background: var(--blue); }
.wz-progress li.is-current { color: var(--ink); }
@media (max-width: 460px) { .wz-progress li span { display: none; } .wz-progress li.is-current span { display: inline; white-space: nowrap; } }
.wizard.is-finished .wz-progress { visibility: hidden; }

.wz-title { font-size: var(--step-2); font-stretch: 112%; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.wz-title:focus { outline: none; }
.wz-sub { color: var(--mute); margin: -8px 0 18px; }
.wz-step { display: grid; gap: 20px; align-content: start; }
.wz-step > .wz-title { margin-bottom: 0; }

/* step transitions */
@media (prefers-reduced-motion: no-preference) {
  .wz-in-fwd { animation: wz-fwd 320ms var(--ease-out) both; }
  .wz-in-back { animation: wz-back 320ms var(--ease-out) both; }
}
@keyframes wz-fwd { from { opacity: 0; translate: 24px 0; } }
@keyframes wz-back { from { opacity: 0; translate: -24px 0; } }

/* step 1 tiles */
.wz-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .wz-tiles { grid-template-columns: 1fr; } }
.wz-tile { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r-md); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow 160ms var(--ease), background-color 160ms var(--ease), scale 160ms var(--ease); }
.wz-tile:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.wz-tile:active { scale: 0.98; }
.wz-tile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wz-tile-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--blue); transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.wz-tile-icon svg { width: 24px; height: 24px; }
.wz-tile-text { display: grid; gap: 4px; }
.wz-tile strong { font-size: var(--step-0); }
.wz-tile small { color: var(--mute); font-size: var(--step--1); line-height: 1.4; }
.wz-tile:has(input:checked) { background: #F2F2FF; box-shadow: inset 0 0 0 2px var(--blue); }
.wz-tile:has(input:checked) .wz-tile-icon { background: var(--blue); color: #fff; }
.wz-tile:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }

/* chips */
.wz-group legend { font-weight: 700; font-size: var(--step--1); margin-bottom: 10px; padding: 0; }
.wz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-chip { position: relative; }
.wz-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wz-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 15px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 600; font-size: var(--step--1); cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease); }
.wz-chip span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px currentColor; opacity: 0.5; transition: opacity 160ms var(--ease); }
.wz-chip input[type="radio"] + span::before { border-radius: 50%; }
.wz-chip:hover span { box-shadow: inset 0 0 0 1.5px var(--ink); }
.wz-chip input:checked + span { background: var(--blue); color: #fff; box-shadow: none; }
.wz-chip input:checked + span::before { opacity: 1; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%232D2AE0' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; box-shadow: none; }
.wz-chip input[type="radio"]:checked + span::before { background: #fff; box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--blue); }
.wz-chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

/* text fields */
.wz-field { display: grid; gap: 6px; }
.wz-field label { font-weight: 700; font-size: var(--step--1); }
.wz-opt { font-weight: 500; color: var(--mute); }
.wz-hint { color: var(--mute); font-size: var(--step--1); }
.wz-field input, .wz-field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid #CFCFC7; border-radius: var(--r-sm); padding: 12px 14px; min-height: 50px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.wz-field textarea { min-height: 120px; resize: vertical; }
.wz-field input:hover, .wz-field textarea:hover { border-color: var(--ink); }
.wz-field input:focus-visible, .wz-field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgb(45 42 224 / 0.2); }
.wz-error { display: none; color: #C2361A; font-size: var(--step--1); font-weight: 600; margin-top: 6px; }
.wz-field.is-invalid .wz-error, .wz-group.is-invalid .wz-error, .wz-need-error.is-shown { display: block; }
.wz-field.is-invalid input, .wz-field.is-invalid textarea { border-color: #C2361A; background: #FFF1EE; }
.wz-group.is-invalid .wz-chip span { box-shadow: inset 0 0 0 1.5px #E7A595; }

/* summary */
.wz-summary { margin: 0; display: grid; gap: 0; border-radius: var(--r-md); background: var(--paper-2); padding: 6px 16px; }
.wz-summary:empty { display: none; }
.wz-summary div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.wz-summary div:last-child { border-bottom: 0; }
.wz-summary dt { color: var(--mute); font-weight: 600; }
.wz-summary dd { margin: 0; font-weight: 700; }

/* nav */
.wz-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: auto; }
.wz-nav [data-wz="next"], .wz-nav [data-wz="send"] { margin-left: auto; }
.wz-nav [hidden] { display: none; }
.btn-ghost-dark { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* done */
.wz-done { justify-items: start; padding-top: 24px; }
.wz-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.wz-check svg { width: 34px; height: 34px; }
@media (prefers-reduced-motion: no-preference) {
  .wz-done:not([hidden]) .wz-check { animation: wz-pop 420ms var(--ease-out) both; }
  .wz-done:not([hidden]) .wz-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: wz-draw 400ms 220ms var(--ease-out) forwards; }
}
@keyframes wz-pop { from { scale: 0.25; opacity: 0; } }
@keyframes wz-draw { to { stroke-dashoffset: 0; } }
.wizard [hidden] { display: none !important; }
.wz-panel { display: grid; gap: 22px; }
