/* Emirates /quiz — all component-specific classes use qp-. */
.qp-wrap { min-width: 0; }
.qp-head { max-width: 760px; }
.qp-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 4px 3px 12px; margin: 0 -3px 24px; -webkit-overflow-scrolling: touch;
}
.qp-tabs::-webkit-scrollbar { display: none; }
.qp-tab {
  position: relative; flex: 1 0 auto; overflow: hidden; text-align: left;
  padding: 15px 17px 17px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--panel); color: var(--ink); font: 400 14px/1.4 var(--fu);
  cursor: pointer; transition: background .2s, border-color .2s;
}
.qp-tab small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 12px; }
.qp-tab b { font-weight: 500; font-variant-numeric: tabular-nums; }
.qp-tab[aria-selected="true"] { background: var(--bg-soft); border-color: var(--accent); }
.qp-tab[aria-selected="true"] > span:first-child { color: var(--accent); }
.qp-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.qp-tab.qp-running .qp-progress { animation: qp-progress 7s linear forwards; }
.qp-panel { --qp-duration: 1.1s; min-width: 0; display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: clamp(24px, 3.5vw, 46px); align-items: start; }
.qp-panel[hidden], .qp-wrap [hidden] { display: none !important; }
.qp-visual, .qp-details { min-width: 0; }
.qp-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qp-index { color: var(--ink-faint); font: 400 12px/1.4 var(--fu); letter-spacing: .12em; }
.qp-segment { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.qp-control, .qp-variant {
  min-height: 40px; border: 0; padding: 9px 17px; border-radius: 3px;
  color: var(--ink-soft); background: transparent; font: 400 14px/1.4 var(--fu); cursor: pointer;
}
.qp-control[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.qp-stage {
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 10;
  border: 1px solid var(--line-soft); border-radius: 8px; background: #F3EEE4;
  box-shadow: 0 18px 38px -30px rgba(61, 58, 44, .3); isolation: isolate;
}
/* Safari 14.0 has no aspect-ratio; reserve exactly the same space. */
@supports not (aspect-ratio: 16 / 10) { .qp-stage::before { content: ""; display: block; padding-top: 62.5%; } }
.qp-plan, .qp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.qp-plan { z-index: 1; opacity: 1; transition: opacity .3s var(--ease); }
.qp-video { z-index: 2; opacity: 0; pointer-events: none; background: #F3EEE4; transition: opacity .3s var(--ease); }
.qp-stage.qp-interior .qp-video { opacity: 1; }
.qp-stage.qp-interior .qp-plan { opacity: 0; }
.qp-scanner { position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 2px; opacity: 0; background: var(--accent); box-shadow: 0 0 15px 3px rgba(176, 122, 82, .25); pointer-events: none; }
.qp-stage.qp-drawing .qp-plan { animation: qp-draw var(--qp-duration) var(--ease) both; }
.qp-stage.qp-drawing .qp-scanner { animation: qp-scan var(--qp-duration) var(--ease) both; }
.qp-stage.qp-loading .qp-plan { opacity: 0; }
.qp-stage.qp-loading::after { content: "Завантажуємо план…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); font-size: 14px; }
.qp-media-error { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; font-size: 14px; color: var(--ink-soft); background: var(--bg-soft); }
.qp-play { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1px solid var(--line); border-radius: 4px; background: var(--panel); padding: 14px 20px; color: var(--ink); font: 400 14px var(--fu); cursor: pointer; }
.qp-variants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.qp-variant { border: 1px solid var(--line); padding: 8px 13px; font-size: 12px; }
.qp-variant[aria-pressed="true"] { border-color: var(--accent-2); background: var(--bg-soft); color: var(--ink); }
.qp-caption { min-height: 3em; margin-top: 14px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.qp-details { padding-top: 5px; }
.qp-kicker { color: var(--accent); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.qp-title { margin: 10px 0; font: 400 clamp(30px, 3.2vw, 43px)/1.08 var(--fd); letter-spacing: -.015em; }
.qp-subtitle { min-height: 3.2em; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.qp-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 23px 0 16px; }
.qp-fact { min-width: 0; border: 1px solid var(--line-soft); border-radius: 5px; padding: 13px 15px; background: var(--panel); }
.qp-label { display: block; color: var(--ink-soft); font-size: 12px; margin-bottom: 5px; }
.qp-value { font-size: 17px; font-weight: 400; line-height: 1.4; }
.qp-price { font-family: var(--fd); font-size: 30px; line-height: 1.1; }
.qp-fact b { font-weight: 500; }
.qp-payment { grid-column: 1 / -1; background: var(--bg-soft); }
.qp-payment .qp-value { font-size: 25px; }
.qp-payment small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.qp-free { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
.qp-free .qp-label { margin: 0; }
.qp-number { display: inline-grid; vertical-align: baseline; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qp-number > * { grid-area: 1 / 1; }
.qp-counting > [data-fact] { opacity: 0; }
.qp-counter { text-align: right; font-weight: inherit; }
.qp-note { font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.qp-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 23px; }
.qp-cta { width: 100%; padding-left: 16px; padding-right: 16px; letter-spacing: .065em; }
.qp-link { color: var(--ink); font-size: 13px; text-decoration: none; text-underline-offset: 5px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.qp-link:hover { color: var(--accent); border-color: var(--accent); }
.qp-tab:focus-visible, .qp-control:focus-visible, .qp-variant:focus-visible, .qp-cta:focus-visible, .qp-link:focus-visible, .qp-play:focus-visible, .qp-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.qp-revealing .qp-fact, .qp-revealing .qp-caption { animation: qp-rise .4s var(--ease) both; animation-delay: calc(var(--qp-duration) + var(--qp-stagger, 0ms)); }
.qp-fact:nth-child(2) { --qp-stagger: 100ms; }
.qp-fact:nth-child(3) { --qp-stagger: 200ms; }
.qp-fact:nth-child(4) { --qp-stagger: 300ms; }
.qp-caption { --qp-stagger: 400ms; }
.qp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes qp-draw { from { clip-path: inset(0 100% 0 0); transform: scale(1.03); filter: drop-shadow(0 0 0 transparent); } to { clip-path: inset(0 0 0 0); transform: scale(1); filter: drop-shadow(0 3px 4px rgba(61, 58, 44, .12)); } }
@keyframes qp-scan { 0% { left: 0; opacity: 0; } 5% { opacity: .85; } 95% { opacity: .85; } 100% { left: 100%; opacity: 0; } }
@keyframes qp-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes qp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qp-progress { to { transform: scaleX(1); } }
@media (max-width: 959px) {
  .qp-panel { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .qp-subtitle { min-height: 0; }
  .qp-actions { max-width: 540px; }
}
@media (max-width: 559px) {
  .qp-tab { flex-grow: 0; padding: 12px 14px 14px; font-size: 13px; }
  .qp-tabs { margin-bottom: 14px; }
  .qp-control { padding: 9px 13px; }
  .qp-facts { gap: 8px; }
  .qp-fact { padding: 12px; }
  .qp-value { font-size: 15px; }
  .qp-actions > *, .qp-variant { width: 100%; }
  .qp-link { padding: 8px 0; }
  .qp-title { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .qp-stage.qp-drawing .qp-plan, .qp-revealing .qp-fact, .qp-revealing .qp-caption { animation: qp-fade .2s ease both; }
  .qp-scanner, .qp-progress { display: none; }
  .qp-plan, .qp-video, .qp-tab { transition-duration: .2s; }
}
