
:root{--bg:#f5f6f8;--panel:#fff;--ink:#202c38;--muted:#667582;--line:#e3e8eb;--accent:#39756f;--soft:#edf5f2;--wrong:#9d4b54;--wrong-bg:#fff4f4;--radius:20px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-size:15px;line-height:1.6}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #cb9e51;outline-offset:3px}button{touch-action:manipulation}a{color:var(--accent)}[hidden]{display:none!important}.shell{display:grid;grid-template-columns:228px minmax(0,1fr);min-height:100vh}.sidebar{padding:32px 24px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;gap:32px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:11px}.logo{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--accent);color:white;font-size:17px;font-weight:750}.brand-name{font-weight:800;letter-spacing:.05em}.brand-sub{color:var(--muted);font-size:11px;letter-spacing:.02em}.nav-label{font-size:11px;color:var(--muted);letter-spacing:.12em;margin:0 0 12px 12px}.nav{display:grid;gap:7px}.nav button{text-align:left;border:0;background:none;padding:12px 14px;border-radius:11px;display:flex;justify-content:space-between;align-items:center;color:var(--muted);min-height:46px}.nav button.active{background:var(--soft);color:var(--accent);font-weight:700}.nav-count{font-size:12px}.sidebar-note{margin-top:auto;padding:15px;border-radius:13px;background:var(--bg);font-size:12px;color:var(--muted)}.sidebar-note strong{color:var(--ink);display:block;margin-bottom:5px}.work{padding:28px 42px 32px;max-width:1510px;width:100%;margin:auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted);margin-bottom:27px}.pill{display:inline-flex;align-items:center;gap:7px;border:1px solid #d9e6e2;background:var(--soft);border-radius:99px;padding:5px 11px;color:var(--accent);font-size:11px;white-space:nowrap}.dot{width:6px;height:6px;background:var(--accent);border-radius:99px}.page-intro{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:23px}.eyebrow{font-size:11px;letter-spacing:.12em;color:var(--accent);font-weight:750;margin:0 0 4px}h1{font-size:29px;letter-spacing:-.045em;margin:0;font-weight:750}.subtitle{margin:5px 0 0;color:var(--muted);font-size:13px}.ghost{background:#fff;border:1px solid var(--line);border-radius:11px;padding:10px 15px;color:var(--ink);font-size:13px;min-height:44px;white-space:nowrap}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:24px}.stat{border:1px solid var(--line);border-radius:15px;background:white;padding:16px 21px}.stat-label{font-size:12px;color:var(--muted);word-break:keep-all}.stat-value{font-size:24px;font-weight:750;margin-top:3px;letter-spacing:-.04em}.stat-value small{font-size:13px;color:var(--muted);font-weight:400;letter-spacing:0;margin-left:5px}.study-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:20px;align-items:start}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.question-card{padding:26px}.card-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.chips{display:flex;gap:7px;flex-wrap:wrap}.chip{font-size:11px;border-radius:6px;padding:3px 8px;background:var(--bg);color:var(--muted)}.chip.unit{background:var(--soft);color:var(--accent)}.bookmark{border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--muted);font-size:12px;padding:8px 10px;min-height:40px;white-space:nowrap}.bookmark[aria-pressed=true]{background:#f7f0df;border-color:#dfce9b;color:#765c20}.q-number{color:var(--muted);font-size:12px;margin:23px 0 5px}.q-text{font-size:19px;line-height:1.7;font-weight:650;letter-spacing:-.02em;margin:0 0 24px;word-break:keep-all;overflow-wrap:anywhere}.options{display:grid;gap:9px}.option{border:1px solid var(--line);background:#fff;border-radius:12px;padding:13px 14px;text-align:left;display:flex;align-items:flex-start;gap:12px;min-height:54px;color:var(--ink);transition:background .12s,border-color .12s;width:100%;word-break:keep-all;overflow-wrap:anywhere}.option:hover:not(:disabled){background:var(--bg)}.option.selected{background:var(--soft);border-color:var(--accent)}.num{height:25px;width:25px;min-width:25px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;font-size:12px;line-height:1;margin-top:1px}.option.selected .num{background:var(--accent);color:white;border-color:var(--accent)}.option.correct{background:var(--soft);border-color:var(--accent)}.option.incorrect{background:var(--wrong-bg);border-color:#d8a5ab}.option:disabled{opacity:1;cursor:default}.option-label{flex:1}.option-state{font-size:11px;white-space:nowrap;padding-top:4px;color:var(--accent)}.option.incorrect .option-state{color:var(--wrong)}.actions{display:flex;gap:10px;margin-top:24px}.primary{border:1px solid var(--accent);background:var(--accent);color:#fff;border-radius:11px;padding:12px 20px;font-weight:650;min-height:48px}.actions .primary{flex:1}.question-bottom{margin-top:17px;display:flex;justify-content:space-between;color:var(--muted);font-size:11px;gap:10px}.explanation{min-height:425px}.ex-head{padding:22px 25px 17px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.ex-head h2{margin:0;font-size:15px}.ex-head span{font-size:11px;color:var(--muted)}.locked{padding:60px 30px 42px;text-align:center;color:var(--muted)}.locked-icon{width:48px;height:48px;border-radius:15px;background:var(--soft);margin:0 auto 19px;display:grid;place-items:center;color:var(--accent);font-size:22px}.locked h3{font-size:16px;color:var(--ink);font-weight:600;margin:0 0 9px}.locked p{font-size:13px;max-width:260px;margin:0 auto 29px;line-height:1.8}.steps{display:flex;justify-content:center;align-items:center;gap:8px;font-size:11px}.steps span{padding:5px 9px;border-radius:6px;background:var(--bg)}.ex-body{padding:22px 25px}.result{font-size:18px;font-weight:750;color:var(--accent);margin-bottom:10px}.result.wrong{color:var(--wrong)}.answer-description{color:var(--ink);font-size:13px;line-height:1.9;margin:0 0 22px;word-break:keep-all;overflow-wrap:anywhere}.detail-title{font-size:12px;font-weight:750;margin-bottom:12px}.detail{border-top:1px solid var(--line);padding:11px 0;display:flex;gap:11px;font-size:12px;color:var(--muted)}.detail .num{height:22px;width:22px;min-width:22px;font-size:10px}.detail.correct{color:var(--accent)}.detail.correct .num{background:var(--soft);border-color:#c6ddd6}.detail p{margin:0;overflow-wrap:anywhere}.question-nav{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px;align-items:center}.question-nav-label{font-size:11px;color:var(--muted);margin-right:3px}.qnav{width:38px;height:38px;border:1px solid var(--line);background:white;border-radius:10px;color:var(--muted);font-size:12px}.qnav.answered{background:var(--soft);color:var(--accent)}.qnav.wrong{background:var(--wrong-bg);color:var(--wrong)}.qnav.current{outline:2px solid var(--accent);outline-offset:1px}.footnote{margin:22px 0 0;font-size:11px;color:var(--muted);line-height:1.9}.footnote strong{font-weight:650}.storage-warning{background:#fff5db;color:#725421;padding:11px 15px;border-radius:10px;font-size:12px;margin-bottom:16px}.empty{padding:60px 25px;text-align:center;grid-column:1/-1}.empty h2{font-size:20px}.empty p{color:var(--muted);font-size:14px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:12px 20px;border-radius:12px;font-size:13px;box-shadow:0 8px 30px #0002;z-index:30;max-width:90vw}.modal-backdrop{position:fixed;inset:0;background:#17222a66;z-index:40;display:grid;place-items:center;padding:20px}.modal{background:white;border-radius:20px;width:min(660px,100%);max-height:90vh;overflow:auto;padding:27px}.modal-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px}.modal h2{font-size:20px;margin:0}.modal p{font-size:13px;color:var(--muted)}.modal-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:22px}.file-controls{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0}.warning-box{background:var(--wrong-bg);border:1px solid #eed6d8;border-radius:11px;padding:13px 16px;font-size:12px;line-height:1.8;color:#84515a}.edit-fields{display:grid;gap:12px;margin-top:18px}.field{display:grid;gap:5px;font-size:12px;font-weight:650}.field input,.field textarea,.field select{border:1px solid #d4dde2;border-radius:8px;padding:9px 10px;background:#fff;width:100%;color:var(--ink);font-size:14px}.field textarea{min-height:65px;resize:vertical}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.divider{height:1px;background:var(--line);margin:22px 0}.danger{color:var(--wrong);border-color:#e9cdd0}.skip-link{position:absolute;left:-9999px}.skip-link:focus{left:15px;top:15px;background:#fff;z-index:50;padding:12px}.noscript{margin:15px;padding:20px;background:#fff5db}.modal-helper{font-size:11px!important}.readme-title{font-size:13px;font-weight:700;margin:15px 0 0}
@media(min-width:1550px){.work{max-width:1400px}.q-text{font-size:21px}}
@media(max-width:1100px){.shell{grid-template-columns:195px minmax(0,1fr)}.sidebar{padding:27px 17px}.work{padding:25px}.study-grid{grid-template-columns:1fr}.explanation{min-height:auto}.locked{padding:35px 25px}.locked p{margin-bottom:20px;max-width:400px}}
@media(max-width:700px){.shell{display:block}.sidebar{position:static;height:auto;padding:17px 18px 0;border-right:0;border-bottom:1px solid var(--line);gap:17px}.brand{gap:9px}.logo{width:31px;height:31px;font-size:14px;border-radius:9px}.brand-name{font-size:13px}.brand-sub{font-size:10px}.nav-label,.sidebar-note{display:none}.nav{display:flex;gap:6px}.nav button{flex:1;padding:10px 10px;font-size:12px;min-height:45px;border-radius:10px 10px 0 0}.work{padding:20px 16px 27px}.topbar{margin-bottom:19px;gap:7px;font-size:10px}.pill{font-size:10px;padding:4px 8px}.page-intro{align-items:flex-start;gap:10px}h1{font-size:25px}.subtitle{font-size:12px}.page-intro .ghost{padding:9px 11px;font-size:11px}.stats{gap:8px;margin-bottom:16px}.stat{padding:13px 12px;border-radius:12px}.stat-value{font-size:22px}.stat-label{font-size:11px}.stat-value small{font-size:11px;margin-left:2px}.study-grid{gap:15px}.question-card{padding:20px 17px}.q-text{font-size:17px;margin-bottom:20px}.option{padding:12px 10px;gap:9px;font-size:14px}.option-state{font-size:10px}.q-number{margin-top:20px}.actions{margin-top:20px}.ex-head{padding:18px 19px}.ex-body{padding:20px 19px}.footnote{font-size:10px}.modal-backdrop{padding:10px}.modal{padding:20px;max-height:94vh}.modal h2{font-size:18px}.two-fields{grid-template-columns:1fr}.qnav{width:39px;height:39px}.bookmark{font-size:11px;padding:7px}.question-bottom{font-size:10px}.chip{font-size:10px}}


/* Foundation: keep the demo's quiet teal study space, with room for a growing bank. */
:root{--bg:#f5f6f3;--ink:#243d36;--muted:#738078;--line:#e2e7df;--accent:#2f6a54;--soft:#edf3ec;--radius:18px}
body{font-size:15px;-webkit-font-smoothing:antialiased}.shell{grid-template-columns:236px minmax(0,1fr)}.sidebar{padding:34px 23px;gap:36px}.brand-name{letter-spacing:.07em;font-size:16px}.logo{width:40px;height:42px;border-radius:13px 13px 13px 3px}.brand-sub{font-size:10px;margin-top:2px}.nav{gap:9px}.nav button{font-size:13px;padding:14px}.nav-count{background:#f4f6f2;padding:1px 7px;border-radius:5px}.nav button.active .nav-count{background:#dce9dd}.guide-link{font-size:12px;display:flex;justify-content:space-between;padding:0 14px;text-decoration:none;color:var(--muted)}.guide-link:hover{color:var(--accent)}.sidebar-note{background:linear-gradient(155deg,#e9efe3,#f4f6ef);padding:20px 17px;border:1px solid #e1e8d9;border-radius:13px;color:#78846e}.sidebar-note strong{font-size:17px;line-height:1.65;font-weight:650;margin:13px 0 10px}.note-eyebrow{font-size:8px;letter-spacing:.14em;color:#819276}.local-note{border-top:1px solid #dce4d6;margin-top:24px;padding-top:13px;font-size:10px}.work{max-width:1480px;margin:0 auto;padding:30px 42px 34px}.topbar{border-bottom:1px solid var(--line);padding-bottom:23px;margin-bottom:29px}.breadcrumb-sep{margin:0 14px;color:#a5afa5}.pill{background:#fff;border-color:var(--line);font-size:10px}h1{font-size:30px}.eyebrow{font-size:10px;letter-spacing:.17em;margin-bottom:6px}.subtitle{font-size:13px;margin-top:8px}.page-intro{margin-bottom:27px}.ghost:hover:not(:disabled){background:var(--soft);border-color:#bdcec0}.primary:hover:not(:disabled){background:#265842}.stats{gap:16px;margin-bottom:24px}.stat{position:relative;padding:17px 22px;border-radius:13px}.stat-value{font-size:27px;margin-top:4px}.stat:after{content:'';position:absolute;width:29px;height:29px;right:20px;top:27px;border:1px solid #dbe6d7;border-radius:50%;background:radial-gradient(circle,#dce8d5 0 3px,transparent 4px)}.filterbar{display:flex;align-items:center;gap:16px;margin-bottom:18px;flex-wrap:wrap}.subject-filter{display:flex;align-items:center;gap:12px;font-size:11px;color:var(--muted)}.subject-filter select{color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:9px;padding:9px 30px 9px 12px;font-size:12px;max-width:230px;min-height:41px}.search-field{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:0 12px;margin-left:auto;max-width:290px;flex:1;min-width:180px}.search-field>span{font-size:25px;color:#879488}.search-field input{border:0;outline-offset:4px;width:100%;padding:9px 0;font-size:12px;color:var(--ink);background:transparent;min-width:0}.filter-count{font-size:11px;color:var(--muted)}.study-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:22px}.question-card{padding:26px 27px}.q-number{font-size:10px;letter-spacing:.13em;margin-top:28px}.q-text{font-size:20px;font-weight:650;line-height:1.75;margin-top:10px;margin-bottom:24px;white-space:pre-line}.options{border:0;margin:0;padding:0;min-width:0}.option{position:relative;align-items:center;font-size:14px;min-height:55px;padding:12px 13px;border-radius:10px}.option input{position:absolute;opacity:0;width:1px;height:1px}.option:has(input:focus-visible){outline:3px solid #cb9e51;outline-offset:3px}.option:has(input:disabled){cursor:default}.option-label{white-space:pre-line}.option .num{width:24px;height:24px;min-width:24px;font-size:11px;margin-top:0}.question-bottom{border-top:1px solid var(--line);padding-top:15px;flex-wrap:wrap;font-size:10px}.question-bottom #q-id{max-width:100%;overflow-wrap:anywhere}.explanation{min-height:450px}.ex-head{padding:23px 25px 18px;background:#fcfdf9}.ex-head h2{font-size:14px}.locked{padding:65px 26px 45px}.locked-icon{border-radius:50%;width:54px;height:54px;background:#f1f4ea;border:1px solid #e1e7d5;font-family:Georgia,serif}.locked h3{font-size:16px}.locked p{font-size:12px;line-height:1.9}.answer-description{white-space:pre-line}.result{font-size:17px}.detail{padding:14px 0;font-size:12px;line-height:1.9}.detail p{white-space:pre-line}.keypoint{padding:13px 15px;background:#f3f6ec;border-left:3px solid #9eb582;border-radius:0 8px 8px 0;font-size:12px;line-height:1.8;white-space:pre-line;margin:10px 0 24px}.source-note{font-size:10px;color:var(--muted);overflow-wrap:anywhere;border-top:1px solid var(--line);padding-top:16px;white-space:pre-line}.question-nav{margin-top:22px}.question-nav-label{margin-right:8px}.footnote{border-top:1px solid var(--line);padding-top:21px;margin-top:26px;color:#7f887f}.footnote strong{color:#5b6b5e;margin-right:7px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#question-figure{margin:0 0 22px}#question-image{max-width:100%;max-height:360px;display:block;margin:auto;object-fit:contain}#image-caption{font-size:11px;color:var(--muted);margin-top:8px}.form-error{color:#9d4b54;background:#fff4f4;padding:12px;border-radius:8px;font-size:13px}.modal-helper{line-height:1.8}.modal{scrollbar-gutter:stable}.warning-box{background:#f6f5ec;color:#736b49;border-color:#e7e2cb}.guide-page{max-width:940px;padding:45px 24px 70px;margin:auto}.guide-page header{display:flex;justify-content:space-between;align-items:center;margin-bottom:34px}.guide-page h1{margin:12px 0}.guide-page h2{font-size:20px;margin-top:32px}.guide-page p{color:#617167}.guide-page .card{padding:25px;margin-top:18px}.guide-page table{border-collapse:collapse;width:100%;font-size:13px}.guide-page th,.guide-page td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.guide-page pre{overflow:auto;background:#f3f5f0;padding:18px;border-radius:12px;font-size:12px;line-height:1.8}.guide-page code{font-size:.9em}.guide-page li{margin:10px 0;color:#617167}.guide-page .download-row{display:flex;gap:12px;flex-wrap:wrap}.guide-page .download-row a{text-decoration:none}
@media(min-width:1600px){.work{padding-left:58px;padding-right:58px}}
@media(max-width:1200px){.work{padding:27px}.shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{padding:29px 17px}.study-grid{grid-template-columns:1fr}.explanation{min-height:auto}.locked{padding:32px 25px}.locked p{max-width:390px;margin-bottom:20px}.stat{padding:16px}.stat:after{right:14px}}
@media(max-width:740px){.shell{display:block}.sidebar{height:auto;position:static;padding:17px 18px 0;gap:18px}.sidebar-note,.guide-link,.nav-label{display:none}.brand-name{font-size:14px}.logo{height:35px;width:35px}.nav{display:flex;gap:6px}.nav button{font-size:12px;min-height:46px;padding:10px 8px;border-radius:10px 10px 0 0;flex:1;gap:6px;justify-content:center}.nav-count{font-size:10px}.work{padding:20px 16px 26px}.topbar{font-size:10px;padding-bottom:16px;margin-bottom:22px;gap:6px}.breadcrumb-sep{margin:0 7px}.pill{padding:4px 7px;font-size:9px}.page-intro{gap:10px;margin-bottom:23px}h1{font-size:25px}.eyebrow{font-size:9px}.subtitle{font-size:12px}.page-intro .ghost{padding:9px 10px;font-size:11px}.stats{gap:8px;margin-bottom:21px}.stat{padding:13px 10px}.stat:after{display:none}.stat-value{font-size:23px}.stat-value small{font-size:10px;margin-left:3px}.stat-label{font-size:10px}.filterbar{gap:9px;margin-bottom:15px}.subject-filter{gap:6px;flex:1}.subject-filter select{min-width:0;max-width:160px;flex:1;font-size:11px}.filter-count{font-size:10px}.search-field{order:3;max-width:none;flex-basis:100%;margin:0}.question-card{padding:20px 17px}.q-text{font-size:18px}.q-number{margin-top:22px}.chip{font-size:9px;padding:3px 6px}.chips{gap:5px}.bookmark{font-size:10px;padding:7px;min-height:40px}.actions{gap:7px}.actions .primary{font-size:13px;padding:12px 10px}.actions .ghost{font-size:12px;padding:10px}.option{font-size:13px;gap:9px}.option-state{font-size:10px}.study-grid{gap:16px}.footnote{font-size:10px}.guide-page{padding:25px 16px}.guide-page .card{padding:17px}.guide-page table{font-size:11px}.guide-page th,.guide-page td{padding:10px 5px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* v0.3: explanation formats follow the author's original manuscript. */
.brand-name{letter-spacing:-.025em;font-size:16px}.brand{min-width:0}.brand-sub{font-size:10px}.explanation-content{font-size:14px;line-height:1.95;word-break:keep-all;overflow-wrap:anywhere}.answer-line{font-size:15px;font-weight:650;color:var(--accent);margin:0 0 16px;white-space:pre-line}.ex-label{font-weight:750}.intent-line,.solution-line{margin:0 0 18px;white-space:pre-line}.intent-line{color:#586a60}.solution-line{color:var(--ink)}.wrong-title{font-size:13px;font-weight:750;margin:24px 0 8px}.wrong-option{padding:12px 0;border-bottom:1px solid var(--line)}.wrong-option:last-child{border-bottom:0}.wrong-original{margin:0;white-space:pre-line}.corrected-sentence{margin:5px 0 0;padding-left:22px;white-space:pre-line;color:#445e50}.explanation-content strong,.editor-preview strong{font-weight:800}.reference-line{margin:24px 0 0;padding-top:15px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);white-space:pre-line}.explanation-editor{border-top:1px solid var(--line);padding-top:13px;margin-top:12px;display:grid;gap:12px}.explanation-editor h3{font-size:17px;margin:8px 0}.explanation-editor h4{font-size:14px;margin:12px 0 4px}.original-option{background:var(--bg);padding:9px 11px;border-radius:7px;font-weight:400;font-size:13px;line-height:1.7;white-space:pre-line}.emphasis-hint{background:var(--soft);color:#435d4e!important;border-radius:8px;padding:12px;line-height:1.8}.emphasis-hint code{font-weight:700}.editor-preview{border:1px solid var(--line);border-radius:11px;overflow:hidden}.editor-preview summary{padding:12px 15px;background:#f7f9f3;cursor:pointer;font-size:13px;font-weight:650}.editor-preview .ex-body{font-size:13px;line-height:1.9;overflow-wrap:anywhere}.format-switch{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 15px}.format-switch button{background:white;border:1px solid var(--line);border-radius:9px;padding:12px 16px;font-size:13px;min-height:44px;color:var(--ink)}.format-switch button[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--soft);font-weight:700}.format-example-note{font-size:12px;line-height:1.8;color:var(--muted)}.guide-page .format-preview{margin-top:8px;padding:0;max-width:760px}.format-preview .explanation-content{padding:25px}.guide-page .format-preview p{color:inherit}.guide-page .format-preview .intent-line{color:#586a60}.guide-page .format-preview .reference-line{color:var(--muted)}.guide-page .format-preview .answer-line{color:var(--accent)}.guide-page .format-preview h3{font-size:13px}.guide-page>h1{font-size:30px}.guide-back{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.guide-table{overflow-x:auto}
@media(max-width:740px){.brand-name{font-size:15px}.explanation-content{font-size:13px}.answer-line{font-size:14px}.guide-page>h1{font-size:24px}.format-switch{gap:6px}.format-switch button{padding:10px 11px;font-size:12px}.format-preview .explanation-content{padding:20px}.guide-page header{gap:10px}.guide-back{padding:10px;font-size:11px;white-space:nowrap}.guide-page header .brand{font-size:13px}}

/* Preserve case descriptions and give long question banks a compact navigator. */
.q-text,.option-label{white-space:pre-line}.question-nav{max-height:190px;overflow-y:auto;padding:5px 3px}.layout-label{font-weight:400;color:var(--muted);margin-top:4px}

/* Subjects stay near the brand; review modes stay at the foot of the sidebar. */
.sidebar{gap:30px;min-height:0}
.sidebar>.brand,.sidebar-bottom{flex-shrink:0}
.subject-navigation{display:flex;flex-direction:column;min-height:0}
.home-button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;flex-shrink:0;margin-bottom:18px;padding:11px 14px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:13px;text-align:left}
.home-button svg{width:18px;height:18px;flex-shrink:0}
.home-button:hover,.home-button[aria-current=page]{background:var(--soft);border-color:#d7e3d5;color:var(--accent)}
.home-button:focus-visible{outline:3px solid #cb9e51;outline-offset:3px}
.section-nav{display:flex;align-items:center;gap:8px}
.section-nav a{display:flex;align-items:center;min-height:42px;padding:8px 13px;border-radius:9px;text-decoration:none;font-size:13px;font-weight:650;color:var(--muted)}
.section-nav a:hover{background:#edf3ec;color:var(--accent)}
.section-nav a[aria-current=page]{background:var(--soft);color:var(--accent)}
.subject-navigation>.nav-label{flex-shrink:0}
.subject-nav{display:flex;flex-direction:column;gap:7px;min-height:0;overflow-y:auto;padding:3px;margin:-3px;scrollbar-width:thin}
.subject-nav button{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;flex-shrink:0;padding:12px 14px;border:1px solid transparent;border-radius:11px;background:transparent;color:var(--muted);font-size:13px;text-align:left;overflow-wrap:anywhere}
.subject-nav button:hover{background:#f5f7f2;color:var(--accent)}
.subject-nav button.active,.subject-nav button[aria-pressed=true],.subject-nav button[aria-current=page]{background:var(--soft);border-color:#d7e3d5;color:var(--accent);font-weight:700}
.subject-nav .subject-count{font-size:11px;flex-shrink:0;background:#f4f6f2;padding:1px 7px;border-radius:5px}
.subject-nav button.active .subject-count,.subject-nav button[aria-pressed=true] .subject-count{background:#dce9dd}
.sidebar-bottom{margin-top:auto;padding-top:22px;border-top:1px solid var(--line)}
.sidebar-bottom .guide-link{margin-top:22px;min-height:32px;align-items:center}
.sidebar-bottom .nav-label{margin-bottom:9px}
.filterbar{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1fr) minmax(0,1.2fr) minmax(0,1.25fr);gap:12px}
.subject-filter,.unit-filter,.subunit-filter{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;min-width:0;font-size:11px;color:var(--muted)}
.subject-filter>span,.unit-filter>span,.subunit-filter>span{white-space:nowrap}
.subject-filter select,.unit-filter select,.subunit-filter select{width:100%;min-width:0;max-width:none;min-height:42px;padding:9px 28px 9px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:12px;text-overflow:ellipsis}
.filterbar select:disabled{background:#f5f6f3;color:var(--muted)}
.filter-search-row{display:flex;align-items:center;gap:10px;min-width:0}
.filter-search-label{font-size:11px;color:var(--muted);white-space:nowrap}
.filter-search-row .search-field{min-width:0;max-width:none;margin:0;flex:1}
.filter-search-row .filter-count{white-space:nowrap;flex-shrink:0}
@media(max-width:1400px){
  .filterbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:11px}
}
@media(max-width:740px){
  .sidebar{padding:17px 18px 14px;gap:17px}
  .subject-navigation{gap:6px}
  .home-button{width:auto;align-self:flex-start;margin-bottom:6px;font-size:12px}
  .section-nav{gap:3px}
  .section-nav a{padding:8px 10px;font-size:12px}
  .subject-navigation>.nav-label{display:block;margin:0;font-size:10px;letter-spacing:0}
  .subject-nav{flex-direction:row;overflow-x:auto;overflow-y:hidden;gap:7px;padding:3px 3px 6px;margin:-3px;overscroll-behavior-x:contain}
  .subject-nav button{min-height:42px;padding:9px 12px;font-size:12px;white-space:nowrap;border:1px solid var(--line);border-radius:10px;background:#fff}
  .subject-nav .subject-count,.subject-nav .nav-count{font-size:10px}
  .sidebar-bottom{margin-top:0;padding-top:12px}
  .sidebar-bottom .mode-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .sidebar-bottom .mode-nav button{min-width:0;min-height:44px;border-radius:10px;padding:10px 6px;gap:5px;font-size:12px;white-space:nowrap}
  .sidebar-bottom .guide-link{display:flex;justify-content:flex-end;gap:7px;margin-top:8px;padding:0;min-height:28px;font-size:11px}
  .filterbar{gap:10px}
  .subject-filter,.unit-filter,.subunit-filter{grid-template-columns:minmax(0,1fr);gap:5px;font-size:11px}
  .subject-filter select,.unit-filter select,.subunit-filter select{font-size:12px;min-height:44px;max-width:100%}
  .filter-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 9px}
  .filter-search-label{grid-column:1/-1}
  .filter-search-row .search-field{order:0;flex-basis:auto}
  .filter-search-row .search-field{min-height:44px}
  .filter-search-row .filter-count{font-size:10px}
}
@media(max-width:360px){
  .sidebar-bottom .mode-nav button{font-size:11px;gap:4px;padding:9px 4px}
  .sidebar-bottom .nav-count{padding:1px 5px}
}
.subject-welcome{padding:32px;text-align:left;min-height:280px}
.subject-welcome h2{margin:0 0 8px;font-size:19px}
.subject-welcome>p{margin:0;color:var(--muted);font-size:13px}
.subject-picker{display:grid;grid-template-columns:repeat(auto-fill,132px);gap:16px;margin-top:25px}
.subject-card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 1fr;gap:5px;width:100%;aspect-ratio:1;text-align:left;border:1px solid var(--line);border-radius:13px;background:#fcfdf9;color:var(--ink);padding:16px;min-height:0}
.subject-card:hover{background:var(--soft);border-color:#bdcec0}
.subject-card-name{font-size:16px;font-weight:650;line-height:1.45;overflow-wrap:anywhere}
.subject-card-count{font-size:11px;color:var(--muted)}
.subject-card-action{align-self:end;font-size:11px;color:var(--accent);margin-top:4px}
.subject-card:focus-visible{outline:3px solid #cb9e51;outline-offset:3px}
@media(max-width:740px){.subject-welcome{padding:24px 18px}.subject-picker{gap:12px}}
