/* Claire @ KCC -- mobile-first. She reads this on a phone between classes. */
:root{
  --ink:#12201f; --ink2:#4a5f5e; --line:#dfe7e6; --bg:#f5f8f7; --card:#fff;
  --teal:#0d5c63; --teal2:#0f7a83; --sun:#e8833a; --coral:#d9455f;
  --good:#1f8a5c; --warn:#b26a00;
  --r:14px; --sh:0 1px 2px rgba(18,32,31,.06), 0 4px 14px rgba(18,32,31,.05);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);
  font:16px/1.6 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  padding-bottom:env(safe-area-inset-bottom)}
a{color:var(--teal2)}

/* header + nav */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:linear-gradient(135deg,#0d5c63,#12868f);color:#fff;padding:14px 16px;
  padding-top:calc(14px + env(safe-area-inset-top))}
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}
.flower{font-size:26px}
.brand b{display:block;font-size:17px;line-height:1.2}
.brand small{display:block;font-size:12px;opacity:.8}
.out{color:#fff;opacity:.85;font-size:13px;text-decoration:none;border:1px solid rgba(255,255,255,.35);
  padding:6px 11px;border-radius:999px;white-space:nowrap}
.tabs{display:flex;gap:2px;overflow-x:auto;background:#fff;border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:20;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs a{flex:0 0 auto;padding:13px 16px;color:var(--ink2);text-decoration:none;font-size:14px;
  font-weight:600;border-bottom:3px solid transparent;white-space:nowrap}
.tabs a.on{color:var(--teal);border-bottom-color:var(--teal)}

main{max-width:840px;margin:0 auto;padding:18px 14px 40px}
footer{max-width:840px;margin:0 auto;padding:0 14px 40px;color:var(--ink2);font-size:12.5px}

h1{font-size:23px;margin:.2em 0 .1em;letter-spacing:-.01em}
h2{font-size:19px;margin:1.6em 0 .5em}
h3{font-size:16.5px;margin:1.3em 0 .4em}
h4{font-size:15px;margin:1.2em 0 .3em}
.sub{color:var(--ink2);margin:.2em 0 1.4em;font-size:14.5px}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  padding:16px 17px;margin:0 0 14px;box-shadow:var(--sh)}
.card h3:first-child,.card h2:first-child{margin-top:0}
.grid{display:grid;gap:14px}
@media(min-width:680px){.grid.two{grid-template-columns:1fr 1fr}}

