/* Responsive test-taking experience for phones, tablets and desktop. Keeps existing markup and handlers intact. */
.test-sticky-header { min-width:0; gap:12px; }
.test-sticky-header > * { min-width:0; }
.test-sticky-header .timer { font-variant-numeric:tabular-nums; white-space:nowrap; }
.test-sticky-header .overall-timer { display:inline-block; }
.test-palette-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.test-palette-summary > div { min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.test-palette-summary b,.test-palette-summary span { display:block; overflow-wrap:anywhere; }
.test-palette-summary span { color:var(--muted); font-size:.78rem; }
.test-palette-filters { flex-wrap:wrap; }
.pal { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:7px; }
.pal button { min-width:0; min-height:40px; padding:6px 2px; }
.test-sticky-header .row { min-width:0; }
@media (min-width:821px) {
  .test-sticky-header { align-items:center; }
  .test-sticky-header > .row { flex-wrap:wrap; }
  .test-palette-summary { max-width:720px; }
  .test-sticky-header + .card { max-width:100%; }
}
@media (max-width:820px) {
  .test-sticky-header { top:8px!important; flex-wrap:wrap; align-items:flex-start!important; }
  .test-sticky-header > .row { flex-wrap:wrap; }
  .test-sticky-header .timer { font-size:.95rem; }
  .test-sticky-header .overall-timer { font-size:.8rem; }
  .test-palette-summary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .test-palette-summary > div { padding:8px 6px; }
  .test-palette-summary b { font-size:.95rem; }
  .test-palette-summary span { font-size:.68rem; line-height:1.3; }
  .pal { grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
  .pal button { min-height:44px; }
  .opt { width:100%; text-align:left; align-items:flex-start; white-space:normal; overflow-wrap:anywhere; }
  .q-text { overflow-wrap:anywhere; }
  .test-palette-filters .chip { min-height:40px; }
}
@media (max-width:520px) {
  .test-sticky-header { gap:8px; }
  .test-sticky-header .overall-timer { display:block; margin-top:3px; }
  .test-palette-summary { gap:5px; }
  .test-palette-summary > div { padding:7px 5px; }
  .test-palette-summary span { font-size:.64rem; }
  .pal { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
  .pal button { min-height:44px; }
  .test-sticky-header .btn { min-height:44px; }
}
@media (prefers-reduced-motion:reduce) {
  .test-sticky-header,.test-palette-summary,.pal button { scroll-behavior:auto; transition:none!important; }
}
