/* =====================================================================
   09-prequal r4: the pre-WhatsApp sheet (2026-10-19, NOTES-prequal-sheet.md)
   WhatsApp hand-off cues from the reference qualifier (wordmark, a message
   bubble, the green final action) set in the page's own materials: cream
   ground, night ink, coral selection, the serif display face for questions,
   56 px pills, --e-out easing. Choices are selectable cards (line icon,
   title, one-line hint, tick badge) in a 2-column grid at every width.
   Full screen like the reference. Transform/opacity only; no glass;
   html.reduce-motion = instant.
   ===================================================================== */

.pq { --pq-cream: #f5f0e7; --pq-sand: #e4d9c6; --pq-ink: #0a0d12; --pq-mute: rgba(10, 13, 18, .6); --pq-coral: var(--orange, #f26b6c);
  --pq-coral-t: #fdeeea; --pq-plum: #512d4c; --wa-green: #25d366; --wa-green-hi: #1fc75c;
  --pq-e: var(--e-out, cubic-bezier(.16, 1, .3, 1)); --pq-spring: cubic-bezier(.34, 1.56, .64, 1);
  position: fixed; inset: 0; z-index: 10050; visibility: hidden; pointer-events: none; transition: visibility 0s linear .3s; }
.pq.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.pq__panel { position: absolute; inset: 0; contain: strict; overflow: auto; overscroll-behavior: contain; background: var(--pq-cream); color: var(--pq-ink);
  font-family: var(--f-ui, "thmanyah sans", Inter, "IBM Plex Sans Arabic", sans-serif);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 32px calc(20px + env(safe-area-inset-bottom, 0px)); opacity: 0; transition: opacity .26s var(--pq-e); }
.pq.is-open .pq__panel { opacity: 1; transition-duration: .3s; }
.pq__panel:focus { outline: none; }

/* header: WhatsApp wordmark physically top-left (the reference), close top-right */
.pq__brand { position: absolute; top: 20px; left: 24px; color: var(--wa-green); line-height: 0; }
.pq__wa { display: block; width: 124px; height: 29px; }
.pq__close { position: absolute; top: 8px; right: 8px; width: 56px; height: 56px; padding: 0; border: 0; background: none; color: var(--pq-ink); cursor: pointer;
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pq__close::before { content: ""; grid-area: 1 / 1; width: 40px; height: 40px; border-radius: 50%; background: rgba(10, 13, 18, .06); transition: transform .3s var(--pq-spring), background-color .2s ease; }
.pq__close svg { grid-area: 1 / 1; width: 18px; height: 18px; position: relative; }
@media (hover: hover) { .pq__close:hover::before { transform: scale(1.12); background: rgba(10, 13, 18, .1); } }
.pq__close:focus-visible { outline: none; }
.pq__close:focus-visible::before { box-shadow: 0 0 0 2px var(--pq-ink); }

.pq__col { width: min(520px, 100%); display: flex; flex-direction: column; transform: translateY(16px); transition: transform .3s var(--pq-e); }
.pq.is-open .pq__col { transform: none; transition-duration: .5s; }

/* who: avatar beside the name, like a chat header */
.pq__head { display: flex; align-items: center; gap: 12px; }
.pq__avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--pq-sand); }
.pq__avatar img { width: 30px; height: 30px; display: block; }
.pq__who { display: flex; flex-direction: column; gap: 2px; text-align: start; line-height: 1.3; }
.pq__who b { font: 700 17px/1.3 Inter, var(--f-ui, sans-serif); }
.pq__who small { font-size: 13px; color: var(--pq-mute); }

