:where(body:has(#reader)) *{box-sizing:border-box}
body:where(:has(#reader)):not([data-physics1-practice]){margin:0;background:#f4f7fa;color:#20394a;font:16px/1.55 system-ui,sans-serif}
body:where(:has(#reader)):not([data-physics1-practice]) > header{display:flex;gap:24px;align-items:center;padding:20px 5%;background:#fff;border-bottom:1px solid #dce5ec}
body:where(:has(#reader)):not([data-physics1-practice]) > header small{margin-left:auto;color:#755b33}
body:where(:has(#reader)):not([data-physics1-practice]) > main{max-width:1360px;margin:24px auto;display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;padding:0 20px}
:where(body:has(#reader)) aside,:where(body:has(#reader)) #reader{background:#fff;border:1px solid #dce5ec;border-radius:12px;padding:20px}
:where(body:has(#reader)) main label{display:block;margin-bottom:14px}
:where(body:has(#reader)) main select,:where(body:has(#reader)) main input:not([type=radio]),:where(body:has(#reader)) main textarea{display:block;width:100%;padding:8px;margin-top:4px}
:where(body:has(#reader)) #questions{max-height:65vh;overflow:auto}
:where(body:has(#reader)) #questions button{display:block;width:100%;text-align:left;border:0;background:none;padding:10px;border-bottom:1px solid #edf1f5;color:#275675;cursor:pointer}
:where(body:has(#reader)) article{max-width:850px;margin:auto}
:where(body:has(#reader)) article p{white-space:pre-wrap}
:where(body:has(#reader)) .choice{display:flex;align-items:baseline;gap:10px}
:where(body:has(#reader)) .figure svg{display:block;max-width:100%;height:auto}
:where(body:has(#reader)) figure{margin:20px 0;border:1px solid #dce5ec;padding:12px;overflow:auto}
:where(body:has(#reader)) table{border-collapse:collapse;margin:auto;max-width:100%}
:where(body:has(#reader)) th,:where(body:has(#reader)) td{border:1px solid #9daeb8;padding:6px}
:where(body:has(#reader)) figcaption{font-size:.9em;color:#567}
:where(body:has(#reader)) main button,:where(body:has(#reader)) dialog button{cursor:pointer;padding:8px 12px}
:where(body:has(#reader)) .answer{background:#f3f8f6;padding:14px;border-radius:8px}
:where(body:has(#reader)) .part{border-left:3px solid #bbd5e5;padding-left:12px}
:where(body:has(#reader)) dialog{width:min(95vw,1000px);max-width:95vw;max-height:90vh}
:where(body:has(#reader)) dialog svg{width:100%;height:auto}
:where(body:has(#reader)) .dialog-area{overflow:auto;max-height:70vh}
:where(body:has(#reader)) dialog::backdrop{background:#0009}
@media(max-width:650px){
body:where(:has(#reader)):not([data-physics1-practice]) > main{display:block;padding:0 10px;margin:10px auto}
:where(body:has(#reader)) aside,:where(body:has(#reader)) #reader{margin-bottom:12px;padding:14px}
:where(body:has(#reader)) #questions{max-height:160px}
body:where(:has(#reader)):not([data-physics1-practice]) > header{gap:10px;padding:12px}
body:where(:has(#reader)):not([data-physics1-practice]) > header small{font-size:.65em}
}

/* Physics 1 uses the shared site header and course palette. */
.physics-practice-hero {
  padding-bottom: 24px;
}

.physics-practice-hero h1 {
  margin: 18px 0 4px;
}

.physics-practice-hero p {
  margin: 0;
}

.physics-practice-layout {
  display: grid;
  grid-template-columns: minmax(200px, 245px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding-block: 28px;
}

.physics-practice-layout :is(aside, #reader) {
  background: var(--ui-panel, #fff);
  border-color: var(--ui-border, #cfdeed);
}

.physics-practice-layout :is(aside, h2) {
  color: var(--navy);
}

.physics-practice-layout :is(input, select, textarea, button) {
  border: 1px solid var(--ui-border, #cfdeed);
  border-radius: 7px;
}

.physics-practice-layout :is(input, select, textarea) {
  background: var(--ui-panel, #fff);
  color: inherit;
}

.physics-practice-layout #questions button[aria-current="true"] {
  background: var(--sky);
  color: var(--navy);
  font-weight: 650;
}

.physics-practice-layout #reader article > h2:first-child {
  font-size: 24px;
}

.physics-practice-note {
  padding-bottom: 18px;
  color: var(--soft);
  font-size: 12px;
}

@media (max-width: 700px) {
  .physics-practice-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding-block: 18px;
  }
}

.course-shortcuts .physics-focus-figure {
  display: block;
  width: 180px;
  max-width: 100%;
  height: 135px;
  object-fit: contain;
}

@media (max-width: 700px) {
  .course-shortcuts .physics-focus-figure { height: 110px; }
}

@media (min-width: 761px) {
  [data-page="physics1-course"] .resource-grid { grid-auto-rows: 1fr; }
}

.resource-card-pending .resource-link { color: var(--soft); }
.resource-card-pending:hover { border-color: var(--ui-border); box-shadow: none; }

[data-physics1-practice] .physics-all-topics {
  display: grid;
  place-items: center;
  border: 1px dashed var(--ui-border);
  border-radius: 7px;
  background: var(--ui-panel);
  color: var(--ui-ink);
  text-decoration: none;
}

[data-physics1-practice] .topicbtn { text-decoration: none; }
[data-physics1-practice] .topicbtn[aria-current="page"] {
  background: var(--ui-selected);
  color: var(--ui-selection-ink);
  font-weight: 600;
}

[data-physics1-practice] #results .question { scroll-margin-block-start: 16px; }
[data-physics1-practice] #bankFilters #reset { grid-column: 1 / -1; }
[data-physics1-practice] #practiceTools .qb-extra-filters input { width: 100%; }
[data-physics1-practice] #results .topicbtn { border: 0; }
[data-physics1-practice] .kb-hint-panel[hidden] { display: none; }
[data-physics1-practice] #cartList { max-height: min(55dvh, 490px); overflow: auto; }
[data-physics1-practice] .physics-compare-actions { display: flex; align-items: center; gap: 10px; }
[data-physics1-practice] .membership-content form { display: inline-block; }
[data-physics1-practice] #physicsPrint { display: none; }

@media print {
  [data-physics1-practice].physics-printing > :not(#physicsPrint) { display: none !important; }
  [data-physics1-practice].physics-printing #physicsPrint { display: block; color: #172539; }
  [data-physics1-practice] #physicsPrint .qbody { padding: 0; }
  [data-physics1-practice] #physicsPrint .compare-answer { margin-top: 16px; }
  [data-physics1-practice] .physics-print-item { break-inside: avoid; margin-block-end: 24px; }
}

[data-physics1-practice] .choice .choice-content { white-space: pre-wrap; }
[data-physics1-practice] :is(.question, .compare-pane) :is(.stem, .prompt, .sol-content p) { white-space: pre-wrap; }

[data-physics1-practice] .compare-pane .choices { font-family: var(--font-question); }
[data-physics1-practice] .compare-header form { display: flex; }
[data-physics1-practice] .compare-header .modal-close { position: static; }
[data-physics1-practice] .qbody figure { margin-inline: 0; overflow: auto; }
[data-physics1-practice] .qbody figure svg { max-width: 100%; height: auto; }

@media (max-width: 760px) {
  [data-physics1-practice] #results .question .question-tools { display: block; }
}
