/* One subject-first workspace shared by tests and flashcards. */
:root { --pr-surface: #fff; --pr-subtle: #f7f8fc; --pr-accent: #5146c7; --pr-accent-soft: #eeecfb; }
.network-header { min-height: 66px; padding-block: 10px; }
.network-brand img { height: 34px; }
.pr-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: calc(100dvh - 66px); }
.pr-sidebar { background: var(--pr-surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 28px 16px 22px; position: sticky; top: 0; height: 100dvh; max-height: 100dvh; overflow-y: auto; }
.pr-brand-row { display: flex; align-items: center; gap: 8px; padding: 0 6px 30px; }
.pr-brand.room-brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; margin: 0; text-align: left; font-size: 18px; font-weight: 700; letter-spacing: -.6px; color: var(--ink); white-space: nowrap; }
.pr-brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .1em; font-weight: 550; }
.pr-brand-dot { color: var(--pr-accent); }
.pr-brand-icon { display: grid; place-items: center; width: 36px; height: 40px; border-radius: 10px; background: var(--pr-accent); color: white; flex-shrink: 0; }
.pr-brand-icon svg { width: 24px; height: 24px; }
.pr-nav-home { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; text-align: left; font-weight: 550; }
.pr-nav-home.active, .pr-subject-links button.active { background: var(--pr-accent-soft); color: var(--pr-accent); font-weight: 650; }
.pr-nav-home .icon { width: 18px; height: 18px; }
.pr-nav-label { font-size: 10px; font-weight: 650; color: var(--muted); letter-spacing: .11em; padding: 30px 12px 12px; }
.pr-subject { margin-bottom: 6px; }
.pr-subject > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 9px 10px; border-radius: 8px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 550; }
.pr-subject > summary::-webkit-details-marker { display: none; }
.pr-subject > summary strong { display: block; font-weight: 550; }
.pr-subject > summary small { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); }
.pr-subject > summary:hover, .pr-nav-home:not(.active):hover, .pr-subject-links button:not(.active):hover { background: var(--pr-subtle); }
.pr-subject-avatar { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 9px; flex-shrink: 0; background: #e8ecfb; color: #5365ab; font-size: 11px; font-weight: 700; letter-spacing: -.01em; }
.pr-subject-avatar[data-color="physiology"] { background: #e2f2ef; color: #2e796c; }
.pr-subject-avatar[data-color="psychology"] { background: #efe8f8; color: #8560a6; }
.pr-subject-avatar[data-color="biology"] { background: #e8f2df; color: #618239; }
.pr-chevron { margin-left: auto; font-size: 23px; font-weight: 400; color: var(--muted); transition: transform .15s; }
.pr-subject[open] > summary .pr-chevron { transform: rotate(90deg); }
.pr-subject-links { margin: 5px 0 12px 25px; border-left: 1px solid var(--line); padding-left: 12px; display: grid; gap: 4px; }
.pr-subject-links button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 9px 8px; background: transparent; border: 0; border-radius: 7px; text-align: left; font-size: 12px; color: var(--muted); }
.pr-subject-links .icon { width: 16px; height: 16px; }
.pr-subject-links small { margin-left: auto; font-size: 10px; font-variant-numeric: tabular-nums; }
.pr-sidebar-footer { margin-top: auto; padding: 38px 12px 4px; font-size: 11px; color: var(--muted); }
.pr-sidebar-footer span { display: block; margin-bottom: 12px; }
.pr-sidebar-footer a { color: var(--muted); text-decoration: none; }
.pr-sidebar-footer a:hover { color: var(--pr-accent); }
.pr-content { min-width: 0; }
.pr-contextbar { display: flex; align-items: center; gap: 16px; min-height: 65px; padding: 14px 36px; border-bottom: 1px solid var(--line); background: var(--pr-surface); }
#room-context { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
#room-context button { padding: 4px 0; border: 0; background: transparent; color: var(--muted); font-size: inherit; }
#room-context button:hover { color: var(--pr-accent); }
.pr-breadcrumb-current { font-weight: 600; color: var(--ink); }
.pr-access-badge { display: flex; align-items: center; gap: 7px; margin-left: auto; white-space: nowrap; color: var(--muted); font-size: 11px; }
.pr-access-badge > span { width: 6px; height: 6px; border-radius: 50%; background: #6a9a79; }
.pr-overview, .module-layout > main { width: 100%; max-width: 1360px; padding: 38px 36px 28px; }
.module-layout { min-height: 0; --blue: #5146c7; --blue-dark: #3f35a7; --blue-pale: #eeecfb; }
.module-layout h1 { font-size: clamp(1.9rem, 2.6vw, 2.8rem); font-weight: 600; }
.module-layout .setup-heading { margin-bottom: 28px; }
.module-layout .setup-heading .eyebrow { font-size: 10px; margin-bottom: 9px; }
.module-layout .subject-description { font-size: 14px; max-width: 650px; }
.module-layout .bank-count strong { font-family: inherit; font-size: 38px; font-weight: 550; letter-spacing: -.04em; }
.module-layout .bank-count { gap: 12px; }
.module-layout .bank-count span { font-size: 12px; }
.module-layout .setup-card { box-shadow: 0 2px 4px #14253d03; }
.module-layout .page-footer { padding-inline: 36px; }
.pr-welcome { margin-bottom: 42px; }
.pr-welcome .eyebrow { color: var(--pr-accent); font-size: 10px; margin-bottom: 14px; }
.pr-welcome h1 { font-size: clamp(1.85rem, 2.7vw, 2.6rem); font-weight: 620; letter-spacing: -.04em; }
.pr-welcome > p:not(.eyebrow) { color: var(--muted); font-size: 15px; margin-top: 14px; }
.pr-library-stats { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.pr-library-stats strong { font-weight: 650; color: var(--ink); margin-right: 4px; }
.pr-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pr-section-heading h2 { font-size: 17px; }
.pr-section-heading > :is(span, p) { font-size: 12px; color: var(--muted); }
.pr-subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pr-subject-card { background: var(--pr-surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; box-shadow: 0 3px 10px #14253d03; }
.pr-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pr-card-heading .pr-subject-avatar { width: 42px; height: 42px; border-radius: 12px; font-size: 13px; }
.pr-course-code { color: var(--muted); font-size: 10px; letter-spacing: .08em; font-weight: 600; }
.pr-subject-card h3 { font-size: 20px; letter-spacing: -.02em; font-weight: 600; }
.pr-subject-card > p { color: var(--muted); font-size: 13px; line-height: 1.75; margin: 10px 0 24px; }
.pr-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.pr-card-actions button { display: flex; align-items: center; gap: 9px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; min-height: 64px; }
.pr-card-actions button:hover { border-color: var(--pr-accent); background: var(--pr-accent-soft); }
.pr-card-actions .icon { width: 18px; height: 18px; color: var(--pr-accent); }
.pr-card-actions strong { display: block; font-size: 12px; font-weight: 600; }
.pr-card-actions small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.pr-action-arrow { color: var(--muted); margin-left: auto; font-size: 14px; }
.pr-library-note { color: var(--muted); font-size: 11px; margin-top: 26px; }
.pr-icon-button { display: inline-grid; place-items: center; padding: 6px; min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--pr-surface); font-size: 24px; }
.pr-mobile-only, .pr-scrim { display: none; }
.pr-sidebar summary:focus-visible { outline: 3px solid #667ff0; outline-offset: 2px; }
.pr-sidebar summary, .fc-tree summary { -webkit-tap-highlight-color: transparent; }
.skip-link:not(:focus) { opacity: 0; pointer-events: none; }
body.dark-mode { --pr-surface: #182536; --pr-subtle: #223247; --pr-accent: #bab3ff; --pr-accent-soft: #323251; }
body.dark-mode .pr-brand-icon { background: #7466de; }
body.dark-mode .pr-subject-avatar { background: #2e3b5b; color: #b8c6f5; }
body.dark-mode .pr-subject-avatar[data-color="physiology"] { background: #25453f; color: #9ed7cb; }
body.dark-mode .pr-subject-avatar[data-color="psychology"] { background: #403352; color: #cfb5ec; }
body.dark-mode .pr-subject-avatar[data-color="biology"] { background: #344730; color: #bbd99b; }
body.dark-mode .module-layout { --blue: #bab3ff; --blue-dark: #d2ccff; --blue-pale: #323251; }
@media (max-width: 1200px) {
  .pr-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .pr-overview, .module-layout > main { padding: 30px 24px 24px; }
  .pr-contextbar { padding-inline: 24px; }
  .pr-subject-card { padding: 20px; }
  .pr-card-actions { grid-template-columns: 1fr; }
  .pr-card-actions button { min-height: 55px; }
  .pr-brand.room-brand { font-size: 17px; gap: 8px; }
  .pr-brand-icon { width: 32px; }
}
@media (max-width: 1050px) {
  .fc-settings, .session-settings { grid-row: auto; }
}
@media (max-width: 980px) {
  .pr-shell { grid-template-columns: minmax(0, 1fr); }
  .pr-sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(300px, calc(100vw - 40px)); z-index: 41; box-shadow: 20px 0 80px #10192530; }
  .sidebar-open .pr-sidebar { display: flex; }
  .sidebar-open .pr-scrim { display: block; position: fixed; inset: 0; z-index: 40; border: 0; background: #10192580; width: 100%; height: 100%; }
  body:has(.sidebar-open) { overflow: hidden; }
  .pr-mobile-only { display: inline-grid; }
  .pr-brand-row { justify-content: space-between; }
  #room-sidebar-close { border: 0; }
  .pr-brand.room-brand { font-size: 18px; }
  .pr-card-actions { grid-template-columns: 1fr 1fr; }
  .pr-access-badge { display: none; }
}
@media (max-width: 620px) {
  .pr-subject-grid { grid-template-columns: 1fr; gap: 14px; }
  .pr-overview, .module-layout > main { padding: 28px 18px 22px; }
  .pr-contextbar { padding: 12px 18px; gap: 12px; }
  #room-context { gap: 7px; font-size: 11px; }
  .pr-welcome { margin-bottom: 32px; }
  .pr-welcome h1 { font-size: 30px; }
  .pr-welcome > p:not(.eyebrow) { font-size: 14px; }
  .pr-library-stats { gap: 8px 15px; font-size: 11px; }
  .pr-section-heading > :is(span, p) { display: none; }
  .pr-card-heading { margin-bottom: 16px; }
  .pr-subject-card { padding: 20px; }
  .pr-card-actions button { padding: 10px; gap: 6px; }
  .pr-action-arrow { display: none; }
  .module-layout .page-footer { padding-inline: 18px; }
  .module-layout .bank-count strong { font-size: 32px; }
  .network-header { min-height: 66px; }
}
@media (prefers-reduced-motion: reduce) { .pr-chevron { transition: none; } }
