/* Notes, past papers by topic, syllabuses, calculators and glossary */
.study-intro .wrap{padding-block:clamp(34px,5vw,76px)}
.study-intro h1{font-size:clamp(36px,5vw,76px);letter-spacing:-.055em;line-height:1;max-width:20ch;text-wrap:balance;overflow-wrap:break-word}
.study-intro p{max-width:58ch}
.study-intro .tuition-crumbs a:hover{color:#ffd4d6}
.study-intro .tuition-crumbs li+li::before{color:#ffffffb3}
.study-intro .study-levels{margin:-8px 0 22px;font-size:16px;color:#ffffffc7}
.study-body{padding-block:clamp(40px,6vw,96px)}
.study-body p{max-width:68ch}
.study-group{margin-bottom:clamp(40px,6vw,84px);scroll-margin-top:16px}
.study-group[hidden],.study-questions tr[hidden]{display:none}
.study-group>h2,.study-next h2,.study-faq>h2{font-size:clamp(27px,3vw,44px);letter-spacing:-.04em;margin-bottom:18px}
.study-group>h3{font-size:21px;margin:26px 0 8px}
.study-group>p{margin-top:14px}
.study-count{font-size:.5em;font-weight:500;letter-spacing:0;color:var(--ink-2);margin-left:8px;white-space:nowrap}
.study-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:8px}
.study-list-wide{grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr));margin-bottom:clamp(40px,6vw,84px)}
.study-list a{display:grid;gap:3px;height:100%;align-content:start;padding:16px 20px;background:#fff;text-decoration:none}
.study-list strong{font-size:19px;letter-spacing:-.02em;line-height:1.2;font-weight:650}
.study-list span{font-size:15px;color:var(--ink-2)}
.study-list a:hover,.study-list a:focus-visible{background:var(--warm);color:var(--tuition-ink)}
.study-list a:hover strong{color:var(--red-dark)}
.study-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.study-chips a{display:inline-flex;gap:8px;align-items:center;min-height:44px;padding:8px 16px;background:#fff;font-weight:600;font-size:16px;text-decoration:none}
.study-chips a:hover,.study-chips a:focus-visible{background:var(--tuition-red);color:#fff}
.study-chips a:hover span{color:#fff}
.study-chips span{font-weight:400;color:var(--ink-2)}
.study-letters{margin:0 0 clamp(30px,4vw,56px)}
.study-scroll{overflow-x:auto;background:#fff;padding:4px clamp(12px,2vw,24px) 12px}
.study-scroll .papers-table tr:last-child td,.study-scroll .papers-table tr:last-child th{border-bottom:0}
.study-open a+a{margin-left:20px}
.study-question{display:grid;grid-template-columns:minmax(0,.32fr) minmax(0,1fr);gap:8px clamp(20px,4vw,60px)}
.study-question h3{font-size:clamp(20px,1.9vw,27px);letter-spacing:-.025em;line-height:1.2}
.study-question ul:not(.study-chips){margin:12px 0 16px;padding-left:20px}
.study-question-links{display:flex;flex-wrap:wrap;gap:6px 24px;margin:0 0 16px}
.study-question-links a{font-weight:650;color:var(--red-dark);text-underline-offset:4px}
.study-toc{position:sticky;top:20px}
.study-toc h2{font-size:24px!important;letter-spacing:-.03em}
.study-toc ol{margin:12px 0 20px;padding:0;list-style:none;font-size:16px}
.study-toc a{display:block;padding:6px 0;text-decoration:none}
.study-toc a:hover{text-decoration:underline;text-underline-offset:4px}
.study-note .lesson-article h2,.study-calc-notes h2{font-size:clamp(26px,2.6vw,38px);letter-spacing:-.035em;margin:56px 0 14px;scroll-margin-top:16px}
.study-note .lesson-article h2:first-child,.study-calc-notes h2:first-child{margin-top:0}
.study-note .lesson-article h3{font-size:clamp(20px,1.7vw,24px);letter-spacing:-.02em;margin:34px 0 10px}
.study-note .note-cases h3{font-size:18px;margin:0 0 6px}
.study-note .note-ledger table{min-width:560px}
.study-note .note-ledger td:nth-child(4),.study-note .note-ledger th:nth-child(4){border-left:2px solid var(--ink)}
.study-mistakes{margin:0;display:grid;gap:6px}
.study-mistakes>div{background:#fff;padding:14px 20px}
.study-mistakes>div[hidden]{display:none}
.study-note .study-mistakes>div{background:var(--warm)}
.study-mistakes dt{font-weight:650}
.study-mistakes dt a{text-underline-offset:4px}
.study-mistakes dd{margin:3px 0 0;max-width:72ch}
.study-faq{margin-bottom:clamp(40px,6vw,84px);max-width:860px}
.study-faq details p{max-width:68ch}
.study-example{background:#fff;padding:18px 22px}
.study-term .study-group{margin-bottom:clamp(30px,4vw,52px)}
.study-next{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.study-next>div{background:var(--warm);padding:clamp(22px,3.4vw,46px)}
.study-next>div:last-child{background:var(--tuition-ink);color:#fff}
.study-next ul{margin:0;padding:0;list-style:none}
.study-next li a,.study-next-links a{display:inline-block;padding:7px 0;font-weight:600;text-underline-offset:4px}
.study-next>div:last-child a:not(.btn):hover{color:#ffd4d6}
.study-next-links{display:flex;flex-wrap:wrap;gap:0 24px;margin:8px 0 18px}
.study-rights{margin-top:28px;font-size:14px;color:var(--ink-2)}
.study-filter{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:end;margin-bottom:clamp(26px,4vw,48px)}
.study-filter[hidden]{display:none}
.study-filter label{display:grid;gap:5px;font-weight:600;font-size:16px}
.study-filter select,.study-filter input,.calc-field input,.calc-field select,.calc-field textarea{min-height:50px;padding:10px 12px;border:1px solid #6c645a;border-radius:0;background:#fff;font:inherit;width:100%;min-width:200px}
.study-filter output{padding-block:12px;color:var(--ink-2)}
.study-answers{margin-top:14px;background:#fff;padding:14px 20px}
.study-answers summary{cursor:pointer;font-weight:650}
.study-answers p{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:10px;max-width:none}
.mcq-marker[hidden]{display:none}
.mcq-marker ol{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:6px;margin:18px 0;padding:0;list-style:none;counter-reset:q}
.mcq-marker ol>li{counter-increment:q;display:grid;grid-template-columns:2em auto 1fr;gap:8px;align-items:center;background:#fff;padding:6px 14px;min-height:56px}
.mcq-marker ol>li::before{content:counter(q);font-weight:650;font-variant-numeric:tabular-nums}
.mcq-marker fieldset{border:0;margin:0;padding:0;display:flex;gap:2px;min-width:0}
.mcq-marker label{position:relative;cursor:pointer}
.mcq-marker input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.mcq-marker label span{display:grid;place-content:center;width:44px;height:44px;background:var(--tone-2);font-weight:600}
.mcq-marker input:checked+span{background:var(--ink);color:#fff}
.mcq-marker input:focus-visible+span{outline:3px solid var(--tuition-red);outline-offset:2px}
.mcq-marker em{font-style:normal;font-size:14px;font-weight:600}
.mcq-marker .is-right em{color:var(--green)}
.mcq-marker .is-wrong em{color:var(--red-dark)}
.mcq-result h3{margin:20px 0 10px}
.calc{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:8px;align-items:start;margin-bottom:clamp(40px,6vw,84px)}
.calc-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;background:var(--warm);padding:clamp(18px,2.6vw,36px)}
.calc-field{display:grid;gap:5px;align-content:start;min-width:0}
.calc-field.is-wide,.calc-field:has(select){grid-column:1/-1}
.calc-field label{font-weight:600;font-size:16px}
.calc-field input,.calc-field select,.calc-field textarea{min-width:0}
.calc-field textarea{line-height:1.6}
.calc-field small{font-size:14px;color:var(--ink-2)}
.calc-result{background:#fff;padding:clamp(18px,2.6vw,36px);min-width:0}
.calc-result h3{font-size:20px;margin:18px 0 8px}
.calc-result .note-figures{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
.calc-result .note-figures strong{overflow-wrap:anywhere;font-size:clamp(20px,2vw,28px)}
.calc-result .note-table{margin-top:14px}
.calc-working{margin:0;padding-left:20px}
.calc-error{color:var(--red-dark);font-weight:600}
.calc-chart{width:100%;height:auto;margin-top:18px}
.calc-chart line{stroke-width:3}
.calc-chart .ax{stroke:var(--ink);stroke-width:1.5}
.calc-chart .rv{stroke:#1b7f4b}.calc-chart .tc{stroke:#b4101c}.calc-chart .fx{stroke:#5b6270;stroke-dasharray:7 6}
.calc-chart circle{fill:var(--ink)}
.calc-chart text{font-size:17px;font-weight:600;fill:var(--ink)}
.calc-legend{display:flex;flex-wrap:wrap;gap:4px 20px;font-size:15px}
.calc-legend span::before{content:'';display:inline-block;width:14px;height:14px;margin-right:7px;vertical-align:-2px;background:currentColor}
.calc-legend .rv{color:#1b7f4b}.calc-legend .tc{color:#b4101c}.calc-legend .fx{color:#5b6270}
.study-calc-notes{margin-bottom:clamp(40px,6vw,84px)}
.papers-more{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.tuition-extra .study-group:last-child{margin-bottom:0}
@media(max-width:900px){
  .study-toc{position:static}
  .calc,.study-next,.study-question{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){
  .study-open a{display:block!important}
  .study-open a+a{margin:8px 0 0}
  .study-scroll .papers-table td,.study-scroll .papers-table th{padding-right:12px}
  .calc-form{grid-template-columns:minmax(0,1fr)}
}
@media print{.study-toc,.study-body,.grade12-practice{display:none!important}}
