.gcse-entry,.gcse-actions button,#mock-start,.gcse-question button,#gcse-export,#gcse-reset,.gcse-practice-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 15px;border:1px solid var(--accent);border-radius:9px;color:var(--bg);background:var(--accent);font:inherit;font-weight:750;text-decoration:none;cursor:pointer}
.gcse-nav{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:12px auto 0}.gcse-nav a{min-height:40px;padding:7px 12px;border:1px solid var(--line);border-radius:9px;color:var(--fg);text-decoration:none}
.gcse-tools,.gcse-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:18px 0}.gcse-tools label,.gcse-date label{display:grid;gap:5px}.gcse-tools input,.gcse-tools select,.gcse-date input,.gcse-answer-input{min-width:0;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--fg);font:inherit}.gcse-tools input,.gcse-tools select,.gcse-date input{min-height:44px}
.gcse-topic-list,.gcse-resource-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.gcse-topic,.gcse-panel,.gcse-question,.gcse-card,.gcse-resource-section{margin:10px 0;padding:16px;border:1px solid var(--line);border-radius:var(--radius);color:var(--fg);background:var(--surface)}.gcse-topic{min-height:92px;text-align:left;font:inherit;cursor:pointer}.gcse-topic:hover,.gcse-topic:focus-visible{border-color:var(--accent);background:var(--surface-2)}.gcse-topic h3{margin:0 0 4px}.gcse-topic small,.gcse-subtle,.gcse-resource-card span,.gcse-topic-resources a span,.gcse-answer-label,.gcse-mark-feedback{color:var(--muted)}
.gcse-progress,.gcse-date,.gcse-resources{margin:26px 0}.gcse-bar{height:12px;overflow:hidden;border-radius:8px;background:var(--surface-3)}.gcse-bar div{width:0;height:100%;background:var(--accent);transition:width .2s}.gcse-actions button,#mock-start,.gcse-question button,#gcse-export,#gcse-reset{margin:0}.gcse-question button.alt{border-color:var(--line);color:var(--accent);background:transparent}.gcse-question .gcse-answer,.gcse-question .gcse-hint,.gcse-scheme{margin-top:8px;padding:10px;border-radius:8px;background:var(--surface-2)}
.gcse-keys{display:flex;gap:8px;flex-wrap:wrap;padding:0;list-style:none}.gcse-keys li{padding:5px 9px;border-radius:8px;background:var(--surface-3)}.gcse-resources a{margin:4px 10px 4px 0;color:var(--accent)}.gcse-resources .gcse-topic-resources{display:flex;flex-wrap:wrap;gap:8px}.gcse-resources .gcse-topic-resources a,.gcse-topic-resources a{display:flex;flex-direction:column;gap:3px;min-width:min(220px,100%);padding:9px 11px;border:1px solid var(--line);border-radius:9px;color:var(--accent);background:var(--surface);text-decoration:none;font-size:.9rem;font-weight:700;line-height:1.4}.gcse-topic-resources a:hover,.gcse-topic-resources a:focus-visible{border-color:var(--accent);background:var(--surface-2)}
.gcse-formula-item{padding:10px;border-bottom:1px solid var(--line)}.gcse-cover{filter:blur(5px);user-select:none}.gcse-marking{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.gcse-correct{color:var(--ok);font-weight:700}.gcse-wrong{color:var(--danger);font-weight:700}.gcse-svg{width:min(460px,100%);color:var(--fg)}.gcse-resource-groups{display:grid;gap:24px}.gcse-resource-card{display:flex;flex-direction:column;gap:6px;min-height:128px;padding:16px;border:1px solid var(--line);border-radius:var(--radius);color:var(--fg);background:var(--surface);text-decoration:none}.gcse-resource-card:hover,.gcse-resource-card:focus-visible{border-color:var(--accent);transform:translateY(-2px)}.gcse-resource-card b{color:var(--accent);font-size:1.03rem}.gcse-resource-card small{margin-top:auto;font-weight:700}.gcse-resource-section{padding:18px}.gcse-answer-label{display:block;margin:12px 0;font-weight:650}.gcse-answer-input{display:block;width:100%;margin-top:6px;resize:vertical}.gcse-answer-input:focus{outline:2px solid var(--accent);outline-offset:1px}.gcse-mark-feedback{min-height:1.5em;margin:8px 0;font-weight:600}.gcse-question-correct{border-color:var(--ok)}.gcse-question-review{border-color:var(--warn)}.gcse-question .wolfram-question-link{color:var(--accent)!important}.gcse-question button:disabled{opacity:.6;cursor:default}.gcse-practice-link:hover,.gcse-practice-link:focus-visible{filter:brightness(1.1)}
@media(max-width:600px){.gcse-tools{align-items:stretch;padding:12px}.gcse-tools label,.gcse-tools input,.gcse-tools select{width:100%;min-width:0}.gcse-topic-list,.gcse-resource-grid{grid-template-columns:1fr}}
.gcse-practice-mode{display:flex!important;align-items:center;gap:9px;min-height:44px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-weight:750}
.gcse-practice-mode input{width:20px;height:20px;min-height:20px;accent-color:var(--accent)}
.gcse-topic.is-locked{opacity:.6;cursor:not-allowed}
.gcse-topic.is-locked:hover{border-color:var(--line);background:var(--surface)}
.gcse-topic-open .hero{display:none}
.gcse-topic-open main{width:min(1500px,100%);max-width:none;padding:16px clamp(12px,3vw,48px) 56px}
.gcse-topic-open main>:not(#topic-view){display:none}
.gcse-topic-open #topic-view{display:block;width:100%;margin:0}
.gcse-topic-open #topic-view{max-width:none}
.gcse-topic-header{padding:clamp(22px,4vw,48px);border:1px solid var(--line);border-radius:18px;background:linear-gradient(130deg,var(--surface),var(--surface-2))}
.gcse-topic-header h1{margin:.35em 0;font-size:clamp(2rem,4vw,3.3rem)}
.gcse-topic-header>p{max-width:850px;line-height:1.7}
.gcse-topic-progress{display:inline-flex;min-height:38px;align-items:center;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--bg);font-weight:750}.gcse-points-count{font-weight:750}
.gcse-topic-back{display:inline-flex;align-items:center;min-height:44px;margin:0 0 10px;color:var(--link);font-weight:750;text-decoration:none}
.gcse-topic-layout{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);align-items:start;gap:24px}
.gcse-topic-sidebar{position:sticky;top:72px;max-height:calc(100vh - 88px);overflow:auto;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.gcse-topic-sidebar>strong{display:block;margin:0 0 12px;color:var(--muted);font-size:.78rem;letter-spacing:.06em;text-transform:uppercase}
.gcse-topic-sidebar ol{display:grid;gap:5px;margin:0;padding:0;list-style:none}
.gcse-step-item>a,.gcse-step-locked{display:flex;min-height:48px;align-items:center;gap:10px;padding:7px;border:1px solid transparent;border-radius:10px;color:var(--fg);text-decoration:none}
.gcse-step-item>a:hover{border-color:var(--line);background:var(--bg)}
.gcse-step-item>a[aria-current=step]{border-color:var(--accent);background:var(--surface-2)}
.gcse-step-number{display:grid;width:30px;height:30px;flex:0 0 30px;place-items:center;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:.76rem;font-weight:800}
.gcse-step-item.is-complete .gcse-step-number{border-color:var(--ok);color:var(--ok)}
.gcse-step-item>a[aria-current=step] .gcse-step-number{border-color:var(--accent);color:var(--accent)}
.gcse-step-copy{display:grid;min-width:0;gap:3px}
.gcse-step-copy strong{overflow:hidden;font-size:.83rem;text-overflow:ellipsis}
.gcse-step-copy small{color:var(--muted);font-size:.73rem}
.gcse-step-item.is-locked .gcse-step-copy{color:var(--muted)}
.gcse-topic-sidebar>p{margin:12px 2px 0;color:var(--muted);font-size:.8rem}
.gcse-topic-main{min-width:0}
.gcse-topic-question-bank{margin:0 0 14px}
.gcse-topic-question-bank a{color:var(--link)}
.gcse-topic-main>.gcse-card,.gcse-topic-main>.gcse-resource-section,.gcse-topic-main>.gcse-current-step{max-width:none;margin:0;padding:clamp(18px,2.5vw,32px)}
.gcse-topic-main>.gcse-current-step>h2{margin-top:0;font-size:1.5rem}
.gcse-topic-main .gcse-question{margin:12px 0 0;padding:0;border:0;background:transparent}
.gcse-topic-main .gcse-question-reviewed{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.gcse-topic-open .gcse-question,.gcse-topic-open .gcse-card{padding:clamp(16px,2.5vw,28px)}
.gcse-question-locked{border-style:dashed;color:var(--muted)}
.gcse-question-reviewed summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:750}
.gcse-answer-input{width:100%;max-width:820px;min-height:88px}
.gcse-topic-footer{display:flex;justify-content:space-between;gap:12px;margin:16px 0}
.gcse-topic-footer a{min-height:44px}
.gcse-topic-footer .gcse-step-previous{color:var(--fg);background:transparent}
.gcse-next-topic{display:inline-flex;margin-top:16px}
.gcse-locked-page{max-width:850px;margin:24px auto;padding:clamp(20px,4vw,44px);border:1px solid var(--warn);border-radius:16px;background:var(--surface)}
.gcse-topic-open button:focus-visible,.gcse-topic-open a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:760px){.gcse-topic-layout{grid-template-columns:minmax(0,1fr);gap:12px}.gcse-topic-sidebar{position:sticky;z-index:20;top:56px;max-height:none;overflow:hidden;padding:10px;border-radius:12px}.gcse-topic-sidebar>strong,.gcse-topic-sidebar>p{display:none}.gcse-topic-sidebar ol{display:flex;gap:7px;overflow-x:auto;padding:0 1px 3px;scrollbar-width:thin}.gcse-step-item{flex:0 0 170px}.gcse-step-item>a,.gcse-step-locked{min-height:46px;padding:6px}.gcse-step-copy strong{font-size:.76rem}.gcse-step-copy small{font-size:.68rem}}
@media(max-width:600px){.gcse-topic-open main{padding:8px 10px calc(var(--bottom-bar-h,120px) + 72px + env(safe-area-inset-bottom))}.gcse-topic-open .gcse-topic-header{padding:20px 16px}.gcse-topic-footer{position:sticky;z-index:10;bottom:calc(68px + env(safe-area-inset-bottom));padding:8px 0;background:var(--bg)}.gcse-topic-footer>*{flex:1}.gcse-topic-footer a{padding:9px 10px}}
@media(max-width:600px){.gcse-topic-footer{align-items:center;justify-content:space-between;gap:8px}.gcse-topic-footer>*{flex:0 1 auto}.gcse-topic-footer a{min-height:44px;padding:8px 12px;border-radius:999px;font-size:.88rem;white-space:nowrap}.gcse-topic-footer .gcse-step-previous{margin-right:auto}}

