/* Klasmeyts Review
   Layout follows Khan Academy: a slim header with Courses and search, course pages with a
   unit sidebar, lesson pages with the unit's lessons beside the video.
   Brand rules: square corners (ovals only for answer bubbles), no divider lines,
   no interpuncts, no dashes in copy. Montserrat Black for display, Poppins for text. */
:root {
  --paper: #FFFFFF;
  --ink: #1C1222;
  --muted: #5E5468;
  --wash: #FDEDF4;
  --wash-deep: #FAD7E7;
  --tint: #F6F2F8;
  --tint-deep: #ECE4F1;
  --accent: #670887;
  --accent-deep: #4E0567;
  --on-accent: #FFFFFF;
  --pink: #FBBDD8;
  --pencil: #1C1222;
  --field: #F6F2F8;
  --band: #670887;
  --on-band: #FFFFFF;
  --band-soft: #F3DDEB;
  --foot: #2A0A36;
  --foot-ink: #F3E3EC;
  --ok: #1D7A4E;
  --error: #A3261B;
  --display: "Montserrat", "Poppins", system-ui, sans-serif;
  --text: "Poppins", system-ui, sans-serif;
  --wrap: 1200px;
  --head-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #140B1A; --ink: #F5EDF8; --muted: #BDB0C6; --wash: #22122B; --wash-deep: #33193F;
    --tint: #1D1124; --tint-deep: #2A1834; --accent: #FBBDD8; --accent-deep: #FFD9E9; --on-accent: #2A0A36;
    --pencil: #F5EDF8; --field: #23142B; --band: #3A0F4C; --on-band: #FFFFFF; --band-soft: #E4C7D8;
    --foot: #0C0610; --foot-ink: #E9DCEF; --ok: #7FD8A8; --error: #FF9A8F; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #140B1A; --ink: #F5EDF8; --muted: #BDB0C6; --wash: #22122B; --wash-deep: #33193F;
  --tint: #1D1124; --tint-deep: #2A1834; --accent: #FBBDD8; --accent-deep: #FFD9E9; --on-accent: #2A0A36;
  --pencil: #F5EDF8; --field: #23142B; --band: #3A0F4C; --on-band: #FFFFFF; --band-soft: #E4C7D8;
  --foot: #0C0610; --foot-ink: #E9DCEF; --ok: #7FD8A8; --error: #FF9A8F; color-scheme: dark;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
  margin: 0; font-family: var(--text); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--paper); z-index: 30; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 40; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .wm { width: 168px; height: auto; aspect-ratio: 11109 / 732; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 12px 20px; min-height: var(--head-h); }
.courses { position: relative; }
.courses > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; font-weight: 600; font-size: 15px; color: var(--accent); cursor: pointer; }
.courses > summary::-webkit-details-marker { display: none; }
.courses > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.courses[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.courses > summary:hover, .courses[open] > summary { background: var(--tint); }
.menu { position: absolute; left: 0; top: calc(100% + 8px); width: min(640px, calc(100vw - 32px)); background: var(--paper); box-shadow: 0 12px 40px rgba(28, 18, 34, 0.18); padding: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; z-index: 30; }
.menu h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; margin-left: -10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.menu a:hover { background: var(--tint); color: var(--accent); }
.menu .soon { font-size: 12px; font-weight: 600; color: var(--muted); align-self: center; }
.head-search { flex: 1; max-width: 420px; position: relative; }
.lib-find { max-width: 640px; }
.head-search input[type="search"] { min-height: 40px; padding: 8px 12px 8px 38px; font-size: 15px; }
.head-search::before { content: ""; position: absolute; left: 13px; top: 50%; width: 11px; height: 11px; border: 2px solid var(--muted); border-radius: 50%; transform: translateY(-62%); pointer-events: none; }
.head-search::after { content: ""; position: absolute; left: 24px; top: 50%; width: 2px; height: 7px; background: var(--muted); transform: translateY(3px) rotate(-45deg); pointer-events: none; }
.search-link { display: none; width: 40px; height: 40px; place-items: center; color: var(--accent); }
.search-link svg { width: 20px; height: 20px; max-width: none; }
.search-link:hover { background: var(--tint); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-right a.link { padding: 8px 10px; font-weight: 600; font-size: 15px; color: var(--accent); text-decoration: none; }
.head-right a.link:hover { background: var(--tint); }
.head-right .btn { min-height: 40px; padding: 8px 16px; font-size: 15px; }

/* Type */
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-family: var(--display); font-weight: 900; letter-spacing: -0.02em; font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-family: var(--text); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-family: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; }
.lede { font-size: clamp(17px, 1.8vw, 19px); color: var(--muted); max-width: 38em; }
.small { font-size: 14px; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  background: var(--accent); color: var(--on-accent);
  border: 0; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-deep); color: var(--on-accent); }
