/* Quiz as a project configurator: questions on the left, the site building live on the right. */
.qz {
  --qz-line: rgba(255,255,255,.14);
  --qz-muted: #9a9a9a;
  --qz-sky: #c9e2fe;
  --qz-blue: #0079ff;
  --qz-film: #070707;
  --qz-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: minmax(400px, 41%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  background: #060606; color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  overscroll-behavior: contain;
  animation: qz-in .5s cubic-bezier(.16,1,.3,1);
}
@keyframes qz-in { from { opacity: 0; } }

/* ---------- question panel ---------- */
.qz-top { grid-column: 1; grid-row: 1; z-index: 3; padding-bottom: 12px; background: #060606; border-bottom: 1px solid var(--qz-line); }
.qz-panel {
  grid-column: 1; grid-row: 2; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  overflow: auto; box-sizing: border-box;
  scrollbar-width: thin; scrollbar-color: #2a2a2a transparent;
}
.qz-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px; padding: env(safe-area-inset-top) clamp(20px, 2.6vw, 40px) 0;
}
.qz-brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.qz-brand b { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.qz-brand span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--qz-muted); white-space: nowrap; }
.qz-close {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
  transition: color .15s ease;
}
.qz-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.qz-close:hover { color: var(--qz-sky); }

.qz-progress { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 16px; padding: 4px clamp(20px, 2.6vw, 40px) 0; }
.qz-count { font: 500 12px/1 var(--qz-mono); color: var(--qz-muted); font-variant-numeric: tabular-nums; }
.qz-count b { color: #fff; font-weight: 600; }
.qz-seg { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.qz-seg span { height: 3px; background: var(--qz-line); transition: background .3s ease; }
.qz-seg span[data-on="true"] { background: #fff; }

.qz-body { flex: 1; display: flex; flex-direction: column; padding: clamp(32px, 5vh, 64px) clamp(20px, 2.6vw, 40px) 32px; }
.qz-title {
  margin: 0; max-width: 15ch;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 3.3vw, 58px); line-height: 1; letter-spacing: -.005em; text-wrap: balance;
}
.qz-title:focus { outline: none; }
.qz-hint { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--qz-muted); max-width: 36em; }

.qz-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: 8px; margin-top: clamp(24px, 3.4vh, 40px); }
.qz-opt {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 14px;
  min-height: 74px; padding: 12px 14px 12px 12px;
  border: 1px solid var(--qz-line); color: #fff;
  transition: border-color .15s ease, background-color .2s ease, color .2s ease;
}
.qz-opt[data-thumb="false"] { grid-template-columns: minmax(0,1fr) auto; padding-left: 18px; }
.qz-opt:hover { border-color: var(--qz-blue); }
.qz-opt:active { transform: translateY(1px); }
.qz-opt[aria-pressed="true"] { background: #fff; border-color: #fff; color: #060606; }
.qz-thumb {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 4px;
  background: linear-gradient(180deg, #161616, #0c0c0c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  transition: box-shadow .2s ease, background-color .2s ease;
}
.qz-opt:hover .qz-thumb { box-shadow: inset 0 0 0 1px rgba(255,255,255,.34); }
.qz-opt[aria-pressed="true"] .qz-thumb { background: #060606; box-shadow: none; }
.qz-opt[data-thumb="false"] .qz-thumb { display: none; }
.qz-thumb-svg { width: 40px; height: 40px; overflow: visible; }
.qz-text { display: grid; gap: 4px; min-width: 0; }
.qz-label { font-size: 17px; font-weight: 500; line-height: 1.25; }
.qz-note { font-size: 13px; line-height: 1.35; color: var(--qz-muted); }
.qz-opt[aria-pressed="true"] .qz-note { color: #555; }
.qz-key {
  min-width: 20px; height: 20px; padding: 0 4px; box-sizing: border-box; display: grid; place-items: center;
  font: 500 11px/1 var(--qz-mono); color: var(--qz-muted);
  border: 1px solid var(--qz-line); border-radius: 3px;
}
.qz-opt[aria-pressed="true"] .qz-key { color: #060606; border-color: rgba(6,6,6,.35); }
.qz-check { width: 14px; height: 14px; fill: none; stroke: #060606; stroke-width: 2; display: none; }
.qz-opt[data-multi="true"][aria-pressed="true"] .qz-check { display: block; }
.qz-opt[data-multi="true"][aria-pressed="true"] .qz-key { display: none; }
@media (hover: none) { .qz-key { display: none; } .qz-opt[data-multi="true"][aria-pressed="true"] .qz-check { display: block; } }

/* Thumbnail icons: the same line vocabulary as the live preview. */
.qz-thumb-svg .t-m { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.qz-thumb-svg .t-t { fill: none; stroke: rgba(255,255,255,.66); stroke-width: 1.1; stroke-linecap: round; }
.qz-thumb-svg .t-f { fill: none; stroke: rgba(255,255,255,.46); stroke-width: 1.05; stroke-dasharray: 3 2.5; }
.qz-thumb-svg .t-g, .qz-thumb-svg .t-h { fill: none; stroke: rgba(255,255,255,.24); stroke-width: .9; }
.qz-thumb-svg .t-a, .qz-thumb-svg .t-inv, .qz-thumb-svg .t-dot { fill: #fff; stroke: #fff; stroke-width: 1.2; }
.qz-thumb-svg .t-ai { fill: none; stroke: #060606; stroke-width: 1.3; }
.qz-thumb-svg .t-bgf { fill: none; }
.qz-thumb-svg text { fill: #fff; font-family: var(--qz-mono); font-weight: 600; }
.qz-thumb-svg .t-txi { fill: #060606; }

.qz-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 28px; }
.qz-field { display: grid; gap: 8px; }
.qz-field > span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--qz-muted); }
.qz-field input {
  all: unset; box-sizing: border-box; width: 100%; height: 56px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.04);
  font-size: 17px; color: #fff; caret-color: var(--qz-sky); transition: border-color .15s ease;
}
.qz-field input::placeholder { color: #8c8c8c; }
.qz-field input:hover { border-color: #fff; }
.qz-field input:focus { border-color: var(--qz-sky); }
.qz-consent { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--qz-muted); max-width: 44em; }
.qz-consent a { color: inherit; text-underline-offset: 3px; }
/* «Другое» and the link sit right under the answers they belong to. */
.qz-other, .qz-link { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.qz-field[data-err="true"] input { border-color: #fff; background: rgba(255,255,255,.09); }
.qz-err { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: #fff; }
.qz-err::before { content: '!'; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 8px; border-radius: 3px; background: #fff; color: #060606; font: 600 11px/1 var(--qz-mono); vertical-align: 1px; }

/* Contact: the channels as one row, the field right under them, everything above the fold. */
.qz-options[data-kind="channel"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(20px, 3vh, 32px); border: 1px solid var(--qz-line); }
.qz-options[data-kind="channel"] .qz-opt[data-thumb] { grid-template-columns: minmax(0, 1fr); justify-items: center; min-height: 48px; padding: 0 6px; border: 0; border-left: 1px solid var(--qz-line); }
.qz-options[data-kind="channel"] .qz-opt:first-child { border-left: 0; }
.qz-options[data-kind="channel"] .qz-opt:not([aria-pressed="true"]):hover { background: rgba(255,255,255,.06); }
.qz-options[data-kind="channel"] .qz-label { font-size: 15px; text-align: center; white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 767px) { .qz-options[data-kind="channel"] .qz-label { font-size: clamp(12px, 3.5vw, 14px); } }
.qz-options[data-kind="channel"] .qz-key, .qz-options[data-kind="channel"] .qz-check { display: none; }
.qz[data-stage="model"] .qz-fields { margin-top: 16px; }

.qz-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(20px, 2.6vw, 40px) max(14px, env(safe-area-inset-bottom));
  background: rgba(6,6,6,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--qz-line);
}
.qz-back { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.qz-back[data-off="true"] { color: #4a4a4a; cursor: default; }
.qz-back svg, .qz-next svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.qz-next {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 20px 0 24px; background: #fff; color: #060606; font-size: 15px; font-weight: 500;
  transition: background-color .15s ease;
}
.qz-next:hover { background: var(--qz-blue); }
.qz-next[data-kind="submit"] { background: var(--qz-sky); }
.qz-next[data-kind="submit"]:hover { background: var(--qz-blue); }
.qz-next[aria-disabled="true"] { background: rgba(255,255,255,.12); color: #7a7a7a; cursor: not-allowed; }
.qz-kbd { font: 11px/1 var(--qz-mono); color: rgba(6,6,6,.5); }
@media (hover: none) { .qz-kbd { display: none; } }

/* ---------- done ---------- */
.qz-done { flex: 1; display: grid; align-content: start; gap: 24px; padding: clamp(32px, 6vh, 72px) clamp(20px, 2.6vw, 40px) 40px; }
.qz-done h2 { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(36px, 3.6vw, 64px); line-height: 1; text-wrap: balance; max-width: 13ch; }
.qz-done p { margin: 0; font-size: 17px; line-height: 1.55; color: #cfcfcf; max-width: 30em; }
.qz-done-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qz-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px; font-size: 15px; font-weight: 500; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.qz-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.qz-btn-solid { background: var(--qz-sky); color: #060606; }
.qz-btn-solid:hover { background: var(--qz-blue); }
.qz-btn-line { border: 1px solid rgba(255,255,255,.4); color: #fff; }
.qz-btn-line:hover { border-color: var(--qz-blue); }
.qz-view { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--qz-line); width: max-content; }
.qz-view button { all: unset; box-sizing: border-box; cursor: pointer; min-height: 40px; padding: 0 16px; font: 500 12px/1 var(--qz-mono); color: var(--qz-muted); display: grid; place-items: center; transition: background-color .15s ease, color .15s ease; }
.qz-view button[aria-pressed="true"] { background: #fff; color: #060606; }
.qz-summary { border-bottom: 1px solid var(--qz-line); }
.qz-summary div { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0,1fr); gap: 16px; padding: 11px 0; border-top: 1px solid var(--qz-line); }
.qz-summary dt { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--qz-muted); }
.qz-summary dd { margin: 0; font-size: 15px; line-height: 1.45; }

/* ---------- live preview ---------- */
.qz-sheet { grid-column: 2; grid-row: 1 / span 2; position: relative; min-width: 0; height: 100dvh; background: var(--qz-film); border-left: 1px solid var(--qz-line); overflow: hidden; }
.qz-sheet-host { position: absolute; inset: 0; }
.bp-host { isolation: isolate; }
.bp-host .bp-svg { position: absolute; inset: 0; }
.bp-drawing { transition: opacity .45s ease; }
.bp-drawing.is-hidden { opacity: 0; }
.bp-model { position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none; transition: opacity .45s ease; touch-action: pan-y; }
.bp-model.is-on { opacity: 1; pointer-events: auto; cursor: grab; }
.bp-model.is-on:active { cursor: grabbing; }
.bp-model canvas { position: absolute; left: 0; top: 0; display: block; }
.bp-model-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bp-model-labels .ml-name { fill: #fff; font: 600 11.5px var(--qz-mono); letter-spacing: .01em; }
.bp-model-labels .ml-name.is-compact { font-size: 9.5px; }
.bp-model-labels .ml-sub { fill: rgba(255,255,255,.58); font: 400 10px var(--qz-mono); }
.bp-model-labels .ml-lead, .bp-model-labels .ml-shelf { stroke: rgba(255,255,255,.45); stroke-width: 1; }
.bp-model-labels .ml-dot { fill: #fff; }
.qz-drag {
  position: absolute; z-index: 4; left: 36px; bottom: calc(clamp(210px, (100% - 72px) * .36, 290px) + 70px); transform: translateY(8px);
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 4px;
  font: 500 11px/1 var(--qz-mono); color: #fff;
  background: rgba(6,6,6,.82); border: 1px solid rgba(255,255,255,.22);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.qz-drag svg { width: 22px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.qz-drag-touch { display: none; }
@media (hover: none) { .qz-drag-mouse { display: none; } .qz-drag-touch { display: inline; } }
.qz[data-view="model"] .qz-drag { opacity: 1; transform: none; transition: opacity .5s ease 2.6s, transform .5s ease 2.6s; }

/* The finale: the request is sent, and the response lands over the preview like a deploy result. */
.bp-deploy { position: absolute; left: 50%; top: 42%; z-index: 4; width: max-content; pointer-events: none; opacity: 0; transform: translate(-50%, -50%); }
.bp-deploy-in {
  position: relative; display: grid; justify-items: start; gap: 12px; min-width: 300px; padding: 20px 28px 20px 24px;
  background: #fff; color: #060606; border-radius: 6px;
  box-shadow: 0 40px 90px rgba(0,0,0,.65), 0 10px 24px rgba(0,0,0,.4);
}
.bp-deploy-top { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--qz-mono); color: rgba(6,6,6,.66); }
.bp-deploy-top b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 3px; background: #060606; color: #fff; }
.bp-deploy-top b svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-deploy-main { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 3.4vw, 52px); line-height: .95; white-space: nowrap; }
.bp-deploy-meta { font: 500 11px/1 var(--qz-mono); color: rgba(6,6,6,.6); }
.bp-deploy.is-on { animation: bp-deploy-in .9s cubic-bezier(.2,.8,.1,1) forwards; }
.bp-deploy.is-on .bp-deploy-in { animation: bp-deploy-wipe .7s cubic-bezier(.65,0,.35,1) .08s both; }
.bp-deploy.is-on .bp-deploy-in::after {
  content: ''; position: absolute; top: -6px; bottom: -6px; left: 0; width: 2px; background: #fff;
  box-shadow: 0 0 18px 4px rgba(255,255,255,.7); animation: bp-deploy-scan .7s cubic-bezier(.65,0,.35,1) .08s both;
}
@keyframes bp-deploy-in { from { opacity: 0; transform: translate(-50%, -44%) scale(.97); filter: blur(6px); } to { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); } }
@keyframes bp-deploy-wipe { from { clip-path: inset(-12px 100% -12px 0 round 6px); } to { clip-path: inset(-12px -12px -12px 0 round 6px); } }
@keyframes bp-deploy-scan { from { left: 0; opacity: 1; } 92% { opacity: 1; } to { left: 100%; opacity: 0; } }
.bp-host.is-model .bp-deploy.is-on { opacity: 0 !important; transition: opacity .3s ease; }

/* ---------- camera furniture (phones and tablets): minimap and slate ---------- */
.qz-report { display: none; }
.bp-hud { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 12px; display: none; align-items: stretch; gap: 8px; pointer-events: none; transition: opacity .3s ease, visibility .3s; }
.bp-host.is-cam .bp-hud { display: flex; }
/* A lower third: the set fades out under the camera furniture. */
.bp-host.is-cam::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 120px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(7,7,7,0), #070707 50%);
  transition: opacity .3s ease;
}
.bp-host.is-cam.is-model::after { opacity: 0; }
.bp-host.is-model .bp-hud { opacity: 0; visibility: hidden; }
.bp-host.is-cam:not(.is-set) .bp-svg { touch-action: none; }
.bp-map {
  all: unset; box-sizing: border-box; pointer-events: auto; cursor: pointer; flex: none; width: 76px; height: 48px; padding: 5px 6px;
  background: #060606; border: 1px solid rgba(255,255,255,.22); transition: border-color .15s ease;
}
.bp-map:hover { border-color: rgba(255,255,255,.55); }
.bp-map:focus-visible { outline: 2px solid var(--qz-sky); outline-offset: 2px; }
.bp-map svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.bp-map .mm { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.42); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bp-map .mm-sec { stroke: rgba(255,255,255,.16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bp-map .mm-cam { fill: rgba(201,226,254,.14); stroke: var(--qz-sky); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.bp-slate {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  background: #060606; border: 1px solid rgba(255,255,255,.22);
  font: 500 11px/1.4 var(--qz-mono); color: #fff;
}
.bp-slate-line { flex: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.bp-slate-line .k { color: rgba(255,255,255,.56); }
.bp-slate-zoom { flex: none; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.72); }
.bp-slate.is-new { animation: bp-slate-in .8s cubic-bezier(.16,1,.3,1); }
@keyframes bp-slate-in { from { background-color: rgba(255,255,255,.22); border-color: #fff; } }
.qz-report .bp-svg { display: block; width: 100%; height: auto; }
.bp-host.is-cam g[data-id="empty"] text { opacity: 0; }

/* ---------- phones and tablets: the stage stays on screen, the dock answers under the thumb ---------- */
@keyframes qz-swell { 0% { transform: none; } 45% { transform: scale(1.05); } 100% { transform: scale(1.025); } }
@keyframes qz-rise { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 1023px) {
  .qz {
    --qz-stage: clamp(236px, 42dvh, 460px);
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto var(--qz-stage) minmax(0, 1fr);
    height: 100dvh; overflow: hidden;
    transition: grid-template-rows .45s cubic-bezier(.16,1,.3,1);
  }
  .qz-top {
    grid-column: 1; grid-row: 1; position: relative;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 18px;
    min-height: 52px; padding: env(safe-area-inset-top) 4px 0 16px;
  }
  .qz-head { display: contents; }
  .qz-brand { order: 0; }
  .qz-brand b { font-size: 20px; }
  .qz-brand span { display: none; }
  .qz-progress { order: 1; gap: 12px; padding: 0; }
  .qz-count { font-size: 11px; }
  .qz-seg { gap: 3px; }
  .qz-seg span { height: 2px; }
  .qz-close { order: 2; justify-content: center; width: 48px; min-height: 48px; padding: 0; }
  .qz-close svg { width: 16px; height: 16px; }
  .qz-close-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  .qz-sheet { grid-column: 1; grid-row: 2; height: auto; min-height: 0; border-left: 0; border-bottom: 1px solid var(--qz-line); }
  .qz-sheet-host { --bp-camera: 1; }
  .qz-drag { left: 12px; bottom: 12px; transform: translateY(6px); padding: 6px 8px; font-size: 10px; }
  .qz[data-view="model"] .qz-drag { transform: none; }

  .qz-panel { grid-column: 1; grid-row: 3; overflow: auto; overscroll-behavior: contain; }
  .qz-body { padding: 18px clamp(16px, 4vw, 32px) 22px; }
  .qz-title { max-width: 18ch; font-size: clamp(28px, 7.4vw, 44px); }
  .qz-hint { margin-top: 8px; font-size: 13px; line-height: 1.45; }
  .qz-hint[data-kind="one"] { display: none; }
  .qz-options { margin-top: 16px; gap: 6px; }
  .qz-fields { margin-top: 20px; }
  .qz-actions { padding: 10px clamp(16px, 4vw, 32px) max(10px, env(safe-area-inset-bottom)); }
  .qz-kbd { display: none; }

  /* An answer is a command: the chosen tile swells, the rest fold toward the edges. */
  .qz-options[data-picked="true"] .qz-opt[aria-pressed="true"] { z-index: 1; animation: qz-swell .46s cubic-bezier(.2,.8,.1,1) both; box-shadow: 0 16px 34px rgba(0,0,0,.55); }
  .qz-options[data-picked="true"] .qz-opt:not([aria-pressed="true"]) {
    opacity: .14; transform: translateX(var(--qz-edge, -12px)) scale(.94); pointer-events: none;
    transition: opacity .28s ease, transform .42s cubic-bezier(.2,.8,.1,1);
  }
  .qz-options[data-picked="true"] .qz-opt:nth-child(even) { --qz-edge: 12px; }
  .qz-body.qz-enter > * { animation: qz-rise .52s cubic-bezier(.16,1,.3,1) both; }
  .qz-body.qz-enter > .qz-title { animation-delay: .03s; }
  .qz-body.qz-enter > :nth-child(n+2) { animation-delay: .08s; }

  /* Typing the contact: the stage steps aside for the keyboard. */
  .qz:has(.qz-fields input:focus) { --qz-stage: 0px; }

  /* The finale reads as a report: deploy result, reply, build log, roadmap, answers. */
  .qz[data-stage="done"] { grid-template-rows: auto auto auto; overflow-x: hidden; overflow-y: auto; }
  .qz[data-stage="done"] .qz-top { position: sticky; top: 0; z-index: 5; background: #060606; border-bottom: 1px solid var(--qz-line); }
  .qz[data-stage="done"] .qz-sheet { height: clamp(320px, 56dvh, 620px); }
  .qz[data-stage="done"] .qz-panel { overflow: visible; }
  .qz-done { gap: 20px; padding: 26px clamp(16px, 4vw, 32px) calc(40px + env(safe-area-inset-bottom)); }
  .qz-done h2 { font-size: clamp(34px, 9vw, 56px); }
  .qz-done p { font-size: 15px; }
  .qz-done-actions .qz-btn { flex: 1 1 200px; justify-content: center; }
  .qz-report { display: block; margin-top: 4px; }
}

/* Phones: compact two-column answer tiles without thumbnails. */
@media (max-width: 767px), (max-width: 1023px) and (orientation: landscape) and (max-height: 560px) {
  .qz-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qz-opt { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 52px; padding: 10px 10px 10px 12px; }
  .qz-opt[data-thumb="false"] { grid-template-columns: minmax(0, 1fr) auto; padding-left: 12px; }
  .qz-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .qz-thumb { display: none; }
  .qz-text { gap: 3px; }
  .qz-label { font-size: 14px; line-height: 1.22; }
  /* Labels carry the answer on a phone; notes would push the first question's tiles under the dock. */
  .qz-note { display: none; }
  .qz-actions { gap: 8px; }
  .qz-summary div { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .bp-deploy-in { min-width: 0; padding: 14px 16px; gap: 8px; }
  .bp-deploy-main { font-size: 26px; }
  .bp-deploy-top, .bp-deploy-meta { font-size: 9px; }
}
/* Short portrait phones: the dock gets more of the height. */
@media (max-width: 1023px) and (orientation: portrait) and (max-height: 720px) {
  .qz { --qz-stage: clamp(212px, 35dvh, 300px); }
  .qz-top { min-height: 46px; }
  .qz-body { padding-top: 14px; }
  .qz-title { font-size: 26px; }
  .qz-hint[data-kind="multi"] { display: none; }
  .qz-options { margin-top: 12px; }
  .qz-opt { min-height: 46px; padding-block: 8px; }
}
@media (max-width: 299px) {
  .qz-options { grid-template-columns: minmax(0, 1fr); }
  .qz-opt:last-child:nth-child(odd) { grid-column: auto; }
}

/* Landscape phones: the stage on the left at full height, the dock on the right. */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 560px) {
  .qz, .qz[data-stage="done"] {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden; padding-left: env(safe-area-inset-left);
  }
  .qz-sheet, .qz[data-stage="done"] .qz-sheet { grid-column: 1; grid-row: 1 / span 2; height: auto; border-bottom: 0; border-right: 1px solid var(--qz-line); }
  .qz-top { grid-column: 2; min-height: 46px; }
  .qz-panel, .qz[data-stage="done"] .qz-panel { grid-column: 2; grid-row: 2; overflow: auto; padding-right: env(safe-area-inset-right); }
  .qz-body { padding-top: 14px; }
  .qz-title { font-size: 26px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qz, .bp-deploy.is-on, .bp-deploy.is-on .bp-deploy-in, .bp-deploy.is-on .bp-deploy-in::after { animation: none; }
  .bp-deploy.is-on { opacity: 1; }
  .bp-deploy.is-on .bp-deploy-in::after { display: none; }
  .qz { transition: none; }
  .qz-body.qz-enter > *, .qz-options[data-picked="true"] .qz-opt, .bp-slate.is-new { animation: none; transition: none; }
  .qz-options[data-picked="true"] .qz-opt:not([aria-pressed="true"]) { transform: none; }
}
