/* Immediate shelf practice uses the shelf page's explicit site-theme tokens. */
.shelf-practice{margin:1.5rem 0 2rem;padding:clamp(16px,3vw,28px);border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink)}
.shelf-practice h2{font-size:clamp(1.35rem,3vw,1.75rem);line-height:1.25}
.shelf-practice p{max-width:74ch}
.shelf-practice .sp-intro{margin:.6rem 0 1rem;color:var(--muted)}
.shelf-practice .sp-picker{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:1rem 0}
.shelf-practice .sp-picker label{font-size:1rem}
.shelf-practice .sp-picker select{min-height:48px;min-width:min(100%,230px);max-width:100%}
.shelf-practice .sp-questions{list-style:none;margin:0;padding:0}
.shelf-practice .sp-question{margin:22px 0 0;padding:22px 0 0;border-top:1px solid var(--line)}
.shelf-practice .sp-questions>li:first-child .sp-question{border-top:0;padding-top:0;margin-top:0}
.shelf-practice .sp-question-title{font-size:1rem;line-height:1.4;color:var(--muted);margin:0 0 12px}
.shelf-practice .sp-stem{font-size:1.04rem;line-height:1.65}
.shelf-practice .sp-stem p{margin:.6rem 0 1rem}
.shelf-practice fieldset{border:0;min-width:0;margin:16px 0 12px;padding:0}
.shelf-practice .sp-legend{font-size:.9rem;color:var(--muted);margin-bottom:8px}
.shelf-practice .sp-choice{display:flex;align-items:flex-start;gap:10px;min-height:48px;padding:12px 14px;margin:8px 0;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-size:1rem;font-weight:400;cursor:pointer;line-height:1.5}
.shelf-practice .sp-choice:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.shelf-practice .sp-choice input{margin:5px 0 0;flex:0 0 auto;width:17px;height:17px;accent-color:var(--accent)}
.shelf-practice .sp-letter{font-weight:700;flex:0 0 1.1em}
.shelf-practice .sp-choice-text{min-width:0;overflow-wrap:anywhere}
.shelf-practice .sp-check,.shelf-practice .sp-reset{font:inherit;font-weight:700;min-height:46px;border:1px solid var(--accent);border-radius:7px;padding:10px 18px;cursor:pointer}
.shelf-practice .sp-check{background:var(--accent);color:#fff}
:root[data-bw-study-scheme="dark"] .shelf-practice .sp-check{color:#10111b}
.shelf-practice .sp-reset{background:transparent;color:var(--accent)}
.shelf-practice .sp-feedback{margin:.5rem 0;font-weight:700}
.shelf-practice .sp-feedback:empty{display:none}
.shelf-practice [data-outcome="correct"] .sp-feedback{color:var(--ok)}
.shelf-practice [data-outcome="wrong"] .sp-feedback{color:var(--ink)}
.shelf-practice .sp-answer{margin:16px 0;border:1px solid var(--line);border-radius:8px;padding:0 14px;background:var(--paper)}
.shelf-practice .sp-answer>summary{font-weight:700;min-height:48px;display:list-item;padding:12px 0;cursor:pointer}
.shelf-practice .sp-answer[open]>summary{border-bottom:1px solid var(--line);margin-bottom:14px}
.shelf-practice .sp-answer h4{font-size:1rem;margin:16px 0 8px}
.shelf-practice .sp-why{margin:10px 0}
.shelf-practice .sp-sources{font-size:.9rem;overflow-wrap:anywhere}
.shelf-practice .sp-footer{margin-top:22px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.shelf-practice :is(button,select,input,summary,a):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.shelf-practice img{display:block;max-width:100%;height:auto}
.shelf-practice figure{margin:1rem 0}
.shelf-practice figcaption{font-size:.88rem;color:var(--muted)}
.shelf-practice .phq-labs,.shelf-practice .phq-lab-block,.shelf-practice .tablewrap{max-width:100%;overflow-x:auto}
.shelf-practice table{font-size:.9rem;max-width:100%}
.shelf-practice [hidden]{display:none!important}
@media(max-width:560px){.shelf-practice{padding:16px 12px;margin-left:0;margin-right:0}.shelf-practice .sp-choice{padding:12px 10px}.shelf-practice .sp-stem{font-size:1rem}.shelf-practice .sp-picker select{width:100%}.shelf-practice .sp-answer{padding:0 10px}}

/* Complement the measured shared-header padding without changing document flow. */
[data-shelf-practice],[data-shelf-practice] [data-shelf-question],[data-shelf-practice] .sp-stem{scroll-margin-top:calc(var(--sp-header-clearance,0px) + 1rem)!important}

/* Keep full laboratory rows readable inside narrow public shelf cards. */
.shelf-practice .phq-stem-lab-block{width:100%;max-width:100%;overflow-x:auto}
/* Inline shelf lab tables use the full question width. */
html:root body .shelf-practice .phq-stem-lab-table{width:100%;min-width:0;max-width:100%;inline-size:100%!important;min-inline-size:0!important;max-inline-size:100%!important;table-layout:fixed!important}
html:root body .shelf-practice .phq-stem-lab-table :is(th,td){min-inline-size:0!important;white-space:normal;overflow-wrap:anywhere}