.btn.quiet { background: var(--paper); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn.quiet:hover { background: var(--tint); color: var(--accent-deep); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--tint); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
input[type="email"], input[type="search"], input[type="text"], select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--field); border: 0; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23887A92' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
input::placeholder { color: var(--muted); opacity: 0.85; }
.status { font-size: 15px; min-height: 1.6em; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.err { color: var(--error); font-weight: 600; }

/* Item icons, like Khan's video and practice markers */
.ico { width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; background: var(--tint); color: var(--accent); }
.ico svg { width: 14px; height: 14px; max-width: none; }
.ico.practice { background: var(--band-soft); color: #4E0567; }

/* Home: hero */
.hero { background: var(--wash); padding-block: clamp(36px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero .copy { display: grid; gap: 18px; min-width: 0; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); }
.hero .lede { color: var(--ink); }
.hero .actions { margin-top: 6px; }
.hero .who { font-size: 15px; color: var(--muted); }

/* Answer sheet illustration: NCE items have five options, A to E */
.sheet { background: var(--paper); padding: clamp(20px, 3vw, 30px); min-width: 0; }
.sheet .sheet-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.sheet ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sheet li { display: grid; grid-template-columns: 26px repeat(5, 1fr); align-items: center; gap: 8px; }
.sheet .num { font-weight: 500; font-size: 15px; color: var(--muted); text-align: right; padding-right: 4px; font-variant-numeric: tabular-nums; }
.bubble {
  height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent); background: transparent;
  transition: background-color 400ms ease;
}
.bubble.on { background: var(--pencil); box-shadow: inset 0 0 0 2px var(--pencil); color: transparent; }

/* Home: sections */
.section { padding-block: clamp(40px, 6vw, 72px); }
.section.tint { background: var(--tint); }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; }

/* Home: course directory, like Khan's course list */
.directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; }
.directory h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.directory ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.directory a, .directory .off { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 14px 16px; background: var(--tint); color: var(--ink); text-decoration: none; }
.directory a:hover { background: var(--tint-deep); color: var(--ink); }
.directory .name { font-weight: 600; }
.directory a .name { color: var(--accent); }
.directory .sub { grid-column: 1; font-size: 14px; color: var(--muted); }
.directory .tag { grid-row: 1 / span 2; grid-column: 2; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; background: var(--paper); color: var(--muted); }
.directory .tag.live { background: var(--accent); color: var(--on-accent); }