/* the big countdown banner */
.hero{background:linear-gradient(135deg,#0d5c63,#12868f);color:#fff;border:0}
.hero .lbl{font-size:12px;text-transform:uppercase;letter-spacing:.09em;opacity:.85}
.hero .big{font-size:27px;font-weight:700;line-height:1.25;margin:6px 0 4px}
.hero .when{opacity:.92;font-size:14.5px}
.hero.alert{background:linear-gradient(135deg,#a8283e,#d9455f)}
.hero.soon{background:linear-gradient(135deg,#a9631c,#e8833a)}

/* CRITICAL -- above urgent. Reserved for "you can lose the course/semester".
   Deliberately the only element on the site with this much visual weight; if
   everything is critical, nothing is. */
.crit-block{border:0;background:linear-gradient(135deg,#8c1327,#c0243f);color:#fff;
  box-shadow:0 2px 6px rgba(140,19,39,.3), 0 10px 30px rgba(140,19,39,.22)}
.crit-block .chead{font-size:12.5px;font-weight:800;letter-spacing:.1em;
  text-transform:uppercase;opacity:.95;margin-bottom:10px}
.crit-block .at{font-size:19px;font-weight:700;line-height:1.3;margin-bottom:6px}
.crit-block .prose strong{color:#fff}
.crit-block .prose code{background:rgba(255,255,255,.18)}
.crit-block a{color:#ffd9df}
.crit-block button{background:#fff;color:#8c1327;margin-top:12px;font-weight:700}
.crit-block button:hover{background:#ffe9ec}
.crit-block .act+.act{border-top:1px solid rgba(255,255,255,.3)}

/* urgent action block -- the loudest thing on the site, on purpose */
.action-block{border:2px solid var(--coral);background:#fff6f7}
.action-block .ahead{font-size:12px;font-weight:800;letter-spacing:.1em;
  text-transform:uppercase;color:var(--coral);margin-bottom:10px}
.act+.act{border-top:1px solid #f5ccd4;margin-top:14px;padding-top:14px}
.act .at{font-size:17px;font-weight:700;line-height:1.35;margin-bottom:4px}
.act .ad{font-size:14.5px}
.action-block button{background:var(--coral);margin-top:10px}
.action-block button:hover{background:#c03a52}

/* course cards */
.course{border-left:5px solid var(--teal)}
.course.online{border-left-color:var(--sun)}
.course .code{font-size:18px;font-weight:700;letter-spacing:-.01em}
.course .ttl{color:var(--ink2);font-size:14.5px}
.meta{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.pill{background:#eef4f3;color:var(--teal);border-radius:999px;padding:3px 10px;
  font-size:12.5px;font-weight:600}
.pill.o{background:#fdf0e5;color:#a9631c}
.pill.g{background:#e7f4ee;color:var(--good)}
.pill.r{background:#fdecef;color:var(--coral)}

/* deadline rows */
.row{display:flex;gap:11px;align-items:flex-start;padding:11px 0;border-top:1px solid var(--line)}
.row:first-child{border-top:0}
.row .d{flex:0 0 62px;text-align:center;background:#eef4f3;border-radius:10px;padding:5px 3px;line-height:1.15}
.row .d b{display:block;font-size:17px}
.row .d span{font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--ink2)}
.row.big .d{background:#fdecef}.row.big .d span,.row.big .d b{color:var(--coral)}
.row.hol .d{background:#f0f0f2}
.row .t{flex:1;min-width:0}
.row .t b{font-weight:600}
.row .n{color:var(--ink2);font-size:13.5px;margin-top:2px}
.row .away{font-size:12px;color:var(--ink2);white-space:nowrap}
.done{opacity:.45;text-decoration:line-through}

.tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  padding:2px 7px;border-radius:5px;background:#eef4f3;color:var(--teal)}
.tag.exam{background:#fdecef;color:var(--coral)}
.tag.holiday{background:#f0f0f2;color:#666}
.tag.assignment{background:#fdf0e5;color:#a9631c}
.tag.reminder{background:#eaf0fb;color:#3457a6}

/* content typography (markdown output) */
.prose p{margin:.7em 0}
.prose ul{margin:.6em 0;padding-left:1.15em}
.prose li{margin:.3em 0}
.prose code{background:#eef4f3;padding:1px 5px;border-radius:5px;font-size:.9em}
.prose strong{color:var(--ink)}
.tw{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:.8em 0}
.tw table{border-collapse:collapse;width:100%;font-size:14px;min-width:380px}
.tw th,.tw td{border:1px solid var(--line);padding:7px 9px;text-align:left;vertical-align:top}
.tw th{background:#eef4f3;font-weight:600}

/* links list */
.links a.lk{display:block;padding:12px 0;border-top:1px solid var(--line);text-decoration:none;color:inherit}
.links a.lk:first-child{border-top:0}
.links .lb{font-weight:600;color:var(--teal2)}
.links .nt{font-size:13.5px;color:var(--ink2)}

/* forms */
label{display:block;font-size:13px;font-weight:600;color:var(--ink2);margin:12px 0 4px}
input,select,textarea{width:100%;font:inherit;padding:11px 12px;border:1px solid var(--line);
  border-radius:10px;background:#fff;color:var(--ink)}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:2px solid var(--teal2);outline-offset:1px;border-color:var(--teal2)}
button,.btn{font:inherit;font-weight:600;background:var(--teal);color:#fff;border:0;
  padding:11px 18px;border-radius:10px;cursor:pointer;margin-top:14px;display:inline-block;
  text-decoration:none}
button:hover{background:var(--teal2)}
button.sm{padding:5px 11px;font-size:12.5px;margin:0}
button.ghost{background:#eef4f3;color:var(--teal)}
button.del{background:#fdecef;color:var(--coral)}
.inline{display:inline}

.note{background:#fdf7ec;border:1px solid #f0dcbb;border-radius:10px;padding:12px 14px;
  font-size:14px;margin:12px 0}
.note.bad{background:#fdecef;border-color:#f5ccd4}
.note.ok{background:#e9f6f0;border-color:#c3e6d5}

/* login */
.login{max-width:340px;margin:12vh auto;padding:0 18px;text-align:center}
.login .flower{font-size:52px}
.login h1{margin:.35em 0 .1em}
.login p{color:var(--ink2);font-size:14.5px;margin:0 0 22px}
.login input{text-align:center;font-size:26px;letter-spacing:.5em;padding:14px;text-indent:.5em}
.login button{width:100%}

/* chat */
.chat{display:flex;flex-direction:column;gap:12px;margin-bottom:16px}
.msg{max-width:88%;padding:12px 15px;border-radius:16px;font-size:15px}
.msg.u{align-self:flex-end;background:var(--teal);color:#fff;border-bottom-right-radius:5px}
.msg.u a{color:#cdeff2}
.msg.a{align-self:flex-start;background:#fff;border:1px solid var(--line);
  border-bottom-left-radius:5px;box-shadow:var(--sh)}
.msg.a p:first-child{margin-top:0}.msg.a p:last-child{margin-bottom:0}
.askbar{position:sticky;bottom:0;background:var(--bg);padding:10px 0 14px;
  padding-bottom:calc(14px + env(safe-area-inset-bottom))}
.askbar form{display:flex;gap:8px;align-items:flex-end}
.askbar textarea{min-height:48px;max-height:150px;border-radius:22px;padding:12px 16px}
.askbar button{margin:0;border-radius:50%;width:48px;height:48px;flex:0 0 48px;padding:0;font-size:19px}
.starter{background:#fff;border:1px solid var(--line);border-radius:999px;padding:8px 14px;
  font-size:13.5px;cursor:pointer;color:var(--teal);margin:0 6px 8px 0;font-weight:500}
.thinking{align-self:flex-start;color:var(--ink2);font-size:14px;padding:10px 15px}

hr{border:0;border-top:1px solid var(--line);margin:24px 0}
details{margin:10px 0}
summary{cursor:pointer;font-weight:600;color:var(--teal);padding:6px 0}
.muted{color:var(--ink2);font-size:13.5px}

@media (prefers-color-scheme: dark){
  :root{--ink:#e6efee; --ink2:#9fb3b2; --line:#26383a; --bg:#0e1718; --card:#152224;
        --teal:#3fb0ba; --teal2:#5cc7d1;}
  .tabs{background:var(--card)}
  .pill{background:#1c3033;color:var(--teal)}
  .pill.o{background:#33251a;color:#e8a76a}
  .pill.g{background:#16321f;color:#5cc48d}
  .pill.r{background:#3a1c23;color:#f08098}
  .row .d{background:#1c3033}.row.big .d{background:#3a1c23}.row.hol .d{background:#232326}
  .tw th{background:#1c3033}
  .prose code{background:#1c3033}
  .tag{background:#1c3033;color:var(--teal)}
  .tag.exam{background:#3a1c23;color:#f08098}
  .tag.holiday{background:#232326;color:#9a9aa2}
  .tag.assignment{background:#33251a;color:#e8a76a}
  .tag.reminder{background:#1b2440;color:#8fa8e6}
  input,select,textarea{background:#0e1718;color:var(--ink)}
  button.ghost{background:#1c3033}
  button.del{background:#3a1c23;color:#f08098}
  .note{background:#2a2318;border-color:#4a3d24}
  .note.bad{background:#3a1c23;border-color:#5c2b35}
  .note.ok{background:#14301f;border-color:#245c3c}
  .starter{background:var(--card)}
  .action-block{background:#2a161b;border-color:#8c3346}
  .act+.act{border-top-color:#4a2029}
}
