/* Shared course navigation and the afternoon reading workspace. */
.topbar .header-brand{width:232px}
.sidebar{width:252px;padding:0;background:var(--surface)}
.workspace{margin-left:252px}
.study-sidebar-content{height:100%;overflow:auto;overscroll-behavior:contain}
.study-side-nav{display:grid;gap:4px;padding:22px 15px 18px;border-bottom:1px solid var(--line)}
.study-side-nav a{display:flex;align-items:center;gap:11px;min-height:43px;padding:8px 13px;color:var(--muted);font-size:calc(12px * var(--study-text-scale, 1));border-radius:7px;text-decoration:none}
.study-side-nav svg{width:18px;height:18px}
.study-side-nav a:hover{background:var(--paper);color:var(--ink)}
.study-side-nav a[aria-current]{background:var(--accent-soft);color:var(--accent);font-weight:650}
.study-side-note{padding:20px 25px;color:var(--muted);font-size:calc(10px * var(--study-text-scale, 1));line-height:1.9}
.af-eyebrow{display:block;font-size:calc(11px * var(--study-text-scale, 1));font-weight:650;color:var(--accent);letter-spacing:.06em}
.af-home-entry{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:24px 26px;margin:0 0 22px;border:1px solid #cddccf;border-radius:12px;background:var(--surface)}
.af-home-entry h2{font-size:calc(18px * var(--study-text-scale, 1));margin-top:6px}
.af-home-entry p{font-size:calc(12px * var(--study-text-scale, 1));color:var(--muted);margin-top:7px}
.af-home-buttons{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;max-width:330px}
.af-home-buttons small{flex-basis:100%;text-align:right;color:var(--muted);font-size:calc(10px * var(--study-text-scale, 1))}
.main[data-page=afternoon]{max-width:1240px}
.af-course-mark{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);white-space:nowrap}
.af-starters{margin:0 0 25px}
.af-starters .section-head{margin-bottom:11px}
.af-starters h2{font-size:calc(14px * var(--study-text-scale, 1))}
.af-starters .section-head p{font-size:calc(11px * var(--study-text-scale, 1));color:var(--muted)}
.af-starter-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.af-starter-list>a{display:flex;align-items:center;gap:11px;padding:17px 15px;background:var(--surface);border:1px solid var(--line);border-radius:9px;text-decoration:none;color:var(--ink)}
.af-starter-list>a:hover{border-color:var(--accent);background:var(--accent-soft)}
.af-starter-list>a>span:nth-child(2){flex:1;min-width:0}
.af-starter-list strong{font-size:calc(12px * var(--study-text-scale, 1));display:block;line-height:1.7}
.af-starter-list small{display:block;margin-top:4px;color:var(--muted);font-size:calc(10px * var(--study-text-scale, 1))}
.af-starter-list>a>svg{width:15px;height:15px}
.af-starter-number{font-size:calc(12px * var(--study-text-scale, 1));color:var(--accent);font-variant-numeric:tabular-nums}
.af-starter-list .af-status{display:none}
.af-filters{display:grid;grid-template-columns:minmax(150px,1.4fr) minmax(130px,1fr) minmax(145px,1fr) minmax(105px,.8fr);gap:13px;padding:17px;background:var(--surface);border:1px solid var(--line);border-radius:10px}
.af-filters input,.af-filters select{font-size:calc(12px * var(--study-text-scale, 1));min-height:42px}
.af-list-summary{display:flex;align-items:center;justify-content:space-between;margin:17px 1px 10px;font-size:calc(11px * var(--study-text-scale, 1));color:var(--muted)}
.af-list-summary .text-link{font-size:calc(11px * var(--study-text-scale, 1))}
.af-question-list{border:1px solid var(--line);border-radius:10px;background:var(--surface);overflow:hidden}
.af-question-row{display:grid;grid-template-columns:99px minmax(0,1fr) 86px 15px;gap:16px;align-items:center;padding:19px 20px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.af-question-row:last-child{border-bottom:0}
.af-question-row:hover{background:var(--accent-soft)}
.af-question-row>svg{width:15px;height:15px;color:var(--muted)}
.af-question-meta{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);line-height:1.8}
.af-question-meta strong{display:block;font-size:calc(11px * var(--study-text-scale, 1));color:var(--ink);font-weight:550}
.af-question-title{min-width:0}
.af-question-title strong{font-size:calc(13px * var(--study-text-scale, 1));font-weight:550;line-height:1.8}
.af-question-title small{display:block;margin-top:5px;color:var(--muted);font-size:calc(10px * var(--study-text-scale, 1));line-height:1.7}
.af-row-progress{display:grid;justify-items:end;gap:5px}
.af-row-progress>small{color:var(--muted);font-size:calc(9px * var(--study-text-scale, 1))}
.af-status{display:inline-flex;align-items:center;white-space:nowrap;font-size:calc(10px * var(--study-text-scale, 1));line-height:1.6;padding:3px 7px;border-radius:5px;background:var(--paper);color:var(--muted)}
.af-status.draft{background:#edf1f8;color:#455d85}
.af-status.review{background:#faf0df;color:#8b6126}
.af-status.complete{background:var(--accent-soft);color:var(--accent)}
.af-source-note{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);line-height:1.9;margin:17px 0 0}
.af-history .section-head{margin-bottom:8px}
.af-history>p{font-size:calc(12px * var(--study-text-scale, 1));color:var(--muted);margin-bottom:10px}
.af-history .af-question-row{padding:13px 0}
.main[data-page=afternoon-question]{max-width:1580px;padding:24px 28px 18px}
.af-question-heading>.text-link{font-size:calc(11px * var(--study-text-scale, 1));gap:5px}
.af-question-heading>.text-link>svg{width:15px;height:15px}
.af-question-route-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:34px}
.af-question-route-bar>.text-link{font-size:calc(11px * var(--study-text-scale, 1));gap:5px;white-space:nowrap}
.af-question-route-bar>.text-link svg{width:15px;height:15px}
.af-question-switcher{display:flex;align-items:center;gap:8px;min-width:0;max-width:64%}
.af-question-switcher .icon-button{width:30px;min-height:32px;padding:5px;flex:none}
.af-question-switcher svg{width:16px;height:16px}
.af-question-switcher select{width:380px;min-width:80px;min-height:32px;padding:4px 8px;font-size:calc(11px * var(--study-text-scale, 1));text-overflow:ellipsis;background:var(--surface);border:1px solid var(--line);border-radius:6px}
.af-sequence-count{font-size:calc(11px * var(--study-text-scale, 1));color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.af-question-heading-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:10px}
.af-question-heading h1{font-size:calc(20px * var(--study-text-scale, 1));line-height:1.7;margin-top:3px}
.af-question-heading-row p{font-size:calc(11px * var(--study-text-scale, 1));color:var(--muted)}
.af-question-heading-row p span{margin-left:12px}
.af-save-question{flex:none;font-size:calc(11px * var(--study-text-scale, 1));min-height:36px;padding:6px 11px}
.af-save-question[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.af-save-question svg{width:15px;height:15px}
.af-question-tools{display:flex;align-items:center;gap:11px;margin:13px 0 15px;font-size:calc(11px * var(--study-text-scale, 1))}
.af-timer{font-variant-numeric:tabular-nums;font-size:calc(13px * var(--study-text-scale, 1));font-weight:600}
.af-question-tools>.text-link{font-size:calc(11px * var(--study-text-scale, 1))}
.af-timing{--af-time-color:var(--accent);min-width:0;flex:none}
.af-timing-values{display:flex;align-items:center;gap:12px}
.af-elapsed{color:var(--muted);font-size:calc(11px * var(--study-text-scale, 1));white-space:nowrap}
.af-elapsed .af-timer{margin-left:4px;color:var(--ink);font-size:calc(12px * var(--study-text-scale, 1))}
.af-time-remaining{color:var(--af-time-color);font-size:calc(12px * var(--study-text-scale, 1));font-weight:600;font-variant-numeric:tabular-nums;min-width:96px;white-space:nowrap}
.af-timing-values>.text-link{font-size:calc(11px * var(--study-text-scale, 1));white-space:nowrap}
.af-timing progress{display:block;width:100%;height:3px;margin-top:6px;border:0;border-radius:3px;overflow:hidden;accent-color:var(--af-time-color)}
.af-timing progress::-webkit-progress-bar{background:var(--line)}
.af-timing progress::-webkit-progress-value{background:var(--af-time-color)}
.af-timing progress::-moz-progress-bar{background:var(--af-time-color)}
.af-timing[data-phase=near]{--af-time-color:var(--gold)}
.af-timing[data-phase=reached],.af-timing[data-phase=over]{--af-time-color:var(--bad)}
.af-target-settings{position:relative;flex:none;border:0;padding:0;margin:0}
.af-target-settings>summary{padding:5px 9px;border:1px solid var(--line);border-radius:5px;font-size:calc(11px * var(--study-text-scale, 1));font-weight:500;white-space:nowrap;color:var(--ink);cursor:pointer}
.af-target-settings>summary:hover{background:var(--accent-soft)}
.af-target-panel{position:absolute;top:calc(100% + 8px);left:0;z-index:35;width:300px;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 8px 24px #12271d22;white-space:normal}
.af-target-panel label{display:block;font-size:calc(12px * var(--study-text-scale, 1));font-weight:600;margin-bottom:8px}
.af-target-input{display:flex;align-items:center;gap:8px}
.af-target-input input{width:76px;min-height:36px;padding:5px 8px;font-size:calc(13px * var(--study-text-scale, 1))}
.af-target-input .button{padding:5px 13px;min-height:36px;font-size:calc(12px * var(--study-text-scale, 1))}
.af-target-panel p{font-size:calc(11px * var(--study-text-scale, 1));line-height:1.8;color:var(--muted);margin-top:12px}
.af-target-panel form p{margin-top:6px}
.af-target-panel>.text-link{font-size:calc(11px * var(--study-text-scale, 1));margin-top:9px}
.af-history-time{color:var(--muted);font-size:calc(11px * var(--study-text-scale, 1))}
@media(prefers-color-scheme:dark){.af-timing[data-phase=near]{--af-time-color:#e2bd7e}.af-timing[data-phase=reached],.af-timing[data-phase=over]{--af-time-color:#eaa394}}
.af-source-links{display:flex;gap:14px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.af-source-links a{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);text-decoration:none}
.af-source-links a:hover{color:var(--accent);text-decoration:underline}
.af-source-links svg{width:11px;height:11px;margin-left:3px}
.af-mobile-tabs{display:none}
.af-workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(310px,.9fr);gap:17px;align-items:start}
.af-reader,.af-answer{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:9px;overflow:hidden}
.af-reader-toolbar,.af-answer-toolbar{display:flex;align-items:center;gap:9px;padding:10px 13px;min-height:54px;border-bottom:1px solid var(--line);background:var(--surface)}
.af-reader-toolbar strong{font-size:calc(12px * var(--study-text-scale, 1));white-space:nowrap}
.af-reader-toolbar select{min-width:0;max-width:260px;flex:1;border:1px solid var(--line);border-radius:5px;background:var(--paper);font-size:calc(11px * var(--study-text-scale, 1));padding:7px}
.af-reader-toolbar output{margin-left:auto;font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.af-reader-scroll,.af-answer-scroll{height:calc(100dvh - 283px);min-height:350px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.af-reader-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.af-reader-toolbar{flex-wrap:wrap}
.af-reader-mode{display:flex;align-items:center;gap:6px;font-size:calc(12px * var(--study-text-scale, 1));white-space:nowrap}
.af-reader-mode select{flex:none;width:85px;font-size:calc(12px * var(--study-text-scale, 1))}
.af-workspace[data-reader-mode=spread]{grid-template-columns:minmax(0,1fr)}
.af-workspace[data-reader-mode=spread] .af-paper{padding:18px;background:var(--paper)}
.af-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;min-width:0;align-items:start}
.af-spread[hidden]{display:none}
.af-spread>.af-source-page{min-width:0;padding:clamp(12px,2vw,24px);background:var(--surface);border:1px solid var(--line);border-radius:4px;margin:0}
.af-workspace[data-reader-mode=spread] .af-answer-scroll{height:auto;max-height:65dvh;min-height:300px}
.af-spread-navigation{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 14px;border-bottom:1px solid var(--line);font-size:calc(13px * var(--study-text-scale, 1));background:var(--surface)}
.af-spread-navigation .button{font-size:calc(12px * var(--study-text-scale, 1));min-height:34px;padding:5px 10px}
.af-spread-navigation svg{width:16px;height:16px}
.af-paper{padding:29px 27px 15px;font-size:calc(14px * var(--study-text-scale, 1));line-height:2.05;color:var(--ink);overflow-wrap:anywhere}
.af-source-page+.af-source-page{border-top:1px solid var(--line);margin-top:28px;padding-top:24px}
.af-source-page-label{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);margin-bottom:18px;line-height:1.5;letter-spacing:.03em}
.af-source-page:focus,.af-source-block[id]:focus,.af-source-figure[id]:focus{outline:2px solid var(--accent);outline-offset:5px;border-radius:2px}
.af-source-page:focus:not(:focus-visible){outline:none}
.af-source-text{white-space:normal;margin:0 0 22px}
.af-source-text u{text-underline-offset:3px;text-decoration-thickness:1px}
.af-source-figure{margin:15px 0 25px;min-width:0}
.af-zoom{display:block;position:relative;width:100%;padding:0;border:1px solid transparent;border-radius:3px;background:#fff;text-align:center}
.af-zoom:hover{border-color:var(--accent)}
.af-zoom img{display:block;width:100%;height:auto}
.af-zoom>span{display:flex;align-items:center;justify-content:center;gap:4px;background:#fff;color:#566b5d;padding:5px;font-size:calc(10px * var(--study-text-scale, 1))}
.af-zoom>span svg{width:12px;height:12px}
.af-answer-toolbar{font-size:calc(11px * var(--study-text-scale, 1));gap:12px}
.af-answer-toolbar strong{font-size:calc(12px * var(--study-text-scale, 1));margin-right:auto}
.af-answer-toolbar #af-save-state{font-size:calc(9px * var(--study-text-scale, 1));color:var(--accent);white-space:nowrap}
.af-answer-toolbar #af-written{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);white-space:nowrap}
.af-answer-scroll{padding:17px 19px 28px}
.af-writing-guide{font-size:calc(10px * var(--study-text-scale, 1));line-height:1.9;color:var(--muted);margin-bottom:22px}
.af-answer-unit{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--line);scroll-margin-top:16px}
.af-unit-head{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:5px}
.af-unit-head label{font-size:calc(12px * var(--study-text-scale, 1));font-weight:650}
.af-unit-head output{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);font-variant-numeric:tabular-nums}
.af-prompt{font-size:calc(11px * var(--study-text-scale, 1));line-height:1.9;margin-bottom:10px;color:var(--muted)}
.af-prompt summary{font-size:calc(10px * var(--study-text-scale, 1));cursor:pointer;width:fit-content}
.af-prompt p{padding:10px 0 7px;color:var(--ink);font-size:calc(12px * var(--study-text-scale, 1))}
.af-prompt small{font-size:calc(9px * var(--study-text-scale, 1));display:block}
.af-answer textarea{display:block;width:100%;max-width:100%;resize:vertical;border:1px solid #cdd9ce;border-radius:6px;padding:10px 11px;min-height:87px;background:var(--surface);font-size:calc(14px * var(--study-text-scale, 1));line-height:1.9}
.af-answer textarea::placeholder{color:var(--muted);opacity:.7;font-size:calc(12px * var(--study-text-scale, 1))}
.af-answer textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.af-answer textarea[readonly]{background:var(--paper)}
.af-assess{display:flex;gap:5px;border:0;padding:10px 0 0;margin:0;flex-wrap:wrap}
.af-assess{position:relative}
.af-assess legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.af-assess button{border:1px solid var(--line);border-radius:5px;padding:6px 10px;min-height:34px;font-size:calc(10px * var(--study-text-scale, 1))}
.af-assess button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);font-weight:650}
.af-assess button:hover{border-color:var(--accent)}
.af-saved-assessment{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);margin-top:8px}
.af-review-controls{padding:22px 0 8px}
.af-review-controls .button{font-size:calc(12px * var(--study-text-scale, 1))}
.af-review-controls>p{font-size:calc(10px * var(--study-text-scale, 1));line-height:1.9;color:var(--muted);margin:9px 0}
.af-review-controls .af-complete-message{color:var(--accent);font-size:calc(12px * var(--study-text-scale, 1));font-weight:650}
.af-official{margin-top:20px;padding-top:20px;border-top:2px solid var(--line);scroll-margin-top:14px}
.af-official h2{font-size:calc(15px * var(--study-text-scale, 1))}
.af-official>p{font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);margin:8px 0 16px}
.af-official details,.af-past{font-size:calc(12px * var(--study-text-scale, 1));line-height:1.9;margin-top:20px}
.af-official summary,.af-past summary{cursor:pointer;font-weight:600}
.af-official details p{padding-top:15px;font-size:calc(12px * var(--study-text-scale, 1))}
.af-past section{padding:15px 0;border-top:1px solid var(--line)}
.af-past h3{font-size:calc(12px * var(--study-text-scale, 1));margin-bottom:13px}
.af-past p{font-size:calc(12px * var(--study-text-scale, 1));overflow-wrap:anywhere}
.af-errata{padding:10px 13px;background:#fff8e9;border:1px solid #eadbb9;border-radius:7px;color:#75561d;font-size:calc(11px * var(--study-text-scale, 1));margin-bottom:14px}
.af-errata summary{cursor:pointer;font-weight:600}
.af-errata p{margin-top:10px;line-height:1.9}
@media(max-width:1250px){.af-starter-list{grid-template-columns:1fr}.af-starter-list>a{padding:11px 14px}.af-starter-list strong{font-size:calc(12px * var(--study-text-scale, 1))}.af-starter-list small{display:inline;margin-left:9px}.af-starter-list>a>span:nth-child(2){display:flex;align-items:baseline;flex-wrap:wrap}.af-starter-list .af-status{display:inline-flex}.af-filters{grid-template-columns:1fr 1fr}.af-home-entry{align-items:flex-start}.af-home-buttons{max-width:250px}.main[data-page=afternoon-question]{padding-inline:19px}.af-paper{padding-inline:20px}}
@media(max-width:1099px){.af-workspace{display:block}.af-mobile-tabs{display:flex;gap:4px;padding:4px;background:var(--accent-soft);border:1px solid var(--line);border-radius:7px;margin-bottom:12px}.af-mobile-tabs button{flex:1;min-height:38px;border-radius:4px;font-size:calc(12px * var(--study-text-scale, 1));color:var(--muted)}.af-mobile-tabs [aria-selected=true]{background:var(--surface);color:var(--accent);font-weight:650}.af-workspace[data-panel=reader] .af-answer,.af-workspace[data-panel=answer] .af-reader{display:none}.af-reader-scroll,.af-answer-scroll{height:calc(100dvh - 335px)}.af-question-heading h1{font-size:calc(18px * var(--study-text-scale, 1))}.af-course-mark{display:none}}
@media(max-width:780px){.af-question-row{grid-template-columns:79px minmax(0,1fr) 15px;gap:12px;padding:15px}.af-row-progress{grid-column:2;grid-row:2;display:flex;align-items:center;gap:9px;justify-self:start}.af-question-row>svg{grid-column:3;grid-row:1/3}.af-question-meta{grid-row:1/3}.af-question-title strong{font-size:calc(12px * var(--study-text-scale, 1))}.af-home-entry{display:block;padding:20px}.af-home-buttons{max-width:none;justify-content:flex-start;margin-top:16px}.af-home-buttons small{text-align:left;flex-basis:auto}.af-question-heading-row{align-items:flex-start;gap:12px}.af-save-question{font-size:0;padding:7px}.af-save-question svg{width:18px;height:18px}.af-source-links{gap:9px}}
@media(max-width:620px){.topbar .header-brand{width:auto}.workspace,.sidebar-collapsed .workspace{margin-left:0}.mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr))}.mobile-nav .nav-link{padding-inline:3px;min-width:0}.af-sidebar-course{padding-bottom:50px}.sidebar-drawer .sidebar{width:100%}.af-filters{padding:13px;gap:11px}.af-search{grid-column:1/-1}.af-filters>.field:last-child{grid-column:1/-1}.af-starter-list small{display:block;margin-left:0}.af-starter-list>a>span:nth-child(2){display:block}.af-starter-list .af-status{display:none}.main[data-page=afternoon-question]{padding:17px 13px 18px}.af-question-heading h1{font-size:calc(16px * var(--study-text-scale, 1))}.af-question-heading-row p{font-size:calc(10px * var(--study-text-scale, 1))}.af-question-heading-row p span{display:none}.af-question-tools{flex-wrap:wrap;gap:8px}.af-source-links{flex-basis:100%;justify-content:flex-start;margin-left:0}.af-reader-scroll,.af-answer-scroll{height:calc(100dvh - 365px);min-height:310px}.af-paper{font-size:calc(14px * var(--study-text-scale, 1));padding:22px 18px 10px;line-height:2.05}.af-answer-scroll{padding:16px}.af-answer textarea{font-size:calc(16px * var(--study-text-scale, 1))}.af-reader-toolbar{padding:9px;gap:5px}.af-reader-toolbar select{font-size:calc(10px * var(--study-text-scale, 1))}.af-to-questions{font-size:calc(10px * var(--study-text-scale, 1))}.af-question-title small{font-size:calc(9px * var(--study-text-scale, 1))}.af-source-note{font-size:calc(9px * var(--study-text-scale, 1))}.af-home-entry h2{font-size:calc(16px * var(--study-text-scale, 1))}.af-home-buttons .button{font-size:calc(12px * var(--study-text-scale, 1))}}
@media(prefers-reduced-motion:reduce){.af-question-row,.af-starter-list>a,.study-side-nav a{transition:none}}
@media(prefers-color-scheme:dark){.af-status.draft{background:#283344;color:#c2d5f7}.af-status.review{background:#3c3120;color:#e5c38d}.af-errata{background:#30291a;border-color:#6a562b;color:#e1c28b}.af-home-entry{border-color:var(--line)}.af-answer textarea{border-color:var(--line)}}
@media print{.af-reader-scroll,.af-answer-scroll{height:auto;overflow:visible}.af-workspace{display:block}.af-reader,.af-answer{display:block!important}.af-mobile-tabs,.af-reader-toolbar,.af-question-tools,.af-save-question{display:none}}
.af-ai-controls{padding:16px;margin-bottom:24px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.af-ai-controls-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.af-ai-controls-heading>span{font-size:calc(12px * var(--study-text-scale, 1));color:var(--muted)}
.af-ai-controls>p,.af-ai-controls>small{font-size:calc(12px * var(--study-text-scale, 1));line-height:1.7;color:var(--muted)}
.af-ai-controls>small{display:block}
.af-ai-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.af-ai-actions .button{font-size:calc(12px * var(--study-text-scale, 1))}
.af-ai-status.error{color:var(--danger,#b65a51)}
.af-unit-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:10px;flex-wrap:wrap}
.af-unit-actions button:disabled{opacity:.45;cursor:not-allowed}
.af-ai-feedback{border:1px solid var(--line);border-radius:10px;padding:16px;margin-top:14px;background:var(--surface);font-size:calc(13px * var(--study-text-scale, 1));line-height:1.85;overflow-wrap:anywhere}
.af-ai-score{display:flex;align-items:baseline;gap:12px}
.af-ai-score strong{font-size:calc(20px * var(--study-text-scale, 1));color:var(--accent)}
.af-ai-score small,.af-ai-date,.af-ai-example small{color:var(--muted);font-size:calc(11px * var(--study-text-scale, 1))}
.af-ai-label{font-weight:700;margin:18px 0 8px}
.af-ai-elements{padding:0;margin:0;list-style:none}
.af-ai-elements li{display:flex;gap:10px;border-top:1px solid var(--line);padding:12px 0}
.af-ai-elements li p{margin:4px 0;color:var(--muted)}
.af-ai-elements li>div{min-width:0}
.af-ai-element-status{flex:none;align-self:flex-start;border:1px solid var(--line);border-radius:5px;padding:1px 6px;font-size:calc(10px * var(--study-text-scale, 1));font-weight:700;white-space:nowrap}
.af-ai-elements .present .af-ai-element-status{color:var(--accent)}
.af-ai-elements .partial .af-ai-element-status,.af-ai-elements .missing .af-ai-element-status{color:var(--danger,#b65a51)}
.af-ai-example{padding:1px 14px 12px;border-left:3px solid var(--accent);background:var(--accent-soft)}
.af-ai-example .af-ai-label{margin-top:10px}
.af-ai-reference{margin:14px 0}
.af-ai-reference blockquote{margin:8px 0;padding-left:12px;border-left:2px solid var(--line)}
.af-ai-date{display:block;margin-top:16px}
.af-ai-feedback.stale{border-style:dashed;color:var(--muted)}
.af-ai-excluded,.af-ai-previous{font-size:calc(12px * var(--study-text-scale, 1));color:var(--muted)}
@media(max-width:620px){.af-ai-controls{padding:13px}.af-ai-actions{align-items:stretch}.af-ai-actions>.button{flex:1}.af-ai-feedback{padding:13px}.af-ai-elements li{gap:8px}}
.topbar .header-brand{width:216px}
.sidebar{width:192px}
.workspace{margin-left:192px}
.study-sidebar-content{display:flex;flex-direction:column}
.study-side-nav{padding:25px 12px;border-bottom:0;gap:6px}
.study-side-nav a{font-size:calc(13px * var(--study-text-scale, 1));min-height:45px}
.study-side-note{margin-top:auto;padding:20px 24px;font-size:calc(10px * var(--study-text-scale, 1));line-height:1.9;border-top:1px solid var(--line)}
.af-list-views{display:flex;gap:5px;border-bottom:1px solid var(--line);margin:0 0 18px}
.af-list-views a{padding:11px 15px;font-size:calc(12px * var(--study-text-scale, 1));text-decoration:none;color:var(--muted);border-bottom:2px solid transparent}
.af-list-views a:hover{color:var(--accent);background:var(--accent-soft)}
.af-list-views [aria-current]{color:var(--accent);border-color:var(--accent);font-weight:650}
.af-workspace-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.af-answer-toolbar{gap:9px}
.af-answer-toolbar strong{font-size:calc(13px * var(--study-text-scale, 1));margin-right:0}
.af-answer-toolbar select{min-width:76px;max-width:130px;flex:1;padding:6px;border:1px solid var(--line);border-radius:5px;background:var(--paper);font-size:calc(11px * var(--study-text-scale, 1))}
.af-answer-toolbar #af-save-state{font-size:calc(10px * var(--study-text-scale, 1));margin-left:auto}
.af-writing-guide{font-size:calc(11px * var(--study-text-scale, 1));margin-bottom:15px}
.af-unit-head{position:sticky;top:-17px;z-index:1;min-height:37px;padding:7px 0;background:var(--surface);border-bottom:1px solid var(--line);margin-bottom:10px}
.af-unit-head label{font-size:calc(14px * var(--study-text-scale, 1))}
.af-unit-head output{font-size:calc(12px * var(--study-text-scale, 1));white-space:nowrap}
.af-unit-head output[data-over=true]{color:#b24e3f;font-weight:700}
.af-prompt{font-size:calc(13px * var(--study-text-scale, 1));color:var(--ink);margin:0 0 13px}
.af-prompt p{font-size:calc(13px * var(--study-text-scale, 1));line-height:1.9;padding:0}
.af-limit-hint{display:inline-block;font-size:calc(11px * var(--study-text-scale, 1));line-height:1.8;margin-top:9px;padding:3px 8px;border-radius:4px;background:var(--paper);color:var(--muted)}
.af-unit-actions .button{font-size:calc(11px * var(--study-text-scale, 1));min-height:34px;padding:5px 11px}
.af-ai-controls{padding:13px;margin-bottom:17px}
.af-ai-controls-heading{gap:8px;margin-bottom:10px}
.af-ai-controls-heading>strong{font-size:calc(12px * var(--study-text-scale, 1))}
.af-ai-controls-heading>span{font-size:calc(11px * var(--study-text-scale, 1));line-height:1.8}
.af-ai-actions{gap:8px}
.af-ai-actions .button{font-size:calc(11px * var(--study-text-scale, 1));min-height:34px;padding:6px 10px}
.af-ai-controls .af-ai-status{margin:10px 0 6px;font-size:calc(11px * var(--study-text-scale, 1));line-height:1.8}
.af-ai-controls>small{font-size:calc(10px * var(--study-text-scale, 1));line-height:1.8}
.af-ai-feedback{font-size:calc(14px * var(--study-text-scale, 1));container-type:inline-size}
.af-ai-score{justify-content:space-between;gap:10px}
.af-ai-score>div{display:flex;flex-direction:column;gap:2px}
.af-ai-score>div>span{font-size:calc(12px * var(--study-text-scale, 1));font-weight:650;color:var(--ink)}
.af-ai-score strong{font-size:calc(22px * var(--study-text-scale, 1))}
.af-ai-explanation{margin:13px 0}
.af-ai-comparison{display:grid;gap:10px;margin:15px 0}
.af-ai-submission,.af-ai-example{padding:12px;border-radius:5px;min-width:0;overflow-wrap:anywhere}
.af-ai-submission{background:var(--paper);border:1px solid var(--line)}
.af-ai-comparison .af-ai-label{margin:0 0 7px;font-size:calc(12px * var(--study-text-scale, 1))}
.af-ai-comparison>div>p:nth-child(2){font-size:calc(14px * var(--study-text-scale, 1));line-height:1.9}
.af-ai-element-status{font-size:calc(11px * var(--study-text-scale, 1))}
.af-ai-edit{margin-top:14px;font-size:calc(12px * var(--study-text-scale, 1));min-height:36px}
.af-ai-edit svg{width:14px}
@container(min-width:480px){.af-ai-comparison{grid-template-columns:1fr 1fr}}
@media(min-width:900px){
  .layout.afternoon-layout{min-height:calc(100dvh - 64px)}
  .workspace.afternoon-workspace-page{height:calc(100dvh - 64px);min-height:600px;display:flex;flex-direction:column}
  .main[data-page=afternoon-question]{flex:1;min-height:0;display:flex;flex-direction:column;padding:17px 24px 10px}
  .af-question-heading{flex:none}
  .af-question-heading-row{margin-top:6px}
  .af-question-heading h1{font-size:calc(18px * var(--study-text-scale, 1));line-height:1.5}
  .af-question-tools{margin:9px 0 12px}
  .af-mobile-tabs{display:none}
  .af-workspace-controls{flex:none}
  .af-workspace{display:grid;flex:1;min-height:0;align-items:stretch;grid-template-columns:minmax(340px,1.1fr) minmax(310px,1fr);gap:16px}
  .af-workspace[data-layout=reading]{grid-template-columns:minmax(340px,1.55fr) minmax(310px,.8fr)}
  .af-workspace[data-layout=writing]{grid-template-columns:minmax(340px,.85fr) minmax(310px,1.3fr)}
  .af-reader,.af-answer,.af-workspace[data-panel=reader] .af-answer,.af-workspace[data-panel=answer] .af-reader{display:flex;flex-direction:column;min-height:0}
  .af-reader-toolbar,.af-answer-toolbar{flex:none}
  .af-reader-scroll,.af-answer-scroll{flex:1;min-height:0;height:auto}
  .af-paper{font-size:calc(15px * var(--study-text-scale, 1));line-height:2;padding:23px 22px 12px}
  .af-to-questions{font-size:calc(10px * var(--study-text-scale, 1))}
  .af-reader-toolbar select{min-width:80px;padding-inline:4px}
  .af-source-note{flex:none;margin-top:8px;font-size:calc(9px * var(--study-text-scale, 1))}
  .workspace.afternoon-workspace-page>.footer{flex:none;padding:8px 24px;font-size:calc(9px * var(--study-text-scale, 1));line-height:1.5}
}
@media(prefers-color-scheme:dark){.af-unit-head output[data-over=true]{color:#f0a89b}}

.af-unit-actions .text-link{font-size:calc(11px * var(--study-text-scale, 1));min-height:34px}
.af-grade-error{color:var(--bad);font-size:calc(11px * var(--study-text-scale, 1));line-height:1.8;margin-top:9px}

/* Keep the workspace tools compact and the two documents independent on PC. */
@media(min-width:900px){
 .main[data-page=afternoon-question]{padding:12px 20px 8px}
 .af-question-heading-row{margin:0;gap:12px;min-width:0}
 .af-back{font-size:calc(11px * var(--study-text-scale, 1));white-space:nowrap;flex:none}
 .af-back svg{width:15px;height:15px}
 .af-question-title-group{flex:1;min-width:0}
 .af-question-heading-row p{font-size:calc(10px * var(--study-text-scale, 1));line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .af-question-heading-row p span{margin-left:8px}
 .af-question-heading h1{font-size:calc(17px * var(--study-text-scale, 1));line-height:1.5;margin:2px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .af-question-switcher{flex:0 1 300px;max-width:none;min-width:160px;gap:5px}
 .af-question-switcher select{width:100%;min-width:0;flex:1}
 .af-sequence-count{font-size:calc(10px * var(--study-text-scale, 1))}
 .af-save-question{min-height:32px;padding:5px 9px;font-size:calc(11px * var(--study-text-scale, 1))}
 .af-question-tools{gap:9px;margin:8px 0 12px;flex-wrap:wrap}
 .af-timing-values{gap:9px}
 .af-time-remaining{min-width:78px;font-size:calc(11px * var(--study-text-scale, 1))}
 .af-timing progress{height:2px;margin-top:3px}
 .af-target-settings>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:4px 7px}
 .af-target-settings>summary::-webkit-details-marker,.af-source-menu>summary::-webkit-details-marker{display:none}
 .af-target-settings>summary::after,.af-source-menu>summary::after{content:'';width:5px;height:5px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg);margin-top:-3px}
 .af-source-menu{position:relative;flex:none;font-size:calc(10px * var(--study-text-scale, 1))}
 .af-source-menu>summary{display:flex;align-items:center;gap:8px;list-style:none;padding:5px 7px;border:1px solid var(--line);border-radius:5px;cursor:pointer}
 .af-source-menu>div{position:absolute;right:0;top:calc(100% + 7px);z-index:35;min-width:160px;padding:10px;border:1px solid var(--line);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #12271d22}
 .af-source-menu a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px;font-size:calc(11px * var(--study-text-scale, 1));text-decoration:none;white-space:nowrap}
 .af-source-menu a:hover{background:var(--accent-soft)}
 .af-source-menu svg{width:12px;height:12px}
 .af-source-menu small{display:block;color:var(--muted);font-size:calc(10px * var(--study-text-scale, 1));padding:5px 8px 0}
 .af-reader-toolbar,.af-answer-toolbar{min-height:46px;padding:7px 12px;gap:8px}
 .af-reader-toolbar #af-reference{flex:none;width:110px;min-width:95px;max-width:120px;font-size:calc(11px * var(--study-text-scale, 1));font-weight:600}
 .af-reader-toolbar #af-reader-jump{min-width:70px;max-width:none}
 .af-reader-toolbar output{font-size:calc(9px * var(--study-text-scale, 1))}
 .af-reader-toolbar>a{margin-left:auto;font-size:calc(10px * var(--study-text-scale, 1));white-space:nowrap;text-decoration:none}
 .af-reader-toolbar>a svg{width:11px;height:11px}
 .af-reference-caption{min-width:0;color:var(--muted);font-size:calc(10px * var(--study-text-scale, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .af-reference-paper{padding:18px 20px 24px;line-height:2;font-size:calc(14px * var(--study-text-scale, 1));overflow-wrap:anywhere}
 .af-reference-paper h2{font-size:calc(14px * var(--study-text-scale, 1));margin:0 0 12px}
 .af-reference-paper p+h2{margin-top:28px}
 .af-reference-guide{font-size:calc(11px * var(--study-text-scale, 1));line-height:1.8;color:var(--muted)}
 .af-reference-paper .af-source-figure{margin:12px 0 20px}
 .af-writing-guide{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;font-size:calc(10px * var(--study-text-scale, 1));line-height:1.8;margin:0 0 12px}
 .af-writing-guide .text-link{font-size:calc(10px * var(--study-text-scale, 1));min-height:26px;padding:0}
.af-review-links{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.af-writing-guide .af-review-links .button{font-size:calc(11px * var(--study-text-scale, 1));min-height:34px;padding:6px 10px}
.af-saved-feedback{font-size:calc(12px * var(--study-text-scale, 1))}
.af-review-controls:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:6px}
 #af-ai-summary{margin:18px 0 20px;scroll-margin-top:12px}
 #af-ai-summary:focus{outline:2px solid var(--accent);outline-offset:4px;border-radius:6px}
 .af-review-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}
 .af-review-controls p{flex-basis:100%;margin:0;font-size:calc(11px * var(--study-text-scale, 1))}
 .af-question-row{min-height:62px;padding:10px 14px;gap:13px}
 .af-question-title strong{font-size:calc(12px * var(--study-text-scale, 1))}
 .af-question-title small{font-size:calc(10px * var(--study-text-scale, 1));line-height:1.6;margin-top:2px}
 .af-question-meta{font-size:calc(10px * var(--study-text-scale, 1))}
 .af-question-meta strong{font-size:calc(11px * var(--study-text-scale, 1))}
 .af-row-progress small{font-size:calc(10px * var(--study-text-scale, 1))}
}

/* A spread uses the full reading width and keeps the answer available below it. */
.workspace.afternoon-workspace-page.af-spread-page{height:auto;min-height:calc(100dvh - 64px)}
.af-spread-page .main[data-page=afternoon-question]{display:block}
.af-spread-page .af-workspace[data-reader-mode=spread][data-layout]{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
.af-workspace[data-reader-mode=spread] .af-reader,.af-workspace[data-reader-mode=spread] .af-answer{display:flex;flex-direction:column}
.af-spread-page .af-workspace[data-reader-mode=spread] .af-reader-scroll{flex:none;height:calc(100dvh - 300px);min-height:400px}
.af-spread-page .af-workspace[data-reader-mode=spread] .af-answer-scroll{flex:none;height:55dvh;min-height:300px}
.af-question-tools{flex-wrap:wrap}
@media(max-width:899px){
 .af-question-heading-row{flex-wrap:wrap;gap:12px}
 .af-question-title-group{flex:1;min-width:240px}
 .af-question-switcher{max-width:none;flex:1;min-width:230px}
}
.af-spread-page .af-mobile-tabs{display:none}
.af-spread>.af-source-page+.af-source-page{margin-top:0;padding-top:clamp(12px,2vw,24px);border-top:1px solid var(--line)}

/* A single divider replaces preset widths and follows the document arrangement. */
.af-pane-divider{display:none;touch-action:none;user-select:none;position:relative;align-items:center;justify-content:center;outline-offset:-3px}
.af-pane-divider>span{display:block;width:4px;height:42px;border-radius:3px;background:var(--line);transition:background .15s}
.af-pane-divider:hover>span,.af-pane-divider:focus-visible>span,.is-resizing .af-pane-divider>span{background:var(--accent)}
.af-workspace.is-resizing,.af-workspace.is-resizing *{user-select:none;cursor:col-resize!important}
.af-workspace[data-reader-mode=spread].is-resizing,.af-workspace[data-reader-mode=spread].is-resizing *{cursor:row-resize!important}
@media(min-width:900px){
 .af-workspace[data-reader-mode=continuous][data-layout]{grid-template-columns:minmax(0,var(--af-reader-width,55%)) 18px minmax(0,1fr);gap:0}
 .af-workspace[data-reader-mode=continuous]>.af-pane-divider{display:flex;width:18px;cursor:col-resize}
}
.af-spread-page .af-workspace[data-reader-mode=spread][data-layout]{gap:0}
.af-workspace[data-reader-mode=spread]>.af-pane-divider{display:flex;height:18px;cursor:row-resize}
.af-workspace[data-reader-mode=spread]>.af-pane-divider>span{width:42px;height:4px}
.af-spread-page .af-workspace[data-reader-mode=spread] .af-reader-scroll{height:var(--af-reader-height,calc(100dvh - 300px));min-height:240px}

.af-answer-fields{display:grid;gap:12px;margin-top:12px}
.af-answer-fields[data-compact=true]{grid-template-columns:repeat(2,minmax(0,1fr))}
.af-answer-field{min-width:0}
.af-part-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:5px}
.af-part-head label{font-size:calc(12px * var(--study-text-scale, 1));font-weight:650;overflow-wrap:anywhere}
.af-part-head output{flex:none;font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);font-variant-numeric:tabular-nums}
.af-part-head output[data-over=true]{color:var(--danger,#b24e3f);font-weight:700}
.af-answer-field textarea{min-height:72px;line-height:1.7}
.af-answer input[data-af-answer]{display:block;width:100%;min-width:0;min-height:42px;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font:inherit;font-size:calc(14px * var(--study-text-scale, 1))}
.af-answer input[data-af-answer]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.af-answer input[data-af-answer][readonly]{background:var(--paper)}
.af-legacy-guide,.af-legacy-copy{padding:10px 12px;margin:10px 0;border:1px dashed var(--line);border-radius:6px;color:var(--muted);font-size:calc(11px * var(--study-text-scale, 1))}
.af-legacy-guide p{margin:0 0 6px}.af-legacy-copy p{white-space:pre-wrap;overflow-wrap:anywhere}
.af-ai-feedback{padding:0}
.af-ai-feedback>summary{display:flex;align-items:center;gap:9px;min-height:48px;padding:11px 14px;list-style:none;cursor:pointer;font-size:calc(12px * var(--study-text-scale, 1))}
.af-ai-feedback>summary::-webkit-details-marker{display:none}
.af-ai-feedback>summary>svg{width:14px;height:14px;flex:none;transition:transform .15s}
.af-ai-feedback[open]>summary>svg{transform:rotate(90deg)}
.af-ai-feedback>summary strong{color:var(--accent);white-space:nowrap;font-size:calc(15px * var(--study-text-scale, 1))}
.af-feedback-toggle{margin-left:auto;font-size:calc(10px * var(--study-text-scale, 1));color:var(--muted);white-space:nowrap}
.af-feedback-open,.af-ai-feedback[open] .af-feedback-closed{display:none}
.af-ai-feedback[open] .af-feedback-open{display:inline}
.af-ai-feedback>summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:8px}
.af-ai-feedback>summary:hover{background:var(--accent-soft);border-radius:9px}
.af-ai-feedback[open]>summary{border-bottom:1px solid var(--line)}
.af-feedback-body{padding:2px 16px 16px}
@media(prefers-reduced-motion:reduce){.af-ai-feedback>summary>svg{transition:none}}
/* Start with the answer fields and keep review tools at the end of the answer. */
@media(min-width:900px){
 .af-answer-scroll{padding:22px 22px 30px}
 .af-answer-unit{padding-bottom:26px;margin-bottom:26px}
 .af-unit-head{margin-bottom:8px}
 .af-prompt{margin-bottom:14px}
 .af-unit-actions{margin-top:12px}
 .af-reader-mode select{max-width:78px}
 .af-question-tools{margin:10px 0 14px;gap:16px}
 .af-answer-toolbar #af-unit-jump{min-width:100px}
 .af-question-switcher{flex-basis:250px}
}
.af-self-reference{margin-top:18px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:9px}
.af-self-reference h3{font-size:calc(13px * var(--study-text-scale, 1));margin:0 0 8px}
.af-self-reference h3:not(:first-child){margin-top:18px}
.af-self-reference blockquote{margin:0 0 12px;padding:10px 13px;border-left:3px solid var(--accent);background:var(--accent-soft);line-height:1.8;overflow-wrap:anywhere}
.af-self-reference ul{padding-left:22px;line-height:1.9}
.af-self-reference details{margin-top:10px}
.af-self-reference summary,.af-chat>summary{cursor:pointer;font-size:calc(13px * var(--study-text-scale, 1));font-weight:600}
.af-chat{margin:14px 0 0}
.af-chat>summary{width:fit-content;padding:7px 10px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--accent)}
.af-chat[open]>summary{margin-bottom:10px}
.af-chat-box.ask-box{margin-top:0;padding:14px}
.af-chat-box .ask-chips{gap:6px}
.af-chat-box .ask-form textarea{min-height:64px;background:var(--surface)}
.af-chat-box .ask-form{align-items:flex-end}
.af-chat-box .ask-a{overflow-wrap:anywhere}
.af-assess button{min-width:56px;font-size:calc(21px * var(--study-text-scale, 1))}
.af-partial-points{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:12px 0 6px}
.af-partial-points label{font-size:calc(13px * var(--study-text-scale, 1))}
.af-partial-points input{width:90px}
.af-partial-points small{flex-basis:100%;color:var(--muted);font-size:calc(11px * var(--study-text-scale, 1))}
