/* Site-wide appearance. Learning diagrams and feedback keep their semantic colors. */
:root:not([data-ui-theme="classic"]) {
  --q-page:#fff9ec;--q-paper:#fffdf6;--q-ink:#23463e;--q-muted:#52665a;--q-line:#c8cbb6;--q-control:#748675;
  --q-teal:#23463e;--q-primary:#285647;--q-mint:#e1eacf;--q-mint-hover:#d3dfbd;--q-mist:#f4e7be;
  --q-coral:#b14d36;--q-coral-hover:#8c3a28;--q-focus:#285647;
  --theme-radius:17px;--theme-shadow:3px 4px 0 #d8dcc6;
  --theme-heading:ui-rounded,"Trebuchet MS",system-ui,sans-serif;--theme-weight:650;
  --theme-texture:radial-gradient(#78866412 .7px,transparent .7px);--theme-texture-size:7px 7px;
}
:root[data-ui-theme="atlas"] {
  --q-page:#f7f4ee;--q-paper:#fffefb;--q-ink:#203b40;--q-muted:#58636d;--q-line:#d4d1db;--q-control:#79858c;
  --q-teal:#203b40;--q-primary:#235761;--q-mint:#e1ece7;--q-mint-hover:#d1e1da;--q-mist:#eeebf5;
  --q-coral:#925034;--q-coral-hover:#743d27;--q-focus:#235761;
  --theme-radius:6px;--theme-shadow:0 5px 20px #203b4009;
  --theme-heading:Georgia,"Times New Roman",serif;--theme-weight:500;
  --theme-texture:linear-gradient(#203b4004 1px,transparent 1px),linear-gradient(90deg,#203b4004 1px,transparent 1px);--theme-texture-size:28px 28px;
}
:root[data-ui-theme="studio"] {
  --q-page:#fffcf5;--q-paper:#fff;--q-ink:#173f42;--q-muted:#53666a;--q-line:#c8d7d5;--q-control:#708889;
  --q-teal:#173f42;--q-primary:#205b5d;--q-mint:#cce8df;--q-mint-hover:#b9dbd0;--q-mist:#e8e1f4;
  --q-coral:#ac4938;--q-coral-hover:#8b392b;--q-focus:#205b5d;
  --theme-radius:24px;--theme-shadow:none;--theme-heading:system-ui,sans-serif;--theme-weight:720;
  --theme-texture:none;--theme-texture-size:auto;
}
html:not([data-ui-theme="classic"]) body[data-q-theme] {
  --ink:var(--q-ink);--muted:var(--q-muted);--line:var(--q-line);--border:var(--q-line);--cream:var(--q-page);--paper:var(--q-paper);
  background-color:var(--q-page);background-image:var(--theme-texture);background-size:var(--theme-texture-size);color:var(--q-ink);
}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(h1,h2,h3) {font-family:var(--theme-heading);font-weight:var(--theme-weight);color:var(--q-ink)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.card,.subject-card,.orientation-card,.f-intro,.f-question,.f-evidence article,.route-card,.step-card,.lab-card,.hint-card,.criteria-card,.evidence-card,.practice-card,.learning-entry,.report-handoff,.qa-shell,.qs-request-panel,.qf-left-surface.qs-subject-panel) {
  background-color:var(--q-paper);border-color:var(--q-line);border-radius:var(--theme-radius);box-shadow:var(--theme-shadow);
}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.site-header,.qa-header,.topbar,.f-site-header,header.q-brand-header) {
  background:var(--q-paper);color:var(--q-ink);border-color:var(--q-line);
}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.subject-home-nav) {background:var(--q-page);color:var(--q-muted);border-color:var(--q-line)}
/* Header text that was colored for the dark Classic header takes the muted ink on the light headers. */
html:not([data-ui-theme="classic"]) body[data-q-theme] .site-header .header-copy small {color:var(--q-muted)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.header-button,.qa-language) {background-color:var(--q-paper);color:var(--q-ink);border-color:var(--q-control)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.site-header,header.q-brand-header) :is(a:not(.q-brand),.product-name,.preview-subject,.preview-purpose,.qh-description-title,.qh-description-detail) {color:var(--q-ink)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.site-header,header.q-brand-header) :is(a,button,select):focus-visible {outline-color:var(--q-focus)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.report-handoff,.f-quote,.first-thought,.written-answer,.f-view-controls,.view-tabs) {background:var(--q-mist)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.report-learning-focus,.goal-report-option,.feedback-section) {background:var(--q-mint);border-color:var(--q-line)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.f-activity-nav .f-toolbar,.lesson-sidebar,.sidebar,.route-nav) {background-color:var(--q-paper);border-color:var(--q-line)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.primary,.btn,.f-primary,.f-secondary-link,.secondary,.quiet,.subject-link,.project-link,.challenge-link,.lesson-link,.area-nav) {border-radius:clamp(6px,var(--theme-radius),16px)}
html body[data-q-theme] .q-theme-bar {
  box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;
  max-width:1900px;min-width:0;margin:0 auto 14px;padding:10px 24px;
  background:var(--q-paper);color:var(--q-ink);border-bottom:1px solid var(--q-line);
  font:13px/1.4 system-ui,sans-serif;
}
.q-theme-label {font-weight:650}
.q-theme-choices {display:flex;gap:5px;min-width:0}
/* Each choice shows a small preview of its appearance. The selected one gets a tint, an outline and a
   check badge on its preview; the font weight never changes, so no control moves between themes. */