/* smooth progress: one bar that grows, plus the count */
.pq__prog { display: flex; align-items: center; gap: 12px; margin-block-start: 18px; }
.pq__track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--pq-sand); overflow: hidden; }
.pq__fill { position: absolute; inset: 0; background: var(--pq-coral); border-radius: 2px; transform-origin: right center; transform: scaleX(.33); transition: transform .6s var(--pq-e); }
.pq__count { font: 500 13px/1 var(--f-ui, sans-serif); color: var(--pq-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* steps: one grid cell; the arriving step slides up over the last one (the page's stacked sections) */
.pq__steps { display: grid; margin-block-start: 14px; }
.pq__step { grid-area: 1 / 1; background: var(--pq-cream); display: flex; flex-direction: column;
  transition: transform .5s var(--pq-e), opacity .32s var(--pq-e); will-change: transform, opacity; }
.pq__step[data-pos="cur"] { z-index: 2; transform: none; opacity: 1; }
.pq__step[data-pos="under"] { z-index: 1; transform: translateY(-10px) scale(.95); opacity: 0; transition-duration: .5s, .42s; }
.pq__step[data-pos="next"] { z-index: 3; transform: translateY(48px); opacity: 0; transition-duration: .36s, .24s; }
.pq__step[inert] { pointer-events: none; }

/* the message bubble: white, incoming-message corner, serif question */
.pq__msg { position: relative; background: #fff; border-radius: 18px; border-start-start-radius: 4px; padding: 14px 18px 15px; text-align: start;
  box-shadow: 0 1px 0 rgba(10, 13, 18, .06); }
.pq__q { margin: 0; font-family: var(--f-display, "thmanyah display", serif); font-weight: 700; font-size: 26px; line-height: 36px; color: var(--pq-ink); text-wrap: balance; }
.pq__q:focus { outline: none; }
.pq__sub { margin: 2px 0 0; font: 400 15px/1.6 var(--f-ui, sans-serif); color: var(--pq-mute); text-wrap: balance; }

/* cards: 2 columns everywhere; icon, title, hint, tick badge */
.pq__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block-start: 14px; }
.pq__card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 48px; padding: 14px 14px 13px; text-align: start;
  border: 1.5px solid transparent; border-radius: 20px; background: #fff; color: var(--pq-ink); cursor: pointer;
  box-shadow: 0 1px 2px rgba(10, 13, 18, .06), 0 0 0 1px var(--pq-sand); font-family: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .45s var(--pq-spring), background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
@media (hover: hover) { .pq__card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(10, 13, 18, .08), 0 0 0 1px var(--pq-sand); } }
.pq__card:active { transform: scale(.97); transition-duration: .12s; }
.pq__card:focus-visible { outline: 2px solid var(--pq-ink); outline-offset: 2px; }
.pq__ic { width: 36px; height: 36px; border-radius: 12px; background: var(--pq-cream); color: var(--pq-plum); display: grid; place-items: center; transition: background-color .2s ease, color .2s ease; }
.pq__ic svg { width: 22px; height: 22px; }
.pq__ct { font: 700 16px/1.35 var(--f-ui, sans-serif); }
.pq__ct span { white-space: nowrap; }
[data-step="svc"] .pq__ct span { display: block; }   /* service names break where the services section breaks them: two lines each */
.pq__ch { font: 400 13px/1.4 var(--f-ui, sans-serif); color: var(--pq-mute); white-space: nowrap; }
.pq__tick { position: absolute; top: 12px; inset-inline-end: 12px; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--pq-sand); background: #fff center / 13px no-repeat;
  transform: scale(.9); transition: transform .4s var(--pq-spring), background-color .2s ease, box-shadow .2s ease; }
