:root{font:16px/1.5 system-ui,sans-serif;color:#13283b;background:#edf3f8}
*{box-sizing:border-box}
body{margin:0}
main{width:min(1080px,100% - 2rem);margin:clamp(1rem,6vw,5rem) auto}
header{color:#f7fbff;border-radius:1rem;padding:clamp(1.5rem,5vw,4rem);background-color:#123752;background-image:linear-gradient(#8fd1ef1a 1px,transparent 1px),linear-gradient(90deg,#8fd1ef1a 1px,transparent 1px);background-size:24px 24px;border-bottom:.35rem solid #f18a40}
.brand{color:#a6ddf4;font-weight:750;margin-top:0}
h1{font-size:clamp(2rem,5vw,4rem);line-height:1.04;max-width:18ch;margin:.5rem 0 1rem;overflow-wrap:anywhere}
p{margin:.6rem 0 1rem}
.intro{max-width:58ch;margin-bottom:0}
section{margin-top:1.5rem;border-radius:1rem;padding:clamp(1rem,4vw,2rem);background:#fff;border:1px solid #cbd9e5}
.signin{max-width:31rem}
h2,h3{margin:0 0 .6rem;line-height:1.2}
label{display:block;font-weight:650;margin-top:.8rem}
input:not([type=hidden]){display:block;width:100%;font:inherit;padding:.65rem .8rem;border:1px solid #708aa1;border-radius:.4rem;margin:.25rem 0 .75rem}
button,.button{display:inline-block;font:inherit;font-weight:650;padding:.55rem .9rem;border:1px solid #346486;border-radius:.45rem;background:white;color:#173d59;text-decoration:none;cursor:pointer}
.button{background:#185779;color:white}
button:hover,.button:hover{outline:2px solid #e18541;outline-offset:2px}
:focus-visible{outline:3px solid #a84408;outline-offset:3px}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:1rem}
article{padding:1.15rem;border:1px solid #cbdae8;border-radius:.6rem;background:#f3f8fc}
.section-head{display:flex;gap:1rem;align-items:center;justify-content:space-between;margin-bottom:1rem}
.state{margin-top:1rem}
.error{color:#9c231d}


select{width:100%;padding:10px;border:1px solid #9db0bf;border-radius:5px;background:#fff;color:#19344c;font:inherit}article form{margin-top:12px}article label{display:block}article input{width:100%;margin:6px 0 10px}article button{max-width:100%;white-space:normal}

/* Portal home and account tools. */
.signin{margin-inline:auto}
.signin>button,.signin form>button{width:100%}
.section-head{flex-wrap:wrap;justify-content:flex-start;gap:.65rem 1rem}
.section-head h2{flex:1 1 14rem;margin:0;overflow-wrap:anywhere}
.section-head form{margin:0}
.section-head>a{padding:.55rem 0}
.subject-cards>article{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:.65rem}
.subject-cards h3,.subject-description,.subject-actions p{margin:0}
.subject-actions{display:grid;align-content:start;gap:.65rem}
.subject-actions :is(.button,button,.state){width:100%;text-align:center}
.subject-actions form{margin:0}
.student-passwords{margin:1.5rem 0}
.student-selection{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.5rem;margin:.75rem 0}
.student-selection label{display:flex;align-items:center;gap:.4rem;margin:0;overflow-wrap:anywhere}
.student-selection input[type=checkbox]{flex:none;width:1.15rem;height:1.15rem;margin:0;padding:0}
@media(max-width:480px){.section-head h2{flex-basis:100%}}
.group-search{display:flex;align-items:end;gap:.65rem;flex-wrap:wrap;margin:1rem 0}
.group-search label{flex:1 1 18rem;margin:0}
.group-search :is(input:not([type=hidden]),select){margin:.25rem 0 0}
.group-search a{padding:.55rem 0}
.group-panel{margin:.75rem 0;padding:.8rem 1rem;border:1px solid #cbd9e5;border-radius:.6rem;background:#f3f8fc}
.group-panel summary{cursor:pointer;font-weight:700;padding:.35rem 0}
.group-panel summary span{margin-left:.45rem;color:#425d73;font-size:.88rem;font-weight:500}
.group-panel .cards,.group-members{margin-top:.8rem}
.group-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 .4rem}
.group-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:.45rem}
.group-members label{display:flex;align-items:center;gap:.45rem;margin:0;overflow-wrap:anywhere}
.group-members label input[type=checkbox]{flex:none;width:1.1rem;height:1.1rem;margin:0;padding:0}
.group-members small{color:#425d73;font-weight:500}