html body[data-q-theme] .q-theme-bar button {
  position:relative;display:inline-flex;align-items:center;justify-content:flex-start;gap:9px;min-height:44px;text-align:left;
  margin:0;padding:5px 12px 5px 5px;border:1px solid var(--q-line);border-radius:12px;
  font:inherit;font-weight:500;background:var(--q-paper);color:var(--q-ink);box-shadow:none;cursor:pointer;
}
html body[data-q-theme] .q-theme-bar button:hover {border-color:var(--q-primary)}
html body[data-q-theme] .q-theme-bar button[aria-pressed="true"] {background:var(--q-mint);border-color:var(--q-primary);box-shadow:inset 0 0 0 1px var(--q-primary)}
html body[data-q-theme] .q-theme-bar button:focus-visible {outline:3px solid var(--q-focus);outline-offset:2px}
.q-theme-thumb {display:block;flex:none;width:40px;height:29px;border-radius:7px;overflow:hidden;box-shadow:0 0 0 1px #0000001f}
.q-theme-thumb svg {display:block;width:100%;height:100%}
.q-theme-check {position:absolute;left:35px;top:calc(50% + 3px);display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--q-primary);color:#fff;box-shadow:0 0 0 2px var(--q-mint);visibility:hidden}
html body[data-q-theme] .q-theme-bar button[aria-pressed="true"] .q-theme-check {visibility:visible}
html body[data-q-theme] .q-theme-bar .q-theme-toggle {display:none}
.q-theme-caret {display:grid;place-items:center;color:var(--q-muted)}
.q-theme-note {margin-left:auto;font-size:12px;color:var(--q-muted)}
html:not([data-ui-theme="classic"]) body[data-q-theme] .challenge-link {background:var(--q-mist);border-color:var(--q-control);color:var(--q-ink)}
html:not([data-ui-theme="classic"]) body[data-q-theme] .project-link {background:var(--q-mint);color:var(--q-primary)}
html:not([data-ui-theme="classic"]) body[data-q-theme] :is(.topic-label,.subject-home-nav a) {color:var(--q-primary)}
/* The map, subject blocks and every course share these surfaces. */
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home {--qa-paper:var(--q-paper);--qa-card:var(--q-paper);--qa-header:var(--q-paper);--qa-header-ink:var(--q-ink);--qa-blue-soft:var(--q-mist);background-image:var(--theme-texture);background-size:var(--theme-texture-size)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .qh-site-header {border:1px solid var(--q-line);border-radius:var(--theme-radius);box-shadow:var(--theme-shadow)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .qh-site-header .qf-page-nav {background:var(--q-page);border-color:var(--q-line);border-radius:var(--theme-radius)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .qh-site-header .qf-page-choice {color:var(--q-ink);white-space:normal}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .qh-site-header .qf-page-choice[aria-current="page"] {background:var(--q-mint);color:var(--q-teal)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .learning-subject-buttons button {background:var(--q-paper);border-radius:clamp(6px,var(--theme-radius),18px)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .learning-subject-buttons button[aria-pressed="true"] {background:var(--q-primary)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .qf-page-heading {padding:12px 0 22px;border-bottom:1px solid var(--q-line)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .qf-page-heading h1 {font-size:clamp(29px,2.8vw,42px);letter-spacing:-.035em}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home :is(.qa-shell,.qs-request-panel,.qf-left-surface.qs-subject-panel) {border:1px solid var(--q-line)}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .subject-card {border-top:3px solid var(--q-primary);padding:22px}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .subject-picture {border-radius:calc(var(--theme-radius) - 3px);background:var(--q-page);margin:12px 0}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .subject-card h3 {font-size:24px}
html:not([data-ui-theme="classic"]) body[data-q-theme].quidence-home .q-qidolab-float {background:var(--q-mint);border-color:var(--q-control);border-radius:var(--theme-radius);box-shadow:var(--theme-shadow)}
html[data-ui-theme="paper"] body[data-q-theme].quidence-home .qs-request-panel {background:linear-gradient(0deg,#fffdf6,#fffdf6);border-top:6px solid #e4d6a7}
html[data-ui-theme="atlas"] body[data-q-theme].quidence-home .qf-page-heading {border-bottom:2px solid var(--q-primary)}
html[data-ui-theme="atlas"] body[data-q-theme].quidence-home .subject-card {border-top-width:1px}
html[data-ui-theme="atlas"] body[data-q-theme].quidence-home .group-heading h2 {font-size:28px}
html[data-ui-theme="studio"] body[data-q-theme].quidence-home .subject-card:nth-child(3n+1) {border-top-color:#c16e59;background:#fff9f4}
html[data-ui-theme="studio"] body[data-q-theme].quidence-home .subject-card:nth-child(3n+2) {border-top-color:#9386b8;background:#faf8ff}
html[data-ui-theme="studio"] body[data-q-theme].quidence-home .subject-card:nth-child(3n) {border-top-color:#6d9d8e;background:#f4fbf7}
html[data-ui-theme="studio"] body[data-q-theme].quidence-home .qf-page-heading::after {content:"";display:block;flex:0 0 68px;height:68px;border-radius:50% 50% 12% 50%;background:conic-gradient(#e9a391 0 25%,#bbddd2 0 50%,#e8e1f4 0 75%,#f3e4ac 0);transform:rotate(-12deg)}
/* Tablets: the label and note share the first row; the choices fill an even grid below them. */
@media(min-width:601px) and (max-width:959px) {
  html body[data-q-theme] .q-theme-bar .q-theme-choices {order:3;flex-basis:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  html body[data-q-theme] .q-theme-bar .q-theme-choices button {min-width:0}
  .q-theme-choices .q-theme-name {flex:1;min-width:0}
  .q-theme-note {order:2;margin-left:auto}
}
@media(min-width:900px) and (max-width:959px) {
  html body[data-q-theme] .q-theme-bar .q-theme-choices {grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:600px) {
  /* Phones: one button with the current appearance opens the same choices as a two-column grid. */
  html body[data-q-theme] .q-theme-bar {gap:8px;padding:8px 12px}
  .q-theme-label {flex:1}
  html body[data-q-theme] .q-theme-bar .q-theme-toggle {display:inline-flex;padding-right:10px}
  html body[data-q-theme] .q-theme-bar:not([data-open]) :is(.q-theme-choices,.q-theme-note) {display:none}
  html body[data-q-theme] .q-theme-bar[data-open] .q-theme-choices {flex-basis:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  html body[data-q-theme] .q-theme-bar[data-open] .q-theme-choices button {min-width:0;padding-right:8px;line-height:1.2}
  .q-theme-choices .q-theme-name {flex:1;min-width:0}
  .q-theme-note {margin-left:0;flex-basis:100%;font-size:11px}
  html body[data-q-theme].quidence-home .subject-card {padding:20px}
  html[data-ui-theme="studio"] body[data-q-theme].quidence-home .qf-page-heading::after {display:none}
}
@media(max-width:360px) {
  /* The narrowest phones keep the label and the button on one line. */
  html body[data-q-theme] .q-theme-bar .q-theme-toggle {gap:6px;padding-right:8px}
  .q-theme-toggle .q-theme-thumb {width:32px;height:23px}
}
@media print {
  html body[data-q-theme] .q-theme-bar {display:none!important}
  html,html body[data-q-theme],html body[data-q-theme] :is(.card,.subject-card,.f-intro,.f-question,.f-evidence article,.report-handoff) {background:white!important;background-image:none!important;box-shadow:none!important}
}

:root[data-ui-theme="classic"]{--q-page:#f8f5ec;--q-paper:#fff;--q-ink:#20383e;--q-muted:#53666b;--q-line:#ddd7e6;--q-control:#6e8588;--q-teal:#153f44;--q-primary:#15565b;--q-mint:#ddf1e8;--q-mist:#eee9f5;--q-focus:#15565b}
.q-theme-choices{flex-wrap:wrap}

/* themes.js shows each logo in the version that contrasts with the header behind it, then marks it ready. Until then
   the logo is hidden, so it never appears in the wrong color; if the script does not run, it appears after 1.5 s. */
img.q-brand-logo[data-logo-light-src][data-logo-dark-src]:not([data-logo-ready]) {visibility:hidden;animation:q-logo-reveal 0s 1.5s forwards}
@keyframes q-logo-reveal {to {visibility:visible}}
