[hidden] { display: none !important; }
.ep-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.page { display: flex; flex-direction: column; gap: var(--ep-space-300); margin-inline: auto; max-width: var(--ep-layout-width-prose); }
.page.wide { max-width: var(--ep-layout-width-page); }
.stack { display: flex; flex-direction: column; gap: var(--ep-space-200); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ep-space-100); }
.muted { color: var(--ep-color-text-secondary); font: var(--ep-font-body-sm); }
.cc { padding-inline-start: var(--ep-space-150); color: var(--ep-color-text-secondary); font: var(--ep-font-label-md); }
.form { display: flex; flex-direction: column; gap: var(--ep-space-300); max-width: var(--ep-layout-width-form); }
.portion { display: flex; flex-direction: column; gap: var(--ep-space-200); padding: var(--ep-space-200); border: var(--ep-border-width-thin) solid var(--ep-color-border-default); border-radius: var(--ep-radius-container); }
.section { display: flex; flex-direction: column; gap: var(--ep-space-200); }
.slug-cell { display: flex; flex-direction: column; }
ep-top-bar a { color: var(--ep-color-text-primary); font: var(--ep-font-heading-sm); text-decoration: none; }
.row.end { align-items: flex-end; }
#prem { align-items: flex-start; }
#prem > ep-button { margin-top: 1.6rem; }
/* Logo: wordmark ≥80px wide with clear space of half its height (design system rule). */
.brand { display: flex; align-items: center; gap: var(--ep-space-150); }
.brand img { display: block; height: 28px; width: auto; }
.help-head { display: flex; align-items: center; gap: var(--ep-space-150); }

/* Exam portion: a summary in the form, chosen in a modal where each chapter opens to its topics. */
.portion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ep-space-150); }
.portion-head h3 { margin: 0; }
.psum-list, .pm-list, .pm-topics { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.psum-list { gap: var(--ep-space-50); }
.psum, .pm-toggle { display: flex; flex: 1; align-items: center; gap: var(--ep-space-150); min-width: 0; padding: var(--ep-space-100) var(--ep-space-150); border: 0; border-radius: var(--ep-radius-md); background: none; color: var(--ep-color-text-primary); font: inherit; text-align: start; cursor: pointer; }
.psum { width: 100%; border-inline-start: 4px solid var(--cat); }
.psum:hover, .pm-toggle:hover { background: var(--ep-color-surface-muted); }
.psum-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.psum-text strong { font: var(--ep-font-label-md); }
.psum-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar { flex: none; width: 4.5rem; height: 6px; overflow: hidden; border-radius: var(--ep-radius-full); background: var(--ep-color-surface-muted); }
.pbar > span { display: block; height: 100%; border-radius: inherit; background: var(--cat); }
.pcount { flex: none; min-width: 3.25em; color: var(--ep-color-text-secondary); font: var(--ep-font-label-sm); text-align: end; }
.pm-list { gap: var(--ep-space-100); margin-block: var(--ep-space-200); }
.pm-ch { border: var(--ep-border-width-thin) solid var(--ep-color-border-default); border-radius: var(--ep-radius-container); }
.pm-ch.in { border-inline-start: 4px solid var(--cat); }
.pm-ch.open { box-shadow: var(--ep-shadow-md); }
.pm-row { display: flex; align-items: center; gap: var(--ep-space-50); padding-inline-start: var(--ep-space-150); }
.pm-check { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ep-color-accent-default); cursor: pointer; }
.pm-ch.open .pm-toggle { border-end-end-radius: 0; border-end-start-radius: 0; }
.pm-topics { padding: var(--ep-space-50) var(--ep-space-150) var(--ep-space-150); border-top: var(--ep-border-width-thin) solid var(--ep-color-border-default); }
.pm-topic { position: relative; display: flex; align-items: center; gap: var(--ep-space-150); width: 100%; padding: var(--ep-space-100) var(--ep-space-100) var(--ep-space-100) var(--ep-space-50); border: 0; border-radius: var(--ep-radius-md); background: none; color: var(--ep-color-text-secondary); font: var(--ep-font-body-md); text-align: start; cursor: pointer; }
.pm-topic[aria-pressed=true] { color: var(--ep-color-text-primary); }
/* A vertical line through the dots; the covered stretch is in the chapter colour. */
.pm-topic::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: calc(var(--ep-space-50) + 0.4375rem); width: 2px; background: var(--ep-color-border-default); }
.pm-topic[aria-pressed=true]::before { background: var(--cat); }
.pm-topics li:first-child .pm-topic::before { top: 50%; }
.pm-topics li:last-child .pm-topic::before { bottom: 50%; }
.pm-dot { position: relative; flex: none; width: 1rem; height: 1rem; border: 2px solid var(--ep-color-border-strong); border-radius: var(--ep-radius-full); background: var(--ep-color-surface-default); }
.pm-topic[aria-pressed=true] .pm-dot { border-color: var(--cat); background: var(--cat); }
.pm-name { flex: 1; min-width: 0; }
.pm-hint { color: var(--cat-fg); font: var(--ep-font-label-sm); opacity: 0; }
.pm-topic:hover, .pm-topic:focus-visible { background: var(--cat-bg); }
.pm-topic:hover .pm-hint, .pm-topic:focus-visible .pm-hint { opacity: 1; }
/* Hovering previews the result: topics after the hovered one fade. */
.pm-topics:hover li:hover ~ li .pm-topic { opacity: 0.45; }
.pm-total { margin-inline-end: auto; color: var(--ep-color-text-secondary); font: var(--ep-font-label-md); }
/* Shared by the exam-portion picker. */
.chev { transition: transform var(--ep-motion-duration-fast); }
.open .chev { transform: rotate(180deg); }
[aria-invalid=true] { border-color: var(--ep-color-border-danger) !important; background: var(--ep-color-feedback-danger-background) !important; }
@media (max-width: 480px) {
  .pbar { display: none; }
  .pm-total { flex-basis: 100%; }
}
@media (hover: none) {
  .pm-hint { opacity: 1; }
}
