:root {
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  color: #202725;
  background: #fff;
  font-synthesis: none;
  --ink: #202725;
  --muted: #535e58;
  --line: #d5dbd7;
  --green: #245640;
  --red: #9e3937;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; touch-action: manipulation; }
a { color: inherit; text-underline-offset: 4px; touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid #478469; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: Georgia, serif; font-weight: normal; line-height: 1.25; margin: 0 0 16px; }
h1 { font-size: clamp(2rem, 3vw, 2.8rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { line-height: 1.7; margin: 0 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 10; background: white; padding: 12px; }
.skip:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 34px 20px; overflow: auto; background: #f5f6f5; border-right: 1px solid var(--line); }
.brand { display: block; font: 25px/1.3 Georgia, serif; text-decoration: none; margin-bottom: 34px; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a { padding: 12px 10px; border-radius: 4px; font-size: 14px; text-decoration: none; }
.sidebar nav a.active { background: #e3eae5; color: var(--green); font-weight: 600; }
.sidebar nav a:hover { background: #e9eeea; }
.workspace { margin-left: 224px; }
.topbar { min-height: 65px; padding: 16px 45px; display: flex; justify-content: flex-end; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; }
main { max-width: 1350px; padding: 38px 45px 55px; min-height: 70vh; }
footer { border-top: 1px solid var(--line); padding: 24px 45px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; line-height: 1.7; }
.page-intro { margin-bottom: 32px; max-width: 900px; }
.page-intro p, .card p, .writing-step p { font-size: 15px; color: var(--muted); }
.materials-index { padding: 0; margin: 0; list-style: none; max-width: 850px; border-top: 1px solid var(--line); }
.materials-index li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.materials-index h2 { font-size: 23px; margin: 0 0 8px; }
.materials-index a { color: var(--green); }
.materials-index p { font-size: 15px; margin: 0; color: var(--muted); }
.latest-session { font-size: 15px; margin: 28px 0 22px; }
.course-note { font-size: 14px; max-width: 780px; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.card, .question-card, .writing-step { background: white; border: 1px solid var(--line); border-radius: 5px; padding: 24px; min-width: 0; }
.card h2 { font-size: 24px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn { display: inline-flex; justify-content: center; align-items: center; padding: 12px 18px; background: var(--green); color: white; border: 1px solid var(--green); border-radius: 4px; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.5; }
.btn:hover { filter: brightness(.94); }
.btn.small { padding: 9px 12px; font-size: 13px; }
.btn.secondary { color: var(--green); background: white; border-color: #aebdb4; }
.btn.secondary:hover { background: #f0f4f1; }
.link { font-size: 14px; color: var(--green); }
.section-content { margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 32px 0 22px; }
.section-head h2 { margin-bottom: 0; }
.session-heading { margin-top: 0; }
.section-head a { font-size: 14px; }
.context-label, .meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.session-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.session-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #eee; display: block; }
.card-body { padding: 20px; flex: 1; }
.session-card h3 { min-height: 46px; }
.tag { display: inline-block; font-size: 12px; background: #f1f3f1; padding: 5px 8px; border-radius: 3px; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.viewer-layout { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 22px; }
.viewer { min-width: 0; }
.slide-frame { background: #eef1ee; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; cursor: pointer; }
.slide-frame img { width: 100%; display: block; }
.viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 0; }
.viewer-controls span { font-size: 14px; }
.slide-list { max-height: 620px; overflow: auto; display: grid; align-content: start; gap: 5px; }
.slide-search-results { margin-top: 13px; }
.slide-list a { font-size: 13px; display: flex; gap: 10px; text-decoration: none; padding: 10px; border-radius: 4px; line-height: 1.4; }
.slide-list a.active { background: #e3eae5; font-weight: bold; }
.slide-list a span { color: var(--muted); min-width: 18px; }
.slide-list a:hover { background: #f1f4f1; }
.search { width: 100%; border: 1px solid #bdc7bd; border-radius: 4px; background: white; padding: 11px 13px; font-size: 14px; }
.search-label { display: block; font-size: 14px; margin-bottom: 7px; }
details { background: white; border: 1px solid var(--line); border-radius: 5px; padding: 15px 18px; margin: 15px 0; }
summary { cursor: pointer; font-size: 14px; font-weight: 600; }
details[open] summary { margin-bottom: 18px; }
.slide-transcript { white-space: pre-wrap; line-height: 1.8; font-size: 15px; }
.notice { background: #f5f6f5; border: 1px solid var(--line); border-radius: 5px; padding: 14px 17px; margin-bottom: 22px; font-size: 14px; line-height: 1.65; }
.workspace > .notice { margin: 15px 45px 0; }
.filters { border: 1px solid var(--line); border-radius: 5px; padding: 24px; display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 20px; margin-bottom: 22px; }
.field label, .field-label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 9px; }
.field select { width: 100%; border: 1px solid #c3cbc3; border-radius: 4px; padding: 11px; background: white; color: var(--ink); }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.6; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
.check-row input { width: 18px; height: 18px; }
.practice-stats { font-size: 14px; color: var(--muted); margin-top: 20px; }
.empty { padding: 35px; border: 1px dashed var(--line); border-radius: 5px; color: var(--muted); line-height: 1.6; }
.question-layout { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 24px; }
.question-card { padding: 30px; }
.question-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 10px; }
.question-top h2 { font-size: 21px; margin: 0; }
.prose { font: 18px/1.85 Georgia, serif; max-width: 82ch; }
.prose p { margin-bottom: 17px; white-space: pre-line; }
.options { border: 0; padding: 0; margin: 25px 0; display: grid; gap: 11px; }
.option { display: flex; gap: 13px; border: 1px solid #d9dfd9; border-radius: 4px; padding: 16px; align-items: flex-start; font-size: 15px; line-height: 1.7; cursor: pointer; background: white; }
.option:hover { background: #f6f8f6; }
.option input { margin-top: 5px; flex-shrink: 0; width: 17px; height: 17px; }
.option .letter { display: inline-flex; background: #edf0ed; min-width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 3px; margin-right: 7px; font-size: 13px; }
.option.selected, .option.correct { border-color: #557954; background: #edf5ed; }
.option.incorrect { border-color: #c6857e; background: #fff2ed; }
.feedback { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.feedback h3, .model h3 { font-size: 18px; }
.correct-text { color: #356330; }
.incorrect-text { color: var(--red); }
.feedback .prose, .model .prose { font-size: 16px; }
.option-explanations { display: grid; gap: 12px; font-size: 15px; line-height: 1.8; }
.option-explanations p { margin: 0; }
.source { font-size: 14px; color: var(--muted); margin: 19px 0 0; border-top: 1px solid var(--line); padding-top: 15px; }
.progress { height: 5px; background: #dfe5df; border-radius: 3px; overflow: hidden; margin: 15px 0 22px; }
.progress div { height: 100%; background: #709157; transition: width .2s; }
.q-nav { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; margin: 15px 0; }
.q-nav button { padding: 9px 3px; background: white; border: 1px solid #cbd4cb; border-radius: 3px; font-size: 13px; color: var(--ink); }
.q-nav button.answered { background: #e2ebe2; }
.q-nav button.current { background: var(--ink); color: white; }
.question-aside { font-size: 14px; }
.question-aside h3 { font-size: 16px; }
.question-aside .btn { width: 100%; margin-top: 10px; }
.question-aside p { color: var(--muted); }
.result-number { font: 48px Georgia,serif; margin-bottom: 8px; }
.result-denominator { font-size: 28px; }
.result-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.result-list { display: grid; gap: 9px; margin-top: 22px; }
.result-row { padding: 13px 16px; border: 1px solid var(--line); border-radius: 3px; display: flex; justify-content: space-between; gap: 10px; text-decoration: none; font-size: 14px; }
.result-row:hover { background: #edf1ed; }
.essay-draft { width: 100%; min-height: 310px; resize: vertical; border: 1px solid #b9c6b9; background: white; padding: 18px; border-radius: 5px; font: 16px/1.8 Georgia,serif; color: var(--ink); }
.draft-meta { font-size: 14px; color: var(--muted); margin: 9px 0 24px; display: flex; justify-content: space-between; gap: 15px; }
.model { background: #f7f9f7; border: 1px solid var(--line); padding: 25px; border-radius: 5px; margin-top: 20px; }
.checklist { display: grid; gap: 12px; margin: 20px 0; }
.checklist label { display: flex; align-items: start; gap: 10px; font-size: 14px; line-height: 1.65; }
.checklist input { margin-top: 5px; }
.writing-steps { display: grid; gap: 14px; margin: 25px 0; }
.writing-step { padding: 20px; }
.writing-step h3 { margin-bottom: 7px; }
.writing-step p { margin: 0; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.inline-link { border: 0; background: transparent; color: var(--green); text-decoration: underline; padding: 0; font-size: 14px; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.status-strip { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
.error { padding: 24px; background: #fff0e9; border: 1px solid #d39280; border-radius: 5px; }
.submit-warning { margin-top: 14px; }
.confirm-action { margin-top: 10px; }
.answer-actions { margin-top: 25px; }
.draft-label { margin-top: 28px; }
.essay-page-title { font-size: 2.5rem; }
.coverage-note { margin-top: 22px; }
.clear-warning { margin-top: 20px; }
.exam-summary { margin: 20px 0; }
@media (max-width:1150px) {
  main { padding-inline: 28px; }
  .topbar, footer { padding-inline: 28px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .viewer-layout { grid-template-columns: minmax(0,1fr) 190px; }
  .question-layout { grid-template-columns: minmax(0,1fr) 170px; }
}
@media (max-width:850px) {
  .sidebar { position: relative; width: 100%; padding: 20px 23px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0; font-size: 24px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; margin-top: 15px; }
  .sidebar nav a { white-space: normal; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 48px; justify-content: flex-start; }
  .viewer-layout, .question-layout { grid-template-columns: minmax(0,1fr); }
  .question-aside { grid-row: 1; }
  .question-aside .q-nav { grid-template-columns: repeat(8,minmax(0,1fr)); }
  .question-aside .btn { width: auto; }
  .slide-list { max-height: 260px; }
}
@media (max-width:560px) {
  main { padding: 28px 20px 40px; }
  .sidebar nav a { padding: 10px 9px; }
  .card-grid, .result-grid, .filters { grid-template-columns: minmax(0,1fr); }
  .question-card { padding: 20px 15px; }
  .option { padding: 13px 10px; }
  .prose { font-size: 17px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-head a { font-size: 13px; }
  .page-intro h1 { font-size: 2rem; }
  .materials-index h2 { font-size: 22px; }
  .question-top { align-items: flex-start; flex-wrap: wrap; }
  .viewer-controls { gap: 6px; }
  .viewer-controls .btn { padding: 9px 10px; }
  .viewer-controls span { font-size: 12px; }
  .status-strip, .draft-meta { flex-direction: column; }
  .result-row { align-items: flex-start; flex-direction: column; }
  .model { padding: 18px; }
}
