/* ACE Light Mode: the switch, and light-mode fixes written by hand (light.css is generated). */

/* ---------- the switch (both modes) ---------- */
.alm-switch { cursor: pointer; font: inherit; }
.alm-switch .alm-icon { display: inline-flex; align-items: center; justify-content: center; }
.alm-switch.alm-bar,
.alm-switch.alm-header,
.alm-switch.alm-login {
	width: 36px; height: 36px; padding: 0; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: #e8e6dc;
	transition: background-color .15s ease, border-color .15s ease;
}
.alm-switch.alm-bar:hover,
.alm-switch.alm-header:hover,
.alm-switch.alm-login:hover { background: rgba(255, 255, 255, .09); }
.alm-switch:focus-visible { outline: 2px solid #5cc4bb; outline-offset: 2px; }
.alm-switch.alm-bar { margin-right: 8px; order: 2; }   /* the top bar orders its right-hand group: join it, before the bell */
.alm-switch.alm-login { margin-left: auto; margin-right: 10px; }
.alm-item { display: flex; align-items: center; }
.alm-switch.alm-side { width: 100%; border: 0; background: none; text-align: left; }
@media (max-width: 480px) {
	.alm-switch.alm-bar { display: none; }   /* on a small phone it lives in the menu */
}
.alm-switch.alm-header-phone { display: none; }
@media (max-width: 768px) {
	.alm-item { display: none; }
	.alm-switch.alm-header-phone { display: inline-flex; margin-left: auto; }
}

html[data-ace-theme="light"] .alm-switch.alm-bar,
html[data-ace-theme="light"] .alm-switch.alm-header,
html[data-ace-theme="light"] .alm-switch.alm-login { border-color: rgba(26, 25, 24, .14); background: #ffffff; color: #2b2a27; }
html[data-ace-theme="light"] .alm-switch.alm-bar:hover,
html[data-ace-theme="light"] .alm-switch.alm-header:hover,
html[data-ace-theme="light"] .alm-switch.alm-login:hover { background: #efede6; }
html[data-ace-theme="light"] .alm-switch:focus-visible { outline-color: #00726a; }

/* Pressing the switch: every part of the page changes in the same instant (no element's own colour fade runs),
   and browsers that can cross-fade the whole page do so as one picture. */
html.alm-switching,
html.alm-switching *,
html.alm-switching *::before,
html.alm-switching *::after { transition: none !important; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .28s; animation-timing-function: ease; }

/* ---------- light mode: the page itself ---------- */
html[data-ace-theme="light"] { color-scheme: light; }
html[data-ace-theme="light"] body { background-color: #f5f4ef; color: #2b2a27; }

/* The teal, one step deeper on light pages: teal text reads at 5:1 on the page, and white on a teal button too. */
html[data-ace-theme="light"]:root {
	/* Paper */
	--color-bg: #f5f4ef;
	--color-bg-alt: #ffffff;
	--color-secondary: #ecebe5;
	--color-heading: #1a1918;
	--color-text: #2b2a27;
	--color-text-muted: #69645a;
	--color-primary: #00766e;
	--color-primary-dark: #005d57;
	--color-accent: #00726a;
	--ace-primary-rgb: 0, 118, 110;
}

/* Colours a page sets per item (a rank's colour, a course's colour): deepened so they read as text. */
html[data-ace-theme="light"] .ace-xp-pillrank-name,
html[data-ace-theme="light"] .ace-xp-rankcard-rank:not(.is-dim),
html[data-ace-theme="light"] .ace-xp-levelup-rank { color: color-mix(in oklab, var(--ace-rank, #00766e) 55%, #1a1918) !important; }
html[data-ace-theme="light"] .ace-xp-pillrank { background: color-mix(in oklab, var(--ace-rank, #00766e) 12%, #ffffff); border-color: color-mix(in oklab, var(--ace-rank, #00766e) 40%, #ffffff); }
html[data-ace-theme="light"] .arp [style*="--acc"] .arp-badge,
html[data-ace-theme="light"] .arp-badge,
html[data-ace-theme="light"] .acq [data-course-id] .ace-cq-badge { color: color-mix(in oklab, var(--acc, #00766e) 55%, #1a1918); }

/* Achievements not yet earned: dimmed less, so their names and progress stay readable. */
html[data-ace-theme="light"] .ace-xp-badge:not(.is-earned) { opacity: .9; }
html[data-ace-theme="light"] .ace-xp-badge:not(.is-earned) .ace-xp-badge-desc,
html[data-ace-theme="light"] .ace-xp-badge:not(.is-earned) .ace-xp-badge-progress { color: #5f5a50 !important; }

/* Rankings: the count on a subject tab. */
html[data-ace-theme="light"] .arp .arp-subj-tab b { opacity: 1; color: #5f5a50; }
html[data-ace-theme="light"] .arp .arp-subj-tab.is-on b,
html[data-ace-theme="light"] .arp .arp-subj-tab[aria-selected="true"] b { color: inherit; }

/* Teal words on a teal tint: the deepest teal. */
html[data-ace-theme="light"] .ace-mock-code,
html[data-ace-theme="light"] .ace-feed-mention,
html[data-ace-theme="light"] .ace-feed-mention-chip { color: #005d57; }

/* The theme's footer (404 and plain pages). */
html[data-ace-theme="light"] .site-footer .site-logo,
html[data-ace-theme="light"] .site-footer .footer-col h4 { color: #1a1918; }

/* Calendar: a day with a class in the small months. */
html[data-ace-theme="light"] .rc-cal-mini-day.has-event { color: #005d57; }
html[data-ace-theme="light"] .site-footer .footer-brand .site-logo { color: #1a1918 !important; }
html[data-ace-theme="light"] .afp-note-tag { color: #7a3a2a !important; }

/* The sign-in page's header: room for the switch without folding "Back to home" onto two lines. */
.al-top .al-back { white-space: nowrap; }
@media (max-width: 859px) {
	/* On the banner: a round button like its neighbours, clear of the animation's pause button. */
	.alm-switch.alm-login { width: 38px; height: 38px; margin-right: 40px; background: rgba(20, 20, 19, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
	html[data-ace-theme="light"] .alm-switch.alm-login { background: rgba(255, 255, 255, .9); }
}

/* 1.0.1 ---------------------------------------------------------------- */

/* The chosen course on the Feed's "Post to" and on Community Questions: dark words on the course's tint. */
html[data-ace-theme="light"] .ace-feed-course-pill.is-selected,
html[data-ace-theme="light"] .afp .ace-feed-course-pill.is-selected,
html[data-ace-theme="light"] .ace-cq-course-pill.is-selected,
html[data-ace-theme="light"] .acq .ace-cq-course-pill.is-selected { color: #1a1918 !important; font-weight: 600; }
html[data-ace-theme="light"] .acq [data-course-id] .ace-cq-course-pill.is-selected,
html[data-ace-theme="light"] .acq .ace-cq-course-pill.is-selected { border-color: color-mix(in oklab, var(--acc, #00766e) 70%, #1a1918); }

/* Answer letters (quizzes and Practice): white letters on a solid disc. */
html[data-ace-theme="light"] .ace-player-content .wpProQuiz_content .ace-qz-opt.ace-qz-opt.ace-qz-opt.ace-qz-opt > label::before {
	background: #6f6a60 !important; color: #ffffff !important; box-shadow: none !important;
}
html[data-ace-theme="light"] .ace-player-content .wpProQuiz_content .ace-qz-opt.ace-qz-picked.ace-qz-opt.ace-qz-opt.ace-qz-opt > label::before {
	background: #00766e !important; color: #ffffff !important;
}
html[data-ace-theme="light"] .ace-player-content .wpProQuiz_content .ace-qz-opt.ace-qz-opt.ace-qz-opt.ace-qz-opt[class*="answerCorrect" i] > label::before {
	background: #2e7148 !important; color: #ffffff !important;
}
html[data-ace-theme="light"] .ace-player-content .wpProQuiz_content .ace-qz-opt.ace-qz-opt.ace-qz-opt.ace-qz-opt[class*="answerCorrectIncomplete" i] > label::before {
	background: transparent !important; color: #2e7148 !important; box-shadow: inset 0 0 0 1.5px #2e7148 !important;
}
html[data-ace-theme="light"] .ace-player-content .wpProQuiz_content .ace-qz-opt.ace-qz-opt.ace-qz-opt.ace-qz-opt[class*="answerIncorrect" i] > label::before {
	background: #b3402b !important; color: #ffffff !important;
}
html[data-ace-theme="light"] .ace-ps-letter { background: #6f6a60; color: #ffffff; }
html[data-ace-theme="light"] .ace-ps-opt:hover:not(:disabled) .ace-ps-letter { background: #00766e; color: #ffffff; }
html[data-ace-theme="light"] .ace-ps-opt.is-right .ace-ps-letter { background: #2e7148; color: #ffffff; }
html[data-ace-theme="light"] .ace-ps-opt.is-wrong .ace-ps-letter { background: #b3402b; color: #ffffff; }

/* Activity History in the wide right-hand column: entries sit on the column, as in dark, not in white boxes. */
html[data-ace-theme="light"] .ace-wide-rail .ace-history-item { background: transparent !important; }

/* Quiz results and review: the right/wrong words a step deeper, and the options nobody picked less faded. */
html[data-ace-theme="light"] .ace-player-content,
html[data-ace-theme="light"] .ace-qzr { --ace-right-text: #00473f; --ace-wrong-text: #8a2620; }
html[data-ace-theme="light"] .ace-player-content .wpProQuiz_content .wpProQuiz_questionList:has(.ace-qz-opt[class*="answer" i]) .ace-qz-opt:not([class*="answer" i]) > label { opacity: .82; }

/* 1.1.0 ---------------------------------------------------------------- */
/* The theme menu (signed-in students): a list of the five themes, lightest first, with "Match my device". */
.alm-menu {
	position: fixed; z-index: 100050; box-sizing: border-box; padding: 8px;
	border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1);
	background: #232321; color: #e8e6dc;
	box-shadow: 0 18px 48px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
	font: 14px/1.35 var(--font-body, Inter, system-ui, sans-serif);
}
.alm-menu[hidden] { display: none; }
.alm-menu-head { margin: 4px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a39e93; }
.alm-opt {
	display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 8px; border: 0; border-radius: 10px;
	background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.alm-opt:hover, .alm-opt:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.alm-opt:focus-visible { box-shadow: inset 0 0 0 2px #5cc4bb; }
.alm-opt.is-on { background: rgba(0, 138, 129, .18); }
.alm-opt-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.alm-opt-text b { font-weight: 600; color: #f5f4ef; }
.alm-opt-text small { font-size: 12px; color: #a39e93; }
.alm-tick { width: 16px; color: #61b6b1; visibility: hidden; flex: none; }
.alm-opt.is-on .alm-tick { visibility: visible; }
.alm-swatch { display: flex; flex: none; width: 46px; height: 32px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
.alm-swatch > span:first-child { width: 13px; }
.alm-swatch > span:last-child { flex: 1; position: relative; }
.alm-swatch i { position: absolute; left: 5px; right: 5px; top: 7px; bottom: 7px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.alm-swatch.is-auto { background: linear-gradient(135deg, #f1f1ef 50%, #262624 50%); }
.alm-swatch.is-auto > span { display: none; }

html[data-ace-theme="light"] .alm-menu { background: #ffffff; color: #2b2a27; border-color: rgba(26, 25, 24, .12); box-shadow: 0 18px 48px rgba(26, 25, 24, .2), 0 2px 6px rgba(26, 25, 24, .08); }
html[data-ace-theme="light"] .alm-menu-head { color: #69645a; }
html[data-ace-theme="light"] .alm-opt:hover, html[data-ace-theme="light"] .alm-opt:focus-visible { background: rgba(26, 25, 24, .05); }
html[data-ace-theme="light"] .alm-opt:focus-visible { box-shadow: inset 0 0 0 2px #00726a; }
html[data-ace-theme="light"] .alm-opt.is-on { background: rgba(0, 118, 110, .1); }
html[data-ace-theme="light"] .alm-opt-text b { color: #1a1918; }
html[data-ace-theme="light"] .alm-opt-text small { color: #5f5a50; }
html[data-ace-theme="light"] .alm-tick { color: #00766e; }
html[data-ace-theme="light"] .alm-swatch { box-shadow: 0 0 0 1px rgba(26, 25, 24, .18); }
@media (pointer: coarse) { .alm-opt { padding: 10px 8px; } }
/* The public pages' footers on the light themes: their small print a step darker. */
html[data-ace-theme="light"] .hm-foot p, html[data-ace-theme="light"] .hm-foot-base span, html[data-ace-theme="light"] .hm-foot-base a,
html[data-ace-theme="light"] .ac-foot p, html[data-ace-theme="light"] .ac-foot-base span, html[data-ace-theme="light"] .ac-foot-base a,
html[data-ace-theme="light"] .dm-foot p, html[data-ace-theme="light"] .dm-foot-base span, html[data-ace-theme="light"] .dm-foot-base a,
html[data-ace-theme="light"] .dm-foot-h { color: #57524a !important; }
html[data-ace-theme="light"] .al-art .al-tx { fill: #5c5b58; }
/* Stone: the Demo page's small labels, a step darker on its grey cells. */
html[data-ace-theme="light"][data-ace-skin="stone"] .dm-cell dt { color: #4b4a47 !important; }
/* Dim: words in the accent colours, a step lighter on its lifted surfaces. */
html[data-ace-skin="dim"] :is(.ace-syl-topic-num, .ace-steps-icon--num, .ace-rdy-code, .ace-xp-recent-xp, .ace-xp-hero-rank,
  .ace-mis-where, .ace-mis-link, .ace-rev-n, .arp-lesson-name, .ace-xp-ranks-more, .ld-course-step-back, .acqr-history a) { color: #63c7bd !important; }
html[data-ace-skin="dim"] :is(.ace-syl-chip, .ace-feed-mention, .ace-feed-mention-chip) { color: #86ddd4 !important; }
html[data-ace-skin="dim"] .ace-xp-badge:not(.is-earned) { opacity: 1; }
html[data-ace-skin="dim"] .ace-xp-badge:not(.is-earned) :is(.ace-xp-badge-desc, .ace-xp-badge-progress) { color: #c3bfb5 !important; }
html[data-ace-skin="dim"] .ace-xp-badge:not(.is-earned) .ace-xp-badge-name { color: #d6d3cb !important; }
html[data-ace-skin="dim"] .ace-xp-rankcard-rank:not(.is-dim) { color: color-mix(in oklab, var(--ace-rank, #61b6b1) 55%, #ffffff) !important; }
html[data-ace-skin="dim"] .arp b { color: #d2cec5; }
html[data-ace-skin="dim"] #acq-tab-browse { color: #f4b8a2; }
html[data-ace-skin="dim"] :is(.arp-badge, .ac-badge) { color: #b3cff4 !important; }
html[data-ace-skin="dim"] .ace-syl-tab.is-active { color: #ffffff !important; }
html[data-ace-skin="dim"] .ace-mock-code { color: #86ddd4 !important; }
html[data-ace-skin="dim"] .arp-subj-tab > b { color: #d2cec5 !important; opacity: 1; }
html[data-ace-skin="dim"] .ac-tile .ac-tx { fill: rgba(232, 240, 243, .82); }
html[data-ace-skin="dim"] .ld-status.ld-primary-background { color: #ffffff !important; }

/* ---------------------------------------------------------------------------
   The calendar's examination tile stays teal in both themes, so its text has
   to stay white. The generated light skin flips it to dark; put it back.
   --------------------------------------------------------------------------- */
html[data-ace-theme="light"] .rc-calendar.ace-ct .rc-cal-day-event.ace-ct-ev--exam .ace-ct-code,
html[data-ace-theme="light"] .rc-calendar.ace-ct .rc-cal-day-event.ace-ct-ev--exam .ace-ct-text{ color: #fff; }
html[data-ace-theme="light"] .rc-calendar.ace-ct .rc-cal-day-event.ace-ct-ev--exam .ace-ct-rest{ color: rgba(255,255,255,.88); }
html[data-ace-theme="light"] .rc-calendar.ace-ct .rc-cal-day.ace-ct--exam .rc-cal-day-number{ color: rgba(255,255,255,.85); }

/* The day's number leads the tile, so it takes the heading colour in the light
   skin too; the generated rules still hold it at the muted grey. Days outside
   the month stay muted, which is what tells them apart. */
html[data-ace-theme="light"] .rc-calendar.ace-ct .rc-cal-day-number{ color: var(--rc-heading); }
html[data-ace-theme="light"] .rc-calendar.ace-ct .rc-cal-day.is-empty .rc-cal-day-number{ color: var(--rc-muted); }
