
  #sfQuizM {
    --navy: #051945;
    --ink: #1b2547;
    --ink-2: #46527a;
    --muted: #5f6a85;
    --accent: #3a5a9a;
    --accent-2: #4fd1c5;
    --tint: #eef1fa;
    --line: #e6eaf5;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    width: 100%;
    max-width: 1120px;
    height: min(720px, 88vh);
    margin: 0 auto;
    background: #fff;
    border-radius: 28px;
    position: relative; z-index: 2;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'Manrope', -apple-system, Arial, sans-serif;
    box-shadow: 0 14px 40px rgba(5, 25, 69, .16);
  }
  #sfQuizM *, #sfQuizM *::before, #sfQuizM *::after { box-sizing: border-box; font-family: inherit; }
  #sfQuizM button { border: none; background: none; color: inherit; cursor: pointer; }
  #sfQuizM a { text-decoration: none; color: inherit; }
  #sfQuizM svg { display: block; }
  #sfQuizM :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

  #sfQuizM .sf-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

   
  #sfQuizM .sf-head { flex: 0 0 auto; padding: clamp(24px, 3vw, 38px) clamp(24px, 3.2vw, 44px) 0; }
  #sfQuizM .sf-eyebrow-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 14px;
  }
  #sfQuizM .sf-eyebrow {
    display: flex; align-items: center; gap: 9px; min-width: 0;
    color: var(--muted); font-size: 14px; font-weight: 700;
  }
  #sfQuizM .sf-eyebrow svg { width: 18px; height: 18px; flex-shrink: 0; }
  #sfQuizM .sf-progress-frac {
    flex-shrink: 0; padding: 5px 12px; border-radius: 999px;
    background: var(--tint); color: var(--accent); font-size: 13.5px; font-weight: 800;
  }
  #sfQuizM .sf-progress-track { height: 7px; border-radius: 999px; background: #eceef7; overflow: hidden; }
  #sfQuizM .sf-progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width .45s cubic-bezier(.4, 0, .2, 1);
  }

   
  #sfQuizM .sf-scroll {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding: clamp(18px, 2.4vw, 28px) clamp(24px, 3.2vw, 44px) 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  #sfQuizM .sf-scroll::-webkit-scrollbar { width: 8px; }
  #sfQuizM .sf-scroll::-webkit-scrollbar-thumb { background: #dfe4f0; border-radius: 999px; }

  #sfQuizM .sf-question {
    margin: 0 0 6px;
    color: var(--navy); font-size: clamp(21px, 2.4vw, 30px); font-weight: 800;
    line-height: 1.18; letter-spacing: -.02em;
  }
  #sfQuizM .sf-hint {
    margin: 0 0 20px;
    color: var(--muted); font-size: clamp(13.5px, 1.1vw, 15.5px); font-weight: 500; line-height: 1.45;
  }

   
  #sfQuizM .sf-group { margin-bottom: 18px; }
  #sfQuizM .sf-group-label {
    margin: 0 0 9px;
    color: #646f8b; font-size: 11px; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase;
  }
   
  #sfQuizM .sf-group-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #sfQuizM .sf-group--wide .sf-group-items { grid-template-columns: minmax(0, 1fr); }

  #sfQuizM .sf-row {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 13px;
    padding: 13px 16px;
    border: 2px solid #eceef7; border-radius: 14px;
    cursor: pointer; text-align: left;
    width: 100%; min-height: 56px;
    transition: border-color .18s ease, background .18s ease, transform .14s ease;
  }
  #sfQuizM .sf-row:hover { border-color: #cfdbf2; background: #fbfcff; }
  #sfQuizM .sf-row:active { transform: scale(.99); }
  #sfQuizM .sf-row.selected { background: var(--tint); border-color: var(--accent); }

  #sfQuizM .sf-dot {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; flex-shrink: 0;
    border: 2.5px solid #c9d5ef; border-radius: 50%;
    color: #fff;
    transition: border-color .2s ease, background .2s ease;
  }
  #sfQuizM .sf-row.selected .sf-dot { border-color: var(--accent); background: var(--accent); }
  #sfQuizM .sf-dot svg { width: 13px; height: 13px; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .2s ease; }
  #sfQuizM .sf-row.selected .sf-dot svg { opacity: 1; transform: scale(1); }

  #sfQuizM .sf-row-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  #sfQuizM .sf-row-name { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; }
  #sfQuizM .sf-row-sub { color: var(--muted); font-size: 13.5px; font-weight: 500; line-height: 1.35; }

   
  #sfQuizM .sf-edge {
    position: absolute; top: 8px; right: 0; bottom: 8px;
    width: 4px; border-radius: 4px 0 0 4px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    transform: scaleY(0); transform-origin: center;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  }
  #sfQuizM .sf-row.selected .sf-edge { transform: scaleY(1); }
  #sfQuizM .sf-row.selected::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(270deg, rgba(58, 90, 154, .26) 0%, rgba(79, 209, 197, .16) 30%, transparent 70%);
    animation: sfSweep .62s cubic-bezier(.2, .8, .2, 1);
  }
  @keyframes sfSweep {
    0%   { opacity: 0; transform: translateX(60%); }
    35%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(-10%); }
  }

   
  #sfQuizM .sf-pills { display: flex; flex-direction: column; gap: 11px; }
  #sfQuizM .sf-pill {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    width: 100%; min-height: 66px;
    padding: 18px 22px;
    border: 2px solid #eceef7; border-radius: 16px; background: #fff;
    color: var(--ink); font-size: clamp(15px, 1.4vw, 18px); font-weight: 800; text-align: left;
    transition: border-color .2s ease, background .2s ease, transform .14s ease, box-shadow .2s ease;
  }
  #sfQuizM .sf-pill:hover { border-color: #cfdbf2; transform: translateY(-1px); }
  #sfQuizM .sf-pill.selected {
    background: var(--tint); border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(58, 90, 154, .16);
  }
  #sfQuizM .sf-pill-check {
    display: flex; align-items: center; justify-content: center;
    width: 27px; height: 27px; flex-shrink: 0;
    border: 2.5px solid #c9d5ef; border-radius: 50%; color: #fff;
    transition: border-color .2s ease, background .2s ease;
  }
  #sfQuizM .sf-pill.selected .sf-pill-check { border-color: var(--accent); background: var(--accent); }
  #sfQuizM .sf-pill-check svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .2s ease; }
  #sfQuizM .sf-pill.selected .sf-pill-check svg { opacity: 1; transform: scale(1); }
  #sfQuizM .sf-pill .sf-edge { top: 10px; bottom: 10px; }
  #sfQuizM .sf-pill.selected::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(270deg, rgba(58, 90, 154, .26) 0%, rgba(79, 209, 197, .16) 30%, transparent 70%);
    animation: sfSweep .62s cubic-bezier(.2, .8, .2, 1);
  }

   
  #sfQuizM .sf-footer {
    flex: 0 0 auto;
    padding: clamp(16px, 2vw, 24px) clamp(24px, 3.2vw, 44px) clamp(20px, 2.4vw, 30px);
    border-top: 1px solid #eef0f6;
    background: #fff;
  }
  #sfQuizM .sf-btn-row { display: flex; gap: 12px; }
  #sfQuizM .sf-btn {
    flex: 1 1 auto; min-height: 56px;
    padding: 15px 24px; border-radius: 15px;
    font-size: 16px; font-weight: 800;
    transition: transform .12s ease, opacity .2s ease, box-shadow .2s ease, background .2s ease;
  }
  #sfQuizM .sf-btn:active { transform: scale(.98); }
  #sfQuizM .sf-btn:disabled { opacity: .4; cursor: not-allowed; }
  #sfQuizM .sf-btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px rgba(58, 90, 154, .3); }
  #sfQuizM .sf-btn-primary:not(:disabled):hover { background: #324e87; }
  #sfQuizM .sf-btn-secondary { background: #f2f3f8; color: #263c52; }
  #sfQuizM .sf-btn-secondary:hover { background: #e9ebf3; }
  #sfQuizM .sf-btn-row:not(.single) .sf-btn-secondary { flex: 0 0 auto; width: clamp(110px, 24%, 150px); }

   
  #sfQuizM .sf-aside {
    display: flex; flex-direction: column; gap: 10px;
    padding: clamp(24px, 3vw, 38px) 22px;
    border-left: 1px solid var(--line);
    background: #f7f9fd;
    overflow-y: auto;
  }
  #sfQuizM .sf-aside-card {
    padding: 18px 18px 16px; border-radius: 18px;
    background: linear-gradient(150deg, #0f1c4a, #22306e);
    color: #fff;
  }
  #sfQuizM .sf-aside-pct { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
  #sfQuizM .sf-aside-cap { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.7); }
  #sfQuizM .sf-aside-title {
    margin: 14px 0 2px; padding-left: 4px;
    color: #646f8b; font-size: 11px; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase;
  }

  #sfQuizM .sf-step {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: 11px;
    padding: 13px 14px;
    border: 1.5px solid transparent; border-radius: 14px;
    background: #fff;
    text-align: left; width: 100%;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  }
  #sfQuizM .sf-step:disabled { cursor: default; }
  #sfQuizM .sf-step-mark {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
    border: 2px solid #d3dcef; border-radius: 50%;
    color: #b3bdd2; font-size: 11px; font-weight: 800;
  }
  #sfQuizM .sf-step-mark svg { width: 12px; height: 12px; }
  #sfQuizM .sf-step-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  #sfQuizM .sf-step-name { color: var(--ink-2); font-size: 14px; font-weight: 700; line-height: 1.25; }
  #sfQuizM .sf-step-ans {
    color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  #sfQuizM .sf-step.is-done { background: #fff; }
  #sfQuizM .sf-step.is-done .sf-step-mark { border-color: var(--accent); background: var(--accent); color: #fff; }
  #sfQuizM .sf-step.is-done .sf-step-name { color: var(--ink); }
  #sfQuizM .sf-step.is-done:hover { border-color: #cfdbf2; }

  #sfQuizM .sf-step.is-now {
    background: var(--tint); border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(58, 90, 154, .12);
  }
  #sfQuizM .sf-step.is-now .sf-step-name { color: var(--navy); font-weight: 800; }
  #sfQuizM .sf-step.is-now .sf-step-mark { border-color: var(--accent); color: var(--accent); }
   
  #sfQuizM .sf-step.is-now .sf-edge { transform: scaleY(1); }
  #sfQuizM .sf-step.is-now::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(270deg, rgba(58, 90, 154, .22), transparent 65%);
    animation: sfPulseEdge 2.6s ease-in-out infinite;
  }
  @keyframes sfPulseEdge {
    0%, 100% { opacity: .25; }
    50%      { opacity: .85; }
  }

  #sfQuizM .sf-aside-help {
    margin-top: auto; padding: 14px 15px;
    border: 1px dashed #d6deef; border-radius: 14px;
    color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.45;
  }
  #sfQuizM .sf-aside-help a { color: var(--accent); font-weight: 800; }

   
  #sfQuizM .sf-step-enter { animation: sfStepInM .34s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sfStepInM { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

   
  #sfQuizM .sf-final { text-align: center; padding: 6px 0 4px; }
  #sfQuizM .sf-final-icon {
    display: flex; align-items: center; justify-content: center;
    width: 76px; height: 76px; margin: 0 auto 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--tint), #e2e9f8); color: var(--accent);
  }
  #sfQuizM .sf-final-icon svg { width: 36px; height: 36px; }
  #sfQuizM .sf-final-title {
    margin: 0 0 12px;
    color: var(--navy); font-size: clamp(22px, 2.6vw, 30px); font-weight: 800;
    line-height: 1.18; letter-spacing: -.02em;
  }
  #sfQuizM .sf-final-summary {
    max-width: 44ch; margin: 0 auto 22px;
    color: #465066; font-size: clamp(14.5px, 1.2vw, 16.5px); line-height: 1.55;
  }
  #sfQuizM .sf-final-summary strong { color: var(--navy); }
  #sfQuizM .sf-cta-wrap { display: flex; justify-content: center; }
  #sfQuizM .sf-cta {
    position: relative; display: inline-flex; align-items: center; gap: 12px;
    padding: 19px 36px; border-radius: 999px;
    background: linear-gradient(100deg, #ff8a3d, #ffb648 55%, #ff8a3d);
    color: #1a0f00; font-size: clamp(15.5px, 1.4vw, 18px); font-weight: 800;
    overflow: hidden; isolation: isolate;
    animation: sfCtaGlowM 2.6s ease-in-out infinite;
    transition: transform .15s ease;
  }
  #sfQuizM .sf-cta:hover { transform: translateY(-2px); }
  @keyframes sfCtaGlowM {
    0%, 100% { box-shadow: 0 0 20px rgba(255,138,61,.45); }
    50%      { box-shadow: 0 0 40px rgba(255,138,61,.8); }
  }
  #sfQuizM .sf-cta-icon { width: 21px; height: 21px; flex-shrink: 0; }
  #sfQuizM .sf-cta-shine {
    position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
    transform: skewX(-20deg);
    animation: sfCtaShineM 3.2s ease-in-out infinite;
    z-index: -1;
  }
  @keyframes sfCtaShineM { 0% { left: -60%; } 35% { left: 130%; } 100% { left: 130%; } }

   
  @media (max-width: 1023px) {
    #sfQuizM { grid-template-columns: minmax(0, 1fr); height: min(760px, 88vh); }
     
    #sfQuizM .sf-aside {
      grid-row: 1;
      flex-direction: row; gap: 6px;
      padding: 14px 16px;
      border-left: none; border-bottom: 1px solid var(--line);
      overflow: visible;
    }
    #sfQuizM .sf-aside-card, #sfQuizM .sf-aside-title, #sfQuizM .sf-aside-help,
    #sfQuizM .sf-step-ans { display: none; }
    #sfQuizM .sf-step {
      flex: 1 1 0; min-width: 0;
      flex-direction: column; align-items: center; gap: 6px;
      padding: 9px 6px; border-radius: 12px;
    }
    #sfQuizM .sf-step-mark { margin-top: 0; width: 20px; height: 20px; }
    #sfQuizM .sf-step-name { font-size: 11.5px; font-weight: 700; text-align: center; }
    #sfQuizM .sf-step .sf-edge { display: none; }
    #sfQuizM .sf-step.is-now::after { animation: none; opacity: .35; }
  }

  @media (max-width: 767px) {
     
    #sfQuizM { height: auto; border-radius: 20px; }
    #sfQuizM .sf-scroll { overflow: visible; padding: 16px 16px 4px; }
    #sfQuizM .sf-head { padding: 16px 16px 0; }
    #sfQuizM .sf-eyebrow-row { margin-bottom: 11px; }
    #sfQuizM .sf-eyebrow { font-size: 13.5px; }
    #sfQuizM .sf-progress-frac { font-size: 13.5px; font-weight: 800; padding: 4px 11px; }
    #sfQuizM .sf-progress-track { height: 7px; }

    #sfQuizM .sf-question { font-size: 21px; line-height: 1.25; }
    #sfQuizM .sf-hint { margin-bottom: 14px; font-size: 16px; }

    #sfQuizM .sf-group { margin-bottom: 14px; }
    #sfQuizM .sf-group-items { grid-template-columns: minmax(0, 1fr); gap: 8px; }
     
    #sfQuizM .sf-row { min-height: 58px; padding: 12px 14px; gap: 12px; border-width: 1.5px; border-radius: 14px; }
    #sfQuizM .sf-row-sub { display: -webkit-box; font-size: 13.5px; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    #sfQuizM .sf-row-name { font-size: 16px; }
    #sfQuizM .sf-dot { width: 25px; height: 25px; border-width: 2px; }
    #sfQuizM .sf-dot svg { width: 13px; height: 13px; }

    #sfQuizM .sf-pills { gap: 10px; }
    #sfQuizM .sf-pill { min-height: 62px; padding: 15px 18px; font-size: 16.5px; border-radius: 15px; border-width: 1.5px; }
    #sfQuizM .sf-pill-check { width: 26px; height: 26px; }

    #sfQuizM .sf-footer {
      position: sticky; bottom: 0; z-index: 2;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
      box-shadow: 0 -8px 20px rgba(5, 25, 69, .06);
    }
    #sfQuizM .sf-btn { min-height: 50px; padding: 13px 18px; font-size: 15px; border-radius: 13px; }
    #sfQuizM .sf-btn-row:not(.single) .sf-btn-secondary { width: auto; padding: 13px 16px; }

    #sfQuizM .sf-aside { padding: 11px 12px; gap: 5px; }
    #sfQuizM .sf-step { padding: 8px 4px; }
    #sfQuizM .sf-step-name { font-size: 10.5px; }

    #sfQuizM .sf-final-icon { width: 62px; height: 62px; border-radius: 18px; margin-bottom: 14px; }
    #sfQuizM .sf-final-icon svg { width: 28px; height: 28px; }
    #sfQuizM .sf-final-title { font-size: 21px; }
    #sfQuizM .sf-final-summary { font-size: 14px; margin-bottom: 18px; }
    #sfQuizM .sf-cta { width: 100%; justify-content: center; padding: 16px 20px; font-size: 15px; }
  }

  @media (max-width: 400px) {
    #sfQuizM .sf-step-name { font-size: 9px; line-height: 1.15; }
    #sfQuizM .sf-step-mark { width: 22px; height: 22px; }
    #sfQuizM .sf-group-label { font-size: 10px; }
  }

  @media (prefers-reduced-motion: reduce) {
    #sfQuizM * { animation: none !important; transition: none !important; }
  }
