.test-toolbar,
.test-result-panel,
.fop-test-section,
.test-hero-card{
  position:relative;
  overflow:hidden;
}
.test-toolbar::before,
.test-result-panel::before,
.fop-test-section::before,
.test-hero-card::before{display:none;}

.test-shell{
  display:grid;
  gap:16px;
  margin-top:8px;
}

.test-hero-card{
  padding:20px;
  border:1px solid rgba(250,204,21,.18);
  border-radius:18px;
  background:linear-gradient(145deg, rgba(255,255,255,.060), rgba(255,255,255,.026));
}
.test-hero-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.24);
  background:rgba(37,99,235,.10);
  color:#b9cdfd;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.test-hero-title{
  margin-top:14px;
  font-size:clamp(22px,3vw,34px);
  line-height:1.08;
  letter-spacing:-.04em;
}
.test-hero-copy{
  margin-top:10px;
  color:var(--muted);
  max-width:760px;
}
.test-hero-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.test-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  color:var(--text);
  font-weight:800;
  font-size:.85rem;
}

.test-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
  gap:16px;
  padding:18px;
  border:1px solid var(--glass-brd);
  border-radius:18px;
  background:linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  backdrop-filter:blur(14px);
}
.test-progress-card,
.test-sections-card{
  min-width:0;
}
.test-progress-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.test-progress-head strong{
  display:block;
  margin-bottom:4px;
  font-size:1rem;
}
.test-progress-head p{
  color:var(--muted);
  font-size:.9rem;
}
.test-progress-value{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:74px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(37,99,235,.24);
  background:rgba(37,99,235,.08);
  color:var(--text);
  font-weight:900;
  font-size:1.12rem;
}
.test-progress-track{
  position:relative;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}
.test-progress-fill{
  position:absolute;
  inset:0 auto 0 0;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg, #2563eb 0%, #60a5fa 55%, #facc15 100%);
  box-shadow:0 0 22px rgba(37,99,235,.36);
  transition:width .24s ease;
}
.test-progress-meta{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.test-progress-chip{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
}
.test-progress-chip span{
  display:block;
  color:var(--muted);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.test-progress-chip strong{
  display:block;
  margin-top:5px;
  font-size:1.02rem;
  line-height:1.2;
}
.test-progress-caption{
  margin-top:12px;
  color:var(--muted);
  font-size:.9rem;
}

.test-sections-card strong{
  display:block;
  margin-bottom:4px;
  font-size:1rem;
}
.test-sections-card p{
  color:var(--muted);
  font-size:.9rem;
}
.test-section-jumps{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
.test-jump-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  color:var(--text);
  text-decoration:none;
  font-size:.86rem;
  font-weight:800;
  transition:transform .15s ease, border-color .18s ease, box-shadow .18s ease;
}
.test-jump-link:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.34);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}
.test-jump-link small{
  color:var(--muted);
  font-size:.72rem;
  font-weight:700;
}