/* Home: featured course */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.feature .copy { display: grid; gap: 16px; }
.feature-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feature-units li { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 4px 16px; padding: 12px 16px; background: var(--paper); align-items: baseline; }
.section:not(.tint) .feature-units li { background: var(--tint); }
.feature-units .date { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.feature-units .what { min-width: 0; font-weight: 500; }
.feature-units .what span { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }
.feature-units li.exam { background: var(--accent); color: var(--on-accent); }
.feature-units li.exam .what span { color: var(--on-accent); opacity: 0.85; }

/* Home: cohort band */
.cohort { background: var(--band); color: var(--on-band); padding-block: clamp(40px, 6vw, 72px); }
.cohort .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.cohort h2 { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 3.4vw, 38px); }
.cohort .copy { display: grid; gap: 14px; }
.cohort p, .cohort .small { color: var(--on-band); opacity: 0.92; }
.cohort .btn { background: var(--on-band); color: #670887; }
.cohort .btn:hover { background: var(--pink); color: #2A0A36; }
.cohort .btn.quiet { background: transparent; color: var(--on-band); box-shadow: inset 0 0 0 2px var(--on-band); }
.cohort .btn.quiet:hover { background: var(--on-band); color: #670887; }
.cohort dl { margin: 0; display: grid; gap: 4px; }
.cohort dl div { background: rgba(255, 255, 255, 0.1); padding: 14px 18px; }
.cohort dt { font-weight: 600; }
.cohort dd { margin: 2px 0 0; font-size: 15px; opacity: 0.9; }

/* Course page */
.course-band { background: var(--band); color: var(--on-band); padding-block: clamp(28px, 4vw, 44px); }
.course-band .wrap { display: grid; gap: 12px; }
.course-band .crumbs a, .course-band .crumbs { color: var(--on-band); opacity: 0.9; }
.course-band h1 { color: var(--on-band); }
.course-band p { max-width: 44em; color: var(--on-band); opacity: 0.92; }
.course-band .btn { background: var(--on-band); color: #670887; }
.course-band .btn:hover { background: var(--pink); color: #2A0A36; }
.course-band .btn.quiet { background: transparent; color: var(--on-band); box-shadow: inset 0 0 0 2px var(--on-band); }
.course-band .btn.quiet:hover { background: var(--on-band); color: #670887; }
.course-band .actions { margin-top: 6px; }
.crumbs { font-size: 14px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs span[aria-hidden] { opacity: 0.6; }

.course-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: 32px clamp(48px, 7vw, 88px); }
.course-nav { position: sticky; top: calc(var(--head-h) + 20px); display: grid; gap: 4px; }
.course-nav h2 { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.course-nav a { display: grid; gap: 0; padding: 10px 14px; background: var(--tint); color: var(--ink); text-decoration: none; }
.course-nav a:hover { background: var(--tint-deep); }
.course-nav a b { font-weight: 600; font-size: 15px; }
.course-nav a span { font-size: 13px; color: var(--muted); }
.units { display: grid; gap: 28px; min-width: 0; }
.unit { background: var(--paper); box-shadow: inset 0 0 0 2px var(--tint-deep); }
.unit-head { padding: 20px 22px 14px; display: grid; gap: 4px; }
.unit-head .eyebrow { color: var(--muted); }
.unit-head p { color: var(--muted); font-size: 15px; }
.unit-list { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 2px; }
.unit-list a, .unit-list .row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.unit-list a:hover { background: var(--tint); }
.unit-list .t { font-weight: 500; min-width: 0; }
.unit-list .d { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.unit-list .state { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.unit-list li.is-open .state { color: var(--accent); }
.unit-list li.is-today > a { background: var(--wash); }
.unit-list .row { color: var(--muted); }
.unit-list .row .ico { background: transparent; }
.notes { padding: 20px 22px; background: var(--tint); display: grid; gap: 10px; }
.notes ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }

/* Lesson page */
.lesson-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; align-items: stretch; min-height: calc(100vh - var(--head-h)); }
.lesson-side { background: var(--tint); padding: 20px 0 32px; }
.lesson-side .unit-title { padding: 0 20px 12px; display: grid; gap: 2px; }
.lesson-side .unit-title a { font-size: 13px; font-weight: 500; }
.lesson-side .unit-title b { font-size: 17px; font-weight: 600; line-height: 1.3; }
.lesson-side ol { list-style: none; margin: 0; padding: 0; }
.lesson-side li a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 20px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.lesson-side li a:hover { background: var(--tint-deep); }
.lesson-side li a[aria-current="page"] { background: var(--paper); box-shadow: inset 4px 0 0 var(--accent); font-weight: 600; }
.lesson-side li a .ico { background: var(--paper); }
.lesson-side li a[aria-current="page"] .ico { background: var(--tint); }
.lesson-side li .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.lesson-side details summary { display: none; }
.lesson-main { padding: 24px clamp(20px, 4vw, 48px) clamp(48px, 7vw, 80px); display: grid; gap: 28px; align-content: start; min-width: 0; max-width: 920px; }
.lesson-top { display: grid; gap: 8px; }
.lesson-top .crumbs a { color: var(--muted); }
.lesson-top .crumbs { color: var(--muted); }

.video { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: var(--foot); color: var(--foot-ink); overflow: hidden; }
.video iframe, .video-play, .video-play img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { padding: 0; margin: 0; background: #000; cursor: pointer; }
.video-play img { object-fit: cover; }
.play-icon { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); background: #670887; transition: background-color 150ms ease; }
.play-icon::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #FFFFFF; }
.video-play:hover .play-icon, .video-play:focus-visible .play-icon { background: #4E0567; }
.video-wait { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }
.video-wait p { max-width: 26em; font-weight: 500; }

.practice { background: var(--tint); padding: clamp(18px, 3vw, 24px); display: grid; gap: 16px; }
.practice-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.practice-head .ico { width: 44px; height: 44px; }
.practice-head .ico svg { width: 20px; height: 20px; }
.practice-head h2 { font-size: 20px; }
.practice-head p { font-size: 14px; color: var(--muted); }
.practice > div[data-state] { display: grid; gap: 12px; }
.gbtn { min-height: 44px; }
.roles { display: flex; flex-wrap: wrap; gap: 8px; }
.roles .btn { min-height: 44px; }
.practice [data-email] { font-weight: 600; overflow-wrap: anywhere; }
.linkish { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.slides-frame { position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 100%; background: var(--tint); }
.slides-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.slides { display: grid; gap: 10px; }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 24px; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; background: var(--accent); }
.points strong { font-weight: 600; }
.points sup { font-size: 0.7em; line-height: 0; }
.keypoints { display: grid; gap: 14px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pager a { display: grid; gap: 2px; padding: 14px 18px; background: var(--tint); text-decoration: none; color: var(--ink); min-width: 0; }
.pager a:hover { background: var(--tint-deep); color: var(--ink); }
.pager a span:last-child { font-weight: 600; }
.pager .pager-next { text-align: right; grid-column: 2; }

/* Account page */
.account { padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.account-copy { display: grid; gap: 16px; min-width: 0; }
.account .panel { background: var(--tint); padding: clamp(20px, 3vw, 28px); display: grid; gap: 14px; }
.account .panel > div[data-state] { display: grid; gap: 14px; }

/* Search */
.search-page { padding-block: 28px 80px; display: grid; gap: 20px; max-width: 860px; }
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hits a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; background: var(--tint); color: var(--ink); text-decoration: none; }
.hits a:hover { background: var(--tint-deep); }
.hits .t { font-weight: 600; color: var(--accent); }
.hits .d { display: block; font-size: 14px; color: var(--muted); }

/* Library */
.lib-head { padding-block: clamp(20px, 4vw, 40px) 20px; display: grid; gap: 12px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 10px; }
.filters > div { min-width: 0; }
.notice { background: var(--wash); padding: 14px 18px; font-size: 15px; }
.lib-signin { background: var(--tint); padding: 16px 18px; display: grid; gap: 12px; max-width: 560px; }
.lib-signin p { font-size: 15px; }
.lib-signin.flash { animation: kr-flash 0.9s ease-out; }
@keyframes kr-flash { 0% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .lib-signin.flash { animation: none; } }
.count { font-size: 15px; color: var(--muted); margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.results li { display: grid; gap: 12px; align-content: space-between; padding: 18px; background: var(--tint); }
.results li > div:first-child { min-width: 0; }
.results h3 { font-size: 17px; margin-bottom: 4px; }
.results .meta { font-size: 14px; color: var(--muted); }
.results .btn { min-height: 42px; padding: 8px 16px; font-size: 15px; justify-self: start; }
.more { padding-block: 20px 80px; }
.empty { padding-block: 32px 80px; display: grid; gap: 18px; justify-items: start; }

/* Plain text pages */
.prose { max-width: 44em; padding-block: clamp(24px, 4vw, 48px) 96px; }
.prose h1 { margin-bottom: 12px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

/* Footer */
.site-foot { background: var(--foot); color: var(--foot-ink); padding-block: 40px; font-size: 15px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; }
.site-foot a { color: var(--foot-ink); }
.site-foot .brand { color: #FFFFFF; }
.site-foot .brand .wm { width: 160px; }
.site-foot .brand .mark { width: 30px; height: 30px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-tag { font-size: 14px; opacity: 0.8; }

@media (max-width: 980px) {
  .site-head .head-search { display: none; }
  .search-link { display: inline-grid; }
  .lesson-wrap { grid-template-columns: minmax(0, 1fr); }
  .lesson-side { padding: 0; order: 2; }
  .lesson-side details summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; font-weight: 600; }
  .lesson-side details summary::-webkit-details-marker { display: none; }
  .lesson-side details summary::after { content: "Show"; font-size: 14px; color: var(--accent); }
  .lesson-side details[open] summary::after { content: "Hide"; }
  .lesson-side .unit-title { display: none; }
  .lesson-main { order: 1; }
}
@media (max-width: 860px) {
  .hero .wrap, .feature, .cohort .wrap, .account { grid-template-columns: minmax(0, 1fr); }
  .sheet { max-width: 440px; }
  .course-body { grid-template-columns: minmax(0, 1fr); }
  .course-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
  .course-nav h2 { grid-column: 1 / -1; }
  .directory { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .q { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .brand .wm { display: none; }
  .head-right a.link { display: none; }
  .courses > summary { padding: 6px 8px; }
  .feature-units li { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: 1fr; }
  .pager .pager-next { grid-column: 1; }
  .unit-list a, .unit-list .row { grid-template-columns: auto minmax(0, 1fr); }
  .unit-list .state { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .bubble { transition: none; } }
