:root {
    color-scheme: light;
    font-family: system-ui, sans-serif;
    color: #252a25;
    background: #f6f4ed;
    line-height: 1.55;
    --ink: #252a25;
    --green: #254c3a;
    --muted: #5b645d;
    --line: #d8d8cb;
    --paper: #fffdf7;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
a { color: var(--green); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #9f4d30; outline-offset: 4px; }
button, .button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    border-radius: 4px;
    padding: .45rem .95rem;
    font-weight: 650;
    text-decoration: none;
}
button:hover, .button:hover { background: #183c2d; }
button.secondary, .button.secondary { background: transparent; color: var(--green); }
button.secondary:hover, .button.secondary:hover { background: #e8ede4; }
button:disabled { cursor: default; opacity: .55; }
header.top {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.masthead {
    max-width: 1060px;
    margin: auto;
    padding: .8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}
.brand {
    color: var(--ink);
    font: 600 1.22rem Georgia, serif;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
}
.brand-mark {
    display: inline-block;
    width: 1.3rem;
    height: .95rem;
    border: 2px solid var(--green);
    border-radius: 2px 2px 4px 4px;
    background: linear-gradient(90deg, transparent 43%, var(--green) 43%, var(--green) 57%, transparent 57%);
}
main { width: min(100% - 3rem, 920px); margin: 3.2rem auto 5rem; }
h1, h2, h3 { font-family: Georgia, serif; font-weight: 500; line-height: 1.12; margin: 0 0 .75em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.25rem); letter-spacing: -.045em; margin-bottom: .35em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.025em; }
h3 { font-size: 1.4rem; margin-bottom: .45em; }
p { margin: 0 0 .85rem; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 61ch; margin-bottom: 1.5rem; }
.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: clamp(1rem, 4vw, 2.25rem);
    margin: 1rem 0 1.5rem;
}
.narrow { max-width: 600px; margin-inline: auto; }
.stack { display: grid; gap: .9rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .9rem; }
.between { justify-content: space-between; }
label { font-weight: 600; }
.field { display: grid; gap: .27rem; }
input:not([type=checkbox], [type=radio]), textarea, select {
    width: 100%;
    background: #fffdf9;
    font-weight: 400;
    border: 1px solid #9ca599;
    border-radius: 4px;
    padding: .48rem .65rem;
    color: var(--ink);
}
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
textarea { min-height: 8rem; resize: vertical; }
fieldset { min-width: 0; }
small, .muted { color: var(--muted); }
.notice { border-left: 3px solid #758c77; background: #edf0e7; padding: .75rem 1rem; margin: .75rem 0; }
.error { border-color: #a8573c; color: #7d2e1b; background: #faeee7; }
.skip { position: absolute; top: .25rem; left: .25rem; z-index: 2; transform: translateY(-200%); }
.skip:focus { transform: none; background: white; padding: .5rem; }
.metrics { margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .75rem; }
.metrics div { padding: .75rem; border-top: 1px solid var(--line); }
.metrics dd { margin: .25rem 0 0; font-family: Georgia, serif; font-size: 1.45rem; }
.assignment-list { list-style: none; padding: 0; margin: 0; }
.assignment-list li { padding: .85rem 0; border-top: 1px solid var(--line); }
.assignment-list li:last-child { padding-bottom: 0; }
.view-nav { border-bottom: 1px solid var(--line); padding: 0 0 .85rem; margin-bottom: 1rem; }
.view-nav [aria-current=true] { background: var(--green); color: white; }
.story { max-width: 74ch; margin-inline: auto; font: 1.15rem/1.75 Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.screenplay {
    max-width: 64ch;
    padding-block: clamp(.75rem, 3vw, 2rem);
    font: clamp(.875rem, 2vw, 1rem)/1.5 "Courier Prime", "Courier New", monospace;
    white-space: pre-wrap;
}
.screenplay p { margin: 0; }
.screenplay p + p { margin-top: .85em; }
.screenplay .screenplay-scene { font-weight: 700; margin-top: 1.5em; }
.screenplay .screenplay-character { margin-left: 36%; }
.screenplay .screenplay-parenthetical { margin-left: 28%; margin-right: 10%; }
.screenplay .screenplay-dialogue { margin-left: 19%; margin-right: 15%; }
.screenplay .screenplay-continuation { margin-top: 0; }
.screenplay .screenplay-transition { text-align: right; }
@media (max-width: 480px) {
    .screenplay .screenplay-character { margin-left: 21%; }
    .screenplay .screenplay-parenthetical { margin-left: 17%; margin-right: 5%; }
    .screenplay .screenplay-dialogue { margin-left: 10%; margin-right: 5%; }
}

.audio-panel { padding: .75rem 1rem; border: 1px solid var(--line); margin: 0 0 1rem; border-radius: 5px; background: var(--paper); }
.audio-panel select { width: auto; }
audio { width: min(100%, 460px); }
.prompt-list { display: grid; gap: 1rem; padding-left: 1.35rem; margin-bottom: 1.5rem; }
.question { border: 0; margin: 0; padding: 0; }
.question legend { font-weight: 650; padding: 0; }
.followup { margin: .25rem 0 .4rem; color: var(--muted); }
.choices label { display: inline-flex; align-items: center; gap: .3rem; font-weight: normal; }
details { margin: .6rem 0; }
.reader-picker { margin: 0; border: 1px solid #9ca599; border-radius: 4px; background: #fffdf9; }
.reader-picker summary { padding: .48rem .65rem; }
.reader-picker fieldset { border: 0; margin: 0; padding: .5rem; max-height: 16rem; overflow: auto; }
.reader-picker label { display: flex; align-items: center; gap: .5rem; padding: .3rem; font-weight: 400; overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 650; }
pre { max-height: 35rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: .55rem .65rem; white-space: nowrap; }
@media (max-width: 550px) {
    main { width: calc(100% - 1.7rem); margin-top: 2rem; }
    .masthead { padding-inline: .85rem; }
}

.analysis-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.table-wrap caption { text-align: left; font-weight: 650; padding-bottom: .6rem; }
.table-wrap td, .table-wrap th { vertical-align: top; }
