:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #142b43;
  background: #f5f2ea;
  font-synthesis: none;
  --navy: #142b43;
  --muted: #58636c;
  --line: #dcdedb;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.6; }
[hidden] { display: none !important; }
h1, h2, h3, p, blockquote { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: 1.2rem; line-height: 1.4; letter-spacing: -.015em; }
h3 { font-size: 1rem; line-height: 1.5; }
a { color: #264f71; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #966417; outline-offset: 5px; }
.skip-link { position: absolute; top: -100px; left: 1rem; background: white; padding: .75rem 1rem; z-index: 2; }
.skip-link:focus { top: .5rem; }
.masthead { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(1.5rem, calc((100vw - 1180px) / 2)); }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.2rem; font-weight: 650; }
.brand-mark { display: inline-grid; place-items: center; background: #d8b86e; color: var(--navy); width: 2rem; height: 2rem; border-radius: .45rem; font-size: 1rem; }
.working-name, .session-label { font-size: .875rem; color: #d4dfed; font-weight: 400; }
.working-name { padding-left: .6rem; border-left: 1px solid #6c819a; }
main { max-width: 1228px; margin: auto; padding: 1.5rem; }
.preview-notice { padding: .75rem 1rem; border-left: 3px solid #286698; background: #e5eef7; font-size: .9375rem; }
.application-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; margin: 2rem 0; }
.eyebrow { color: var(--muted); font-size: .875rem; font-weight: 650; margin-bottom: .35rem; }
.intro { margin-top: .65rem; color: var(--muted); }
.fiction-label { border: 1px solid #b8c7d9; color: #415773; border-radius: 2rem; padding: .25rem .75rem; font-size: .875rem; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.5rem; }
.source-panel, .checklist-panel { background: #fff; border: 1px solid var(--line); border-radius: .75rem; padding: 1.5rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.version { color: var(--muted); font-size: .875rem; }
.section-note { margin: .4rem 0 1.4rem; color: var(--muted); font-size: .875rem; }
.passage { padding: 1rem 0 1.1rem; border-top: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.passage:target { background: #edf4fc; box-shadow: 0 0 0 .5rem #edf4fc; }
.passage h3 { color: #58636c; font-size: .875rem; margin-bottom: .45rem; }
.passage blockquote { line-height: 1.75; }
.source-footnote, .checklist-footnote { color: var(--muted); font-size: .875rem; margin-top: 1rem; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task { position: relative; padding: 1.1rem 0 1.15rem 2.35rem; border-top: 1px solid var(--line); }
.completion-icon { position: absolute; top: 1.2rem; left: 0; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border: 1px solid #76ad9d; border-radius: 50%; color: #215c4c; background: #e6f4ee; font-size: .875rem; }
.completion { color: #32624f; font-size: .875rem; margin: .3rem 0 .2rem; }
.source-link { font-size: .875rem; display: inline-block; padding: .3rem 0; }
.dependency-note { color: var(--muted); font-size: .875rem; }
.review-reason { margin-top: .65rem; padding: .65rem .85rem; color: #704710; background: #fff3d9; border-left: 3px solid #a56808; font-size: .9375rem; }
.review-reason strong { display: block; font-size: .875rem; }
.change-section { margin-top: 1.5rem; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: .75rem; }
.change-intro { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.change-intro p:not(.eyebrow) { color: var(--muted); margin-top: .4rem; }
button { font: inherit; font-weight: 600; font-size: .9375rem; color: white; background: var(--navy); border: 1px solid var(--navy); border-radius: .45rem; padding: .8rem 1.1rem; min-height: 48px; cursor: pointer; flex-shrink: 0; }
button:hover { background: #2c5078; }
.status-message:empty { display: none; }
.status-message { font-size: .9375rem; margin-top: 1rem; color: #704710; }
#change-preview { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1.2rem; }
.preview-heading { display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.preview-badge { color: #704710; background: #fff3d9; padding: .1rem .5rem; border-radius: .25rem; font-size: .875rem; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.comparison > div { padding: 1rem; background: #f5f2ea; border: 1px solid var(--line); border-radius: .35rem; }
.comparison-label { color: var(--muted); font-size: .875rem; font-weight: 600; margin-bottom: .5rem; }
.explanation { margin: 1rem 0; }
.person-decides { border-left: 3px solid #368174; background: #edf6f4; padding: 1rem; }
.person-decides p { margin-top: .3rem; }
.simulation-note { color: var(--muted); font-size: .875rem; margin-top: 1rem; }
footer { max-width: 1228px; padding: .5rem 1.5rem 2rem; margin: auto; color: var(--muted); font-size: .875rem; display: flex; gap: 2rem; justify-content: space-between; }
footer span { white-space: nowrap; }
@media (max-width: 800px) {
  .workspace, .comparison { grid-template-columns: 1fr; }
  .change-intro { flex-direction: column; align-items: flex-start; }
  .application-heading { align-items: flex-start; }
  .fiction-label { display: none; }
  footer { flex-direction: column; gap: .5rem; }
}
@media (max-width: 480px) {
  .masthead { padding: 1rem; flex-wrap: wrap; gap: .4rem; }
  .brand { flex-wrap: wrap; }
  main { padding: 1rem; }
  .application-heading { margin: 1.5rem 0; }
  .source-panel, .checklist-panel, .change-section { padding: 1rem; }
  button { width: 100%; }
}

/* Shared workspace controls; the earlier scripted preview uses these styles too. */
.panel { background: #fff; border: 1px solid var(--line); border-radius: .75rem; padding: 1.5rem; margin: 1.5rem 0; }
.panel > p { margin: .75rem 0 1rem; }
summary { cursor: pointer; font-weight: 650; padding: .5rem 0; }
.panel > summary { font-size: 1.2rem; }
label { display: block; font-weight: 600; margin: 1rem 0 .35rem; }
input:not([type="checkbox"]), textarea, select { font: inherit; color: inherit; border: 1px solid #8b9cb0; border-radius: .35rem; background: #fff; width: 100%; padding: .65rem .75rem; min-height: 44px; }
textarea { resize: vertical; line-height: 1.6; }
textarea.snapshot { background: #f7f9fc; min-height: 18rem; }
.helper { font-size: .875rem; color: var(--muted); margin: .5rem 0 1rem; overflow-wrap: anywhere; }
form > button { margin-top: 1rem; }
.form-heading, .workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.form-heading { margin: .75rem 0; }
.workspace-toolbar { margin: 1.5rem 0; }
.workspace-toolbar > div { min-width: 16rem; max-width: 50%; }
.workspace-toolbar h2 { overflow-wrap: anywhere; }
.secondary { color: var(--navy); background: white; border-color: #8b9cb0; }
.secondary:hover { background: #eaf1f8; }
button:disabled { cursor: not-allowed; color: #596373; background: #e9edf2; border-color: #b8c3ce; }
.button-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.save-panel { background: #edf6f4; border-left: 3px solid #368174; padding: .8rem 1rem; }
.save-panel .button-row:has(button:not([hidden])) { margin-top: .75rem; }
.save-panel.save-failed { background: #fff0e5; border-color: #a34913; }
#action-status:not(:empty) { padding: .75rem 0; }
.error-message { background: #fff0ed; color: #8e2818; padding: .8rem 1rem; border-left: 3px solid #a43b2b; margin: 1rem 0; overflow-wrap: anywhere; }
.saved-task { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.saved-task h3 { overflow-wrap: anywhere; }
.completion-state { font-weight: 600; color: #32624f; }
.review-state { font-size: .875rem; color: #604a23; margin: .35rem 0 .75rem; }
.task-quote, .excerpt blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-quote { font-size: .9375rem; padding: .5rem .75rem; border-left: 3px solid #8b9cb0; margin: .6rem 0; }
.no-source-label { font-size: .875rem; padding: .5rem .7rem; background: #edf1f6; }
.checkbox-row { display: flex; gap: .75rem; align-items: center; font-weight: 500; min-height: 44px; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--navy); }
.task-editor, .task-history { font-size: .9375rem; }
.task-editor form { background: #f5f2ea; padding: .5rem 1rem 1rem; border-radius: .35rem; }
.task-history ul { padding-left: 1.3rem; font-size: .875rem; }
.excerpt { background: #edf4fc; border-left: 3px solid #286698; padding: 1rem; margin: 1rem 0; }
.excerpt blockquote { margin: .5rem 0; }
.backup-output, .restore-preview { margin: 1rem 0; padding: 1rem; background: #f5f2ea; border: 1px solid var(--line); border-radius: .4rem; }
#restore-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
#restore-applications { overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .form-heading, .workspace-toolbar { flex-direction: column; align-items: stretch; }
  .workspace-toolbar > div { max-width: 100%; min-width: 0; }
}
@media (max-width: 480px) { .panel { padding: 1rem; } .application-heading { flex-wrap: wrap; } }

/* Version comparisons and human review. Status is always conveyed in words. */
.diff-row, .version-review { border: 1px solid var(--line); border-radius: .45rem; margin: 1rem 0; padding: .75rem 1rem; background: #fafbfd; }
.diff-quote, .chosen-mapping, .resolution-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-row .comparison, .version-review .comparison { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.diff-row summary, .version-review summary { overflow-wrap: anywhere; }
.unreviewed-material { padding: .65rem .85rem; background: #fff3d9; border-left: 3px solid #a56808; color: #704710; font-size: .875rem; }
.source-reviews { margin-top: 1rem; }
.version-review { font-size: .9375rem; }
.version-review form { padding-top: .5rem; border-top: 1px solid var(--line); }
.version-review .button-row button { flex-shrink: 1; }
.chosen-mapping { padding: .6rem .75rem; background: #edf4fc; border-left: 3px solid #286698; }
.saved-task > button { margin: .25rem .25rem .25rem 0; }
#version-preview { margin-top: 1.5rem; }
@media (max-width: 800px) { .diff-row .comparison, .version-review .comparison { grid-template-columns: 1fr; } }

/* Confirmed task links and independent reviews use linear, textual lists. */
.task-dependencies { margin-top: 1rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.task-dependencies h4 { margin: 0; font-size: .9375rem; line-height: 1.5; }
.task-dependencies summary, .task-dependencies li { overflow-wrap: anywhere; }
.task-dependencies ul, .task-dependencies ol { padding-left: 1.4rem; }
.dependency-blockers { padding: .7rem .85rem; background: #f5f2ea; border-left: 3px solid #8b9cb0; font-size: .875rem; }
.dependency-blockers ul { margin: .45rem 0; }
.dependency-blockers .helper { margin-bottom: 0; }
.dependency-editor, .dependency-reviews, .work-change-editor { margin-top: .65rem; font-size: .9375rem; }
.dependency-editor form, .work-change-editor form { padding: .75rem 1rem 1rem; background: #f5f2ea; border-radius: .35rem; }
.dependency-editor fieldset { min-width: 0; margin: 0; padding: .3rem .75rem .75rem; border: 1px solid var(--line); border-radius: .35rem; }
.dependency-editor legend { padding: 0 .3rem; font-weight: 600; }
.dependency-choice { margin: .3rem 0 0; align-items: flex-start; padding: .45rem 0; }
.dependency-choice input { flex-shrink: 0; margin-top: .25rem; }
.dependency-choice span { min-width: 0; overflow-wrap: anywhere; }
.dependency-review { margin: .7rem 0; padding: .65rem .9rem; background: #fafbfd; border: 1px solid var(--line); border-radius: .45rem; }
.dependency-review[open] { border-left: 3px solid #a56808; }
.dependency-review form { border-top: 1px solid var(--line); padding-top: .25rem; }
.causal-chain li { margin: .35rem 0; }
.dependency-history, .work-change-history { margin-top: .6rem; font-size: .875rem; }
.work-change-history li { margin-bottom: .75rem; }
.work-change-history li .helper { margin: .3rem 0; }

/* Session 5: readable at narrow widths/zoom; stable focus without motion. */
html.large-text { font-size: 125%; }
:focus { outline: 3px solid #966417; outline-offset: 3px; }
main:focus { outline: none; }
section, form, details, .workspace > *, .comparison > *, .button-row > * { min-width: 0; }
input, textarea, select, button { max-width: 100%; }
button { white-space: normal; overflow-wrap: anywhere; flex-shrink: 1; }
select { text-overflow: ellipsis; }
label, summary, p, legend, h2, h3, h4 { overflow-wrap: anywhere; }
summary { min-height: 44px; }
fieldset.view-options { border: 1px solid var(--line); margin: 1rem 0; padding: .5rem 1rem; }
.view-options legend { font-weight: 600; }
.view-options .checkbox-row { margin: .2rem 0; }
input[type="radio"] { width: 1.2rem; min-height: auto; height: 1.2rem; flex-shrink: 0; }
input[type="checkbox"] { flex-shrink: 0; }
.reading-options { max-width: 16rem; margin: 1rem 0; }
.workspace-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 1rem 0; }
.workspace-nav a { padding: .5rem .2rem; }
.recovery-panel { margin-top: .75rem; }
.recovery-panel p + p { margin-top: .5rem; }
#step-navigation { padding: .5rem 0 1rem; }
#privacy-notes p { margin: .75rem 0; }
@media (max-width: 480px) {
  .diff-row, .version-review, .dependency-review { padding: .6rem; }
  .task-editor form, .dependency-editor form, .work-change-editor form { padding: .5rem; }
  .view-options input { width: 1.2rem; }
}

/* Origin Scholar: warm paper, editorial type, and a quiet academic palette. */
:root { --cream: #fbf8f0; --gold: #c29a4b; --navy: #142b43; --muted: #58636c; background: var(--cream); }
body { line-height: 1.65; }
h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.035em; font-size: clamp(2rem, 4vw, 3.3rem); }
.masthead { padding-block: 1.25rem; background: var(--cream); color: var(--navy); border-bottom: 1px solid #deddd5; }
.brand { color: var(--navy); text-decoration: none; font-family: Georgia, 'Times New Roman', serif; font-size: 1.65rem; font-weight: 400; gap: .6rem; white-space: nowrap; }
.brand em { font-style: normal; font-weight: bold; }
.brand-mark { background: var(--navy); color: var(--cream); width: 2.2rem; height: 2.5rem; border-radius: 1.2rem 1.2rem .25rem .25rem; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 400; position: relative; }
.brand-mark span { position: absolute; right: .12rem; top: -.4rem; color: #ebc97f; font-size: 2.3rem; }
.masthead nav { display: flex; align-items: center; gap: 1.5rem; font-size: .9375rem; }
.masthead nav a { color: var(--navy); padding-block: .55rem; text-decoration: none; }
.masthead nav a:hover { text-decoration: underline; }
.workspace-page main { max-width: 1280px; padding-top: .5rem; }
.application-heading { margin: 2rem 0 1.5rem; align-items: flex-end; }
.eyebrow { color: #795a24; font-size: .75rem; font-weight: 700; letter-spacing: .14em; }
.intro { font-size: 1rem; }
.session-label { color: #58636c; font-size: .875rem; padding-bottom: .2rem; }
.preview-notice { background: #f1ebdc; border-color: #b28a44; font-size: .875rem; padding: .7rem 1rem; }
.mobile-break { display: none; }
.save-panel { background: #edf2ed; padding: .65rem 1rem; border-color: #4d6c54; font-size: .875rem; margin-top: .75rem; }
.recovery-panel { background: transparent; border-color: #d6d7cc; color: var(--muted); padding-block: .3rem; }
.recovery-panel p:empty, .button-row:empty { display: none; }
#draft-status:not(:empty) { font-size: .875rem; }
.workspace-nav { border-bottom: 1px solid #cfd2cf; padding-bottom: .6rem; gap: .25rem 1.65rem; margin: 1.5rem 0 0; }
.workspace-nav a { font-size: .9375rem; text-decoration: none; font-weight: 600; }
.workspace-nav a:hover { text-decoration: underline; }
.reading-options { display: flex; align-items: center; gap: .75rem; max-width: 17rem; margin: .75rem 0; }
.reading-options label { margin: 0; white-space: nowrap; font-size: .875rem; font-weight: 400; }
.reading-options select { min-height: 38px; padding: .3rem .6rem; font-size: .875rem; }
.panel { border-radius: .4rem; margin: 1rem 0; padding: 1.25rem 1.5rem; box-shadow: 0 2px 5px #142b4303; }
.panel > summary { font-size: 1rem; }
.demo-panel { border-color: #c9b57e; background: #f8f3e5; }
.demo-panel > summary { color: #654b1e; }
.workspace-toolbar { gap: 1rem; padding-block: .5rem; }
.workspace-toolbar h2 { font-family: Georgia, serif; font-size: 1.75rem; font-weight: 400; }
.workspace-toolbar label { margin-top: 0; font-size: .875rem; }
.workspace-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #d9d9cd; background: #fffdf8; padding: 1rem 0; margin-bottom: 1rem; border-radius: .4rem; }
.workspace-stats > div { padding: 0 1.5rem; display: flex; align-items: center; gap: .85rem; }
.workspace-stats > div + div { border-left: 1px solid #dddcd1; }
.workspace-stats strong { font-family: Georgia, serif; font-size: 2rem; line-height: 1.2; font-weight: 400; }
.workspace-stats span { font-size: .875rem; color: var(--muted); }
.person-decides { border-color: #b28a44; background: #f2eddf; font-size: .875rem; padding: .75rem 1rem; }
.workspace { margin-top: 1.5rem; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 1.25rem; align-items: start; }
.source-panel, .checklist-panel { border-radius: .4rem; padding: 1.5rem; }
.section-heading h2 { font-family: Georgia, serif; font-size: 1.65rem; font-weight: 400; }
textarea.snapshot { background: #fbf9f3; border-color: #b5b6ad; line-height: 1.85; }
.saved-task { border: 1px solid var(--line); border-left: 3px solid #829187; border-radius: .35rem; margin: 1rem 0; padding: 1.25rem; background: #fff; }
.saved-task.needs-review { border-left-color: #a2752f; }
.saved-task h3 { font-size: 1.15rem; margin-bottom: .5rem; line-height: 1.45; }
.completion-state { display: inline-block; color: #315744; background: #edf3ed; border-radius: .25rem; padding: .1rem .5rem; font-size: .875rem; }
.completion-state.incomplete { color: #58636c; background: #f0f1ee; }
.task-quote { background: #faf8f2; border-color: #c3b38e; font-family: Georgia, serif; line-height: 1.7; }
.saved-task > .helper { margin-top: .45rem; margin-bottom: .35rem; }
.saved-task > button { padding: .5rem .75rem; min-height: 44px; }
.task-editor > summary, .task-history > summary { font-size: .875rem; color: #46556b; }
.task-dependencies { border-color: #e5e4dd; }
.excerpt, .chosen-mapping { background: #eef2f4; }
button { border-radius: .3rem; }
button:hover { background: #244865; }
.secondary { border-color: #a9b0b3; }
.secondary:hover { background: #f3f1e9; }
input:not([type="checkbox"]), textarea, select { border-color: #a5adae; }
fieldset.view-options { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; border: 0; background: #f5f3ed; padding: .5rem .75rem; }
.view-options legend { font-size: .875rem; padding-top: .5rem; }
.view-options .checkbox-row { font-size: .875rem; }
footer { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid #deddd5; }
@media (min-width: 1000px) { .source-panel { position: sticky; top: 1rem; } }
@media (max-width: 800px) { .workspace { grid-template-columns: 1fr; } .workspace-stats > div { flex-direction: column; align-items: flex-start; gap: .35rem; padding: 0 .8rem; } }
@media (max-width: 560px) { .masthead { padding: 1rem; flex-wrap: wrap; } .masthead nav { gap: 1rem; } .brand { font-size: 1.45rem; } .application-heading { display: block; } .session-label { display: block; margin-top: 1rem; } .workspace-nav { gap: .15rem 1rem; } .panel, .source-panel, .checklist-panel { padding: 1rem; } .saved-task { padding: .85rem; } .workspace-stats span { font-size: .8rem; } .mobile-break { display: block; } }
