/* static/css/service-quiz.css — адаптивный квиз подбора услуг. */
/* ✏️ ИЗМЕНЕНО: красный градиент, появление и проходящий блик как в expertno. */
@keyframes sq-launch-slide-in {
  from { transform: translateX(-140%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes sq-launch-shine {
  0%, 45% { left: -75%; }
  65%, 100% { left: 125%; }
}
.sq-launch { position: fixed; right: 24px; bottom: 24px; z-index: 60; overflow: hidden; border: 0; border-radius: 18px; background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 8px 20px #dc262666; padding: 16px 22px; font: inherit; font-weight: 700; cursor: pointer; min-height: 48px; animation: sq-launch-slide-in .6s cubic-bezier(.16,1,.3,1) both; }
.sq-launch::after { content: ""; position: absolute; top: 0; left: -75%; width: 45%; height: 100%; pointer-events: none; background: linear-gradient(115deg, transparent, #ffffff8c, transparent); animation: sq-launch-shine 3.6s ease-in-out 1s infinite; }
.sq-launch span { margin-right: 8px; }
.sq-dialog { border: 1px solid var(--border); border-radius: 24px; padding: 0; width: min(960px, calc(100% - 40px)); max-height: calc(100dvh - 40px); margin: auto; color: var(--ink); background: var(--surface); box-shadow: 0 24px 100px #14212b40; }
.sq-dialog::backdrop { background: #14212ba8; backdrop-filter: blur(4px); }
.sq-dialog [hidden], .sq-launch[hidden] { display: none !important; }
.sq-dialog .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html:has(.sq-dialog[open]) { overflow: hidden; }
.sq-header { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; border-bottom: 1px solid var(--border); }
.sq-brand { font-size: 23px; font-weight: 800; letter-spacing: -.7px; }
.sq-brand span { color: var(--accent-ink); }
.sq-close { width: 44px; height: 44px; font: inherit; font-size: 30px; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; color: var(--ink); }
.sq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
.sq-main { padding: 36px; min-width: 0; }
.sq-main h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.18; margin: 14px 0 20px; font-weight: 800; }
.sq-main p { line-height: 1.65; }
.sq-lead { color: var(--text-2); font-size: 18px; }
.sq-benefits { padding-left: 22px; margin: 24px 0; display: grid; gap: 12px; }
.sq-note { color: var(--text-2); font-size: 13px; margin-top: 18px; }
.sq-aside { padding: 32px 24px; background: var(--surface-2); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.sq-aside-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 25px; }
.sq-aside h3 { margin: 0; font-size: 21px; line-height: 1.3; }
.sq-aside p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.sq-aside-note { margin-top: auto; padding-top: 32px; color: var(--text-2); font-size: 12px; line-height: 1.8; }
.sq-progress-label { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.sq-progress { display: block; width: 100%; height: 5px; margin: 12px 0 26px; border: 0; border-radius: 10px; appearance: none; }
.sq-progress::-webkit-progress-bar { background: var(--border); border-radius: 10px; }
.sq-progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
.sq-progress::-moz-progress-bar { background: var(--accent); }
.sq-hint { color: var(--text-2); font-size: 14px; }
.sq-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.sq-option { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 13px; padding: 15px; cursor: pointer; line-height: 1.4; min-height: 52px; font-size: 15px; }
.sq-option:has(input:checked) { border-color: var(--accent-ink); background: var(--accent-bg); }
.sq-option input { width: 18px; height: 18px; accent-color: var(--accent-ink); flex-shrink: 0; }
.sq-navigation { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.sq-navigation .btn { min-height: 48px; }
.sq-error { color: #a32626; font-size: 14px; margin: 10px 0 0; }
.sq-error:empty { display: none; }
.sq-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sq-form { display: grid; gap: 15px; margin-top: 22px; }
.sq-summary { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 20px 0; }
.sq-summary summary { cursor: pointer; font-weight: 600; }
.sq-summary dl { font-size: 14px; line-height: 1.5; }
.sq-summary dt { color: var(--text-2); margin-top: 12px; }
.sq-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.sq-success-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; color: var(--accent-ink); background: var(--accent-soft); font-size: 34px; }
.quiz-invitation p { line-height: 1.65; }
.sq-dialog :focus-visible, .sq-launch:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .sq-launch, .sq-launch::after { animation: none; }
}
@media (max-width: 700px) {
  .sq-layout { grid-template-columns: minmax(0, 1fr); }
  .sq-aside { display: none; }
  .sq-main { padding: 24px; }
  .sq-header { padding: 12px 20px; }
  .sq-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 20px; }
  .sq-launch { right: 14px; bottom: 14px; padding: 14px 18px; font-size: 14px; }
  .sq-fields { grid-template-columns: minmax(0, 1fr); }
  .sq-options { grid-template-columns: minmax(0, 1fr); }
}
