:root{--ink:#18352A;--muted:#456052;--line:#CCDCC8;--accent:#286340;--surface:#F7FAF3}
body{font-family:system-ui,"Segoe UI",sans-serif;background:var(--surface);color:var(--ink)}
:where(a,button,input,textarea,select,summary):focus-visible{outline:3px solid #4D8627;outline-offset:3px}
[hidden]{display:none!important}
.reh-page body{max-width:1200px;margin-inline:auto;padding:clamp(16px,3vw,36px)}
.reh-page h1{font-size:clamp(1.85rem,5vw,2.65rem);letter-spacing:-.035em;margin-block:.5rem}
.reh-page h2{font-size:1.25rem}
.reh-page :is(section,article){border-color:var(--line);border-radius:14px}
.reh-page :is(input,textarea,select,button,.action){border-radius:8px;max-width:100%;box-sizing:border-box}
.reh-page :is(button,.action,select,input:not([type=checkbox]):not([type=radio])){min-height:36px}
.reh-page :is(#openCatalogue,#publishButton,#save,#unlockBtn,.action),.reh-join #joinBtn,.reh-classroom #startSessionBtn:not(:disabled){background:var(--accent);color:white}
.reh-back{color:var(--accent);font-weight:650;text-underline-offset:.18em}
.reh-nav-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:40px;padding:6px 14px;border:1px solid var(--accent);border-radius:8px;background:white;color:var(--accent);text-decoration:none;font-weight:650;line-height:1.3}
.reh-nav-button:hover{background:#E9F2E3}
.reh-nav-button[aria-current="page"]{background:var(--accent);color:white}
.reh-results-nav{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.reh-caption{color:var(--muted);margin:0;line-height:1.5}
.reh-page .course-group{padding-top:20px}
.reh-page .level-group{border-color:#83A875;padding-left:clamp(10px,2vw,20px)}
.reh-page .level-group article{padding:16px;background:#F7FAF3}
.reh-page .level-group h4{color:var(--accent)}
.reh-page #query{width:min(100%,560px)}
.reh-workspace{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:12px;margin:20px 0}
.reh-workspace a{display:grid;align-content:start;gap:6px;padding:18px;background:white;border:1px solid var(--line);border-radius:14px;color:var(--ink);text-decoration:none;font-weight:700}
.reh-workspace a:first-child,.reh-workspace a:hover{background:#E9F2E3;border-color:#83A875}
.reh-workspace small{color:var(--muted);font-weight:400;line-height:1.45}
.reh-import{margin-block:14px;padding:12px 16px;background:white;border:1px solid var(--line);border-radius:14px}
.reh-import label{display:block;margin-block:8px}
.reh-import summary,.reh-tools summary{cursor:pointer;font-weight:650}
.reh-classroom .controls{gap:8px}
.reh-classroom .controls :is(button,select){min-height:36px;border-radius:8px}
.reh-tools{border:1px solid var(--line);border-radius:8px;padding:7px 10px;background:white;color:var(--ink)}
.reh-tools div{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px}
.reh-classroom #writingPanel{padding:8px 14px;border-bottom:1px solid var(--line)}
.reh-classroom #writingPanel>summary{cursor:pointer;font-weight:700}
.reh-classroom #writingPanel[open]{max-height:42vh;overflow:auto}
.reh-classroom #writingAssignForm{display:flex;flex-wrap:wrap;align-items:end;gap:10px;padding-top:10px}
.reh-classroom #writingAssignForm label{display:grid;gap:4px}
.reh-classroom #quizOptions{flex-basis:100%;min-width:0}
.reh-classroom #writingPanel :is(textarea,select,input){max-width:100%;box-sizing:border-box}
.reh-classroom #writingPanel p:empty{display:none}
.reh-join input,.reh-join #joinBtn,.reh-student #writingForm button{border-radius:8px}
@media(max-width:640px){.reh-classroom #writingAssignForm{align-items:stretch;flex-direction:column}}

.reh-brand-heading { display:flex; align-items:center; gap:12px; }
.reh-brand-heading img { object-fit:contain; background:white; border-radius:10px; }
.reh-brand-heading span { color:var(--reh-accent,var(--accent)); font-size:.75rem; font-weight:750; letter-spacing:.09em; text-transform:uppercase; }
.reh-brand-heading h1 { margin:0; }
.reh-brand-heading { border-bottom:2px solid #A68832; padding-bottom:10px; }

@media (max-width: 600px) {
  .reh-classroom #writingPanel, main#student {
    font: 1.125rem/1.5 system-ui, sans-serif;
    overflow-wrap: anywhere;
  }
  :is(.reh-classroom #writingPanel, main#student) :is(button, textarea, select, input:not([type=radio]):not([type=checkbox])) {
    font: inherit;
    min-height: 44px;
  }
}
