:root{font-family:system-ui,sans-serif;color:#243447;background:#e4eaf3;font-size:15px}*{box-sizing:border-box}body{margin:0}header{border-bottom:1px solid #dbe2eb;padding:18px 24px;display:flex;justify-content:space-between;align-items:center;background:white}main{max-width:760px;margin:32px auto;padding:0 20px}h1{font-size:23px;line-height:1.3}h2{font-size:20px}label{display:block;font-size:14px;font-weight:600;margin-bottom:18px}input,select,textarea{display:block;width:100%;font:inherit;background:white;border:1px solid #b8c5d5;border-radius:4px;padding:10px;margin-top:6px}textarea{resize:vertical;line-height:1.6}button{font:inherit;border:1px solid #b8c5d5;border-radius:4px;background:white;color:inherit;padding:9px 15px;cursor:pointer}button[type=submit],#send-button,#login-form button{background:#2459a6;color:white;border-color:#2459a6}button:disabled{opacity:.55;cursor:default}:focus-visible{outline:3px solid #6c9ddd;outline-offset:3px}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:14px}.toolbar label{flex:1;min-width:200px}.toolbar a{font-size:14px}nav{display:flex;gap:8px;margin:24px 0}nav button[aria-pressed=true]{background:#e6edf8;border-color:#2459a6}#notice:empty{display:none}#notice{background:#e6edf8;padding:12px;overflow-wrap:anywhere}#sender-note,footer,#history>p{color:#52677d;font-size:13px}footer{text-align:center;padding:24px}#login{max-width:350px;margin:60px auto}dialog{width:min(520px,95vw);max-height:90vh;border:1px solid #b8c5d5;border-radius:6px;padding:24px}dialog::backdrop{background:#18283b66}.message{border-top:1px solid #dbe2eb;padding:16px 0;overflow-wrap:anywhere}.message p{white-space:pre-wrap;font-size:14px;line-height:1.6}.message small{color:#52677d}details summary{cursor:pointer}[hidden]{display:none!important}@media(max-width:500px){main{margin:20px auto}.toolbar{align-items:flex-start}header{padding:15px 20px}}
.assignment{display:flex;align-items:center;gap:8px;margin:12px 0;font-weight:400}.assignment input{width:auto;margin:0}#register,#complete{max-width:420px;margin:40px auto}#register-form{margin-top:20px}#users form{margin:16px 0}#users .message>button{margin-right:10px}
/* Keep authentication fields, feedback and recovery actions in one readable column. */
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.brand img{display:block;width:40px;height:40px;object-fit:contain;flex-shrink:0}
body.auth-view main{max-width:460px;margin:36px auto}
body.auth-view #notice{margin:0 0 28px;line-height:1.6}
body.auth-view #login,body.auth-view #register,body.auth-view #complete{max-width:none;margin:24px auto 40px}
body.auth-view h1{margin:0 0 24px}
#login-form{display:grid;gap:24px}
#login-form label{margin:0;line-height:1.5}
#login-form input{margin-top:10px;min-height:44px}
#login-form>button{justify-self:start;min-width:112px;min-height:44px}
#login>.toolbar{margin-top:20px;gap:12px}
#login>.toolbar button{min-height:44px}
#notice[data-tone=warning]{background:#fff4dc;color:#614200}
#notice[data-tone=error]{background:#fcebea;color:#8a2525}
@media(max-width:400px){#login>.toolbar{display:grid;grid-template-columns:1fr}#login>.toolbar button{width:100%}body.auth-view main{margin-top:24px}}
/* The compose box: formatting buttons, the writing area, pictures and the attachment list. */
.field{margin-bottom:18px}
.label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
#format-bar{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
#format-bar button{min-width:40px;min-height:36px;padding:6px 10px}
#link-row{background:#eef3fa;border:1px solid #dbe2eb;border-radius:4px;padding:12px;margin-bottom:8px}
#link-row label{margin-bottom:10px}
#editor{min-height:260px;max-height:60vh;overflow:auto;background:white;border:1px solid #b8c5d5;border-radius:4px;padding:12px;line-height:1.6;overflow-wrap:anywhere}
#editor:empty::before{content:attr(data-placeholder);color:#7a8ba0}
#editor img{max-width:100%;height:auto;display:block;margin:8px 0}
#editor a{color:#2459a6}
#editor blockquote{margin:0 0 12px;padding-left:12px;border-left:3px solid #b8c5d5;color:#52677d}
#attachment-list{list-style:none;margin:10px 0 0;padding:0}
#attachment-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #dbe2eb;padding:8px 0;overflow-wrap:anywhere;font-size:14px}
#attach-note{color:#52677d;font-size:13px}
.message a{overflow-wrap:anywhere}
/* Three levels of light: the page, the boxed work area on it, and the inbox inside that, which is the lightest. */
#workspace{background:#f2f6fb;border:1px solid #d3deed;border-radius:10px;padding:22px 24px;margin-top:8px}
#inbox{background:#fcfdff;border:1px solid #d3deed;border-radius:8px;padding:6px 18px 18px;margin-bottom:8px}
#inbox h1{font-size:20px;margin:14px 0 8px}
#incoming-messages{margin-top:14px;border:1px solid #dbe5f2;border-radius:6px;overflow:hidden}
#incoming-messages .mail-row{margin:0;padding:11px 14px;border-top:1px solid #e3ebf5}
#incoming-messages .mail-row:first-child{border-top:0}
#incoming-messages .mail-row:nth-child(odd){background:#ffffff}
#incoming-messages .mail-row:nth-child(even){background:#eff4fa}
#incoming-messages .mail-row>summary{display:grid;grid-template-columns:minmax(120px,28%) 1fr auto;gap:14px;align-items:baseline;font-weight:400;list-style-position:inside}
#incoming-messages .mail-row.unread>summary{font-weight:700;color:#14253a}
#incoming-messages .mail-from,#incoming-messages .mail-subject{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#incoming-messages .mail-when{font-size:12px;font-weight:400;color:#52677d;white-space:nowrap}
#incoming-messages .mail-row[open]{outline:2px solid #c7d8ee;outline-offset:-2px}
#incoming-messages .mail-row .toolbar{gap:10px;margin-top:6px}
#incoming-messages .mail-row .toolbar button{padding:6px 12px}
#incoming-messages .mail-row.unread>summary::marker{color:#2459a6}
@media(max-width:560px){#workspace{padding:14px 12px}#incoming-messages .mail-row>summary{grid-template-columns:1fr}#incoming-messages .mail-when{justify-self:start}}
