body.quiz-page-body{overflow-x:hidden}
main.page.quiz-page{
  min-height:100svh;
  padding-top:146px;
  padding-bottom:72px;
  background:
    radial-gradient(circle at top left, rgba(14,165,198,.13), transparent 34%),
    radial-gradient(circle at top right, rgba(11,183,131,.08), transparent 38%),
    linear-gradient(180deg, #f8fbfe, #eef4f8);
}
.quiz-shell{
  width:min(100% - 28px, 1240px);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0, 1.05fr) minmax(370px, 488px);
  gap:22px;
  align-items:start;
  transition:min-height .42s cubic-bezier(.22,.74,.24,1);
}
.quiz-shell.is-focusing,
.quiz-shell.is-focused{
  grid-template-columns:minmax(0, 560px);
  justify-content:center;
  align-items:start;
  align-content:start;
  gap:0;
  min-height:0;
}
.quiz-shell.is-focused.has-tall-card{
  min-height:0;
  align-items:start;
}
.quiz-hero,
.quiz-card{
  border-radius:30px;
  border:1px solid rgba(13,42,63,.08);
  background:linear-gradient(135deg, rgba(255,255,255,.99), rgba(239,248,252,.95));
  box-shadow:0 20px 46px rgba(15,23,42,.08);
}
.quiz-hero{
  padding:30px;
  max-height:900px;
  max-width:100%;
  overflow:hidden;
  transform-origin:left center;
  transition:opacity .3s ease, transform .44s cubic-bezier(.22,.74,.24,1), max-height .4s cubic-bezier(.22,.74,.24,1), max-width .4s cubic-bezier(.22,.74,.24,1), padding .32s ease, margin .32s ease, border-color .26s ease, box-shadow .26s ease;
  will-change:opacity, transform;
  backface-visibility:hidden;
}
.quiz-shell.is-focusing .quiz-hero,
.quiz-shell.is-focused .quiz-hero{
  opacity:0;
  transform:translate3d(-10px,0,0);
  max-height:0;
  max-width:0;
  margin:0;
  padding:0;
  border-width:0;
  box-shadow:none;
  pointer-events:none;
}
.quiz-kicker{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;
  background:rgba(14,165,198,.10);border:1px solid rgba(14,165,198,.18);
  font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#0b7ea6;
}
.quiz-title{
  margin:16px 0 0;
  font-size:clamp(32px, 4.9vw, 54px);
  line-height:1.02;
  letter-spacing:-.05em;
  color:#07111f;
}
.quiz-sub{
  margin-top:14px;
  color:#4b5d73;
  font-size:16px;
  line-height:1.72;
  max-width:740px;
}
.quiz-desc{
  margin-top:14px;
  color:#52657a;
  line-height:1.72;
  font-size:14.8px;
  max-width:720px;
}
.quiz-benefits{display:grid;gap:10px;margin-top:22px}
.quiz-benefit{
  display:grid;
  grid-template-columns:30px 1fr;
  gap:12px;
  align-items:start;
  padding:14px 16px;
  border-radius:20px;
  border:1px solid rgba(13,42,63,.08);
  background:rgba(255,255,255,.76);
}
.quiz-benefit__icon{
  width:30px;height:30px;border-radius:999px;
  display:grid;place-items:center;
  background:linear-gradient(180deg,#0ea5c6,#0b7ea6);
  color:#fff;font-weight:900;font-size:14px;
}
.quiz-benefit strong{display:block;font-size:14.4px;color:#07111f}
.quiz-benefit span{display:block;margin-top:4px;color:#5b7087;font-size:13.4px;line-height:1.56}
.quiz-card{
  position:sticky;
  top:18px;
  padding:24px;
  display:grid;
  gap:18px;
  transform-origin:center top;
  transition:box-shadow .28s ease, border-color .28s ease, opacity .3s ease, transform .4s cubic-bezier(.22,.74,.24,1);
  backface-visibility:hidden;
}
.quiz-shell.is-focusing .quiz-card,
.quiz-shell.is-focused .quiz-card{
  position:relative;
  top:0;
  margin:0 auto;
  width:min(100%, 560px);
  box-shadow:0 24px 56px rgba(15,23,42,.14);
}
.quiz-card.animate-focus{
  transition:none;
}
.quiz-progress{display:grid;gap:10px}
.quiz-progress__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.quiz-progress__label{font-size:13px;font-weight:700;color:#5b7087;line-height:1.5}
.quiz-progress__meta{font-size:12px;font-weight:800;color:#0b7ea6;letter-spacing:.04em;text-transform:uppercase}
.quiz-progress__meta:empty{display:none}
.quiz-progress__track{
  position:relative;
  height:10px;
  border-radius:999px;
  background:rgba(15,23,42,.08);
  overflow:hidden;
}
.quiz-progress__bar{
  position:absolute;
  left:0;top:0;bottom:0;
  width:0%;
  border-radius:inherit;
  background:linear-gradient(90deg,#0ea5c6,#0b7ea6);
  box-shadow:0 10px 18px rgba(14,165,198,.18);
  transition:width .3s cubic-bezier(.22,.74,.24,1);
}
.quiz-view{
  display:grid;
  gap:14px;
  opacity:0;
  transform:translate3d(0,8px,0) scale(.995);
  will-change:transform, opacity;
  backface-visibility:hidden;
}
.quiz-view.is-ready{
  opacity:1;
  transform:none;
  transition:opacity .28s ease, transform .38s cubic-bezier(.22,.74,.24,1);
}
.quiz-view__eyebrow{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0b7ea6;
}
.quiz-view h2{
  margin:0;
  color:#07111f;
  font-size:30px;
  line-height:1.1;
  letter-spacing:-.04em;
}
.quiz-view p{
  margin:0;
  color:#53657c;
  line-height:1.72;
  font-size:14.8px;
}
.quiz-start-copy{display:grid;gap:12px}
.quiz-start-list{display:grid;gap:10px}
.quiz-start-item{
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(13,42,63,.08);
  background:rgba(248,251,254,.88);
  color:#3f546a;
  line-height:1.64;
  font-size:14px;
}
.quiz-start-item b{color:#07111f}
.quiz-actions{display:grid;gap:10px;margin-top:6px}
.quiz-action-btn{
  width:100%;
  justify-content:center;
  min-height:50px;
  font-size:14px;
}
.quiz-option-list{display:grid;gap:12px}
.quiz-option{
  width:100%;
  text-align:left;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(13,42,63,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,254,.96));
  color:#0f172a;
  font-size:14.6px;
  line-height:1.58;
  font-weight:700;
  cursor:pointer;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
  box-shadow:0 12px 24px rgba(2,8,23,.05);
}
.quiz-option:hover{
  transform:translateY(-1px);
  border-color:rgba(14,165,198,.26);
  box-shadow:0 18px 30px rgba(2,8,23,.07);
  background:linear-gradient(180deg, rgba(240,249,255,.98), rgba(247,251,255,.98));
}
.quiz-footnote{
  padding:12px 14px;
  border-radius:16px;
  background:rgba(14,165,198,.08);
  border:1px solid rgba(14,165,198,.14);
  color:#456179;
  font-size:13.4px;
  line-height:1.58;
}
.quiz-mid-box{
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(14,165,198,.18);
  background:rgba(14,165,198,.08);
  display:grid;
  gap:10px;
}
.quiz-mid-line{
  padding:12px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(13,42,63,.08);
  color:#365671;
  line-height:1.6;
  font-size:14px;
}
.quiz-result-head{
  display:grid;
  gap:10px;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(248,251,255,.98), rgba(241,248,252,.96));
  border:1px solid rgba(13,42,63,.08);
}
.quiz-result-score{
  display:flex;
  align-items:flex-end;
  gap:14px;
  flex-wrap:wrap;
}
.quiz-result-score__value{
  font-size:56px;
  font-weight:900;
  line-height:.95;
  letter-spacing:-.05em;
  color:#07111f;
}
.quiz-result-score__meta{
  display:grid;
  gap:4px;
}
.quiz-result-score__meta strong{
  font-size:16px;
  color:#07111f;
}
.quiz-result-score__meta span{
  color:#566b81;
  font-size:13.6px;
}
.quiz-level{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.quiz-level.low{background:rgba(11,183,131,.10);border:1px solid rgba(11,183,131,.20);color:#0a8d67}
.quiz-level.moderate{background:rgba(14,165,198,.10);border:1px solid rgba(14,165,198,.20);color:#0b7ea6}
.quiz-level.elevated{background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.22);color:#b56a00}
.quiz-level.high{background:rgba(249,115,22,.12);border:1px solid rgba(249,115,22,.22);color:#c55b07}
.quiz-level.critical{background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.20);color:#c62828}
.quiz-result-grid{display:grid;gap:12px}
.quiz-result-card{
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(13,42,63,.08);
  background:rgba(255,255,255,.88);
}
.quiz-result-card h3{
  margin:0 0 8px;
  color:#07111f;
  font-size:15.6px;
}
.quiz-result-card p{color:#51667d;font-size:14.4px;line-height:1.68}
.quiz-result-note{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(15,23,42,.04);
  border:1px solid rgba(13,42,63,.08);
  color:#44586d;
  font-size:13.6px;
  line-height:1.6;
}

.quiz-service-block{
  display:grid;
  gap:12px;
  margin-top:4px;
  padding:18px;
  border-radius:24px;
  border:1px solid rgba(14,165,198,.18);
  background:linear-gradient(180deg, rgba(240,249,255,.96), rgba(255,255,255,.98));
  box-shadow:0 18px 34px rgba(14,165,198,.10);
}
.quiz-service-block.guarantee{
  background:linear-gradient(180deg, rgba(231,246,255,.96), rgba(255,255,255,.98));
}
.quiz-service-block.estimate{
  background:linear-gradient(180deg, rgba(240,253,250,.96), rgba(255,255,255,.98));
  border-color:rgba(11,183,131,.20);
  box-shadow:0 18px 34px rgba(11,183,131,.10);
}
.quiz-service-block.legal{
  background:linear-gradient(180deg, rgba(254,242,242,.96), rgba(255,255,255,.98));
  border-color:rgba(239,68,68,.20);
  box-shadow:0 18px 34px rgba(239,68,68,.10);
}
.quiz-service-block.acceptance{
  background:linear-gradient(180deg, rgba(255,247,237,.96), rgba(255,255,255,.98));
  border-color:rgba(249,115,22,.20);
  box-shadow:0 18px 34px rgba(249,115,22,.10);
}
.quiz-service-block__eyebrow{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0b7ea6;
}
.quiz-service-block h3{
  margin:0;
  color:#07111f;
  font-size:22px;
  line-height:1.18;
  letter-spacing:-.03em;
}
.quiz-service-block p{
  margin:0;
  color:#4f647a;
  font-size:14.6px;
  line-height:1.72;
}
.quiz-service-block__reason{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(13,42,63,.08);
  background:rgba(255,255,255,.82);
  color:#39566f;
  font-size:13.5px;
  line-height:1.62;
}
.quiz-generating-view{
  gap:16px;
}
.quiz-loading-box{
  display:grid;
  justify-items:center;
  gap:14px;
  padding:22px 18px 24px;
  border-radius:24px;
  border:1px solid rgba(14,165,198,.14);
  background:linear-gradient(180deg, rgba(240,249,255,.92), rgba(255,255,255,.94));
}
.quiz-loading-ring{
  --progress:0;
  position:relative;
  width:112px;
  height:112px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:conic-gradient(#0ea5c6 calc(var(--progress) * 1%), rgba(14,165,198,.14) 0);
  box-shadow:0 16px 38px rgba(14,165,198,.18);
}
.quiz-loading-ring::before{
  content:'';
  position:absolute;
  inset:10px;
  border-radius:inherit;
  background:linear-gradient(180deg,#fff,#f6fbff);
  box-shadow:inset 0 0 0 1px rgba(13,42,63,.06);
}
.quiz-loading-ring span{
  position:relative;
  z-index:1;
  color:#07111f;
  font-size:24px;
  font-weight:900;
  letter-spacing:-.04em;
}
.quiz-loading-copy{
  display:grid;
  gap:4px;
  text-align:center;
}
.quiz-loading-copy strong{
  color:#07111f;
  font-size:15px;
}
.quiz-loading-copy small{
  color:#5d7084;
  font-size:12.8px;
  line-height:1.5;
}
.quiz-empty{
  padding:22px;
  border-radius:22px;
  border:1px dashed rgba(13,42,63,.18);
  color:#51667d;
  text-align:center;
}
.quiz-small-note{
  font-size:13px;
  color:#6c7c91;
}
.quiz-card,
.quiz-progress,
.quiz-view{scroll-margin-top:94px;}

html[data-theme="dark"] .quiz-page{
  background:
    radial-gradient(circle at top left, rgba(14,165,198,.18), transparent 34%),
    radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 36%),
    linear-gradient(180deg, #07111f, #0b1623);
}
html[data-theme="dark"] .quiz-hero,
html[data-theme="dark"] .quiz-card,
html[data-theme="dark"] .quiz-benefit,
html[data-theme="dark"] .quiz-start-item,
html[data-theme="dark"] .quiz-option,
html[data-theme="dark"] .quiz-mid-line,
html[data-theme="dark"] .quiz-result-head,
html[data-theme="dark"] .quiz-result-card{
  background:linear-gradient(180deg, rgba(18,27,36,.96), rgba(14,21,30,.98));
  border-color:rgba(84,101,120,.34);
  box-shadow:0 22px 44px rgba(0,0,0,.24);
}
html[data-theme="dark"] .quiz-title,
html[data-theme="dark"] .quiz-benefit strong,
html[data-theme="dark"] .quiz-view h2,
html[data-theme="dark"] .quiz-result-card h3,
html[data-theme="dark"] .quiz-result-score__value,
html[data-theme="dark"] .quiz-result-score__meta strong{
  color:#f5f9fc;
}
html[data-theme="dark"] .quiz-kicker,
html[data-theme="dark"] .quiz-view__eyebrow,
html[data-theme="dark"] .quiz-progress__meta{
  color:#7dd3fc;
}
html[data-theme="dark"] .quiz-kicker{
  background:rgba(14,165,198,.14);
  border-color:rgba(56,189,248,.22);
}
html[data-theme="dark"] .quiz-sub,
html[data-theme="dark"] .quiz-desc,
html[data-theme="dark"] .quiz-benefit span,
html[data-theme="dark"] .quiz-view p,
html[data-theme="dark"] .quiz-result-card p,
html[data-theme="dark"] .quiz-result-score__meta span,
html[data-theme="dark"] .quiz-progress__label,
html[data-theme="dark"] .quiz-small-note,
html[data-theme="dark"] .quiz-result-note,
html[data-theme="dark"] .quiz-empty,
html[data-theme="dark"] .quiz-start-item,
html[data-theme="dark"] .quiz-mid-line,
html[data-theme="dark"] .quiz-option{
  color:#c8d6df;
}
html[data-theme="dark"] .quiz-start-item b{color:#f5f9fc}
html[data-theme="dark"] .quiz-footnote{
  background:rgba(14,165,198,.10);
  border-color:rgba(14,165,198,.22);
  color:#c8d6df;
}
html[data-theme="dark"] .quiz-mid-box{
  background:rgba(14,165,198,.10);
  border-color:rgba(14,165,198,.22);
}
html[data-theme="dark"] .quiz-progress__track{background:rgba(255,255,255,.10)}
html[data-theme="dark"] .quiz-result-note{background:rgba(255,255,255,.04);border-color:rgba(84,101,120,.24)}
html[data-theme="dark"] .quiz-service-block{
  background:linear-gradient(180deg, rgba(14,23,34,.96), rgba(10,16,25,.98));
  border-color:rgba(56,189,248,.22);
  box-shadow:0 24px 44px rgba(0,0,0,.32);
}
html[data-theme="dark"] .quiz-service-block.guarantee{
  background:linear-gradient(180deg, rgba(8,35,55,.96), rgba(10,18,27,.98));
}
html[data-theme="dark"] .quiz-service-block.estimate{
  background:linear-gradient(180deg, rgba(8,42,33,.96), rgba(10,18,27,.98));
  border-color:rgba(11,183,131,.24);
}
html[data-theme="dark"] .quiz-service-block.legal{
  background:linear-gradient(180deg, rgba(58,20,20,.9), rgba(14,21,30,.98));
  border-color:rgba(239,68,68,.28);
}
html[data-theme="dark"] .quiz-service-block.acceptance{
  background:linear-gradient(180deg, rgba(73,39,14,.88), rgba(14,21,30,.98));
  border-color:rgba(249,115,22,.28);
}
html[data-theme="dark"] .quiz-service-block__eyebrow{color:#8be7ff}
html[data-theme="dark"] .quiz-service-block h3{color:#f5f9fc}
html[data-theme="dark"] .quiz-service-block p,
html[data-theme="dark"] .quiz-service-block__reason{color:#d5e3ec}
html[data-theme="dark"] .quiz-service-block__reason{background:rgba(255,255,255,.04);border-color:rgba(84,101,120,.26)}
html[data-theme="dark"] .quiz-loading-box{background:linear-gradient(180deg, rgba(14,23,34,.96), rgba(10,16,25,.98));border-color:rgba(56,189,248,.20)}
html[data-theme="dark"] .quiz-loading-ring{background:conic-gradient(#38bdf8 calc(var(--progress) * 1%), rgba(148,163,184,.14) 0);box-shadow:0 18px 40px rgba(14,165,198,.16)}
html[data-theme="dark"] .quiz-loading-ring::before{background:linear-gradient(180deg,#101b2a,#0a101a);box-shadow:inset 0 0 0 1px rgba(148,163,184,.14)}
html[data-theme="dark"] .quiz-loading-ring span,
html[data-theme="dark"] .quiz-loading-copy strong{color:#f5f9fc}
html[data-theme="dark"] .quiz-loading-copy small{color:#c8d6df}
html[data-theme="dark"] .quiz-option{background:linear-gradient(180deg, rgba(15,23,42,.96), rgba(9,16,26,.94));border-color:rgba(71,85,105,.48);box-shadow:0 16px 30px rgba(0,0,0,.26);color:#eef6ff;}
html[data-theme="dark"] .quiz-shell.is-focusing .quiz-card,
html[data-theme="dark"] .quiz-shell.is-focused .quiz-card{box-shadow:0 30px 72px rgba(0,0,0,.42);}
html[data-theme="dark"] .quiz-option:hover{background:linear-gradient(180deg, rgba(14,165,198,.16), rgba(15,23,42,.96));border-color:rgba(56,189,248,.34);box-shadow:0 20px 34px rgba(0,0,0,.32);}
html[data-theme="dark"] .quiz-option:focus-visible{outline:2px solid rgba(56,189,248,.45);outline-offset:2px;}

/* =====================================================================
   BUCKLER · Repair-risk quiz — visual refinement layer (v2)
   Appends polish to buttons, result blocks, and start animation.
   Uses the existing palette/radii/fonts only — no new design language.
   All selectors are additive; nothing above is overridden destructively.
   ===================================================================== */

/* ---------- 1. Smoother, richer primary action button ---------- */
.quiz-action-btn{
  position:relative;
  overflow:hidden;
  border-radius:14px;
  font-weight:800;
  letter-spacing:.005em;
  transition:transform .26s cubic-bezier(.22,.74,.24,1),
             box-shadow .26s cubic-bezier(.22,.74,.24,1),
             filter .26s ease,
             background .26s ease;
}
.quiz-action-btn.primary,
a.quiz-action-btn.primary{
  background:linear-gradient(135deg,#13b1d6 0%, #0ea5c6 46%, #0b7ea6 100%);
  background-size:180% 180%;
  background-position:0% 50%;
  box-shadow:0 14px 30px rgba(11,126,166,.30), inset 0 1px 0 rgba(255,255,255,.22);
}
.quiz-action-btn.primary:hover{
  transform:translateY(-2px);
  background-position:100% 50%;
  box-shadow:0 22px 42px rgba(11,126,166,.40), inset 0 1px 0 rgba(255,255,255,.28);
}
.quiz-action-btn.primary:active{
  transform:translateY(0);
  box-shadow:0 10px 22px rgba(11,126,166,.30), inset 0 1px 0 rgba(255,255,255,.18);
}
/* moving sheen across the CTA */
.btn-small.quiz-action-btn.primary::after{
  content:"" !important;
  display:block !important;
  position:absolute;
  top:0;bottom:0;
  left:-60%;
  width:45%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent);
  transform:skewX(-18deg);
  opacity:0;
  pointer-events:none;
}
.quiz-action-btn.primary:hover::after{
  animation:quizSheen 1.05s cubic-bezier(.22,.74,.24,1);
}
@keyframes quizSheen{
  0%{left:-60%;opacity:0}
  18%{opacity:1}
  100%{left:130%;opacity:0}
}
/* CTA links that point to a service get a trailing arrow */
a.btn-small.quiz-action-btn[data-quiz-cta="primary"]{
  gap:9px;
}
a.btn-small.quiz-action-btn[data-quiz-cta="primary"]::before{
  content:"" !important;
  display:block !important;
  width:16px;height:16px;flex:0 0 auto;
  margin-right:-2px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m13 6 6 6-6 6'/></svg>") center/contain no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m13 6 6 6-6 6'/></svg>") center/contain no-repeat;
  transition:transform .26s cubic-bezier(.22,.74,.24,1);
  order:2; /* arrow after the label */
}
a.btn-small.quiz-action-btn[data-quiz-cta="primary"]:hover::before{
  transform:translateX(4px) !important;
}

/* secondary (start) button gets a subtle press feedback even though it's primary-styled */
.quiz-action-btn[data-start-quiz]:not(:disabled):active{ transform:translateY(0) scale(.995); }
.quiz-action-btn[data-start-quiz][disabled]{ filter:saturate(.7); }

/* answer options — crisper press + accent rail on hover */
.quiz-option{ position:relative; }
.quiz-option::before{
  content:"";
  position:absolute;left:0;top:12px;bottom:12px;width:3px;
  border-radius:3px;
  background:linear-gradient(180deg,#13b1d6,#0b7ea6);
  opacity:0;
  transform:scaleY(.4);
  transform-origin:center;
  transition:opacity .22s ease, transform .22s cubic-bezier(.22,.74,.24,1);
}
.quiz-option:hover::before{ opacity:1; transform:scaleY(1); }
.quiz-option:active{ transform:translateY(0) scale(.997); }

/* ---------- 2. Result header & score — gauge-style badge ---------- */
.quiz-result-head{
  position:relative;
  padding:20px;
  overflow:hidden;
}
/* soft brand glow in the corner for depth */
.quiz-result-head::after{
  content:"";
  position:absolute;right:-40px;top:-40px;width:160px;height:160px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(14,165,198,.16), transparent 70%);
  pointer-events:none;
}
.quiz-result-score{ align-items:center; gap:18px; }
.quiz-result-score__value{
  position:relative;
  display:grid;
  place-items:center;
  width:96px;height:96px;
  flex:0 0 auto;
  font-size:38px;
  border-radius:999px;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 58%, transparent 59%),
    conic-gradient(var(--quiz-gauge,#0ea5c6) calc(var(--quiz-gauge-pct,64) * 1%), rgba(15,23,42,.10) 0);
  box-shadow:0 14px 30px rgba(15,23,42,.10), inset 0 0 0 1px rgba(13,42,63,.05);
}
.quiz-result-score__value::after{
  content:"/100";
  position:absolute;
  bottom:17px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
  color:#8295a8;
}
/* level color drives the gauge ring */
.quiz-result-head:has(.quiz-level.low) .quiz-result-score__value{ --quiz-gauge:#0bb783; }
.quiz-result-head:has(.quiz-level.moderate) .quiz-result-score__value{ --quiz-gauge:#0ea5c6; }
.quiz-result-head:has(.quiz-level.elevated) .quiz-result-score__value{ --quiz-gauge:#f59e0b; }
.quiz-result-head:has(.quiz-level.high) .quiz-result-score__value{ --quiz-gauge:#f97316; }
.quiz-result-head:has(.quiz-level.critical) .quiz-result-score__value{ --quiz-gauge:#ef4444; }

.quiz-result-score__meta strong{ font-size:16.5px; letter-spacing:-.01em; }
.quiz-level{ position:relative; padding-left:28px; }
.quiz-level::before{
  content:"";
  position:absolute;left:12px;top:50%;transform:translateY(-50%);
  width:8px;height:8px;border-radius:999px;
  background:currentColor;
  box-shadow:0 0 0 4px color-mix(in srgb, currentColor 20%, transparent);
}

/* ---------- 3. Result cards — iconified, color-tagged, lifting ---------- */
.quiz-result-grid{ gap:12px; }
.quiz-result-card{
  position:relative;
  padding:16px 16px 16px 56px;
  border-radius:18px;
  transition:transform .24s cubic-bezier(.22,.74,.24,1),
             box-shadow .24s ease,
             border-color .24s ease;
}
.quiz-result-card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 30px rgba(15,23,42,.08);
  border-color:rgba(14,165,198,.24);
}
.quiz-result-card h3{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13.5px;
  letter-spacing:.005em;
}
/* icon chip per card via nth-child */
.quiz-result-card::before{
  content:"";
  position:absolute;left:16px;top:16px;
  width:28px;height:28px;border-radius:9px;
  background:rgba(14,165,198,.12);
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:16px 16px;mask-size:16px 16px;
}
/* a thin accent rail at the very left edge */
.quiz-result-card::after{
  content:"";
  position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:3px;
  background:#0ea5c6;
  opacity:.55;
}
/* card 1 — decode (document) */
.quiz-result-card:nth-child(1)::before{
  background-color:rgba(14,165,198,.14);
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3v5h5'/><path d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M8 13h8'/><path d='M8 17h6'/></svg>");
          mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3v5h5'/><path d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M8 13h8'/><path d='M8 17h6'/></svg>");
}
.quiz-result-card:nth-child(1)::after{ background:#0ea5c6; }
/* card 2 — risk now (alert triangle) */
.quiz-result-card:nth-child(2)::before{
  background-color:rgba(249,115,22,.14);
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c55b07' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.3 3.6 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.6a2 2 0 0 0-3.4 0z'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>");
          mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c55b07' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.3 3.6 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.6a2 2 0 0 0-3.4 0z'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>");
}
.quiz-result-card:nth-child(2)::after{ background:#f97316; }
/* card 3 — why (search / analysis) */
.quiz-result-card:nth-child(3)::before{
  background-color:rgba(99,102,241,.14);
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
          mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
}
.quiz-result-card:nth-child(3)::after{ background:#6366f1; }
/* card 4 — next step (check / arrow) */
.quiz-result-card:nth-child(4)::before{
  background-color:rgba(11,183,131,.16);
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a8d67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m13 6 6 6-6 6'/></svg>");
          mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a8d67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m13 6 6 6-6 6'/></svg>");
}
.quiz-result-card:nth-child(4)::after{ background:#0bb783; }

/* staggered entrance for the result cards (only inside a ready view) */
.quiz-view.is-ready .quiz-result-card{
  animation:quizCardIn .5s cubic-bezier(.22,.74,.24,1) both;
}
.quiz-view.is-ready .quiz-result-card:nth-child(1){ animation-delay:.04s; }
.quiz-view.is-ready .quiz-result-card:nth-child(2){ animation-delay:.10s; }
.quiz-view.is-ready .quiz-result-card:nth-child(3){ animation-delay:.16s; }
.quiz-view.is-ready .quiz-result-card:nth-child(4){ animation-delay:.22s; }
@keyframes quizCardIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ---------- 4. Result note — quote-style affordance ---------- */
.quiz-result-note{
  position:relative;
  padding-left:44px;
}
.quiz-result-note::before{
  content:"";
  position:absolute;left:14px;top:14px;
  width:18px;height:18px;
  background:#8295a8;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4'/><path d='M12 8h.01'/></svg>") center/contain no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4'/><path d='M12 8h.01'/></svg>") center/contain no-repeat;
}

/* ---------- 5. Service recommendation block — icon chip + depth ---------- */
.quiz-service-block{
  position:relative;
  overflow:hidden;
  padding-top:20px;
}
.quiz-service-block::before{
  content:"";
  position:absolute;right:-30px;bottom:-30px;width:150px;height:150px;border-radius:999px;
  background:radial-gradient(circle, rgba(14,165,198,.12), transparent 70%);
  pointer-events:none;
}
.quiz-service-block.estimate::before{ background:radial-gradient(circle, rgba(11,183,131,.12), transparent 70%); }
.quiz-service-block.legal::before{ background:radial-gradient(circle, rgba(239,68,68,.12), transparent 70%); }
.quiz-service-block.acceptance::before{ background:radial-gradient(circle, rgba(249,115,22,.12), transparent 70%); }
.quiz-service-block__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
}
.quiz-service-block__eyebrow::before{
  content:"";
  width:15px;height:15px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3 4 6v6c0 4.5 3 7.7 8 9 5-1.3 8-4.5 8-9V6z'/><path d='m9 12 2 2 4-4'/></svg>") center/contain no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3 4 6v6c0 4.5 3 7.7 8 9 5-1.3 8-4.5 8-9V6z'/><path d='m9 12 2 2 4-4'/></svg>") center/contain no-repeat;
}
.quiz-service-block__reason{
  position:relative;
  padding-left:38px;
}
.quiz-service-block__reason::before{
  content:"";
  position:absolute;left:12px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;
  background:#0b7ea6;opacity:.7;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18h6'/><path d='M10 22h4'/><path d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1h6c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/></svg>") center/contain no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18h6'/><path d='M10 22h4'/><path d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1h6c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/></svg>") center/contain no-repeat;
}
.quiz-service-block.estimate .quiz-service-block__reason::before{ background:#0a8d67; }
.quiz-service-block.legal .quiz-service-block__reason::before{ background:#c62828; }
.quiz-service-block.acceptance .quiz-service-block__reason::before{ background:#c55b07; }

/* ---------- 6. Start-screen benefits — number chips lift on hover ---------- */
.quiz-benefit{ transition:transform .22s cubic-bezier(.22,.74,.24,1), box-shadow .22s ease, border-color .22s ease; }
.quiz-benefit:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 26px rgba(15,23,42,.07);
  border-color:rgba(14,165,198,.22);
}
.quiz-benefit__icon{
  box-shadow:0 8px 16px rgba(11,126,166,.22);
}

/* ---------- 7. Smoother focus animation (узнать риск → quiz) ----------
   Goal: buttery transition. Visible motion is carried by GPU-friendly
   opacity/transform; the layout collapse (max-width/height/grid) runs in the
   same short window so nothing lingers or stutters. */
.quiz-shell{
  transition:grid-template-columns .42s cubic-bezier(.22,.84,.30,1),
             gap .42s cubic-bezier(.22,.84,.30,1),
             min-height .42s cubic-bezier(.22,.84,.30,1);
}
.quiz-hero{
  transform:translateZ(0);
  will-change:opacity, transform;
  transition:opacity .26s ease,
             transform .42s cubic-bezier(.22,.84,.30,1),
             max-height .42s cubic-bezier(.22,.84,.30,1),
             max-width .42s cubic-bezier(.22,.84,.30,1),
             padding .34s cubic-bezier(.22,.84,.30,1),
             margin .34s cubic-bezier(.22,.84,.30,1),
             border-color .26s ease, box-shadow .26s ease;
}
.quiz-shell.is-focusing .quiz-hero,
.quiz-shell.is-focused .quiz-hero{
  opacity:0;
  transform:translate3d(-22px,0,0);
  /* no blur: filter animation forces costly repaints and causes the “low-fps” look */
  filter:none;
}
/* the card glides up & fades in once, cleanly (no overshoot bounce that can stutter) */
.quiz-shell.is-focusing .quiz-card,
.quiz-shell.is-focused .quiz-card{
  transition:box-shadow .3s ease, border-color .3s ease,
             transform .42s cubic-bezier(.22,.84,.30,1);
}
.quiz-shell.is-focusing .quiz-card{
  animation:quizCardSettle .44s cubic-bezier(.22,.84,.30,1) both;
}
@keyframes quizCardSettle{
  from{ opacity:.55; transform:translate3d(0,10px,0); }
  to{ opacity:1; transform:translate3d(0,0,0); }
}
/* gentle ambient lift of the whole card on the result screen */
.quiz-shell.is-focused .quiz-card{ box-shadow:0 26px 60px rgba(15,23,42,.13); }
/* once settled, release will-change so it doesn't tax the compositor */
.quiz-shell.is-focused .quiz-hero{ will-change:auto; }

/* ---------- 8. Progress bar — animated stripe sheen ---------- */
.quiz-progress__bar{
  /* keep original absolute positioning + width transition; only refine look */
  background:linear-gradient(90deg,#13b1d6,#0b7ea6);
  overflow:hidden;
  transition:width .55s cubic-bezier(.22,.84,.30,1);
}
.quiz-progress__bar::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform:translateX(-100%);
  animation:quizBarSheen 2.4s ease-in-out infinite;
}
@keyframes quizBarSheen{
  0%{ transform:translateX(-100%); }
  55%{ transform:translateX(220%); }
  100%{ transform:translateX(220%); }
}

/* ---------- Loading ring — gentle pulse while generating ---------- */
.quiz-loading-ring{ animation:quizRingPulse 1.8s ease-in-out infinite; }
@keyframes quizRingPulse{
  0%,100%{ box-shadow:0 16px 38px rgba(14,165,198,.18); }
  50%{ box-shadow:0 16px 46px rgba(14,165,198,.30); }
}

/* =========================== DARK THEME =========================== */
html[data-theme="dark"] .quiz-result-score__value{
  background:
    radial-gradient(circle at 50% 50%, #101b2a 0 58%, transparent 59%),
    conic-gradient(var(--quiz-gauge,#38bdf8) calc(var(--quiz-gauge-pct,64) * 1%), rgba(148,163,184,.20) 0);
  box-shadow:0 14px 30px rgba(0,0,0,.34), inset 0 0 0 1px rgba(148,163,184,.14);
}
html[data-theme="dark"] .quiz-result-score__value::after{ color:#9fb2c4; }
html[data-theme="dark"] .quiz-result-head:has(.quiz-level.low) .quiz-result-score__value{ --quiz-gauge:#22c79a; }
html[data-theme="dark"] .quiz-result-head:has(.quiz-level.moderate) .quiz-result-score__value{ --quiz-gauge:#38bdf8; }
html[data-theme="dark"] .quiz-result-head:has(.quiz-level.elevated) .quiz-result-score__value{ --quiz-gauge:#fbbf24; }
html[data-theme="dark"] .quiz-result-head:has(.quiz-level.high) .quiz-result-score__value{ --quiz-gauge:#fb923c; }
html[data-theme="dark"] .quiz-result-head:has(.quiz-level.critical) .quiz-result-score__value{ --quiz-gauge:#f87171; }
html[data-theme="dark"] .quiz-result-card:hover{ border-color:rgba(56,189,248,.32); box-shadow:0 18px 32px rgba(0,0,0,.34); }
html[data-theme="dark"] .quiz-result-note::before{ background:#9fb2c4; }
html[data-theme="dark"] .quiz-result-head::after{ background:radial-gradient(circle, rgba(56,189,248,.18), transparent 70%); }
html[data-theme="dark"] .quiz-action-btn.primary{
  box-shadow:0 16px 32px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,255,255,.16);
}
html[data-theme="dark"] .quiz-benefit:hover{ border-color:rgba(56,189,248,.3); box-shadow:0 14px 26px rgba(0,0,0,.32); }

@media(max-width:1080px){
  .quiz-shell{grid-template-columns:1fr}
  .quiz-card{position:static}
  .quiz-shell.is-focusing,
  .quiz-shell.is-focused{min-height:0}
}
@media(max-width:760px){
  main.page.quiz-page{padding-top:130px;padding-bottom:56px}
  .quiz-shell{width:min(100% - 18px, 1240px);gap:18px}
  .quiz-shell.is-focusing,
  .quiz-shell.is-focused{grid-template-columns:minmax(0,1fr);min-height:0}
  .quiz-hero,.quiz-card{padding:20px;border-radius:24px}
  .quiz-view h2{font-size:26px}
  .quiz-result-score__value{font-size:46px}
  .quiz-service-block{padding:16px;border-radius:20px}
  .quiz-service-block h3{font-size:20px}
}

@media (prefers-reduced-motion: reduce){
  .quiz-shell,
  .quiz-hero,
  .quiz-card,
  .quiz-card.animate-focus,
  .quiz-progress__bar,
  .quiz-view,
  .quiz-view.is-ready{
    transition:none !important;
  }
}
