/* Panic: one screen in the hero's composition. The copy keeps its bottom-left seat; the form takes the tiles' place. */

.p-screen { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: 100svh; padding: 0 var(--pad); }
/* The hero's tiles, mirrored to the left and running hot. They fade out before the form and under the headline. */
.p-screen::before {
  content: ""; position: absolute; z-index: -2; top: 0; left: 0; bottom: 0;
  aspect-ratio: 1688 / 1736; height: 100%;
  background: url(img/flizes-red.webp) center / cover no-repeat;
  animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both;
}
.p-screen::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(270deg, #000 38%, rgb(0 0 0 / .7) 50%, transparent 66%),
    linear-gradient(rgb(0 0 0 / .5), transparent 15%, transparent 40%, rgb(0 0 0 / .85) 66%, #000 84%);
}
.p-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(32px, 6vw, 112px); align-items: end; padding-bottom: clamp(28px, 4vw, 56px); }
.p-grid .copy { padding: 0; }
.p-promise { display: flex; align-items: flex-start; gap: 10px; margin-top: 28px; font-size: clamp(17px, 1.35vw, 19px); color: var(--muted); }
.p-promise .star { flex: none; width: 15px; height: 13px; margin: .4em 0 0; vertical-align: 0; }
/* Each answered question turns the headline's star a third. */
.panic-page h1 .star { rotate: var(--turn, 0deg); }

/* The form: one question at a time, no boxes, hairlines like the rest of the page. */
.stage { padding-bottom: .3em; }
.wizard { display: grid; }
.wizard[hidden], .w-done[hidden] { display: none; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.w-step + .w-step { margin-top: 40px; }
.js .w-step { display: none; margin: 0; animation: w-in .35s cubic-bezier(.16, 1, .3, 1); }
.js[data-step="1"] [data-n="1"], .js[data-step="2"] [data-n="2"], .js[data-step="3"] [data-n="3"] { display: block; }
@keyframes w-in { from { opacity: 0; } }
legend { padding: 0; margin-bottom: 22px; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.05; letter-spacing: -.035em; }


.w-line { display: block; width: 100%; height: 56px; padding: 0; border: 0; border-bottom: 1px solid rgb(255 255 255 / .24); border-radius: 0; background: none; color: var(--text); font: inherit; font-size: clamp(20px, 1.7vw, 24px); letter-spacing: -.01em; transition: border-color .15s; }
.w-line::placeholder { color: rgb(244 244 245 / .32); }
.w-line:hover { border-color: rgb(255 255 255 / .45); }
.w-line:focus { outline: none; border-color: var(--text); }
.bad .w-line:not(.w-soft):placeholder-shown, .bad .w-line[name="site"] { border-color: var(--red); }
.w-soft { height: 48px; margin-top: 18px; font-size: 18px; }
.w-msg { display: block; min-height: 22px; margin-top: 8px; font-size: 14px; color: var(--red); }

/* Issues as words; a chosen one gets a flat lit fill and the red asterisk. */
.w-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-inline: -12px; }
.w-tiles label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; letter-spacing: 0; white-space: nowrap; color: rgb(244 244 245 / .8); cursor: pointer; transition: color .15s, background-color .15s; }
.w-tiles label:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.w-tiles label:has(:checked) { color: var(--text); background: rgb(255 255 255 / .1); }
.w-tiles input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.w-tiles label:has(:focus-visible) { color: var(--text); background: rgb(255 255 255 / .06); }
.w-step:focus { outline: none; }
.w-tiles .pick { flex: none; width: 12px; height: auto; aspect-ratio: 85 / 72; color: rgb(244 244 245 / .28); rotate: -90deg; transition: color .2s, rotate .35s cubic-bezier(.16, 1, .3, 1); }
.w-tiles label:hover .pick { color: rgb(244 244 245 / .5); }
.w-tiles label:has(:checked) .pick { color: var(--red); rotate: 0deg; }
.w-tiles + .w-msg { margin-top: 4px; }
.w-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

.w-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.w-pair span { display: block; font-size: 14px; color: var(--muted); }

.w-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.w-back { padding: 10px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; transition: color .15s; }
.w-back:hover { color: var(--text); }
.js[data-step="1"] .w-back { visibility: hidden; }
.w-next { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 26px; border: 0; border-radius: 22px; corner-shape: squircle; background: var(--text); color: #09090b; font: inherit; font-weight: 500; cursor: pointer; transition: background-color .2s, scale .15s; }
.w-next:hover { background: #d4d4da; }
.w-next:active { scale: .98; }
.w-next svg { width: 20px; height: 20px; transition: translate .2s; }
.w-next:hover svg { translate: 3px 0; }
.w-alt { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.js:not([data-step="3"]) .w-alt { display: none; }
.w-alt button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }

.w-alt button svg { width: 16px; height: 16px; color: #25d366; }
.w-alt button span { border-bottom: 1px solid var(--line); transition: border-color .15s; }
.w-alt button:hover span { border-color: var(--text); }

/* Done: what happens next, and the price facts the page no longer lists. */
.w-done { animation: w-in .4s cubic-bezier(.16, 1, .3, 1); }
.w-done:focus { outline: none; }
.w-done h2 { margin: 0; font-size: clamp(28px, 2.6vw, 40px); font-weight: 400; letter-spacing: -.035em; }
.w-lead { margin-top: 12px; color: var(--muted); }
.w-done ol { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.w-done li { display: grid; grid-template-columns: 44px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.w-done li span { color: var(--muted); font-variant-numeric: tabular-nums; }
.w-fine { margin-top: 16px; font-size: 14px; color: var(--muted); }
.w-fine a { color: var(--text); border-bottom: 1px solid var(--line); }

::selection { background: var(--red); color: #fff; }

@media (max-width: 960px) {
  .p-screen::before { height: auto; width: 100%; bottom: auto; background-image: url(img/flizes-red-900.webp); }
  .p-screen::after { background: linear-gradient(rgb(0 0 0 / .4), transparent 10%, transparent 14%, rgb(0 0 0 / .8) 28%, #000 42%); }
  .p-grid { grid-template-columns: 1fr; align-items: start; gap: 56px; padding-top: min(46vw, 40svh); }
}
@media (max-width: 760px) {
  .w-tiles { gap: 2px 4px; margin-inline: -10px; }
  .w-tiles label { padding: 10px; }
  .w-tiles { gap: 0 20px; }
  .w-pair { grid-template-columns: 1fr; gap: 16px; }
  .w-alt { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .p-screen::before { animation: none; }
  .w-step, .w-done { animation: none !important; }
}