/* GCSE pages use the same spacious cards and clear hierarchy as the study rooms. */
body[data-page="topics"] main,body[data-page="formulas"] main,body[data-page="words"] main,body[data-page="mock"] main{width:min(1280px,100%);padding:clamp(20px,3vw,36px) clamp(16px,3vw,32px) 64px}
body[data-page="topics"] .hero,body[data-page="formulas"] .hero,body[data-page="words"] .hero,body[data-page="mock"] .hero{padding:clamp(38px,6vw,72px) max(16px,calc((100vw - 1216px)/2)) clamp(30px,4vw,48px)}
body[data-page="topics"] .hero h1,body[data-page="formulas"] .hero h1,body[data-page="words"] .hero h1,body[data-page="mock"] .hero h1{max-width:850px;letter-spacing:-.04em}
.gcse-kicker{display:block;margin-bottom:8px;color:var(--accent);font:600 .72rem/1.3 var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
.gcse-tools{align-items:end;padding:16px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface-2) 55%,var(--surface)))}
.gcse-tools label:not(.gcse-practice-mode){flex:1 1 180px;min-width:min(180px,100%);font-size:.86rem;font-weight:650}
.gcse-tools label:not(.gcse-practice-mode) input,.gcse-tools label:not(.gcse-practice-mode) select{width:100%;background:var(--bg)}
.gcse-practice-mode{flex:1 1 250px}
.gcse-dashboard{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:14px;margin:18px 0 34px}
.gcse-dashboard>.gcse-progress,.gcse-dashboard>.gcse-date{min-width:0;margin:0;padding:clamp(18px,2.5vw,26px);border:1px solid var(--line);border-radius:14px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface-2) 38%,var(--surface)))}
.gcse-dashboard h2{margin-bottom:10px;font-size:1.35rem}
.gcse-progress>p,.gcse-date>p{color:var(--muted)}
.gcse-points-count{color:var(--fg)!important;font-weight:750}
.gcse-bar{height:9px;margin:14px 0;background:var(--surface-3)}
.gcse-progress>.gcse-panel{margin:12px 0;padding:12px;border-radius:10px;background:var(--surface-2)}
.gcse-progress>.gcse-panel:empty{display:none}
.gcse-dashboard .gcse-actions{margin:14px 0 0}
.gcse-dashboard .gcse-actions button{min-height:44px;padding:8px 13px;border-radius:8px;font-size:.86rem}
.gcse-dashboard .gcse-actions button:last-child{border-color:var(--line);color:var(--fg);background:transparent}
.gcse-date label{max-width:360px;font-weight:650}
.gcse-date input{width:100%;background:var(--bg)}
#topic-list>h2{margin:32px 0 14px;font-size:1.55rem;letter-spacing:-.02em}
.gcse-topic-list,.gcse-resource-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:14px}
.gcse-topic{display:flex;min-width:0;min-height:144px;flex-direction:column;align-items:flex-start;justify-content:flex-start;margin:0;padding:20px;text-align:left;border-radius:14px;background:linear-gradient(150deg,var(--surface),#101923)}
.gcse-topic h3{font-size:1.03rem;line-height:1.35;overflow-wrap:anywhere}
.gcse-topic small{display:block;margin-top:auto;padding-top:9px;line-height:1.5}
.gcse-topic.is-locked{filter:saturate(.65)}
.gcse-resource-groups{gap:28px}
.gcse-resource-groups>section{margin:0}
.gcse-resource-groups h3{margin-bottom:12px}
.gcse-resource-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}
.gcse-resource-card{min-width:0;min-height:150px;padding:18px;border-radius:14px;background:linear-gradient(150deg,var(--surface),#101923)}
.gcse-resource-card b{line-height:1.4;overflow-wrap:anywhere}
.gcse-nav{justify-content:flex-start;margin:20px 0 0}
.gcse-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 14px;border-color:var(--line);border-radius:9px;background:rgba(17,26,38,.72);font-weight:600}
.gcse-nav a:hover,.gcse-nav a[aria-current=page]{border-color:var(--accent);color:var(--fg);background:var(--surface-2)}
body[data-page="formulas"] #formula-lists{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr))}
body[data-page="formulas"] #formula-lists>section,body[data-page="words"] #exam-tips{min-width:0;margin:0;padding:clamp(18px,2.5vw,26px);border:1px solid var(--line);border-radius:14px;background:var(--surface)}
body[data-page="formulas"] #formula-lists>section h2{min-height:2.4em;margin-bottom:12px;font-size:1.22rem}
body[data-page="formulas"] #formula-lists>section>[data-cover]{min-height:44px;padding:8px 13px;border:1px solid var(--accent);border-radius:8px;color:#0b1220;background:var(--accent);font:600 .88rem var(--font-ui);cursor:pointer}
.gcse-formula-item{padding:13px 2px;line-height:1.55}
.gcse-formula-item:last-child{border-bottom:0}
body[data-page="words"] #exam-words{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:14px}
body[data-page="words"] #exam-words>h2{grid-column:1/-1;margin:0 0 2px}
body[data-page="words"] #exam-words>.gcse-card{min-width:0;min-height:160px;margin:0;padding:20px;border-radius:14px}
body[data-page="words"] #exam-words>.gcse-card h3{color:var(--accent)}
body[data-page="words"] #exam-words>.gcse-card p:last-child{margin-bottom:0}
body[data-page="words"] #exam-tips{margin-top:18px;line-height:1.75}
body[data-page="words"] #exam-tips li{padding:5px 0}
body[data-page="mock"] .gcse-tools{align-items:center}
body[data-page="mock"] #mock-paper{display:grid;gap:12px}
body[data-page="mock"] #mock-paper>.gcse-question,body[data-page="mock"] #mock-results>.gcse-question{width:100%;min-width:0;margin:0;padding:clamp(16px,2.5vw,24px);border-radius:14px}
body[data-page="mock"] #mock-paper>.gcse-question>p,body[data-page="mock"] #mock-results>.gcse-question>p{line-height:1.7}
body[data-page="mock"] #mock-paper input[type=number]{width:min(150px,100%);min-height:42px;margin:6px;padding:8px;border:1px solid var(--line);border-radius:8px;color:var(--fg);background:var(--bg);font:inherit}
body[data-page="mock"] #mock-results{padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.gcse-topic-complete{display:flex;align-items:flex-start;gap:14px;margin:18px 0;padding:18px;border:1px solid color-mix(in srgb,var(--ok) 55%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--ok) 9%,var(--surface))}
.gcse-topic-complete>span{font-size:1.5rem}
.gcse-topic-complete p{margin:5px 0 0;color:var(--muted)}
.gcse-topic-footer a,.gcse-topic-main .gcse-entry{border-radius:9px;font-weight:700}
@media(max-width:760px){.gcse-dashboard{grid-template-columns:minmax(0,1fr)}.gcse-topic-list,.gcse-resource-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}}
@media(max-width:600px){body[data-page="topics"] main,body[data-page="formulas"] main,body[data-page="words"] main,body[data-page="mock"] main{padding:18px 14px 48px}.gcse-tools{gap:10px;padding:12px}.gcse-practice-mode{flex:1 1 100%}.gcse-topic-list,.gcse-resource-grid,body[data-page="words"] #exam-words{grid-template-columns:minmax(0,1fr)}.gcse-topic{min-height:120px;padding:17px}.gcse-resource-card{min-height:130px}.gcse-dashboard>.gcse-progress,.gcse-dashboard>.gcse-date{padding:18px}.gcse-nav{gap:8px}.gcse-nav a{flex:1 1 auto}.gcse-topic-complete{padding:14px}}
@media(prefers-reduced-motion:reduce){.gcse-topic,.gcse-resource-card{transition:none}.gcse-topic:hover,.gcse-resource-card:hover{transform:none}}
