/* Shared learner design, continuous with the starting-point Dashboard.
   Paper #fffdf6, ink #293e33, secondary #52665a, green #3d6852,
   rule #e1d7bd. Home and the XPNova identity retain their own composition. */
.q-clock-control { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 5px; margin: -4px -7px -4px 2px; background: transparent; border: 0; border-radius: 5px; color: inherit; cursor: pointer; }
.q-clock-control:hover { background: #2f6b4f15; }
.q-clock-control svg { width: 16px; height: 16px; stroke-width: 2.5; }
.q-pause-screen { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 360px; padding: 36px 20px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.q-pause-screen > svg { width: 32px; height: 32px; fill: none; stroke: var(--forest); stroke-width: 2; }
.q-pause-screen h1, .q-pause-screen p { margin: 0; }
.q-pause-screen a { font-size: 14px; color: var(--forest); }
.mini-test { --mini-test-size: min(320px, calc(100vw - 32px), calc(100dvh - 24px)); position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; width: var(--mini-test-size); height: var(--mini-test-size); overflow: hidden; background: #fffdf6; color: #293e33; border: 1px solid #d6c7a2; border-radius: 16px; box-shadow: 0 8px 30px #143b2529; font: 14px/1.45 var(--font-body); animation: dock-test .25s ease-out; }
.mini-test-header { display: flex; flex-shrink: 0; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px 6px 16px; background: #2f6b4f; color: #fff8e7; font-size: 12px; }
.mini-pause-mark { font-size: 17px; font-weight: 700; }
.mini-test-time { margin-inline-start: auto; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-test-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 14px 16px 16px; }
.mini-test-summary { display: flex; flex-shrink: 0; align-items: baseline; gap: 8px; }
.mini-test-summary strong { font-size: 16px; font-weight: 600; }
.mini-test-body p { flex-shrink: 0; margin: 4px 0 8px; color: #52665a; font-size: 12px; }
.mini-test-progress { color: #52665a; font-size: 12px; }
.mini-test-question { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; flex: 1; min-height: 0; margin-top: 12px; overflow: hidden; overflow-wrap: anywhere; white-space: pre-line; color: #293e33; font-size: 14px; line-height: 1.5; }
.mini-test-controls { display: flex; gap: 2px; margin-inline-start: auto; }
.mini-test-control { display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.mini-test-control svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini-test-control:hover { background: #ffffff1f; }
.mini-test-control:focus-visible { outline: 3px solid #f7c94b; outline-offset: -2px; }
body.has-paused-test .app-foot { padding-bottom: 360px; }
@keyframes dock-test { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .mini-test { right: 12px; bottom: 12px; } .q-clock-control { width: 36px; height: 36px; } }
body.workspace-mode {
  --font: var(--font-body);
  --serif: var(--font-heading);
  --serif-display: var(--font-heading);
  --radius: 8px;
  --radius-sm: 7px;
  --radius-lg: 10px;
  --shadow: none;
  --shadow-lg: none;
}
.workspace-page {
  --lp-paper: #fffdf6;
  --lp-green: #3d6852;
  --lp-soft: #eef2e5;
  --lp-line: #e1d7bd;
  max-width: 1120px;
  min-width: 0;
  margin-inline: auto;
  padding: 8px 0 40px;
  color: #293e33;
  font: 17px/1.6 var(--font);
  overflow-wrap: anywhere;
}
.workspace-page > .learning-page { padding: 0; font-family: var(--font); }
.workspace-page :is(h1, h2, h3, h4, button, input, select, textarea) { font-family: var(--font); }
.workspace-page :is(h1, h2, h3, h4) { font-family: var(--font-heading); text-wrap: balance; font-weight: 700; }
.workspace-page h1 { font-size: clamp(30px, 3.5vw, 45px); line-height: 1.16; letter-spacing: -1.2px; }
.workspace-page h2 { font-size: 25px; line-height: 1.28; letter-spacing: -.5px; }
.workspace-page h3 { font-size: 20px; line-height: 1.4; }
.workspace-page .lp-heading h1 { margin: 7px 0 14px; }
.workspace-page .lp-heading p { margin: 0; }
.workspace-page .lp-heading > p:first-child { margin-bottom: 8px; }
.workspace-page p { color: #52665a; max-width: 72ch; }
.workspace-page :is(strong, b) { font-weight: 600; }
.workspace-page :is(a, button, summary, input, select, textarea):focus-visible,
body.workspace-mode :is(.nav-item, .btn, .sa-subject, .modal button):focus-visible {
  outline: 3px solid #3d6852; outline-offset: 4px;
}
body.workspace-mode .app-header :is(a, button):focus-visible { outline-color: #f7c94b; }
.workspace-page :is(a, button), body.workspace-mode .modal button { touch-action: manipulation; }
.workspace-page .btn, body.workspace-mode .modal .btn {
  font-size: 15px; font-weight: 600; min-height: 44px; padding: 10px 18px;
  border-width: 1px; border-radius: 7px; box-shadow: none;
  white-space: normal; text-align: center;
}
.workspace-page .btn:active, body.workspace-mode .modal .btn:active { transform: none; }
.workspace-page .btn-primary { background: var(--forest); color: #fff8e7; }
body.workspace-mode .nav-item { font-size: 14px; font-weight: 600; }
body.workspace-mode .side-stat { border-width: 1px; }
body.workspace-mode .side-stat strong { font-weight: 600; }
body.workspace-mode .side-stat span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.workspace-page .page-head { margin: 0 0 30px; }
.workspace-page .page-head h1 { margin: 7px 0 14px; }
.workspace-page .page-head p { font-size: 17px; line-height: 1.6; }
.workspace-page .eyebrow { font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.workspace-page .page-nova { display: none; }
.workspace-page .section-title { font-size: 21px; font-weight: 700; letter-spacing: -.3px; text-transform: none; margin: 30px 0 16px; }
.workspace-page :is(.card, .doc, .review-item, .table-wrap, .benchmark-box, .auth-card, .consent-card, .plan-card, .notice-box, .focus-box) {
  background: var(--lp-paper); border-width: 1px; border-color: var(--lp-line); box-shadow: none; border-radius: 8px;
}
.workspace-page .empty-state {
  padding: 32px; text-align: left; background: var(--lp-paper); border-left: 4px solid var(--lp-green);
}
.workspace-page .empty-state > svg { display: none; }
.workspace-page .empty-state h3 { font-size: 23px; margin: 0 0 12px; }
.workspace-page .empty-state p { margin-bottom: 0; }
.workspace-page .empty-state a { text-decoration: underline; text-underline-offset: 4px; }
.workspace-page :is(.hist-summary, .result-stats) { gap: 0; margin: 24px 0 32px; }
.workspace-page .rstat { border: 0; border-bottom: 1px solid var(--lp-line); border-radius: 0; padding: 18px 20px 18px 0; background: transparent; }
.workspace-page .rs-label { font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.workspace-page .rs-value { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.workspace-page .table-wrap { overflow-x: auto; }
.workspace-page table { font-variant-numeric: tabular-nums; }
.workspace-page table th { text-transform: none; letter-spacing: 0; font-weight: 600; }
.workspace-page .hist th, .workspace-page .hist td { padding: 14px 16px; }
.workspace-page .hist .session-name { display: block; color: #52665a; font-size: 13px; }
.workspace-page :is(.subject-tabs, .range-tabs) { gap: 8px; }
.workspace-page :is(.subject-tab, .range-tab, .subtab) { font-weight: 500; border-width: 1px; min-height: 44px; display: inline-flex; align-items: center; }
.workspace-page :is(.subject-tab.active, .range-tab.active, .subtab.active) { font-weight: 600; }
.workspace-page .pill { font-size: 12px; font-weight: 500; }
.workspace-page .review-item { margin-bottom: 16px; }
.workspace-page .ri-head { padding: 20px; }
.workspace-page .ri-num { font-weight: 500; }
.workspace-page .review-body { padding: 0 24px 24px; }
.workspace-page .ri-stem { line-height: 1.6; font-size: 16px; }
.workspace-page :is(.q-panel, .q-nav, .option) { box-shadow: none; border-width: 1px; border-radius: 8px; }
.workspace-page .q-nav { border-radius: 18px; }
.workspace-page .option { min-height: 56px; }
.workspace-page .q-panel h2 { letter-spacing: normal; }
.workspace-page .doc { max-width: 82ch; margin-inline: auto; font-size: 17px; line-height: 1.75; }
.workspace-page .doc :is(h1, h2, h3, h4) { letter-spacing: -.3px; }
.workspace-page .doc h1 { font-size: 30px; }
.workspace-page .doc h2 { font-size: 24px; }
.workspace-page .doc h3 { font-size: 20px; }
.workspace-page .doc :is(th, td) { border-width: 1px; }
.workspace-page .doc table { display: block; overflow-x: auto; max-width: 100%; }
.workspace-page .result-hero { background: var(--lp-paper); border: 1px solid var(--lp-line); border-radius: 8px; box-shadow: none; }
.workspace-page .result-hero .rh-body h1 { font-weight: 700; font-size: 30px; }
.workspace-page .plan-name { font-weight: 700; }
.workspace-page .plan-price { font-size: 36px; font-weight: 700; }
/* The featured plan keeps its dark surface: its pale text belongs to that
   surface, rather than the shared paper-card reset above. */
.workspace-page .plan-best { background: var(--forest); border-color: var(--forest-sh); overflow: visible; }
.workspace-page .plan-best .plan-badge { position: absolute; align-self: flex-start; }
.workspace-page .plan-best .plan-btn { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.workspace-page .fld :is(input, select) { font-size: 16px; border-width: 1px; }

/* Public exam selection: the same measured type and paper as Dashboard. */
.workspace-page .sa-head { max-width: 72ch; }
.workspace-page .sa-head h1 { font-size: clamp(30px, 3.5vw, 45px); font-weight: 700; }
.workspace-page .sa-head p { font-size: 17px; }
.lp-exams { list-style: none; padding: 0; margin: 0 0 28px; }
.lp-exam { padding: 28px 30px; background: var(--lp-paper); border-left: 4px solid var(--lp-green); }
.lp-exam + .lp-exam { margin-top: 20px; }
.lp-exam-line { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 12px; }
.lp-exam h2 { font-size: 24px; margin: 0; }
.lp-exam p { margin: 0; font-size: 16px; }
.lp-exam .sa-style { white-space: normal; }
.lp-catalogue-next { border-top: 1px solid var(--lp-line); padding: 22px 0 0; }
.lp-catalogue-next p { font-size: 15px; }
.workspace-page .sa-legal { font-size: 13px; }
.lp-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 28px 0 38px; }
.lp-method { display: block; color: inherit; border-top: 2px solid var(--lp-green); padding-top: 18px; text-decoration: none; }
.lp-method h2 { font-size: 22px; margin: 0 0 10px; }
.lp-method p { font-size: 15px; margin: 0; }
.lp-method:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.lp-resource-list { display: grid; gap: 0; margin: 24px 0 32px; }
.lp-resource { display: block; text-decoration: none; color: inherit; padding: 24px 0; border-bottom: 1px solid var(--lp-line); }
.lp-resource:first-child { border-top: 1px solid var(--lp-line); }
.lp-resource h2 { font-size: 23px; margin: 0 0 10px; }
.lp-resource p { font-size: 16px; margin: 0 0 12px; }
.lp-resource span { font-size: 14px; color: var(--lp-green); text-decoration: underline; text-underline-offset: 4px; }
.lp-resource:hover { background: var(--lp-soft); }
.lp-review-summary { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 0; font-size: 15px; color: #52665a; }
.workspace-page .lp-count { font-size: 34px; font-weight: 600; line-height: 1.2; margin-bottom: 12px; }
.workspace-page .lp-next h2 { font-size: 29px; }
.lp-history-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.lp-history-heading h2 { margin: 0; }
.workspace-page .link-row { border-width: 1px; box-shadow: none; }
.workspace-page .link-row:hover { box-shadow: none; }
.lp-subject-button { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.lp-subject-button:disabled { color: #52665a; cursor: default; }
.lp-subject-button:disabled:hover { background: none; }

/* Dialogs are outside #main; they use the same learner tokens explicitly. */
body.workspace-mode .modal { font-family: var(--font); border: 1px solid #e1d7bd; border-radius: 10px; background: #fffdf6; max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
body.workspace-mode .modal :is(h3, h4) { font-family: var(--font-heading); font-weight: 700; }
body.workspace-mode .modal strong { font-family: var(--font); font-weight: 600; }
body.workspace-mode .modal .sa-schools li { border-left: 2px solid #3d6852; border-radius: 0; background: #eef2e5; }
body.workspace-mode .modal .sa-subject { border-width: 1px; border-radius: 7px; box-shadow: none; min-height: 70px; }
body.workspace-mode .modal .sa-subject span { font-weight: 500; }
body.workspace-mode .modal .sa-choose { font-weight: 600; }

@media (max-width: 1000px) {
  .workspace-page { font-size: 16px; }
  .lp-methods { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 600px) {
  .workspace-page .page-head p, .workspace-page .sa-head p { font-size: 16px; }
  .lp-exam { padding: 24px 20px; }
  .lp-exam h2 { font-size: 22px; }
  .workspace-page .empty-state { padding: 24px 20px; }
  .workspace-page .lp-subject-button { align-items: flex-start; }
  .workspace-page .mistake-subtabs { flex-wrap: wrap; }
  .workspace-page .hist-summary, .workspace-page .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-page .review-body { padding: 0 16px 20px; }
  .workspace-page .ri-head { padding: 16px; }
  .workspace-page .lp-next h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  body.workspace-mode *, body.workspace-mode *::before, body.workspace-mode *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
}