.fop-test-form{
  display:grid;
  gap:16px;
}
.fop-test-section{
  scroll-margin-top:92px;
  padding:18px;
  border-radius:18px;
  border:1px solid var(--glass-brd);
  background:linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow:var(--shadow-sm);
}
.fop-test-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.fop-test-section-title-wrap strong{
  display:block;
  font-size:1.06rem;
  line-height:1.25;
}
.fop-test-section-title-wrap p{
  margin-top:5px;
  color:var(--muted);
  font-size:.9rem;
}
.fop-test-section-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:64px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(37,99,235,.22);
  background:rgba(37,99,235,.08);
  color:#b9cdfd;
  font-weight:900;
  font-size:.92rem;
}
.test-question-grid{
  display:grid;
  gap:12px;
}
.fop-test-question{
  padding:16px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.035);
}
.fop-test-legend{
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  margin-bottom:14px;
  padding:0;
  color:var(--text);
  font-weight:800;
  font-size:1rem;
  line-height:1.45;
}
.question-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(37,99,235,.18), rgba(250,204,21,.18));
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  font-size:.92rem;
  font-weight:900;
}
.question-text{
  display:block;
  padding-top:6px;
}
.fop-test-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.fop-test-option{
  position:relative;
  display:flex;
  gap:12px;
  min-height:74px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--border);
  background:linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transition:transform .14s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.fop-test-option:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.30);
  box-shadow:0 14px 34px rgba(0,0,0,.16);
}
.fop-test-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.fop-test-option.is-selected{
  border-color:rgba(37,99,235,.48);
  background:linear-gradient(145deg, rgba(37,99,235,.16), rgba(96,165,250,.08));
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.fop-test-option.is-correct-picked{
  border-color:rgba(16,185,129,.48);
  background:linear-gradient(145deg, rgba(16,185,129,.15), rgba(16,185,129,.06));
}
.fop-test-option.is-wrong-picked{
  border-color:rgba(244,63,94,.38);
  background:linear-gradient(145deg, rgba(244,63,94,.14), rgba(244,63,94,.05));
}
.option-radio{
  flex:0 0 auto;
  position:relative;
  width:24px;
  height:24px;
  margin-top:2px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.04);
}
.fop-test-option.is-selected .option-radio::after,
.fop-test-option.is-correct-picked .option-radio::after,
.fop-test-option.is-wrong-picked .option-radio::after{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:999px;
  background:currentColor;
}
.option-body{
  min-width:0;
  display:flex;
  gap:10px;
}
.option-letter{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.045);
  color:var(--muted);
  font-size:.78rem;
  font-weight:900;
}
.option-text{
  display:block;
  color:var(--text);
  font-size:.94rem;
  line-height:1.42;
}
.fop-test-feedback{
  margin-top:12px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(244,63,94,.22);
  background:rgba(244,63,94,.08);
  color:var(--text);
  font-size:.9rem;
  line-height:1.5;
}
.fop-test-feedback strong{font-weight:900;}
.fop-test-feedback a{
  color:var(--accent2);
  font-weight:800;
  text-decoration:none;
}
.fop-test-feedback.is-correct{
  border-color:rgba(16,185,129,.30);
  background:rgba(16,185,129,.08);
}
.fop-test-feedback.is-skipped{
  border-color:rgba(245,158,11,.30);
  background:rgba(245,158,11,.10);
}

.test-sticky-actions{
  position:-webkit-sticky;
  position:sticky;
  bottom:12px;
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(250,204,21,.24);
  background:rgba(13,16,28,.86);
  backdrop-filter:blur(18px);
  box-shadow:0 18px 50px rgba(0,0,0,.28);
}
[data-theme="light"] .test-sticky-actions{
  background:rgba(255,255,255,.88);
}
.test-actions-copy strong{
  display:block;
  margin-bottom:4px;
}
.test-actions-copy span{
  display:block;
  color:var(--muted);
  font-size:.9rem;
}
.test-actions-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.test-btn-primary,
.test-btn-secondary{
  min-height:46px;
  padding:11px 16px;
  border-radius:14px;
  font-weight:900;
}
.test-btn-primary{
  border:1px solid rgba(37,99,235,.36);
  background:linear-gradient(135deg, rgba(37,99,235,.98), rgba(96,165,250,.92));
  color:#fff;
  box-shadow:0 10px 28px rgba(37,99,235,.28);
}
.test-btn-primary:hover{
  border-color:#60a5fa;
  box-shadow:0 14px 32px rgba(37,99,235,.38);
}
.test-btn-secondary{
  border:1px solid var(--glass-brd);
  background:rgba(255,255,255,.045);
  color:var(--text);
}

.test-result-panel{
  padding:18px;
  border:1px solid rgba(250,204,21,.24);
  border-radius:18px;
  background:linear-gradient(145deg, rgba(255,255,255,.060), rgba(255,255,255,.024));
}
.test-result-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.test-result-head strong{
  display:block;
  font-size:1.08rem;
}
.test-result-head p{
  margin-top:4px;
  color:var(--muted);
}
.test-result-score{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:92px;
  min-height:92px;
  border-radius:24px;
  border:1px solid rgba(250,204,21,.26);
  background:rgba(250,204,21,.10);
  color:var(--accent2);
  font-size:1.45rem;
  font-weight:900;
}
.test-result-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.test-result-card{
  padding:14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
}
.test-result-card span{
  display:block;
  color:var(--muted);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.test-result-card strong{
  display:block;
  margin-top:6px;
  font-size:1rem;
  line-height:1.3;
}
.test-result-copy{
  margin-top:14px;
  color:var(--text);
}
.test-weak-block{
  margin-top:14px;
}
.test-weak-block strong{
  display:block;
  margin-bottom:8px;
}
.test-weak-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.test-weak-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(244,63,94,.18);
  background:rgba(244,63,94,.08);
  color:var(--text);
  font-size:.84rem;
  font-weight:800;
}
.test-weak-pill small{
  color:var(--muted);
  font-size:.74rem;
}

