/* Source reading, retained recordings, assessment workspaces and the read-only chapter archive. */
.source-reading-checkpoint { padding: .75rem; border-left: 3px solid #cab77b; color: #ded7b7; background: #233323; }

/* Run forms and retained receipts share materials, not authority. */
.recording-deck { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; margin-block: 1.2rem; }
.recording-deck > * { min-width: 0; }
.recording-deck > section > h5 { margin: 0 0 1rem; padding: 0; color: #ded6ae; font: 500 .85rem/1.6 var(--font-mono); }
.chapter-run-form { margin-block: 1rem; }
.chapter-run-form .labelled { font-size: .9rem; }
.chapter-run-form textarea { min-height: 10rem; background: #07140d; font: .85rem/1.65 var(--font-mono); }
.chapter-run-form .hint { font-size: .8rem; }
.field-recording { border: 1px solid #768064; border-radius: 6px; padding: clamp(.75rem, 2vw, 1.3rem); background: linear-gradient(145deg, #253328, #111e17 65%); box-shadow: inset 0 0 0 3px #0a150e; }
.field-recording > h3 { color: #eadfbe; font: 600 clamp(1.25rem, 2vw, 1.55rem)/1.4 var(--font-display); }
.recording-runs { padding: .65rem; border: 1px solid #647355; border-radius: 4px; background: #101e15; }
.recording-runs button { flex: 1 1 9rem; white-space: normal; font: .8rem/1.5 var(--font-mono); }
.recording-runs button[aria-pressed="true"] { border-color: #c5b37f; background: #3c472e; color: #f2e6c2; box-shadow: inset 0 -2px #c5b37f; }
.recording-input, .recording-provenance { margin-block: 1rem; }
.recording-trail h4 { color: #c7c6a6; font: .8rem/1.6 var(--font-mono); }
.recording-trail ol { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.recording-trail button { min-height: 74px; border-radius: 4px; }
.recording-trail button[aria-current="step"] { border-color: #c7b77e; background: #34422b; box-shadow: inset 3px 0 #c7b77e; }
.recording-trail-number { color: #d5c58d; }
.recording-trail-tool { font-size: .8rem; }
.recording-trail-status { font-size: .75rem; }
.recording-stage { padding: 0; border: 0; background: none; }
.recording-step-title { color: #e1d7b1; font: 500 1rem/1.5 var(--font-mono); }
.recording-request, .recording-result { border: 1px solid #5b745e; border-radius: 4px; padding: .9rem; background: #0c1b13; }
.recording-result { border-top: 3px solid #b1a372; background: #1a281d; }
.recording-request pre { font-size: .8rem; }
.recording-question { line-height: 1.6; font-weight: 600; }
.recording-choices button { font-size: .84rem; line-height: 1.6; }
.recording-choices button[aria-pressed="true"] { border: 2px solid #c5b37b; background: #35482d; box-shadow: inset 3px 0 #c5b37b; }
.recording-choices button[data-result="review"] { border-color: #c2a173; background: #382c1e; }
.recording-choice-feedback { padding: .8rem; border-left: 3px solid #b6c697; background: #263a25; color: #d9e8c9; font-size: .82rem; }
.recording-choice-feedback:empty { display: none; }
.recording-choice-feedback[data-result="review"] { border-color: #c2a173; background: #30271b; color: #e1d0ae; }
.recording-awaiting { padding: 1.2rem 1rem; border: 1px dashed #8f956d; color: #c8d0b6; font-size: .88rem; line-height: 1.7; }
.recording-result .recording-receipt { margin: 0; padding: 0; border: 0; }
.recording-receipt > h5 { color: #dad9ba; font-size: .95rem; }
.recording-reading-feedback { padding: .8rem; border: 1px solid #798c64; border-left-width: 3px; border-radius: 3px; background: #283a25; font-size: .85rem; }
.recording-reading-feedback[data-result="review"] { border-color: #ba9d70; background: #30281c; color: #e5d6b7; }
.recording-reading-form .labelled { margin-block: .3rem; font-size: .86rem; }
.recording-choice-description { margin: 0 0 .5rem; color: #bdc9b2; font-size: .8rem; line-height: 1.6; }
.recording-choice-description:empty { display: none; }
.recording-reading > h5 { color: #e6d9ac; font-size: 1rem; }
@media (min-width: 1250px) {
  .recording-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .field-recording { padding: .65rem; }
  .recording-request, .recording-result { padding: .7rem; }
  .recording-trail button { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .chapter-run-form textarea { min-height: 9rem; }
}
@media (forced-colors: active) {
  .recording-choices button[aria-pressed="true"], .recording-runs button[aria-pressed="true"], .recording-trail button[aria-current="step"] { border: 3px solid Highlight; }
  .field-recording, .recording-request, .recording-result { border: 1px solid CanvasText; }
}

/* Evidence stays inspectable beside the learner's explanation and declared controls. */
.evidence-choice-meaning { font-size: .8rem; line-height: 1.6; color: #c0cbb3; overflow-wrap: anywhere; margin: .3rem 0 .8rem; }
.evidence-choice-meaning:empty { display: none; }

/* Diagnosis workspaces retain their frozen sources and native assessment state. */
.assessment-feedback-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-block: 1rem; }
.assessment-feedback-card { min-width: 0; padding: 1rem; border: 1px solid #70805c; border-top: 3px solid #b7c98e; border-radius: 5px; background: #15251a; }
.assessment-feedback-card.needs-review { border-top-color: #e2b66b; background: #201e14; }
.assessment-feedback-card h4 { margin-top: 0; font: 600 1.05rem/1.4 var(--font-display); }
.assessment-check-status { display: inline-block; padding: .2rem .5rem; border: 1px solid currentColor; font: 600 .8rem/1.4 var(--font-mono); }
.assessment-feedback-card.needs-review .assessment-check-status { color: #f0ca8a; }
.assessment-feedback-card .facts { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.assessment-feedback-card .facts dd { text-align: left; margin-bottom: .7rem; overflow-wrap: anywhere; }
.assessment-feedback-question { padding-left: .7rem; border-left: 2px solid #91b8a1; }
.assessment-feedback button { white-space: normal; }
@media (max-width: 760px) { .assessment-feedback-grid { grid-template-columns: minmax(0, 1fr); } }
@media (forced-colors: active) { .assessment-feedback-card { border: 2px solid CanvasText; } }

.assessment-workbench.has-case-file { grid-template-columns: minmax(0, 1fr); }
.assessment-workspaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-block: 1rem; }
.assessment-workspaces button { display: grid; align-content: start; gap: .45rem; min-height: 80px; padding: .75rem; white-space: normal; font: .8rem/1.5 var(--font-mono); text-align: left; }
.assessment-workspaces button[aria-pressed="true"] { color: #f1e3b9; background: #3b472b; border-color: #c7b578; box-shadow: inset 0 -3px #c7b578; }
.assessment-pane { min-width: 0; padding: clamp(.75rem, 2vw, 1.3rem); border: 1px solid #738260; border-radius: 5px; background: #102016; box-shadow: inset 0 2px 10px #0005; }
.assessment-pane[hidden] { display: none; }
.assessment-pane > h3 { font: 600 1.25rem/1.4 var(--font-display); }
.assessment-pane pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28rem; overflow: auto; }
.assessment-pane > .primary { display: inline-block; margin-block: 1rem .5rem; }
.assessment-chapter-connection { padding: .8rem 1rem; margin-block: 1rem; border-left: 3px solid #bbd79a; background: #1a2a20; }
.assessment-chapter-connection p { margin-block: .5rem; }
.assessment-assistance { padding-left: .75rem; border-left: 2px solid #91b8a1; }
.assessment-case { grid-column: 1 / -1; padding: clamp(.75rem, 2vw, 1.3rem); color: #e8eddf; background: #243021; border: 1px solid #8b8b67; border-top: 5px solid #c6b783; border-radius: 5px; box-shadow: inset 0 1px #f6ffe833, 0 5px 0 #090f0bb3; }
.assessment-case[data-scenario="relay"] { border-top-color: #9dcbd3; }
.assessment-case[data-scenario="inbox"] { border-top-color: #dbbd8c; }
.case-file-stamp { font: 600 .75rem/1.7 var(--font-mono); letter-spacing: .08em; color: #c6d8b4; }
.assessment-case > h4 { margin-block: .6rem; font: 600 1.3rem/1.4 var(--font-display); }
.assessment-case > p { max-width: 65ch; line-height: 1.65; }
.case-file-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
.case-file-tabs button { flex: 1 1 9rem; min-height: 48px; border: 1px solid #83907a; border-bottom: 0; border-radius: .35rem .35rem 0 0; background: #30382e; color: #f0f3e8; text-align: left; white-space: normal; font: 600 .8rem/1.5 var(--font-mono); padding: .7rem; }
.case-file-tabs button[aria-pressed="true"] { background: #e5dfc5; color: #202c26; box-shadow: inset 0 3px #4c6a4b; }
.case-file-contents { padding: clamp(.8rem, 2vw, 1.3rem); background: #e5dfc5; color: #202c26; border: 1px solid #a9b29d; }
.case-file-contents > h4 { margin: 0 0 1rem; font: 600 1rem/1.5 var(--font-mono); }
.case-document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .8rem; }
.case-document { min-width: 0; padding: 1rem; border: 1px solid #a4ab95; background: #f3ecd7; box-shadow: 2px 3px 0 #28362618; }
.case-document-origin { font: 600 .75rem/1.6 var(--font-mono); letter-spacing: .07em; color: #486045; }
.case-document h5, .case-file-contents h5 { margin: .5rem 0 .9rem; font: 600 1.05rem/1.5 var(--font-display); overflow-wrap: anywhere; }
.case-document h6 { margin: 1rem 0 .5rem; font: 600 .8rem/1.5 var(--font-mono); }
.case-document .facts { grid-template-columns: minmax(0, 1fr); gap: .15rem; margin: 0; }
.case-document .facts dt { color: #435640; font-size: .75rem; }
.case-document .facts dd { text-align: left; color: #202c26; margin: 0 0 .8rem; font-family: var(--font-mono); overflow-wrap: anywhere; }
.case-document-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; margin: .5rem 0 0; }
.case-document-empty { border: 1px dashed #77876e; padding: 1rem; line-height: 1.6; }
.case-record-list details { color: #202c26; border-color: #a4ab95; background: #f3ecd7; margin-bottom: .6rem; }
.case-record-list pre { color: #202c26; background: #f3ecd7; }
@media (forced-colors: active) {
  .assessment-case, .case-file-contents, .case-document { color: CanvasText; background: Canvas; border: 2px solid CanvasText; box-shadow: none; }
  .case-file-tabs button[aria-pressed="true"] { border: 3px solid Highlight; }
}
@media (max-width: 600px) {
  .assessment-workspaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assessment-pane { padding-inline: .5rem; }
  .assessment-terminal .facts { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .assessment-terminal .facts dd { text-align: left; margin-bottom: .5rem; }
}
@media (forced-colors: active) {
  .assessment-pane, .assessment-workspaces button[aria-pressed="true"], .assessment-chapter-connection { border: 2px solid CanvasText; }
}

.assessment-identity h2 { color: #eee0b6; font: 600 clamp(1.4rem, 2.7vw, 2rem)/1.3 var(--font-display); }
.assessment-identity { margin-block: 1rem; padding: 1rem 1.1rem; border: 1px solid #79805b; border-left: 4px solid #c5b27d; background: repeating-linear-gradient(0deg, transparent, transparent 23px, #c7c48908 24px), #1b2a1d; border-radius: 4px; }
.assessment-identity h2 { margin: .6rem 0; }
.assessment-identity > p:last-child { color: #c8d0b8; margin-bottom: 0; }
.assessment-specification { margin-block: 1rem; padding: .8rem; border: 1px solid #5d7256; border-radius: 4px; background: #102016; }
.assessment-specification > summary { color: #d3d6b4; }
.assessment-workspace-state { font: .75rem/1.55 var(--font-mono); color: #c2c9ad; }
.assessment-workspaces button:disabled { opacity: 1; color: #aeb59b; background: #142017; border-style: dashed; }
.assessment-workspaces button:disabled .assessment-workspace-state { color: #a6b197; }
.assessment-task { padding: 1rem; border: 1px solid #7c805b; border-radius: 4px; background: #1e2d1e; }
.assessment-task h3 { color: #e3d5aa; font: 500 .95rem/1.6 var(--font-mono); }
.assessment-task > h3:first-child { margin-top: 0; }
.assessment-task .assessment-probe { padding: .8rem; border: 1px solid #6c815e; border-left: 3px solid #bcae77; border-radius: 3px; background: #0e2015; }
.assessment-actions { padding: .9rem; border: 1px solid #728360; border-top: 3px solid #c3af77; border-radius: 4px; background: #213021; }
.assessment-evidence-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: 1rem; }
.assessment-evidence-links button { white-space: normal; text-align: left; }
.assessment-submit { max-width: none; }
.assessment-question-group { min-width: 0; margin: .7rem 0; padding: .9rem; border: 1px solid #75815f; border-radius: 5px; background: #17271b; }
.assessment-question-group legend { max-width: 100%; padding: .25rem .5rem; color: #dfd2a3; font: 500 .8rem/1.7 var(--font-mono); }
.assessment-question-group .labelled { margin-block: .7rem; font-size: .87rem; }
.assessment-question-group .hint { font-size: .8rem; }
.assessment-question-group textarea { min-height: 10rem; }
.assessment-submit > button { justify-self: start; white-space: normal; }
.assessment-pane > .mission-trace { padding: .8rem; border: 1px solid #596f51; border-radius: 4px; background: #0a1910; }
.assessment-pane > .mission-trace details { border-color: #627858; }
.assessment-question-group textarea:focus-visible { outline: 2px solid #e7d59c; outline-offset: 3px; }
@media (max-width: 600px) {
  .assessment-identity, .assessment-task, .assessment-question-group { padding: .7rem; }
  .assessment-terminal .assessment-pane { padding: .65rem; }
  .assessment-terminal .case-file-contents, .assessment-terminal .case-document { padding: .7rem; }
  .assessment-workspaces { gap: .4rem; }
  .assessment-workspaces button { padding: .6rem; }
  .assessment-evidence-links button, .assessment-submit > button { width: 100%; }
  .assessment-question-group legend { font-size: .75rem; }
}
@media (forced-colors: active) {
  .assessment-identity, .assessment-specification, .assessment-task, .assessment-actions, .assessment-question-group { border: 1px solid CanvasText; }
  .assessment-workspaces button[aria-pressed="true"] { border: 3px solid Highlight; }
  .assessment-workspace-state { color: ButtonText; }
}

.assessment-stages[hidden] { display: none; }
@media (min-width: 1250px) {
  .assessment-workbench.has-case-file { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
  .assessment-workbench.has-case-file > .assessment-case { grid-column: auto; }
  .assessment-workbench.has-case-file > details { grid-column: 1 / -1; }
  .assessment-workbench.has-case-file .case-file-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); }
}

/* The chapter archive: one list and one read-only record per earlier guided investigation. */
.chapter-archive { padding: clamp(.75rem, 2vw, 1.3rem); border: 1px solid #74805d; border-radius: 7px; background: linear-gradient(125deg, #1d2d22, #101c15 70%); }
.chapter-archive > h2 { color: #efe3bb; font-family: var(--font-display); line-height: 1.3; }
.chapter-archive h3 { margin-block: 1.4rem .6rem; color: #e1d7b1; font: 500 .9rem/1.6 var(--font-mono); }
.chapter-archive-status { padding: .7rem .9rem; border-left: 3px solid #cab77b; background: #233323; }
.chapter-archive-list, .chapter-archive-steps, .chapter-archive-links { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.chapter-archive-list a { display: grid; gap: .3rem; padding: .85rem 1rem; border: 1px solid #5f7253; border-radius: 5px; background: #112218; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.chapter-archive-list a:hover, .chapter-archive-list a:focus-visible { border-color: #c5b37f; }
.chapter-archive-list strong { color: #eadfbb; }
.chapter-archive-steps { counter-reset: archive-step; }
.chapter-archive-steps li { counter-increment: archive-step; display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .6rem .8rem; border-left: 3px solid #5f7253; background: #112218; }
.chapter-archive-steps li::before { content: counter(archive-step, decimal-leading-zero); color: #c9bd89; font: .75rem/1.6 var(--font-mono); }
.chapter-archive-steps li.checked { border-left-color: #bfd19a; }
.chapter-archive-steps li > strong { flex: 1 1 12rem; font-weight: 500; }
.chapter-archive-links li { overflow-wrap: anywhere; }
@media (forced-colors: active) {
  .chapter-archive, .chapter-archive-list a, .chapter-archive-steps li { border: 1px solid CanvasText; }
}
