.jag-bq{max-width:850px;margin:1.5rem auto;padding:1.5rem;border:1px solid #d6c8a8;border-radius:12px;background:#faf8f2}.jag-bq fieldset{border:0;border-bottom:1px solid #e2dccc;margin:0;padding:1.2rem 0}.jag-bq legend{font-weight:700;padding-top:1rem}.jag-bq label{display:block;padding:.5rem .75rem;margin:.3rem 0;border-radius:6px;cursor:pointer}.jag-bq label:hover{background:#eee8db}.jag-bq button{margin-top:1rem;padding:.7rem 1.4rem;background:#213f70;color:white;border:0;border-radius:5px;cursor:pointer}.jag-bq button:disabled{opacity:.6}.jag-bq-results{margin-top:1.2rem}.jag-bq-results p{padding:.7rem;border-bottom:1px solid #e2dccc}

.jag-bq-setup{display:flex;flex-wrap:wrap;align-items:end;gap:1rem;padding:1rem 0;border-bottom:1px solid #e2dccc}.jag-bq-setup label{display:flex;flex-direction:column;gap:.3rem;margin:0;padding:0}.jag-bq-setup select{min-width:130px;max-width:220px;padding:.5rem;background:#fff;border:1px solid #c6b894;border-radius:5px}.jag-bq-setup button{margin:0}.jag-bq-count{font-size:.9rem;color:#555}.jag-bq-results button{margin-top:1rem}@media(max-width:540px){.jag-bq{padding:1rem}.jag-bq-setup{display:grid;grid-template-columns:1fr 1fr}.jag-bq-setup label:first-child{grid-column:1/-1}.jag-bq-setup select{width:100%}.jag-bq-setup button{grid-column:1/-1}}
/* v0.3.0 progressive quiz flow */
.jag-bq [hidden]{display:none!important}
.jag-bq-progress{margin:1.2rem 0 .5rem}.jag-bq-progress-label{font-weight:600;margin-bottom:.5rem}.jag-bq-progress-track{height:9px;background:#e8dfcf;border-radius:10px;overflow:hidden}.jag-bq-progress-track span{display:block;height:100%;width:0;background:#b28b4c;transition:width .2s ease}
.jag-bq-navigation{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center}.jag-bq-navigation button{margin-top:1rem}.jag-bq-prev{background:#56657a!important}.jag-bq-results-ready{padding-top:.5rem}.jag-bq-score{font-size:1.5rem;margin:.7rem 0}.jag-bq-feedback{font-size:1.05rem}.jag-bq-review-item{padding:1rem 0;border-bottom:1px solid #e2dccc}.jag-bq-review-item p{margin:.5rem 0;padding:0;border:0}.jag-bq-correct{color:#25603c}.jag-bq-incorrect{color:#9a362f}.jag-bq-review-item a{display:inline-block;margin-top:.5rem}.jag-bq-play-again{margin-top:1.5rem}

.jag-bq-daily-intro{margin:.4rem 0 1rem}.jag-bq-daily-note{font-size:.95rem;color:#59492f;background:#f3ead6;padding:.8rem;border-radius:6px}

/* v0.5: consistent Kadence-compatible typography and compact JaG branding */
.jag-bq, .jag-bq *{font-family:inherit;letter-spacing:normal}
.jag-bq{font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:#172c4a;line-height:1.55}
.jag-bq-brand{display:flex;align-items:center;gap:14px;padding:0 0 16px;margin:0 0 16px;border-bottom:1px solid #d5bb80}
.jag-bq-mark{width:72px;height:75px;object-fit:contain;flex-shrink:0}
.jag-bq-brand-name{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:clamp(1.55rem,3.5vw,2.2rem);line-height:1.1;color:#142b50}
.jag-bq-brand-subtitle{font-family:inherit;font-size:.75rem;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:#a17c3d;margin-top:5px}
.jag-bq legend{font-family:inherit;font-size:1.08rem;color:#172c4a}
.jag-bq-daily-intro,.jag-bq-daily-note,.jag-bq-count{font-family:inherit}
.jag-bq button{font-family:inherit;font-weight:600}
@media(max-width:540px){.jag-bq-brand{gap:10px}.jag-bq-mark{width:54px;height:57px}.jag-bq-brand-name{font-size:1.5rem}.jag-bq-brand-subtitle{font-size:.65rem;letter-spacing:.08em}}

/* v1.2.5: keep long subject labels legible without breaking mobile layout */
@media (min-width: 701px){.jag-bq-setup label:has(select[data-jag-subject]){flex:2 1 245px;min-width:245px}.jag-bq-setup select[data-jag-subject]{width:100%;max-width:none;min-width:0}.jag-bq-setup label:has(select[name="jag_bq_topic"]){flex:1 1 165px;min-width:145px}.jag-bq-setup label:has(select[name="jag_bq_level"]),.jag-bq-setup label:has(select[name="jag_bq_count"]){flex:0 1 125px;min-width:100px}.jag-bq-setup select[name="jag_bq_topic"],.jag-bq-setup select[name="jag_bq_level"],.jag-bq-setup select[name="jag_bq_count"]{width:100%;min-width:0}}

/* v1.3.16: let the subject selector fill its full row on narrow screens. */
@media (max-width: 540px) {
  .jag-bq-setup label:has(> select[data-jag-subject]) {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }
  .jag-bq-setup select[data-jag-subject] {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* v1.3.17: mobile setup grid — full-width subject/topic; paired difficulty/count. */
@media (max-width: 540px) {
  .jag-bq-setup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .jag-bq-setup > label { min-width: 0; width: 100%; box-sizing: border-box; }
  .jag-bq-setup > label:nth-child(1),
  .jag-bq-setup > label:nth-child(2) { grid-column: 1 / -1; }
  .jag-bq-setup > label:nth-child(3) { grid-column: 1; }
  .jag-bq-setup > label:nth-child(4) { grid-column: 2; }
  .jag-bq-setup > label select {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }
}

/* v1.3.18: keep the active quiz and results visible after navigation. */
#jag-bq-questions, #jag-bq-setup, .jag-bq-results { scroll-margin-top: 85px; }