@media (max-width: 980px){
  .test-toolbar,
  .test-result-grid,
  .fop-test-options{
    grid-template-columns:1fr;
  }
  .test-result-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 760px){
  .test-progress-meta{
    grid-template-columns:1fr;
  }
  .fop-test-section-head,
  .test-result-head,
  .test-progress-head{
    display:block;
  }
  .fop-test-section-badge,
  .test-progress-value,
  .test-result-score{
    margin-top:12px;
  }
  .test-sticky-actions{
    display:block;
    bottom:8px;
  }
  .test-actions-buttons{
    margin-top:12px;
  }
  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary{
    width:100%;
    justify-content:center;
  }
}
@media (max-width: 640px){
  .test-hero-card,
  .test-toolbar,
  .fop-test-section,
  .fop-test-question,
  .test-result-panel{
    padding:16px;
    border-radius:16px;
  }
  .fop-test-legend{
    gap:10px;
    font-size:.95rem;
  }
  .question-badge{
    width:34px;
    height:34px;
    border-radius:10px;
  }
  .fop-test-option{
    min-height:unset;
    padding:13px;
  }
  .option-letter{
    width:26px;
    height:26px;
  }
  .test-result-grid{
    grid-template-columns:1fr;
  }
}


/* v22.11.2 — premium result and interview mode */
.test-mode-card{
  margin-top:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(250,204,21,.20);
  background:linear-gradient(135deg,rgba(250,204,21,.08),rgba(37,99,235,.07));
}
.test-mode-copy strong{display:block;color:var(--text);margin-bottom:4px;}
.test-mode-copy span{display:block;color:var(--muted);font-size:.9rem;line-height:1.45;}
.test-mode-buttons{display:flex;gap:8px;flex:0 0 auto;}
.test-mode-btn{
  min-height:42px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
  transition:transform .14s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.test-mode-btn:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.34);}
