/* Shared reading and study layout. */
.study-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0;
  margin: 0 0 22px;
}
.study-page-heading h1 { font: 500 clamp(28px,4vw,42px)/1.25 var(--serif); margin: 0 0 8px; }
.study-page-heading p { font-size: 15px; line-height: 1.6; color: #526674; margin: 0; }
.study-kicker { display: block; margin: 0; font-weight: 650; color: #476679; font-size: 13px; line-height: 1.5; }
.study-today {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  border: 1px solid #c7d6db;
  background: #f9fbfb;
  min-height: 275px;
  overflow: hidden;
}
.study-today-inner { padding: clamp(22px,4vw,42px); }
.study-today h2 { margin: 12px 0; font: 500 clamp(24px,4vw,38px)/1.3 var(--serif); }
.study-today p:not(.study-kicker) { color: #3f5360; line-height: 1.65; }
.study-today .study-today-meta { margin-top: 16px; font-size: 14px; }
.study-today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.study-today-art { min-height: 0; background: #dce7ea; }
.study-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 24px 0; }
.study-shortcuts article, .study-section { padding: 24px; background: #f9fbfb; border: 1px solid #c7d6db; min-width: 0; }
.study-shortcuts h2, .study-section h2 { font: 500 23px/1.4 var(--serif); margin: 6px 0 10px; }
.study-shortcuts article p:not(.study-kicker) { color: #495e69; margin: 0 0 14px; }
.study-section { margin-top: 26px; scroll-margin-top: 14px; }
.catalog-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.catalog-tools .inline-search { flex: 1 0 min(100%,260px); min-width: 0; }
.catalog-tools .inline-search input { min-width: 0; width: 100%; }
.catalog-count { margin: 14px 0; font-size: 14px; color: #526674; }
.catalog-pagination { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.lesson-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.guided-shell { display: grid; grid-template-columns: minmax(165px,210px) minmax(0,1fr); gap: 24px; max-width: none; }
.guided-main { min-width: 0; grid-column: 2; grid-row: 1; }
.guided-outline { grid-column: 1; grid-row: 1; display: block; }
.guided-outline > summary { cursor: pointer; font-weight: 600; padding: 7px 0; }
.guided-outline nav { display: grid; gap: 4px; }
.guided-step-count { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guided-step-count progress { width: min(30%,145px); height: 6px; accent-color: #167387; }
.guided-stage { min-height: auto; }
.guided-stage .guided-stage-kind { color: #28637a; font-size: 13px; margin: 0 0 6px; font-weight: 650; }
.guided-review-actions, .ce-section-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; }
.guided-review-actions .text-link { text-align: left; }
.guided-pending { margin: 8px 0 18px; }

.ce-beginner-list { margin-top: 18px; }
.ce-unit-picker { display: none; }
.ce-workspace, #exam-results { scroll-margin-top: 14px; }

@media (max-width: 800px) {
  .guided-shell { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .guided-main { grid-column: 1; grid-row: 2; }
  .guided-outline { grid-column: 1; grid-row: 1; }
  .guided-outline nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .guided-heading { flex-direction: row; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
}
@media (max-width: 760px) {
  .ce-roadmap { display: none; }
  .ce-unit-picker { display: grid; gap: 6px; margin-bottom: 16px; }
  .ce-unit-picker select { min-height: 42px; max-width: 100%; padding: 8px; font-size: 16px; border: 1px solid #bdced5; background: white; }
  .study-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .study-today, .study-shortcuts { grid-template-columns: minmax(0,1fr); }
  .study-today-art { min-height: 90px; }
  .study-page-heading { flex-wrap: wrap; }
  .study-section, .study-shortcuts article { padding: 18px; }
  .guided-stage { padding: 18px; }
}

/* Shared surfaces and typography. */
:root {
  --study-ink: #172f3b;
  --study-focus: #176f90;
  --study-muted: #455d6b;
  --study-accent: #14677a;
  --study-border: #c5d5da;
  --study-paper: #fcfdfc;
}
body { color: var(--study-ink); }
.button { min-height: 44px; font-size: 14px; gap: 12px; }
.button-blue { background: var(--study-accent); }
.button-blue:hover { background: #105565; }
.button-dark { background: #193945; }
.button-dark:hover { background: #244e5d; }
.button-outline { color: var(--study-ink); }
.text-link { font-size: 14px; line-height: 1.45; color: #205e70; }
.text-link:hover { color: #104652; }
:where(button,a,summary,input,select,textarea):focus-visible { outline: 2px solid var(--study-focus); outline-offset: 3px; }
:where(input,textarea,select) { color: var(--study-ink); }
:where(input,textarea)::placeholder { color: #526e79; opacity: 1; }
main:focus { outline: none; }
.topbar .search-trigger { min-height: 42px; color: var(--study-muted); font-size: 12px; }
#navigation a { min-height: 46px; color: #365564; font-size: 14px; }
#navigation a.active { color: #effbfc; }
#navigation a > small { display: none; }
.workspace-label > .live-dot:last-child { margin-left: 0; }
.skip-link { position: fixed; z-index: 50; left: 12px; top: 12px; padding: 10px; background: white; color: #173f50; }
.skip-link:not(:focus) { transform: translateY(-150%); }

.study-page-heading h1 { color: var(--study-ink); }
.study-today, .study-shortcuts article, .study-section { background: var(--study-paper); }
.study-today { border-radius: 15px; }
.study-shortcuts article, .study-section { border-radius: 12px; }
.study-today-art { background: #dce8ec linear-gradient(135deg, #e8f0ef 45%, #b9d2db 45%, #dce8ec 75%) 76% center / cover no-repeat; }
.study-today-meta { font-variant-numeric: tabular-nums; }
.study-shortcuts .text-link { display: inline-flex; min-height: 28px; align-items: center; }
.study-home .status-strip { display: flex; flex-wrap: wrap; gap: 5px 16px; padding: 12px 0; }
.study-home .status-strip > div { color: var(--study-muted); min-width: 0; padding: 0 12px 0 0; font-size: 13px; }
.study-home .status-strip strong { color: var(--study-ink); font-size: 15px; }
.study-home .status-strip .status-right { padding-right: 0; }
.study-empty { padding: 20px; background: var(--study-paper); border: 1px solid var(--study-border); border-radius: 10px; }
.study-empty p { margin: 6px 0 16px; color: var(--study-muted); }

.guided-route { border-radius: 12px; background: var(--study-paper); }
.guided-path-option { min-height: 56px; border-radius: 7px; }
.guided-path-option b, .guided-route-item b { color: var(--study-ink); font-size: 14px; }
.guided-path-option small, .guided-route-item small { color: var(--study-muted); }
.catalog-tools .filter-tab { min-height: 38px; font-size: 14px; color: var(--study-muted); }
.catalog-tools .filter-tab.active { color: #164d61; }
.catalog-tools .inline-search input, #book-filter { font-size: 15px; min-height: 42px; }
.lesson-card { min-width: 0; padding: 18px; background: white; border-radius: 9px; }
.lesson-card h3 { font-size: 18px; line-height: 1.45; color: var(--study-ink); }
.lesson-card p { font-size: 14px; color: var(--study-muted); line-height: 1.65; }
.lesson-card-bottom { padding-top: 16px; }
.lesson-card-bottom > span { font-size: 12px; color: var(--study-muted); }
.catalog-pagination .button { min-width: 90px; }
.guided-heading { margin-top: 12px; }
.guided-heading h1 { line-height: 1.3; }
.guided-heading .eyebrow { color: var(--study-muted); font-size: 13px; letter-spacing: .02em; }
.guided-heading .button-outline { flex-shrink: 0; }
.guided-step-count { color: var(--study-muted); font-size: 13px; }
.guided-step-count > span { color: var(--study-muted); }
.guided-stage {
  border: 1px solid var(--study-border);
  background: var(--study-paper);
  border-radius: 12px;
  padding: clamp(20px,3.5vw,36px);
}
.guided-stage > h2 { margin: 0 0 12px; font-size: clamp(22px,3.7vw,30px); }
.guided-stage > p:not(.guided-stage-kind), .guided-stage :is(dd, li) { color: #243e50; font-size: 16px; line-height: 1.68; }
.guided-stage textarea, .guided-demo input { font-size: 16px; }
.guided-choices label { min-height: 48px; }
.guided-controls { align-items: center; gap: 10px; }
.guided-controls .button { white-space: normal; }
.guided-review-actions { padding-top: 12px; border-top: 1px solid #dfebed; }
.guided-review-actions button { min-height: 34px; }
.guided-outline nav { padding: 8px 0; }
.guided-outline > summary, .guided-outline .guided-step-link { color: var(--study-muted); }
.guided-outline .guided-step-link.active { color: #104e65; }
.guided-outline .guided-step-link:disabled { opacity: .66; }
.guided-privacy { color: var(--study-muted); }
.guided-example code { color: #254657; }
.guided-output { color: #214c54; }
.guided-feedback[tabindex]:focus { outline: 2px solid var(--study-focus); outline-offset: 2px; }

.books-toolbar { gap: 12px; flex-wrap: wrap; }
.book-card { border-radius: 10px; overflow: hidden; text-align: left; background: var(--study-paper); }
.book-cover { height: 168px; }
.book-card h3 { font-size: 18px; }
.book-card .book-information p, .book-card .book-state { color: var(--study-muted); font-size: 13px; }
.book-card-link { display: flex; align-items: center; color: #205e70; font-weight: 620; gap: 6px; margin-top: 12px; font-size: 14px; }
.book-card-link .icon { width: 15px; height: 15px; }
.book-detail-modal .book-detail { margin-bottom: 17px; }
.book-detail-modal .book-detail .book-next-title { color: var(--study-ink); font-weight: 650; margin: 12px 0 8px; }
.book-chapters > details, .book-sources { border-bottom: 1px solid var(--study-border); padding: 9px 0; }
.book-chapters > details > summary, .book-sources > summary { cursor: pointer; padding: 7px 4px; color: var(--study-ink); }
.book-chapters > details > summary small { margin-left: 8px; color: var(--study-muted); }
.book-chapters .chapter-lesson { font-size: 14px; gap: 10px; padding: 10px 4px; }
.chapter-lesson > span:first-child { min-width: 0; }
.chapter-lesson > span:last-child { flex-shrink: 0; }
.book-sources { margin-top: 18px; }

.ce-page .ce-intro, .ce-page .ce-task, .ce-page .ce-mock { background: var(--study-paper); border-radius: 10px; }
.ce-intro-main { min-width: 0; }
.ce-intro-main h2 { color: var(--study-ink); margin: 6px 0; }
.ce-intro-main .ce-details { padding: 8px 12px; }
.ce-unit-heading h2, #exam-results > h2 { color: var(--study-ink); }
.ce-days button { font-size: 13px; }
.ce-question .ce-worked-example { margin: 0 0 14px; padding: 10px 12px; }
.ce-worked-example pre { margin: 8px 0 0; }
.ce-worked-example > p { margin-top: 8px; }
.ce-question fieldset { min-width: 0; }
.ce-question pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ce-task .ce-details { margin-top: 14px; }
.ce-lower { margin-top: 35px; }

.study-goal-now.goal-hero { min-height: auto; padding: clamp(20px,4vw,36px); display: block; background: #e0edf1; border-radius: 12px; }
.study-goal-now .goal-main { max-width: 680px; padding: 0; }
.study-goal-now .goal-main p { font-size: 16px; color: var(--study-ink); line-height: 1.7; }
.study-goal-now .goal-main .study-kicker { font-size: 13px; }
.study-goal-now .goal-main .text-link { display: inline-flex; margin: 12px 0 0 14px; }
.goal-roadmap ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; padding-left: 1.3em; }
.goal-roadmap ol p, .project-body p { color: var(--study-muted); font-size: 14px; line-height: 1.65; }
.project-card { border-radius: 9px; overflow: hidden; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px 15px; align-items: center; }
.project-body .deliverable b { font-size: 13px; }
.project-body .project-preview { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.source-box > summary { cursor: pointer; color: var(--study-ink); }

.review-stats { margin-bottom: 10px; }
.review-stats > div > span { font-size: 14px; color: var(--study-muted); }
.review-list { padding: 0; margin: 0; list-style: none; }
.review-list > li { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #dce7e9; }
.review-list > li:first-child { margin-top: 8px; }
.review-list > li > div { min-width: 0; }
.review-list h3 { margin: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.review-list p { margin: 5px 0 0; color: var(--study-muted); font-size: 14px; overflow-wrap: anywhere; }
.review-list .text-link { text-align: left; flex-shrink: 0; }
.study-section > details > summary { padding: 8px 0; cursor: pointer; font-size: 15px; }
.study-section > p { font-size: 15px; margin: 0 0 12px; color: var(--study-muted); }

.article-space .article-page-head { padding: 0 0 20px; }
.article-space .article-page-head h1 { margin: 0 0 7px; }
.article-space .article-banner { border-radius: 10px; overflow: hidden; min-height: 100px; }
.article-space .article-banner-label { min-height: auto; padding: 18px; min-width: 0; }
.article-space .article-banner-label::before { content: none; }
.article-space .article-banner-label h2 { font: 500 24px/1.3 var(--serif); letter-spacing: 0; }
.article-space .article-banner-label p { color: #e4eadb; font-size: 13px; letter-spacing: 0; overflow-wrap: anywhere; }
.article-space .article-banner-art { min-height: 0; }
.article-space .article-row { grid-template-columns: minmax(0,1fr) auto; min-width: 0; padding-left: 14px; }
.article-space .article-read-nav {
  position: sticky; top: 0; z-index: 2; background: #fbfaf4;
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px;
  padding: 8px 10px; border-bottom: 1px solid #cbd3be;
}
.article-space .article-read-nav .text-link { color: #355327; padding: 6px 0; }
.article-space [data-reading-block] { scroll-margin-top: 85px; }
.article-space .article-note { scroll-margin-top: 70px; }

@media (max-width: 780px) {
  .sidebar:not(.open) { visibility: hidden; }
}
@media (max-width: 800px) {
  .lesson-toolbar .focus-control { width: auto; padding: 4px 0; }
  .guided-heading .button-outline { min-height: 36px; padding: 5px 9px; }
  .guided-outline > summary { padding-top: 2px; }
}
@media (max-width: 640px) {
  .study-today-art { background-position: 74% 63%; }
  .guided-stage { padding: 16px; }
  .guided-heading .eyebrow { font-size: 12px; }
  .guided-step-count { gap: 6px; }
  .guided-heading h1 { font-size: 25px; }
  #course-catalog { padding: 14px; }
  #course-catalog .lesson-grid { display: grid; gap: 0; }
  #course-catalog .lesson-card { padding: 14px 0; border: 0; border-bottom: 1px solid var(--study-border); border-radius: 0; }
  #course-catalog .lesson-card h3 { margin: 5px 0; }
  #course-catalog .lesson-card p { margin: 0 0 4px; }
  #course-catalog .lesson-card-bottom { padding-top: 5px; }
  .book-cover { height: 118px; }
  .goal-roadmap ol { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .review-list > li { align-items: flex-start; }
  .review-list .text-link { max-width: 118px; }
  .article-space .article-banner-label p { font-size: 12px; }
  .article-space .article-banner-label h2 { font-size: 20px; }
}
.guided-example > span:has([data-action="guided-copy"]) { display: flex; gap: 8px 14px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.ce-rhythm-detail { margin-top: 14px; }
@media (max-width: 640px) {
  .guided-controls {
    background: #edf3f4;
    border-top: 1px solid var(--study-border);
    margin: 10px -5px 0;
    padding: 7px 5px max(7px, env(safe-area-inset-bottom));
  }
}

.first-routes { margin-bottom: 20px; }
.first-route-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,170px),1fr)); gap: 10px; }
.first-route-list article { padding: 10px 13px; border: 1px solid var(--study-border); border-radius: 7px; }
.first-route-list h3 { font-size: 15px; font-weight: 650; }
.first-route-list p { font-size: 14px; line-height: 1.6; margin: 4px 0 7px; color: var(--study-muted); }
.first-route-list .text-link { padding: 5px 0; }
.guided-foundation, .guided-precheck details, .guided-clion details, .article-start-terms {
  background: #f0f6f7; border: 1px solid var(--study-border); border-radius: 7px; padding: 9px 12px;
}
.guided-foundation, .guided-precheck, .guided-clion, .article-start-terms { margin: 10px 0 16px; }
.guided-foundation summary, .guided-precheck summary, .guided-clion summary, .article-start-terms summary { cursor: pointer; color: var(--study-ink); font-size: 14px; }
.guided-foundation dl, .article-start-terms dl { margin: 9px 0; }
.guided-foundation dd, .article-start-terms dd { margin: 3px 0 12px; line-height: 1.6; }
.guided-foundation p, .guided-precheck p, .guided-clion p { padding: 4px 0; color: var(--study-muted); font-size: 14px; }
.guided-precheck pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; margin: 6px 0; background: white; border-radius: 5px; }
.guided-precheck > button { display: block; margin-top: 5px; padding: 7px 0; }
.guided-solution { border-left: 3px solid #368192; background: #f1f6f6; padding: 7px 12px; }
.guided-clion details { margin-top: 7px; }
.guided-variation { margin: 12px 0 20px; }
.variation-instruction { color: var(--study-muted); line-height: 1.7; font-size: 15px; padding-bottom: 10px; }
.variation-scenes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.variation-scenes > div { background: #eff6f7; border: 1px solid var(--study-border); padding: 13px; border-radius: 7px; min-width: 0; }
.variation-scenes h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #175769; }
.variation-scenes b, .variation-scenes p { font-size: 14px; line-height: 1.55; }
.variation-scenes pre { font: 14px/1.65 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0; }
.variation-reason { margin: 8px 0; font-size: 15px; line-height: 1.65; }
.variation-controls { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.variation-controls .button { white-space: normal; text-align: left; }
.guided-evidence { font-size: 15px; color: #2b5968; margin-top: 7px; }
.ce-primer { background: #eef5f6; border-left: 3px solid #5999a5; padding: 10px 12px; margin: 10px 0 15px; }
.ce-primer b { margin-right: .5em; }
.ce-primer p { margin: 4px 0 0; }
.book-primer { padding: 9px 4px; background: #eff5f6; }
.book-primer .text-link { text-align: left; }
.article-start-terms { background: #f1f4e9; }
.article-start-terms dt { font-weight: 650; }
@media (max-width: 540px) {
  .first-route-list { grid-template-columns: minmax(0,1fr); }
  .first-route-list article { padding: 9px 10px; }
  .variation-scenes { grid-template-columns: minmax(0,1fr); }
  .guided-foundation dd { font-size: 14px; }
}

/* Keep prose at a readable measure while demos and code use the available width. */
.guided-stage > :is(p, ul, ol, dl),
.guided-heading p, .variation-instruction, .variation-reason { max-inline-size: 40em; }
.guided-stage > p:not(.guided-stage-kind), .guided-stage :is(dd, li) { line-height: 1.8; }
.guided-privacy, .guided-source, .guided-demo > small, .guided-output small {
  color: var(--study-muted);
  font-size: 13px;
  line-height: 1.6;
}
.guided-example pre, .guided-trace-code { max-inline-size: 100%; overflow-x: auto; }
@media (max-width: 640px) {
  .study-today-actions .text-link, .study-home > .study-page-heading > .text-link,
  .guided-review-actions button, .guided-heading .button-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .guided-outline > summary { min-height: 44px; align-content: center; }
  .topbar :is(.search-trigger, #mobile-menu) { min-width: 44px; min-height: 44px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --study-ink: #e1edf1;
    --study-muted: #adbec6;
    --study-accent: #286579;
    --study-link: #9bdbea;
    --study-border: #506774;
    --study-paper: #1b2a32;
    --study-inset: #243741;
    --study-field: #18252c;
    --study-selected: #2c5060;
    --study-focus: #a8e8f4;
    --study-good: #c3e9bf;
    --study-good-bg: #233c31;
    --study-retry: #ffe0ac;
    --study-retry-bg: #483625;
    --ink: var(--study-ink);
    --muted: var(--study-muted);
    --line: var(--study-border);
    --cyan: var(--study-link);
    background: #131e25;
  }
  body { background: #131e25; color: var(--study-ink); }
  .ambient { background: radial-gradient(ellipse at 80% 0%, #263e4b, transparent 65%); }
  .sidebar { background: #172731; border-color: var(--study-border); }
  .brand-mark, .breadcrumb b, .focus-control b { color: var(--study-link); }
  .study-today-art { background-color: #3b6576; background-blend-mode: multiply; }
  .guided-review-actions { border-color: var(--study-border); }
  #navigation a, .sidebar-settings, .sidebar-target, .sidebar-target small,
  .workspace-label, .local-caption, .storage-indicator, .topbar-date, .breadcrumb { color: var(--study-muted); }
  #navigation a:is(:hover, .active), .icon-button:hover, .search-result:hover {
    background: var(--study-selected); color: var(--study-ink);
  }
  .profile-avatar, .search-trigger, .search-trigger kbd { background: var(--study-inset); color: var(--study-ink); }
  .text-link, .text-link:hover { color: var(--study-link); }
  .button-outline, .button-outline:hover { background: var(--study-inset); color: var(--study-ink); }
  .skip-link { color: var(--study-ink); background: var(--study-field); }
  ::selection { color: #101c23; background: #a8e8f4; }
  :where(button, a, summary, input, select, textarea, pre):focus-visible { outline: 2px solid var(--study-focus); outline-offset: 3px; }
  :where(input, select, textarea, progress) { accent-color: var(--study-link); }
  dialog, .modal-heading .icon-button { background: var(--study-paper); color: var(--study-ink); }
  dialog::backdrop { background: #070e14b0; }
  dialog :is(.form-label, .form-note, .modal-heading p), .search-footer,
  .search-result :is(b, small), .study-page-heading p, .study-kicker,
  .study-today p:not(.study-kicker), .study-shortcuts article p:not(.study-kicker),
  .guided-heading p, .guided-outline > p, .guided-outline small, .guided-source,
  .guided-soft-note, .guided-summary p, .guided-route p, .guided-route-action > span,
  .guided-demo-views b, .guided-demo-caption, .guided-trace-code small,
  .guided-example > span, .guided-stage .guided-stage-kind, .variation-scenes h3,
  .guided-evidence { color: var(--study-muted); }
  .guided-soft-note, .guided-demo-caption { color: var(--study-muted) !important; }
  dialog :is(input:not([type="checkbox"], [type="radio"]), select, textarea),
  .ce-unit-picker select, #guided-input, .guided-demo input, .editor-body textarea {
    background: var(--study-field);
    border-color: var(--study-border);
    color: var(--study-ink);
  }
  :is(dialog, .guided-stage, .editor-body, .inline-search) :is(input, textarea)::placeholder { color: var(--study-muted); }
  .study-today, .study-shortcuts article, .study-section, .guided-example,
  .guided-choices label, .guided-demo, .guided-demo-views > div, .variation-scenes > div {
    border-color: var(--study-border);
  }
  .guided-stage > p:not(.guided-stage-kind), .guided-stage :is(dd, li),
  .guided-example code, .guided-output, .guided-output b { color: var(--study-ink); }
  .guided-terms, .guided-example > span, .guided-example pre, .guided-trace-code,
  .guided-help p, .guided-choices label, .guided-route-item, .guided-path-option,
  .guided-demo, .guided-demo-views > div, .guided-foundation, .guided-precheck details,
  .guided-clion details, .guided-precheck pre, .guided-solution, .variation-scenes > div,
  .guided-controls, .ce-primer, .book-primer { background: var(--study-inset); }
  .variation-controls .button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--study-focus); }
  .guided-choices label:has(input:checked), .guided-step-link.active,
  .guided-route-item.current, .guided-path-option.active, .guided-trace-code > span.active {
    background: var(--study-selected); color: var(--study-ink);
  }
  .guided-terms dt, .guided-outline .guided-step-link.active { color: var(--study-link); }
  .guided-output, .guided-feedback.good { background: var(--study-good-bg); color: var(--study-good); }
  .guided-feedback.retry { background: var(--study-retry-bg); color: var(--study-retry); }
  .lesson-content, .practice-editor, .book-card, .book-chapters, .chapter-lesson,
  .review-stats > div, .project-card, .source-box { background: var(--study-paper); border-color: var(--study-border); }
  .lesson-content-heading p, .lesson-step p, .editor-body > p, .editor-body .editor-honesty,
  .project-body p, .source-box p, .form-label { color: var(--study-muted); }
}
