/* Reading, practice and feedback share one paper-like surface inside the workspace. */
.workspace-view .teacher-settings details,
.workspace-view .device-teacher details details { border-top:1px solid var(--reader-line); padding-block:.75rem; }
.workspace-view .teacher-settings summary,
.workspace-view .device-teacher summary { cursor:pointer; font-weight:650; }
.workspace-view .teacher-settings code,
.workspace-view .device-teacher code { overflow-wrap:anywhere; }
.workspace-view .teacher-command { white-space:pre-wrap; padding:.65rem; background:var(--reader-tint); user-select:all; }
.workspace-view .device-pair { font-size:1.25rem; letter-spacing:.07em; background:var(--reader-tint); padding:.35rem .55rem; user-select:all; }
.workspace-view .device-teacher [hidden] { display:none!important; }
.workspace-view .foundation-workshop summary small {
  display: inline-block;
  margin-inline-start: .6rem;
  color: var(--reader-sub);
  white-space: nowrap;
}
.workspace-view .foundation-workshop form { margin-block: 1.25rem; }
body.workspace-view {
  --reader-paper: #fcfbf6;
  --reader-page: #f4f3ed;
  --reader-ink: #202b27;
  --reader-sub: #505d55;
  --reader-line: #c8cec2;
  --reader-field: #818f81;
  --reader-pine: #155548;
  --reader-tint: #e5efe7;
  --reader-warm: #f6ecd9;
  --reader-ochre: #825316;
  --reader-serif: Georgia, "Times New Roman", serif;

  .lesson-workspace, .learning-intro {
    --study-surface: var(--reader-paper);
    --study-raised: var(--reader-page);
    --study-line: var(--reader-line);
    --study-ink: var(--reader-ink);
    --study-muted: var(--reader-sub);
    --study-action: var(--reader-pine);
  }
  .lesson-workspace > p:first-child { margin-bottom: clamp(1.3rem, 3vw, 2.25rem); }
  .lesson-workspace > p:first-child a { color: var(--reader-sub); font-size: .86rem; }
  .lesson-workspace > .kicker { margin-bottom: .55rem; }
  .lesson-workspace h1, .lesson-sample h1, .learning-intro h1, .study-title h1 {
    max-width: 25ch;
    font: 500 clamp(2.05rem, 4.5vw, 3.5rem)/1.07 var(--reader-serif);
    letter-spacing: -.038em;
    text-wrap: balance;
  }
  .lesson-workspace .split {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(16rem, 1fr);
    gap: clamp(1rem, 2.6vw, 2.2rem);
  }
  .lesson-workspace article.panel, .lesson-sample article.panel, .learning-intro .study-card {
    min-width: 0;
    padding: clamp(1rem, 3.2vw, 2.5rem);
    border: 1px solid var(--reader-line);
    border-radius: 0;
    background: var(--reader-paper);
    box-shadow: none;
  }
  .lesson-workspace article.panel > p, .lesson-sample article.panel > p, .lesson-step p {
    max-width: 65ch;
    line-height: 1.73;
  }
  .lesson-workspace article.panel video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 0;
    background: #232f2b;
  }
  .lesson-workspace video + .muted { margin: .55rem 0 1.45rem; font-size: .8rem; }
  .lesson-intro { margin-block-end: 1.5rem; font-size: clamp(1.02rem, 2vw, 1.14rem); }
  .lesson-step { margin-block: 1.55rem; padding-block-start: 1.35rem; }
  .lesson-step h2, .lesson-sample h2, article.panel .industry-case h2, .prompt-workbench h2 {
    margin-bottom: .65rem;
    font: 500 clamp(1.45rem, 3vw, 1.85rem)/1.18 var(--reader-serif);
    letter-spacing: -.023em;
  }
  .lesson-workspace .stack > .panel {
    margin: 0;
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--reader-line);
    border-top: 2px solid var(--reader-pine);
    border-radius: 0;
    background: var(--reader-paper);
    box-shadow: none;
  }
  .lesson-workspace .stack h2 { font-size: 1.1rem; line-height: 1.3; }
  .lesson-workspace .stack :is(p, li) { font-size: .91rem; line-height: 1.56; }
  .lesson-workspace .stack audio { max-width: 100%; }
  .lesson-workspace .stack .rows a { overflow-wrap: anywhere; }

  .lesson-depth {
    gap: .8rem 1.5rem;
    margin: 1.25rem 0;
    padding: .85rem 0;
    border: solid var(--reader-line);
    border-width: 1px 0;
    border-radius: 0;
    background: transparent;
  }
  .lesson-depth p { margin-top: .15rem; font-size: .88rem; }
  .lesson-depth nav {
    flex-wrap: nowrap;
    gap: 0;
    max-width: 100%;
    padding: 0;
    border: 1px solid var(--reader-field);
    border-radius: 0;
    background: var(--reader-paper);
  }
  .lesson-depth nav a {
    min-height: 42px;
    padding: .45rem .9rem;
    border-radius: 0;
    color: var(--reader-sub);
  }
  .lesson-depth nav a + a { border-inline-start: 1px solid var(--reader-field); }
  .lesson-depth nav a[aria-current=true] {
    color: var(--reader-pine);
    background: var(--reader-tint);
    box-shadow: inset 0 -2px var(--reader-pine);
  }
  .lesson-depth nav a:hover { background: var(--reader-tint); }
  .lesson-video {
    padding: 1rem;
    border: 1px solid var(--reader-line);
    border-inline-start: 3px solid var(--reader-pine);
    border-radius: 0;
    color: var(--reader-ink);
    background: var(--reader-tint);
  }
  .lesson-video :is(h2, a), .lesson-sources a, .tutor-result a { color: var(--reader-pine); }
  .lesson-video h2 { margin-bottom: .4rem; font: 650 .97rem/1.35 var(--quiz-font); }
  .lesson-sources, .lesson-recap { border-block: 1px solid var(--reader-line); }
  :is(.lesson-sources, .lesson-recap, .practice-help) summary { color: var(--reader-pine); font-weight: 600; }
  .lesson-readings li + li { margin-top: .7rem; }
  .lesson-readings small { color: var(--reader-sub); }
  .tutor-result:not(:empty) { border-color: var(--reader-line); border-radius: 0; background: var(--reader-tint); }

  /* References and evidence are arranged as labelled columns. */
  .quiz-visual, .diag-body .quiz-visual, .quiz-visual.quiz-illustration {
    margin: 1.1rem 0 1.45rem;
    padding: .95rem 1rem;
    border: 1px solid var(--reader-line);
    border-top: 2px solid var(--reader-pine);
    border-radius: 0;
    color: var(--reader-ink);
    background: #edf1e9;
  }
  .quiz-visual figcaption, .diag-body .quiz-visual figcaption { margin-bottom: .7rem; color: var(--reader-pine); font-weight: 650; }
  .quiz-visual ul { gap: 1px; }
  .quiz-visual li, .diag-body .quiz-visual li, .quiz-visual.quiz-illustration li {
    min-width: 0;
    padding: .65rem .75rem;
    border: 0;
    border-inline-start: 1px solid var(--reader-line);
    border-radius: 0;
    color: var(--reader-ink);
    background: var(--reader-paper);
  }
  .quiz-visual li strong, .diag-body .quiz-visual li strong { margin-bottom: .25rem; color: var(--reader-sub); font: 650 .8rem/1.4 var(--quiz-font); }
  .quiz-visual li span { font-size: .96rem; line-height: 1.5; }
  .quiz-illustration-label li::after { background: repeating-linear-gradient(90deg, var(--reader-sub) 0 1px, transparent 1px 3px, var(--reader-sub) 3px 5px, transparent 5px 8px); }
  .quiz-illustration-documents li::before {
    color: var(--reader-sub);
    border-color: currentColor;
    background: linear-gradient(currentColor,currentColor) .2rem .22rem/.58rem 1px no-repeat, linear-gradient(currentColor,currentColor) .2rem .46rem/.4rem 1px no-repeat;
  }

  .industry-case, .workbench-sheet, .workbench-transfer {
    border: 1px solid var(--reader-line);
    border-radius: 0;
    background: var(--reader-page);
  }
  .industry-case, .workbench-transfer { border-top: 2px solid var(--reader-pine); }
  .industry-case .kicker { color: var(--reader-pine); }
  .industry-facts > div, .workbench-facts > div {
    border: 0;
    border-inline-start: 2px solid #9aac98;
    border-radius: 0;
    background: var(--reader-paper);
  }
  .industry-facts dt, .workbench-facts dt { color: var(--reader-sub); font-size: .82rem; }
  .industry-facts dd, .workbench-facts dd { color: var(--reader-ink); }
  .workbench-steps button { border-radius: 0; border-color: var(--reader-field); background: transparent; color: var(--reader-sub); }
  .workbench-steps button[aria-current=step] { border-color: var(--reader-pine); background: var(--reader-tint); color: var(--reader-pine); }
  .workbench-sheet blockquote { border-radius: 0; border-color: var(--reader-pine); background: var(--reader-paper); }
  .industry-decisions label, .workbench-options label, .learning-intro .time-choice label {
    border-color: var(--reader-field);
    border-radius: 0;
    background: var(--reader-paper);
  }
  .industry-decisions label:has(input:checked), .workbench-options label:has(input:checked), .learning-intro .time-choice label:has(input:checked) {
    border-color: var(--reader-pine);
    background: var(--reader-tint);
  }
  :is(.industry-decisions, .workbench-options, .time-choice) input { accent-color: var(--reader-pine); }
  .industry-decisions label:focus-within { outline: 2px solid var(--reader-pine); outline-offset: 2px; }
  .industry-feedback, .workbench-feedback { border-radius: 0; border-color: var(--reader-pine); background: var(--reader-tint); }
  .intake-preview { max-width: none; border-color: var(--reader-line); border-inline-start: 3px solid var(--reader-pine); border-radius: 0; background: var(--reader-tint); }
  .intake-preview li { border-color: #a6b8a7; border-radius: 0; color: var(--reader-pine); }
  .intake-track { margin-block: 1.5rem; }
  .learning-intro .study-card input:not([type=radio]) { background: var(--reader-paper); }
  .learning-intro .plan-steps strong { font-variant-numeric: tabular-nums; }

  .study-view {
    --q-bg: var(--reader-paper);
    --q-row: var(--reader-paper);
    --q-edge: var(--reader-line);
    --q-text: var(--reader-ink);
    --q-sub: var(--reader-sub);
    --q-mint: var(--reader-pine);
    --q-violet: #465e87;
    --q-font: var(--quiz-font);
  }
  .study-view :is(.study-paper, .study-scorehead, .study-panel) { border-radius: 0; background: var(--reader-paper); }
  .study-view :is(.study-paper, .study-scorehead) { border-top: 2px solid var(--reader-pine); }
  .study-view .notice, .diag-body .notice { color: var(--reader-ink); border-color: var(--reader-pine); background: var(--reader-tint); }
  .study-view .study-question legend {
    max-width: 49ch;
    margin-bottom: .55rem;
    font: 600 clamp(1.18rem, 2.25vw, 1.45rem)/1.42 var(--quiz-font);
  }
  .study-track i, .diag-segments i { border-radius: 0; background: var(--reader-line); }
  .study-track .current, .diag-segments .current { background: var(--reader-pine); }
  .study-track .done, .diag-segments .done { background: #7a9781; }
  .study-options, .diagnostic-dialog .diag-options { gap: .42rem; }
  .study-view :is(button,.button), .diagnostic-dialog :is(button, .button) {
    border-radius: 0;
    background: var(--reader-pine);
    color: var(--reader-paper);
  }
  .study-view :is(button,.button):hover, .diagnostic-dialog :is(button,.button):hover { background: #104538; }
  .study-view .secondary, .diagnostic-dialog :is(button.secondary,.diag-close) {
    border-color: var(--reader-field);
    color: var(--reader-ink);
    background: transparent;
  }
  .study-view :is(button,.button).secondary:hover, .diagnostic-dialog :is(button.secondary,.diag-close):hover { background: var(--reader-tint); }
  .study-view .study-option, .diagnostic-dialog .diag-option {
    min-height: 46px;
    padding: .65rem .85rem;
    border-color: var(--reader-field);
    border-radius: 0;
    justify-content: stretch;
    text-align: start;
    background: var(--reader-paper);
    color: var(--reader-ink);
  }
  .study-option .study-answer-copy { width: 100%; text-align: start; font-size: 1rem; font-weight: 500; }
  .study-option .study-key, .diag-option .diag-key {
    width: 1.5rem;
    height: 1.5rem;
    border-color: #a3ada1;
    border-radius: 0;
    color: var(--reader-sub);
    background: var(--reader-page);
  }
  .study-view .study-option:hover:not(:disabled), .diagnostic-dialog .diag-option:hover:not(:disabled) { color: var(--reader-ink); background: var(--reader-tint); }
  .study-view .study-option[aria-pressed=true], .diagnostic-dialog .diag-option[aria-pressed=true] { border-color: var(--reader-pine); background: var(--reader-tint); }
  :is(.study-view .study-option, .diagnostic-dialog .diag-option).answer-hit { border-color: var(--reader-pine); color: var(--reader-ink); background: var(--reader-tint); }
  :is(.study-view .study-option, .diagnostic-dialog .diag-option).answer-miss { border-color: var(--reader-ochre); color: var(--reader-ink); background: var(--reader-warm); }
  .answer-feedback { border-color: var(--reader-pine); border-radius: 0; background: var(--reader-tint); color: #193f33; }
  .answer-feedback.miss { border-color: var(--reader-ochre); background: var(--reader-warm); color: #4e3b21; }
  .answer-source a { color: var(--reader-pine); }
  .study-scorehead { border-color: var(--reader-line); }
  .study-score-note { color: var(--reader-sub); }
  .study-sequence > span, .study-verdict, .study-review dl div { border-radius: 0; }
  .study-sequence .hit, .study-verdict.hit { color: var(--reader-pine); background: var(--reader-tint); }
  .study-sequence .miss, .study-verdict.miss { color: #674419; background: var(--reader-warm); }
  .study-review dl div { background: var(--reader-page); }
  .study-skill[data-skill=evidence], .study-skill[data-skill=value] { --meter: #567891; }
  .study-skill progress { border-radius: 0; background: var(--reader-line); }
  .study-skill progress::-webkit-progress-bar { border-radius: 0; background: var(--reader-line); }
  .study-skill progress::-webkit-progress-value { border-radius: 0; }
  .study-skill progress::-moz-progress-bar { border-radius: 0; }

  .diagnostic-dialog {
    --surface: var(--reader-paper);
    --ink: var(--reader-ink);
    --muted: var(--reader-sub);
    --line: var(--reader-line);
    --green: var(--reader-pine);
    --serif: var(--quiz-font);
    color-scheme: light;
    border-radius: 0;
    border-color: var(--reader-field);
    background: var(--reader-paper);
    box-shadow: 0 1rem 4rem #18332730;
  }
  .diagnostic-dialog::backdrop { background: #172b25a8; }
  .diag-art { border-radius: 0; }
  .diag-bar { background: var(--reader-page); }
  .diag-progress, .diag-sharing summary, .diag-bar > span { color: var(--reader-sub); }
  .diag-bar i { border-radius: 0; transform: none; box-shadow: none; background: var(--reader-pine); }
  .diag-option .diag-radio { border-color: var(--reader-field); }
  .diag-option[aria-pressed=true] .diag-radio { border-color: var(--reader-pine); background: var(--reader-paper); }
  .diag-option[aria-pressed=true] .diag-key { color: var(--reader-pine); border-color: var(--reader-pine); }
  .diag-body :is(textarea,input) { background: var(--reader-paper); border-color: var(--reader-field); }
  .diag-body .error { color: #903b32; }
  .diagnostic-dialog :focus-visible { outline-color: var(--reader-pine); }
}

@media (max-width: 52rem) {
  body.workspace-view .lesson-workspace .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 38rem) {
  body.workspace-view {
    .quiz-visual ul { grid-auto-flow: row; grid-template-columns: 1fr; }
    .quiz-visual li + li { border-top: 1px solid var(--reader-line); }
    .lesson-depth nav { width: 100%; }
    .lesson-depth nav a { flex: 1; }
    .study-report .study-sequence { gap: .35rem; }
  }
}

/* Free interactive study lessons */
.skills-study {
  max-width:66rem;
  margin-inline:auto;
}
.skills-study-back { display:inline-block; margin-bottom:1rem; font-weight:600; }
.skills-study .page-heading { margin-bottom:1.2rem; }
.skills-study .page-heading .muted { max-width:63ch; }
.skills-study-player { margin:0; }
.skills-study-player video {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16 / 9;
  background:#10202e;
  border:1px solid #21394b;
}
.skills-study-player figcaption { margin-top:.5rem; color:#45594e; font-size:.88rem; }
.skills-study .film-dialog { border-radius:.25rem; }
.skills-study-links ol { margin:.25rem 0 1rem; padding-inline-start:1.4rem; }
.skills-study-links p { margin:.8rem 0 .25rem; font-weight:650; }
.skills-study-links li { padding:.18rem 0; }
.skills-study :is(.skills-study-chapters,.skills-study-sources,.skills-study-transcript,.skills-study-navigation) {
  margin-top:1.6rem;
  padding-top:1rem;
  border-top:1px solid #c8d2c6;
}
.skills-study-chapters h2, .skills-study-sources h2 { font-size:clamp(1.25rem,3vw,1.6rem); margin-bottom:.6rem; }
.skills-study-chapters ol {
  list-style:none;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));
  gap:.5rem;
  margin:0;
  padding:0;
}
.skills-study-chapters button {
  display:flex;
  align-items:baseline;
  gap:.65rem;
  width:100%;
  min-height:44px;
  text-align:left;
  color:#244b41;
  background:#f5f7f0;
  border:1px solid #b9c9be;
  border-radius:0;
}
.skills-study-chapters button:hover { background:#e4eee5; }
.skills-study-chapters button span { color:#4b665a; font-variant-numeric:tabular-nums; }
.skills-study-transcript summary { font-weight:650; cursor:pointer; }
.skills-transcript-controls {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.45rem 1rem;
  padding-block:.65rem;
}
.skills-transcript-controls label {
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  min-height:44px;
}
.skills-transcript-controls [role="status"] { font-size:.88rem; }
.skills-transcript-scroll {
  max-height:clamp(12rem,45vh,25rem);
  overflow-y:auto;
  list-style:none;
  margin:0;
  padding:.25rem;
  border:1px solid #c8d2c6;
  background:#fbfaf5;
}
.skills-transcript-line {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:baseline;
  gap:.35rem;
  padding:.14rem .5rem .14rem .2rem;
  border-inline-start:3px solid transparent;
  color:#26322d;
}
.skills-transcript-line.is-current { background:#e7efe7; border-inline-start-color:#3f7965; }
.skills-study .skills-transcript-line button.plain {
  padding-inline:.38rem;
  border:0;
  font-size:.82rem;
  font-variant-numeric:tabular-nums;
}
.skills-transcript-line p { margin:.32rem 0; line-height:1.65; }
.skills-transcript-line p span { border-radius:.15rem; transition:background-color .11s ease-out; }
.skills-transcript-line p .is-spoken { background:#f8d873; color:#24231b; box-shadow:0 .12em 0 #a45b14; }
@media (prefers-reduced-motion:reduce) { .skills-transcript-line p span { transition:none; } }
@media (min-width:960px) {
  .skills-study-stage:has(details[open]) {
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);
    align-items:start;
    gap:1rem;
  }
  .skills-study-stage .skills-study-transcript[open] { margin:0; padding:0; border:0; }
}
.skills-study-sources ul { padding-inline-start:1.35rem; }
.skills-study-navigation { display:flex; gap:1rem; flex-wrap:wrap; align-items:center; }
