/* Python Quiz only: no shared selectors or new dependencies. */
.pq-root { --pq-ink: var(--ink, #172033); --pq-muted: var(--muted, #65708a); --pq-line: var(--line, #dfe5ee); --pq-blue: var(--blue, #2457c5); --pq-green: var(--green, #087c5d); --pq-red: var(--red, #b42318); color: var(--pq-ink); font-size: .94rem; line-height: 1.6; min-width: 0; }
.pq-root *, .pq-root *::before, .pq-root *::after { box-sizing: border-box; }
.pq-root h2, .pq-root h3, .pq-root p { overflow-wrap: anywhere; }
.pq-root h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; line-height: 1.4; }
.pq-root h3 { margin: 0; font-size: 1rem; line-height: 1.5; }
.pq-root p { margin: .55rem 0; }
.pq-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.pq-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .11em; color: var(--pq-blue); margin: 0 0 .35rem !important; }
.pq-muted { color: var(--pq-muted); }
.pq-small { font-size: .8rem; }
.pq-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.pq-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; background: var(--pq-blue); color: #fff; border-radius: .65rem; padding: .64rem .88rem; font: inherit; font-size: .83rem; line-height: 1.4; font-weight: 750; text-decoration: none; cursor: pointer; text-align: center; min-height: 2.55rem; transition: background .15s, border-color .15s; }
.pq-btn:hover:not(:disabled) { background: #19479f; }
.pq-btn-secondary { background: #eef2f8; color: #23314a; border-color: #e0e6ef; }
.pq-btn-secondary:hover:not(:disabled) { background: #e0e8f5; border-color: #b5c7e6; }
.pq-root button:disabled { opacity: .55; cursor: not-allowed; }
.pq-root button:focus-visible, .pq-root a:focus-visible, .pq-root summary:focus-visible, .pq-root pre:focus-visible { outline: 3px solid #91b2f3; outline-offset: 3px; }
.pq-language { flex: 0 0 auto; }
.pq-tabs { display: flex; gap: .2rem; overflow-x: auto; border-bottom: 1px solid var(--pq-line); margin-bottom: 1.25rem; }
.pq-tab { border: 0; border-radius: .4rem .4rem 0 0; background: transparent; color: var(--pq-muted); white-space: nowrap; font: inherit; font-size: .87rem; font-weight: 750; padding: .7rem .85rem; cursor: pointer; }
.pq-tab:hover:not(:disabled) { background: #eef3fb; }
.pq-tab-active { color: var(--pq-blue); box-shadow: inset 0 -3px 0 var(--pq-blue); }
.pq-card { border: 1px solid var(--pq-line); border-radius: .85rem; background: #fff; padding: 1.15rem; box-shadow: var(--shadow, 0 6px 22px rgba(25,43,79,.06)); min-width: 0; }
.pq-bank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 1rem; }
.pq-bank { display: flex; flex-direction: column; gap: .4rem; }
.pq-bank h3 { font-size: 1.12rem; }
.pq-bank > .pq-actions { margin-top: auto; padding-top: .65rem; }
.pq-bank-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin: .55rem 0; padding: .7rem; border-radius: .6rem; background: #f5f8fd; }
.pq-bank-counts dt { color: var(--pq-muted); font-size: .75rem; }
.pq-bank-counts dd { margin: .15rem 0 0; font-weight: 750; font-size: .9rem; }
/* PQ_READINESS_V61: published availability / required draw count, never a quota rewrite. */
.pq-bank .pq-count-legend { margin: .35rem 0 0; }
.pq-bank-counts .pq-count-points { color: var(--pq-muted); font-weight: 400; font-size: .7rem; overflow-wrap: anywhere; }
.pq-bank-counts .pq-count-shortage { background: #fff4db; color: #8c5100; border-radius: .4rem; padding: .25rem .35rem; }
.pq-count-shortage dt { color: inherit; font-weight: 750; }
.pq-notice.pq-readiness { border-left-color: #b7791f; background: #fff4db; color: #8c5100; margin: .3rem 0 !important; }
.pq-readiness-detail { display: block; margin-top: .4rem; font-weight: 700; }
.pq-badge { display: inline-flex; align-items: center; border-radius: 10rem; background: #edf2f9; color: #536078; padding: .2rem .6rem; font-size: .73rem; font-weight: 750; line-height: 1.6; }
.pq-good { background: #e5f6f0; color: var(--pq-green); }
.pq-bad { background: #feeceb; color: var(--pq-red); }
.pq-pending { background: #fff4db; color: #8c5100; }
.pq-toolbar, .pq-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.pq-toolbar { margin: 0 0 1rem; }
.pq-toolbar > .pq-field { min-width: min(100%, 17rem); flex: 1 1 17rem; max-width: 32rem; }
.pq-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pq-active-runs { margin-bottom: 1rem; }
.pq-active-runs .pq-row { padding: .6rem 0; border-bottom: 1px solid var(--pq-line); }
.pq-active-runs .pq-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pq-empty { border: 1px dashed #c9d3e2; padding: 2.6rem 1rem; text-align: center; border-radius: .8rem; background: #fbfcfe; color: var(--pq-muted); }
.pq-empty .pq-btn { margin-top: .65rem; }
.pq-notice { border-left: 3px solid var(--pq-blue); padding: .75rem .9rem; border-radius: .2rem .6rem .6rem .2rem; background: #eef4ff; color: #334c79; font-size: .84rem; margin: 0 0 1rem !important; }
.pq-error { background: #fff1f0; color: var(--pq-red); padding: .7rem .85rem; border-radius: .55rem; font-size: .84rem; overflow-wrap: anywhere; margin: .65rem 0; }
.pq-error:empty { display: none; }
.pq-error-text { color: var(--pq-red); }
.pq-question-list { display: grid; gap: 1rem; }
.pq-prompt { font-size: .95rem; margin-top: .85rem !important; }
.pq-code { display: block; width: 100%; max-width: 100%; overflow: auto; white-space: pre; tab-size: 4; background: #14213d; color: #edf3ff; border-radius: .65rem; padding: 1rem; margin: .8rem 0; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .87rem; line-height: 1.65; }
.pq-code code { font: inherit; white-space: inherit; }
.pq-options-preview { list-style: none; display: grid; gap: .45rem; padding: 0; margin: .8rem 0; }
.pq-options-preview li { display: flex; align-items: flex-start; gap: .75rem; border: 1px solid var(--pq-line); padding: .6rem .8rem; border-radius: .5rem; }
.pq-options-preview b { flex: 0 0 auto; }
.pq-review-details { margin-top: .75rem; border-top: 1px solid var(--pq-line); padding-top: .7rem; }
.pq-review-details summary { color: var(--pq-blue); font-weight: 700; cursor: pointer; }
.pq-field { display: grid; gap: .4rem; color: var(--pq-ink); font-size: .83rem; font-weight: 700; min-width: 0; }
.pq-field input:not([type="checkbox"]):not([type="radio"]), .pq-field select, .pq-field textarea { display: block; width: 100%; min-width: 0; border: 1px solid #c9d3e2; border-radius: .6rem; padding: .7rem .78rem; background: #fff; color: var(--pq-ink); font: inherit; font-weight: 400; outline: none; }
.pq-field textarea { resize: vertical; line-height: 1.6; }
.pq-field input:focus, .pq-field select:focus, .pq-field textarea:focus { border-color: var(--pq-blue); box-shadow: 0 0 0 3px #dbe7ff; }
.pq-field input:disabled, .pq-field textarea:disabled { background: #f2f4f8; color: #626e83; }
.pq-monospace { font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important; tab-size: 4; white-space: pre; overflow-x: auto; }
.pq-options { display: grid; gap: .55rem; padding: 0; margin: .85rem 0; border: 0; min-width: 0; }
.pq-option { display: flex; align-items: flex-start; gap: .6rem; border: 1px solid var(--pq-line); border-radius: .65rem; padding: .75rem .85rem; cursor: pointer; background: #fff; }
.pq-option:hover { background: #f6f9ff; border-color: #a3bce9; }
.pq-option:has(input:checked) { background: #eef4ff; border-color: var(--pq-blue); }
.pq-option:focus-within { outline: 2px solid #91b2f3; outline-offset: 2px; }
.pq-option input { flex: 0 0 auto; margin: .3rem 0 0; accent-color: var(--pq-blue); }
.pq-option input:disabled + span { opacity: .7; }
.pq-save-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: .75rem; min-height: 2rem; }
.pq-save-row .pq-btn { padding: .4rem .65rem; min-height: 2rem; font-size: .75rem; }
.pq-feedback { padding: .85rem 1rem; border-radius: .6rem; margin-top: .65rem; font-size: .87rem; }
.pq-feedback p:last-child { margin-bottom: 0; }
.pq-run-summary { margin-bottom: 1rem; }
.pq-run-summary h3 { font-size: 1.15rem; }
.pq-run-metrics { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; font-size: .86rem; }
.pq-progress { display: block; width: 100%; height: .6rem; accent-color: var(--pq-blue); margin: .7rem 0; border: 0; border-radius: 1rem; overflow: hidden; background: #e7edf6; }
.pq-progress::-webkit-progress-bar { background: #e7edf6; border-radius: 1rem; }
.pq-progress::-webkit-progress-value { background: var(--pq-blue); border-radius: 1rem; }
.pq-progress::-moz-progress-bar { background: var(--pq-blue); border-radius: 1rem; }
.pq-timer { font-variant-numeric: tabular-nums; }
.pq-timer-low { color: var(--pq-red); }
.pq-question-number { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; margin-right: .65rem; border-radius: 50%; background: #e9f0ff; color: var(--pq-blue); font-size: .86rem; }
.pq-result-score { display: flex; align-items: baseline; gap: .8rem; margin-top: .8rem; }
.pq-result-score strong { font-size: 2rem; color: var(--pq-blue); }
.pq-result-score small { font-size: 1.1rem; font-weight: 500; color: var(--pq-muted); }
.pq-submit-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; border: 1px solid var(--pq-line); border-radius: .8rem; background: #fff; padding: 1rem; margin-top: 1rem; }
.pq-filters { margin-bottom: 1rem; }
.pq-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.pq-table-wrap { overflow: auto; border: 1px solid var(--pq-line); border-radius: .75rem; }
.pq-table { border-collapse: collapse; width: 100%; min-width: 920px; background: #fff; font-size: .82rem; }
.pq-table th, .pq-table td { text-align: left; padding: .75rem .8rem; border-bottom: 1px solid var(--pq-line); vertical-align: top; }
.pq-table th { background: #f7faff; color: var(--pq-muted); font-size: .73rem; font-weight: 800; }
.pq-table td { overflow-wrap: anywhere; max-width: 18rem; }
.pq-table tr:last-child td { border-bottom: 0; }
.pq-table tbody tr:hover { background: #f8faff; }
.pq-modal-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(15,28,52,.54); padding: 1rem; overscroll-behavior: contain; }
.pq-modal { display: flex; flex-direction: column; width: min(100%, 49rem); max-height: calc(100dvh - 2rem); overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 1rem; box-shadow: 0 28px 65px rgba(14,27,53,.28); }
.pq-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--pq-line); }
.pq-modal-head h3 { font-size: 1.1rem; }
.pq-modal-body { padding: 1.25rem; }
.pq-modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; padding: 1rem 1.25rem; border-top: 1px solid var(--pq-line); background: #f9fbff; }
.pq-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.pq-full { grid-column: 1 / -1; flex-basis: 100%; }
.pq-class-list { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; border: 1px solid var(--pq-line); border-radius: .6rem; padding: .75rem .9rem; max-height: 13rem; overflow: auto; }
.pq-class-list legend { padding: 0 .3rem; }
.pq-class-list label { display: inline-flex; align-items: center; gap: .5rem; font-size: .83rem; font-weight: 500; }
.pq-class-list input { accent-color: var(--pq-blue); }
.pq-difficulty-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; border: 1px solid var(--pq-line); border-radius: .65rem; padding: .6rem .85rem .85rem; margin: 0; min-width: 0; }
.pq-difficulty-fields legend { padding: 0 .3rem; font-size: .83rem; font-weight: 700; }
.pq-difficulty-fields .pq-available-count { margin: 0; font-weight: 400; }
.pq-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 850px) { .pq-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pq-run-question > .pq-row { align-items: flex-start; } }
@media (max-width: 560px) {
  .pq-heading { gap: .7rem; } .pq-root h2 { font-size: 1.15rem; } .pq-heading > div { min-width: 0; }
  .pq-language { padding: .55rem .65rem; font-size: .78rem; }
  .pq-tab { padding: .65rem .7rem; font-size: .82rem; }
  .pq-bank-grid, .pq-filter-grid, .pq-form-grid { grid-template-columns: 1fr; }
  .pq-card { padding: .95rem; } .pq-actions { gap: .4rem; }
  .pq-toolbar { align-items: stretch; } .pq-toolbar > .pq-actions { width: 100%; }
  .pq-submit-bar { align-items: stretch; } .pq-submit-bar > .pq-actions { width: 100%; }
  .pq-submit-bar .pq-btn { flex: 1 1 10rem; }
  .pq-run-metrics { gap: .5rem 1rem; } .pq-code { padding: .85rem; font-size: .8rem; }
  .pq-modal-overlay { padding: .5rem; } .pq-modal { max-height: calc(100dvh - 1rem); border-radius: .7rem; }
  .pq-modal-head, .pq-modal-body, .pq-modal-foot { padding: .9rem; }
  .pq-difficulty-fields { gap: .6rem; padding: .65rem; }
  .pq-option { padding: .65rem; } .pq-table td, .pq-table th { padding: .65rem; }
}
@media (prefers-reduced-motion: reduce) { .pq-root * { transition: none !important; scroll-behavior: auto !important; } }