.pq__card[aria-checked="true"] { background: var(--pq-coral-t); border-color: var(--pq-coral); box-shadow: 0 0 0 0 transparent; }
.pq__card[aria-checked="true"] .pq__ic { background: #fff; color: var(--pq-coral); }
.pq__card[aria-checked="true"] .pq__tick { transform: scale(1); background-color: var(--pq-coral); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' stroke='%23fff' stroke-width='2.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:is([data-step="pri"], [data-step="kind"]) .pq__card .pq__tick { border-radius: 50%; }   /* radios; kind = website or app, app-web-split 2026-10-19 */

/* action row: secondary back pill beside the primary, in thumb reach; back hidden on the first screen */
.pq__row { display: flex; gap: 10px; margin-block-start: 16px; }
.pq__back, .pq__next, .pq__send { height: 56px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 17px/1 var(--f-ui, sans-serif); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .4s var(--pq-spring), background-color .2s ease, color .2s ease, opacity .2s ease; }
.pq__back { flex: 0 0 auto; padding: 0 20px; border: 0; background: #fff; color: var(--pq-ink); box-shadow: 0 0 0 1px var(--pq-sand); }
.pq__back svg { width: 16px; height: 16px; }
.pq__back[hidden], .pq__next[hidden], .pq__send[hidden] { display: none; }
.pq__next, .pq__send { flex: 1 1 auto; padding: 0 24px; border: 0; }
.pq__next { background: var(--pq-ink); color: #fff; }
.pq__n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--pq-coral); color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }
.pq__n[hidden] { display: none; }
.pq__next[disabled] { background: #dcd4c6; color: rgba(10, 13, 18, .45); cursor: default; }
.pq__send { background: var(--wa-green); color: var(--pq-ink); }
.pq__send-ic { width: 22px; height: 22px; fill: currentColor; }
.pq__send[aria-disabled="true"] { background: #dcd4c6; color: rgba(10, 13, 18, .45); pointer-events: none; }
@media (hover: hover) {
  .pq__next:not([disabled]):hover { background: var(--pq-coral); }
  .pq__send:hover { background: var(--wa-green-hi); }
  .pq__back:hover { box-shadow: 0 0 0 1.5px var(--pq-ink); }
}
.pq__back:active, .pq__next:not([disabled]):active, .pq__send:active { transform: scale(.97); transition-duration: .12s; }
.pq__back:focus-visible, .pq__next:focus-visible, .pq__send:focus-visible { outline: 2px solid var(--pq-ink); outline-offset: 2px; }

.pq__foot { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--pq-mute); text-align: center; }
.pq__skip { align-self: center; display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; font: 500 14px/1 var(--f-ui, sans-serif);
  color: var(--pq-mute); text-decoration: underline; text-underline-offset: 4px; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .pq__skip:hover { color: var(--pq-ink); } }
.pq__skip:focus-visible { outline: 2px solid var(--pq-ink); outline-offset: -6px; border-radius: 8px; }

/* scroll lock (the menu's N8 pattern; desktop scroll is held by Lenis.stop + the wheel/key guard in the JS) */
@media (max-width: 768px) {
  html.pq-open, html.pq-open body { overflow: hidden; }
}

/* phone: thumb-first, column on the bottom edge, 16 px edge line */
@media (max-width: 540px) {
  .pq__panel { justify-content: flex-end; padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .pq__brand { top: calc(18px + env(safe-area-inset-top, 0px)); left: 18px; }
  .pq__wa { width: 108px; height: 25px; }
  .pq__close { top: calc(6px + env(safe-area-inset-top, 0px)); right: 2px; }
  .pq__q { font-size: 24px; line-height: 32px; }
  .pq__sub { font-size: 14px; }
  .pq__grid { gap: 8px; }
  .pq__card { padding: 12px 12px 11px; gap: 5px; border-radius: 18px; }
  .pq__ic { width: 32px; height: 32px; border-radius: 10px; }
  .pq__ic svg { width: 20px; height: 20px; }
  .pq__ct { font-size: 15px; }
  .pq__ch { font-size: 12px; }
  .pq__tick { top: 10px; inset-inline-end: 10px; width: 20px; height: 20px; }
  .pq__row { gap: 8px; margin-block-start: 12px; }
  .pq__foot { margin-block-start: 10px; }
}
@media (max-height: 720px) {
  .pq__head { display: none; }
  .pq__prog { margin-block-start: 0; }
}

/* reduced motion: instant swaps; is-warm: the invisible idle paint (warm() in the JS) */
html.reduce-motion .pq, html.reduce-motion .pq *, .pq.is-instant .pq__step, .pq.is-warm, .pq.is-warm * { transition: none !important; }

/* =====================================================================
   One card family with section 02 (2026-10-19, NOTES-services-select.md).
   Source = the page's service cards: no border at rest, radius 24 (18 on phone), the same selected state (2 px coral ring,
   coral tint #fdeeea, 4 px lift, no tick), the same press spring. White on the sheet's cream ground (the page cards are cream
   on white: the same step of contrast, inverted). The service step uses a compact page card: the page drawing in miniature on
   a cream stage with its number, then the name in the display face, then the hint.
   ===================================================================== */
.pq { --pq-sel: #fdeeea; --pq-sel-stage: #f9e0d8; }
.pq__card { border: 0; border-radius: 24px; box-shadow: none;
  transition: translate .5s var(--pq-spring), scale .45s var(--pq-spring), background-color .25s ease, box-shadow .25s ease; }
@media (hover: hover) { .pq__card:hover { transform: none; box-shadow: inset 0 0 0 1.5px var(--pq-coral); } }
.pq__card:active { transform: none; scale: .97; transition-duration: .12s, .12s, .25s, .25s; }
.pq__card[aria-checked="true"] { background: var(--pq-sel); box-shadow: inset 0 0 0 2px var(--pq-coral); translate: 0 -4px; }
.pq__tick { display: none; }

/* service step: compact page card */
.pq__card--svc { padding: 0 0 13px; gap: 0; overflow: hidden; align-items: stretch; }
.pq__card--svc .pq__ic { display: none; }
.pq__art { position: relative; display: block; aspect-ratio: 2.3 / 1; padding: 6px 8px; box-sizing: border-box; background: #ede7db; transition: background-color .25s ease; }
.pq__art svg { position: absolute; inset: 6px 8px; display: block; width: calc(100% - 16px); height: calc(100% - 12px); overflow: visible; }
.pq__num { position: absolute; top: 9px; inset-inline-start: 12px; font: 600 11px/14px Inter, var(--f-ui, sans-serif); color: #9a9ea6; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pq__card--svc .pq__ct { margin: 11px 14px 0; font: 700 18px/1.3 var(--f-display, serif); }
.pq__card--svc .pq__ch { margin: 4px 14px 0; }
.pq__card--svc[aria-checked="true"] .pq__art { background: var(--pq-sel-stage); }
.pq__card--svc[aria-checked="true"] .pq__num { color: var(--pq-coral); }
@media (max-width: 540px) {
  .pq__card { border-radius: 18px; }
  .pq__card--svc { padding-bottom: 11px; }
  .pq__card--svc .pq__ct { margin: 9px 12px 0; font-size: 16px; }
  .pq__card--svc .pq__ch { margin: 3px 12px 0; }
  .pq__num { top: 7px; inset-inline-start: 10px; }
}
html.reduce-motion .pq__card { translate: none !important; scale: none !important; }