.test-mode-btn.is-active{
  border-color:rgba(250,204,21,.42);
  background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(250,204,21,.13));
  box-shadow:0 10px 26px rgba(37,99,235,.18);
}
.is-interview-mode .test-toolbar{border-color:rgba(250,204,21,.26);}
.test-jump-link.is-strong{border-color:rgba(16,185,129,.32);background:rgba(16,185,129,.08);}
.test-jump-link.is-medium{border-color:rgba(245,158,11,.32);background:rgba(245,158,11,.08);}
.test-jump-link.is-weak{border-color:rgba(244,63,94,.28);background:rgba(244,63,94,.08);}
.fop-test-option.is-correct-answer:not(.is-wrong-picked){border-color:rgba(16,185,129,.36);}
.fop-test-option.is-correct-answer:not(.is-wrong-picked) .option-letter{color:#bbf7d0;border-color:rgba(16,185,129,.28);background:rgba(16,185,129,.10);}
.test-level-banner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(250,204,21,.22);
  background:linear-gradient(135deg,rgba(37,99,235,.09),rgba(255,255,255,.035));
}
.test-level-copy span{
  display:inline-flex;
  margin-bottom:8px;
  color:var(--accent2);
  font-weight:900;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.test-level-copy strong{
  display:block;
  color:var(--text);
  font-size:clamp(22px,3vw,34px);
  line-height:1.08;
  letter-spacing:-.035em;
}
.test-level-copy p{margin-top:8px;color:var(--muted);}
.level-low .test-result-score{color:#fecdd3;border-color:rgba(244,63,94,.30);background:rgba(244,63,94,.10);}
.level-start .test-result-score{color:#fed7aa;border-color:rgba(245,158,11,.30);background:rgba(245,158,11,.10);}
.level-helper .test-result-score{color:#fde68a;border-color:rgba(250,204,21,.30);background:rgba(250,204,21,.10);}
.level-ready .test-result-score{color:#bfdbfe;border-color:rgba(37,99,235,.34);background:rgba(37,99,235,.12);}
.level-strong .test-result-score{color:#bbf7d0;border-color:rgba(16,185,129,.34);background:rgba(16,185,129,.12);}
.test-section-score-wrap,
.test-repeat-block{
  margin-top:16px;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.035);
}
.test-section-score-wrap>strong,
.test-repeat-block>strong{display:block;margin-bottom:12px;font-size:1rem;}
.test-section-score-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.test-section-score-card{
  min-width:0;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.035);
}
.test-section-score-card span{
  display:block;
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
  line-height:1.25;
}
.test-section-score-card strong{display:block;margin-top:8px;color:var(--text);font-size:1.06rem;}
.mini-score-track{
  position:relative;
  margin-top:10px;
  height:8px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.06);
}
.mini-score-fill{
  position:absolute;
  inset:0 auto 0 0;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#facc15);
}
.test-repeat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.test-repeat-card{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(244,63,94,.18);
  background:linear-gradient(145deg,rgba(244,63,94,.08),rgba(255,255,255,.025));
}
.test-repeat-card span{
  display:inline-flex;
  margin-bottom:8px;
  color:#fecdd3;
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.test-repeat-card strong{display:block;margin-bottom:10px;color:var(--text);}
.test-repeat-links{display:flex;flex-wrap:wrap;gap:8px;}
.test-repeat-links a{
  display:inline-flex;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  color:var(--accent2);
  font-size:.82rem;
  font-weight:800;
  text-decoration:none;
}
.test-repeat-links a:hover{border-color:rgba(250,204,21,.32);}
@media(max-width:980px){
  .test-section-score-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .test-repeat-grid{grid-template-columns:1fr;}
}
@media(max-width:760px){
  .test-mode-card,.test-level-banner{display:block;}
  .test-mode-buttons{margin-top:12px;display:grid;grid-template-columns:1fr;}
  .test-mode-btn{width:100%;}
  .test-section-score-grid{grid-template-columns:1fr;}
}

/* v22.11.4 — sticky progress and clean result CTA */
.test-floating-progress{
  position:-webkit-sticky;
  position:sticky;
  top:10px;
  z-index:8;
  display:grid;
  grid-template-columns:minmax(150px,.5fr) minmax(160px,1fr) auto;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(37,99,235,.22);
  background:rgba(13,16,28,.84);
  backdrop-filter:blur(18px);
  box-shadow:0 16px 44px rgba(0,0,0,.24);
}
[data-theme="light"] .test-floating-progress{
  background:rgba(255,255,255,.88);
  box-shadow:0 16px 44px rgba(37,99,235,.12);
}
.test-floating-info span{
  display:block;
  color:var(--muted);
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.test-floating-info strong{
  display:block;
  margin-top:3px;
  color:var(--text);
  font-size:.98rem;
  font-weight:900;
}
.test-floating-track{
  position:relative;
  height:10px;
  overflow:hidden;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.06);
}
.test-floating-fill{
  position:absolute;
  inset:0 auto 0 0;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb 0%,#60a5fa 54%,#facc15 100%);
  box-shadow:0 0 18px rgba(37,99,235,.32);
  transition:width .24s ease;
}
.test-floating-percent{
  min-width:62px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(37,99,235,.24);
  background:rgba(37,99,235,.08);
  color:var(--text);
  text-align:center;
  font-size:1rem;
  font-weight:900;
}
[data-theme="light"] .test-floating-percent,
[data-theme="light"] .test-progress-value{
  color:#172033;
  background:rgba(37,99,235,.06);
  border-color:rgba(37,99,235,.20);
}
.test-next-step{
  margin-top:16px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(37,99,235,.22);
  background:linear-gradient(135deg,rgba(37,99,235,.085),rgba(255,255,255,.035));
}
.test-next-step-copy span{
  display:inline-flex;
  margin-bottom:8px;
  color:#b9cdfd;
  font-weight:900;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.test-next-step-copy strong{
  display:block;
  color:var(--text);
  font-size:1.05rem;
  line-height:1.32;
}
.test-next-step-copy p{
  margin-top:7px;
  color:var(--muted);
}
.test-next-step-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}
.test-next-step-actions a,
.test-next-step-actions button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.045);
  color:var(--text);
  font:900 .86rem 'Inter',system-ui,sans-serif;
  text-decoration:none;
  cursor:pointer;
  transition:transform .14s ease,border-color .18s ease,box-shadow .18s ease;
}
.test-next-step-actions a:first-child{
  border-color:rgba(37,99,235,.32);
  background:linear-gradient(135deg,rgba(37,99,235,.18),rgba(96,165,250,.10));
}
.test-next-step-actions a:hover,
.test-next-step-actions button:hover{
  transform:translateY(-1px);
  border-color:rgba(250,204,21,.32);
  box-shadow:0 12px 26px rgba(0,0,0,.16);
}
@media(max-width:760px){
  .test-floating-progress{
    top:6px;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    padding:10px 12px;
    border-radius:16px;
  }
  .test-floating-track{grid-column:1/-1;order:3;}
  .test-floating-percent{min-width:58px;}
  .test-next-step{display:block;}
  .test-next-step-actions{margin-top:12px;display:grid;grid-template-columns:1fr;}
  .test-next-step-actions a,
  .test-next-step-actions button{width:100%;}
}


/* v22.11.5 — calmer premium cards, no overbright glow */
.test-hero-card,
.test-toolbar,
.fop-test-section,
.test-result-panel,
.test-next-step{
  box-shadow:0 14px 34px rgba(0,0,0,.16);
}
[data-theme="light"] .test-hero-card,
[data-theme="light"] .test-toolbar,
[data-theme="light"] .fop-test-section,
[data-theme="light"] .test-result-panel,
[data-theme="light"] .test-next-step{
  box-shadow:0 14px 34px rgba(37,99,235,.08);
}
.test-floating-progress{
  border-color:rgba(37,99,235,.18);
}
.test-level-banner{
  background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(255,255,255,.035));
}

/* v22.11.6 — compact sticky progress, less visual noise */
.test-toolbar-compact{
  grid-template-columns:1fr;
  padding:14px;
}
.test-toolbar-compact::before{display:none;}
.test-toolbar-compact .test-sections-card{
  display:grid;
  grid-template-columns:minmax(0,.72fr) minmax(260px,1fr);
  gap:14px;
  align-items:start;
}
.test-toolbar-compact .test-section-jumps{
  margin-top:0;
  justify-content:flex-end;
}
.test-floating-progress{
  top:8px;
  z-index:30;
  margin:0 0 12px;
  grid-template-columns:auto minmax(160px,1fr) auto;
  padding:10px 12px;
  border-radius:16px;
  border-color:rgba(37,99,235,.24);
  background:rgba(13,16,28,.90);
  box-shadow:0 12px 34px rgba(0,0,0,.24);
}
[data-theme="light"] .test-floating-progress{
  background:rgba(255,255,255,.94);
  border-color:rgba(37,99,235,.22);
  box-shadow:0 12px 30px rgba(37,99,235,.11);
}
.test-floating-info span{
  font-size:.68rem;
}
.test-floating-info strong{
  font-size:.92rem;
  white-space:nowrap;
}
.test-floating-percent{
  min-width:56px;
  padding:7px 10px;
  border-radius:13px;
  font-size:.98rem;
}
.test-mode-card{
  margin-top:16px;
}
@media(max-width:900px){
  .test-toolbar-compact .test-sections-card{
    grid-template-columns:1fr;
  }
  .test-toolbar-compact .test-section-jumps{
    justify-content:flex-start;
  }
}
@media(max-width:640px){
  .test-floating-progress{
    top:6px;
    grid-template-columns:auto 1fr auto;
    gap:8px;
    padding:9px 10px;
    border-radius:14px;
  }
  .test-floating-info span{display:none;}
  .test-floating-info strong{font-size:.86rem;}
  .test-floating-percent{min-width:52px;font-size:.92rem;}
}

/* v22.13.15 — mobile test sticky stretch fix */
@media (max-width: 900px), (pointer: coarse) {
  .test-floating-progress,
  .test-sticky-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }

  .test-floating-progress {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .test-floating-info {
    min-width: 0;
  }

  .test-floating-info strong {
    white-space: normal;
  }

  .test-floating-track {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .test-floating-percent {
    justify-self: end;
  }

  .test-sticky-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    bottom: 8px;
    padding: 12px;
  }

  .test-actions-copy,
  .test-actions-buttons {
    width: 100%;
    min-width: 0;
  }

  .test-actions-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 0;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .test-floating-progress {
    padding: 8px 9px;
    border-radius: 14px;
  }

  .test-sticky-actions {
    padding: 10px;
    border-radius: 14px;
  }
}


/* v22.13.16 — real mobile test progress/footer stretch fix
   Keep the progress layout desktop-like on touch devices, but make controls fill cleanly on phones. */
@media (pointer: coarse), (max-width: 900px) {
  .test-floating-progress {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .test-floating-track {
    grid-column: auto !important;
    order: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .test-floating-info {
    min-width: 0 !important;
  }

  .test-floating-info strong {
    white-space: nowrap !important;
  }

  .test-floating-percent {
    justify-self: end !important;
    flex: 0 0 auto !important;
  }

  .test-sticky-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .test-actions-copy {
    width: 100% !important;
    min-width: 0 !important;
  }

  .test-actions-buttons {
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 10px !important;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary {
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  .test-floating-progress {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    padding: 9px 10px !important;
  }

  .test-floating-info span {
    display: none !important;
  }

  .test-sticky-actions {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    bottom: 8px !important;
  }

  .test-actions-buttons {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    justify-content: stretch !important;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 420px) {
  .test-actions-buttons {
    grid-template-columns: 1fr !important;
  }
}


/* v22.13.17 — hard mobile test stretch fix
   Replace the fragile grid overrides with a flex layout so progress and result actions
   stretch like desktop on phones and tablets. */
.fop-test-form,
.test-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.test-floating-progress,
.test-sticky-actions {
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

@media (pointer: coarse), (max-width: 900px) {
  .test-floating-progress {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .test-floating-info {
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  .test-floating-info strong {
    white-space: nowrap !important;
  }

  .test-floating-track {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 80px !important;
    max-width: none !important;
    grid-column: auto !important;
    order: 0 !important;
  }

  .test-floating-percent {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    justify-self: auto !important;
  }

  .test-sticky-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .test-actions-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .test-actions-buttons {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 10px !important;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary {
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  .test-floating-progress {
    padding: 9px 10px !important;
  }

  .test-floating-info span {
    display: none !important;
  }

  .test-floating-track {
    min-width: 70px !important;
  }

  .test-sticky-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    bottom: 8px !important;
  }

  .test-actions-copy,
  .test-actions-buttons {
    width: 100% !important;
  }

  .test-actions-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 420px) {
  .test-actions-buttons {
    grid-template-columns: 1fr !important;
  }
}


/* v22.13.19 — mobile sticky overflow fix
   Keep decorative card overflow intact; fix sticky support and avoid body overflow creating a mobile scroll container. */
.test-floating-progress{
  position:-webkit-sticky;
  position:sticky;
}
.test-sticky-actions{
  position:-webkit-sticky;
  position:sticky;
}

/* v22.13.20 — mobile sticky safe area fix
   Keep sticky controls visible without letting question text slide underneath them. */
.test-sticky-actions{
  isolation:isolate;
}
@media (pointer: coarse), (max-width: 900px){
  .test-sticky-actions{
    z-index:40 !important;
    background:rgb(13 16 28) !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    overflow:visible !important;
  }

  [data-theme="light"] .test-sticky-actions{
    background:rgb(255 255 255) !important;
  }

  .fop-test-form{
    padding-bottom:clamp(170px, 30vh, 260px) !important;
  }

  .fop-test-section:last-of-type{
    margin-bottom:clamp(120px, 24vh, 220px) !important;
  }
}
@media (max-width: 640px){
  .test-sticky-actions{
    bottom:calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    max-height:calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)) !important;
    overflow:auto !important;
  }

  .fop-test-form{
    padding-bottom:clamp(210px, 36vh, 320px) !important;
  }

  .test-actions-copy span{
    line-height:1.35 !important;
  }
}

/* v22.13.21 — final Android/touch mobile button fix
   Overrides earlier pointer: coarse / width media conflicts for the sticky test actions. */
@media (pointer: coarse) and (max-width: 640px) {
  .test-actions-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: stretch !important;
    align-items: stretch !important;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (pointer: coarse) and (max-width: 420px) {
  .test-actions-buttons {
    grid-template-columns: 1fr !important;
  }
}


/* v22.13.22 — mobile result spacing fix
   When the result is visible, remove the extra bottom safe-area reserved for the sticky check panel. */
.fop-test-form.has-result{
  padding-bottom:24px !important;
}
.fop-test-form.has-result .fop-test-section:last-of-type{
  margin-bottom:24px !important;
}
.fop-test-form.has-result .test-sticky-actions{
  position:static !important;
  bottom:auto !important;
  margin-top:18px !important;
  margin-bottom:18px !important;
}
@media (pointer: coarse), (max-width:900px){
  .fop-test-form.has-result{
    padding-bottom:24px !important;
  }
  .fop-test-form.has-result .fop-test-section:last-of-type{
    margin-bottom:24px !important;
  }
}
@media (max-width:640px){
  .fop-test-form.has-result{
    padding-bottom:18px !important;
  }
  .fop-test-form.has-result .test-sticky-actions{
    margin-bottom:14px !important;
  }
}

/* v22.13.23 — final result spacing and mobile button hard fix
   This block must stay at the end of the file: it overrides earlier touch/mobile rules. */
.fop-test-form.has-result,
.fop-test-form:has(.test-result-panel:not([hidden])){
  padding-bottom:20px !important;
}

.fop-test-form.has-result .fop-test-section:last-of-type,
.fop-test-form:has(.test-result-panel:not([hidden])) .fop-test-section:last-of-type{
  margin-bottom:20px !important;
}

@media (pointer: coarse) and (max-width:640px){
  .test-actions-buttons{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    width:100% !important;
    flex-wrap:wrap !important;
    justify-content:stretch !important;
    align-items:stretch !important;
  }

  .test-actions-buttons .btn-s,
  .test-btn-primary,
  .test-btn-secondary{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
    justify-content:center !important;
    text-align:center !important;
  }
}

@media (pointer: coarse) and (max-width:420px){
  .test-actions-buttons{
    grid-template-columns:1fr !important;
  }
}


/* v22.13.24 — test intro text cleanup */
.test-intro-note{
  margin:10px 0 18px;
  color:var(--muted);
  font-size:15px;
  line-height:1.55;
}
.test-disclaimer{
  margin:18px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
.test-disclaimer strong{
  color:var(--text);
}
@media (max-width:640px){
  .test-intro-note{
    margin:8px 0 14px;
    font-size:14px;
  }
  .test-disclaimer{
    font-size:13px;
  }
}


/* v22.13.25 — compact test hero and topic jumps */
.test-hero-card{
  padding:18px 20px !important;
}
.test-hero-title{
  margin-top:0 !important;
  font-size:clamp(20px,2.4vw,28px) !important;
}
.test-hero-copy{
  max-width:720px !important;
}
.test-toolbar-compact .test-sections-card{
  display:block !important;
}
.test-sections-card strong{
  margin-bottom:10px !important;
}
.test-sections-card p{
  display:none !important;
}
.test-toolbar-compact .test-section-jumps{
  justify-content:flex-start !important;
  margin-top:0 !important;
}
@media(max-width:640px){
  .test-hero-card{
    padding:16px !important;
  }
  .test-hero-title{
    font-size:22px !important;
  }
  .test-hero-copy{
    font-size:14px !important;
  }
  .test-section-jumps{
    gap:8px !important;
  }
  .test-jump-link{
    padding:9px 10px !important;
    border-radius:12px !important;
  }
}


/* v22.13.26 — clean topic jump chips */
.test-jump-link small{
  display:none !important;
}
.test-jump-link{
  justify-content:center !important;
  text-align:center !important;
}


/* v22.13.27 — hide any legacy topic/section count badges */
.fop-test-section-badge,
.test-topic-count,
.test-jump-count,
.topic-count{
  display:none !important;
}
