@font-face { font-family: 'Figtree'; src: url('/fonts/Figtree.ttf') format('truetype'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
:root {
  --navy: #0A2540; --navy-2: #14406d; --cream: #FBF7EF; --paper: #ffffff; --ink: #1d2433; --muted: #4a5568; --line: #eadfcb;
  --flame: #C2410C; --flame-2: #E8590C; --sun: #FFB612; --sun-soft: #FFF1CC; --green: #00704A; --red: #B3261E; --blue: #1F4E9E; --teal: #0F766E;
  --accent: var(--navy); --warn: #8a1c1c;
  --radius: 20px; --shadow: 0 1px 2px rgba(10,37,64,.06), 0 8px 24px rgba(10,37,64,.08);
  --tab-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Figtree', system-ui, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.55; font-size: 17px; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 6.5vw, 2.6rem); margin: 1.1rem 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.4rem; margin: 1.6rem 0 .5rem; } h3 { font-size: 1.15rem; }
a { color: var(--navy); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 10px 14px; z-index: 99; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 6px; }
.top :focus-visible, .tabbar :focus-visible, .foot :focus-visible, .hero :focus-visible { outline-color: var(--sun); }

/* Header: navy bar, scrollable section pills on small screens, SA colour stripe underneath */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-top: 10px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 650; min-height: 44px; }
.brand .logo { display: block; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.top nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; order: 3; padding: 2px 0 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: #fff; text-decoration: none; white-space: nowrap; padding: 9px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 99px; background: rgba(255,255,255,.10); font-weight: 600; font-size: .95rem; scroll-snap-align: start; transition: background .15s; }
.top nav a:hover { background: rgba(255,255,255,.22); }
.top nav a[aria-current] { background: var(--sun); color: var(--navy); }
.top nav a.me { background: var(--flame); }
.top nav a.me[aria-current] { background: var(--sun); }
.sa-stripe { height: 5px; background: linear-gradient(90deg, var(--green) 0 22%, var(--sun) 22% 38%, #111 38% 52%, var(--red) 52% 76%, var(--blue) 76% 100%); }
@media (min-width: 900px) {
  .top nav { flex: 0 1 auto; order: 0; overflow: visible; padding: 0; gap: 4px; }
  .top nav a { padding: 8px 12px; background: none; }
  .top nav a[aria-current] { background: var(--sun); }
  .top nav a.me { background: var(--flame); margin-left: 6px; }
  .top .wrap { padding-top: 8px; padding-bottom: 8px; }
}

/* Bottom tab bar (phones) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--navy); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(10,37,64,.25); border-top: 3px solid var(--sun); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: #dbe5f1; text-decoration: none; font-size: .74rem; font-weight: 600; border-radius: 14px; transition: background .15s, color .15s; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current] { color: var(--navy); background: var(--sun); }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(circle at 96% 4%, #FFB612 0 62px, transparent 63px), radial-gradient(circle at 100% 100%, #00704A 0 110px, transparent 111px), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #f6f1e6; border-radius: 28px; padding: 24px 20px 26px; margin: 16px 0 8px; }
.hero h1 { color: #fff; margin-top: .5rem; max-width: 18ch; } .hero p { max-width: 56ch; }
.hero a { color: #fff; }
.hero-logo { display: block; height: 72px; width: auto; margin: 0 0 .8rem; background: var(--cream); padding: 10px 12px; border-radius: 18px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--navy); background: var(--sun); font-size: .78rem; margin: 0; padding: 4px 10px; border-radius: 99px; }
.hero .search label { color: #fff; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 1rem 0 0; }
.search label { display: block; font-weight: 700; margin: .7rem 0 .35rem; }
.row { display: flex; gap: 8px; } .row input { flex: 1; min-width: 0; }

/* Controls */
input, select, textarea { font: inherit; padding: 12px 14px; min-height: 48px; border: 2px solid #b9c2cf; border-radius: 14px; background: #fff; width: 100%; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(255,182,18,.45); outline: none; }
button, .btn { font: inherit; font-weight: 700; background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 11px 20px; min-height: 48px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s, background .15s, box-shadow .15s; }
button:hover, .btn:hover { background: var(--navy-2); border-color: var(--navy-2); }
button:active, .btn:active { transform: scale(.97); }
.row button { background: var(--flame); border-color: var(--flame); }
.row button:hover { background: #9a3409; border-color: #9a3409; }
.btn.gold { background: var(--sun); border-color: var(--sun); color: var(--navy); } .btn.gold:hover { background: #ffc94d; border-color: #ffc94d; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; } .btn.ghost:hover { background: rgba(255,255,255,.15); }
button.secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); } button.secondary:hover { background: var(--sun-soft); }
button.danger, a.btn.danger { background: #8B1E1E; color: #fff; border-color: #8B1E1E; }
button.danger:hover, a.btn.danger:hover { background: #6F1616; border-color: #6F1616; color: #fff; }
a.btn.secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); } a.btn.secondary:hover { background: var(--sun-soft); }
.danger-zone { margin: 2.5rem 0 1.2rem; padding: 1.1rem 1.2rem 0.6rem; border: 2px solid #8B1E1E; border-radius: 16px; background: #fff8f6; }
.danger-zone h2 { color: #8B1E1E; margin-top: 0; }
button.link { background: none; border: 0; color: var(--navy); text-decoration: underline; padding: 0 4px; min-height: 44px; }
button.link:hover { background: none; }

/* Section tiles on Home */
.doors { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin: 1.2rem 0; }
.door { position: relative; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--radius); padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.door-title { text-decoration: none; }
.door-title::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.door strong { font-family: 'Fraunces', serif; font-size: 1.35rem; color: var(--accent); }
.door .tags { margin: 4px 0 0; font-size: .88rem; position: relative; z-index: 1; } .tags a { text-decoration: none; }
.s-accommodation { --accent: var(--green); } .s-tutoring { --accent: var(--blue); } .s-services { --accent: var(--navy-2); } .s-wellness { --accent: var(--teal); }
.s-career { --accent: var(--flame); } .s-marketplace { --accent: var(--red); } .s-specials { --accent: #8a5a00; }
.pagehead { border-left: 8px solid var(--accent); padding: 4px 0 4px 14px; margin: 16px 0 8px; } .pagehead h1 { margin: .3rem 0 .3rem; } .pagehead p { margin: 0 0 .3rem; max-width: 60ch; }
.pagehead .eyebrow { background: var(--accent); color: #fff; }

/* Cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 1rem 0; align-items: stretch; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
/* Equal-height row (grid stretch) + two children: body grows, foot stays on the shared bottom edge. */
.cards > .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
}
.cards > .card .card-main { flex: 1 1 auto; min-width: 0; }
.cards > .card .card-foot {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 14px;
}
.cards > .card .card-foot > form { margin: 0; }
.card.featured { border: 2px solid var(--sun); } .card h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .92rem; margin: .4rem 0; }
.meta span { background: #f3ecde; border-radius: 99px; padding: 3px 11px; }
.meta strong { color: #7a2e00; }
.badges { margin: .2rem 0; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--sun-soft); color: #5a4300; }
.badge.ok { background: #d8f1e5; color: #064e36; } .badge.ex { background: #e7e9ee; color: #2d3748; }
.notice { background: #eaf1f9; border-left: 6px solid var(--navy); border-radius: 0 14px 14px 0; padding: 10px 14px; font-size: .95rem; }
.contact { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: .6rem 0 0; } .contact dt { font-weight: 700; } .contact dd { margin: 0; word-break: break-word; }
.ad { background: #fff; border: 2px dashed #9aa3b2; border-radius: var(--radius); padding: 12px 16px; margin: 1rem 0; }
.wellness { background: #fff; border: 1px solid var(--line); border-left: 8px solid var(--teal); border-radius: var(--radius); padding: 16px 18px; margin: 1.5rem 0; }
.small { font-size: .9rem; color: var(--muted); }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: .6rem 0; }
.tags li { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 13px; }
.tags li a { display: inline-block; padding: 3px 0; }
.tags li strong { color: var(--navy); }
.card .tags li, .profile .tags li { background: var(--sun-soft); border-color: #f1d996; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 12px; max-width: 580px; margin: 1rem 0; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; }
.form label.check, label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; min-height: 44px; padding: 8px 0; }
.check input { width: 24px; height: 24px; min-height: 0; margin-top: 2px; accent-color: var(--navy); flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; padding: 14px; } legend { font-weight: 800; color: var(--navy); padding: 0 6px; }
.error { background: #fde8e8; color: var(--warn); padding: 10px 14px; border-radius: 14px; border-left: 6px solid var(--red); }
.ok { background: #dff2ea; color: #064e36; padding: 10px 14px; border-radius: 14px; border-left: 6px solid var(--green); }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: .92rem; border-radius: 12px; overflow: hidden; } th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.fees { max-width: 580px; margin: 1rem 0; } caption { text-align: left; font-weight: 800; padding: 4px 0; }
.scroll { overflow-x: auto; } .actions form, form.inline { display: inline; } .actions button { padding: 6px 12px; min-height: 40px; font-size: .88rem; margin: 2px 0; }
.token { word-break: break-all; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); display: block; }

/* Profiles and Vibes */
.phead { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); } .headline { font-size: 1.1rem; margin: 0; }
.phead h1 { margin: 0 0 .2rem; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--sun); }
.avatar.blank { display: inline-flex; width: 80px; height: 80px; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-family: 'Fraunces', serif; font-size: 2rem; border-color: var(--sun); }
.profile section { margin: 1rem 0; } .entry { border-top: 1px solid var(--line); padding: .5rem 0; } .entry h3 { margin: .3rem 0 0; font-size: 1.05rem; }
.card.person { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; } .card.person .avatar.blank, .card.person .avatar { width: 60px; height: 60px; font-size: 1.5rem; }
h2.vibe { font-size: 1.15rem; margin: .8rem 0 .2rem; color: var(--flame); }
.netbtns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .netbtns form { margin: 0; }
.netlist { list-style: none; padding: 0; } .netrow { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; } .netrow button, .netrow .btn { padding: 6px 14px; min-height: 40px; font-size: .9rem; }
.netcount { font-weight: 700; color: var(--navy); }

/* Footer */
.foot { margin-top: 2.5rem; background: var(--navy); color: #e8edf4; padding: 1.6rem 0 1.8rem; border-top: 5px solid var(--sun); } .foot a { color: #fff; } .foot .small { color: #c9d2de; }
.foot p { margin: .4rem 0; }
.foot-grid { display: grid; gap: 18px; align-items: center; } @media (min-width: 700px) { .foot-grid { grid-template-columns: 1fr auto; } }
.sa-badge { background: var(--cream); border-radius: 18px; padding: 8px 14px; justify-self: start; }
.sa-badge img { display: block; width: 190px; height: auto; }

/* Motion, only when the visitor has not asked for less */
@media (prefers-reduced-motion: no-preference) {
  main { animation: rise .35s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .door, .card { transition: transform .18s ease, box-shadow .18s ease; }
  .door:hover, .card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(10,37,64,.08), 0 14px 32px rgba(10,37,64,.14); }
  .tabbar a:active { transform: scale(.94); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 480px) { .phead { flex-direction: column; align-items: flex-start; } .row { flex-direction: column; } .row button { width: 100%; } .hero { border-radius: 24px; padding: 20px 16px 22px; } }
@media print { .top, .tabbar, .foot { display: none; } body { padding: 0; } }

/* 29 Oct: personal home, sign-up screen */
.greet { margin-top: 1.2rem; }
.mecard { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--sun); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.mecard .phead { border: 0; box-shadow: none; padding: 0; background: none; }
.mename { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 650; margin: 0; color: var(--navy); }
.meter { height: 12px; background: #efe7d6; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--sun)); border-radius: 99px; }
.nudge { margin: .2rem 0 .6rem; font-weight: 600; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin: .8rem 0 0; }
.quick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.quick a { display: flex; align-items: center; min-height: 52px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--accent, var(--navy)); border-radius: 14px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.netrow .avatar, .netrow .avatar.blank { width: 40px; height: 40px; font-size: 1.1rem; border-width: 2px; }
.handle { margin: 0 0 .3rem; color: var(--muted); font-weight: 600; }
.hint { font-weight: 400; font-size: .9rem; color: var(--muted); }
.signup .callme { flex-direction: column; }
.pw { display: flex !important; flex-direction: row !important; gap: 8px; align-items: stretch; } .pw input { flex: 1; min-width: 0; }
.peek { min-width: 76px; padding: 8px 12px; }
.callpreview { display: none; margin: .3rem 0 0; } .js .callpreview { display: block; }
[data-strength] { color: var(--green); }
.signup .hint b { color: var(--navy); word-break: break-all; }
a.btn.secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); } a.btn.secondary:hover { background: var(--sun-soft); }
.actions-row .btn { flex: 1 1 auto; }

/* Completeness bar widths (no inline styles, so the page can use a strict content security policy) */
.meter.w0 span { width: 0%; }
.meter.w5 span { width: 5%; }
.meter.w10 span { width: 10%; }
.meter.w15 span { width: 15%; }
.meter.w20 span { width: 20%; }
.meter.w25 span { width: 25%; }
.meter.w30 span { width: 30%; }
.meter.w35 span { width: 35%; }
.meter.w40 span { width: 40%; }
.meter.w45 span { width: 45%; }
.meter.w50 span { width: 50%; }
.meter.w55 span { width: 55%; }
.meter.w60 span { width: 60%; }
.meter.w65 span { width: 65%; }
.meter.w70 span { width: 70%; }
.meter.w75 span { width: 75%; }
.meter.w80 span { width: 80%; }
.meter.w85 span { width: 85%; }
.meter.w90 span { width: 90%; }
.meter.w95 span { width: 95%; }
.meter.w100 span { width: 100%; }

/* Getting ready for varsity */
.s-varsity { --accent: #6b3fa0; }
.vpromo { background: #fff; border: 2px solid #6b3fa0; border-radius: var(--radius); padding: 6px 18px 12px; margin: 18px 0; box-shadow: var(--shadow); }
.vpromo h2 { margin-top: .6rem; }
.vcard .vimg, .vpost .vimg, .vmine .vimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin: 6px 0 10px; background: #efe7d6; }
.vmeta { color: var(--muted); font-size: .95rem; margin: .1rem 0 .4rem; }
.vdate { font-weight: 800; color: var(--navy); margin: .2rem 0; }
.vtext { max-width: 62ch; }
.vempty { background: #fff; border: 1px dashed var(--line); border-radius: 14px; padding: 14px; }
.badge.kind-open_day { background: #e3f0ff; color: #0d3b78; } .badge.kind-special { background: #fff1cc; color: #5a4300; }
.badge.kind-deadline { background: #fde2dc; color: #7a1d12; } .badge.kind-info { background: #e8e1f3; color: #3f2468; }
.vfilter .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.vfilter label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; flex: 1 1 160px; }
.vfilter select, .form select, .form textarea, .form input[type=date], .form input[type=url] { font: inherit; padding: 10px 12px; border: 2px solid #c9d3df; border-radius: 12px; background: #fff; min-height: 44px; width: 100%; }
details.guide { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; margin: 12px 0; box-shadow: var(--shadow); }
details.guide summary, .vmine details summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; color: var(--navy); }
details.guide[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.vmine details { margin: 8px 0; }
.vfilter .row { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: end; }
.vfilter .row label { margin: 0; flex: none; width: 100%; }
.vfilter .row button { width: 100%; }
@media (min-width: 640px) { .vfilter .row { grid-template-columns: 1fr 1fr auto; } .vfilter .row button { width: auto; } }

/* Study tools */
.s-study { --accent: var(--teal); }
.study { margin: 0 0 1.5rem; }
.st-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: .6rem 0; }
.st-top p { margin: 0; }
.st-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: .8rem 0 1rem; }
.st-tabs button { padding: 8px 6px; font-size: .95rem; }
.st-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.study textarea { min-height: 200px; resize: vertical; }
.study .form { max-width: 720px; }
.study .bad { color: var(--warn); font-weight: 700; }
.study [hidden] { display: none !important; }
.st-card { background: var(--paper); border: 2px solid var(--navy); border-radius: var(--radius); padding: 22px 18px; margin: .8rem 0; min-height: 150px; box-shadow: var(--shadow); }
.st-front { font-size: 1.25rem; font-weight: 700; margin: 0 0 .8rem; overflow-wrap: anywhere; }
.st-back { font-size: 1.1rem; margin: 0; padding-top: .8rem; border-top: 2px dashed var(--line); overflow-wrap: anywhere; }
.st-grades { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.st-grades button { flex-direction: column; gap: 2px; padding: 10px 6px; }
.st-grades small { font-weight: 400; color: var(--muted); font-size: .8rem; }
@media (min-width: 560px) { .st-grades { grid-template-columns: repeat(4, 1fr); } }
progress { width: 100%; height: 10px; accent-color: var(--teal); }
.st-terms dt { font-weight: 800; color: var(--navy); margin-top: .6rem; } .st-terms dd { margin: 0 0 0 0; }
.st-mini { border-bottom: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 2px; } .st-mini span { color: var(--muted); }
.st-q { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: .6rem 0; }
.st-opts { display: grid; gap: 8px; }
.st-opt { justify-content: flex-start; text-align: left; font-weight: 600; }
.st-opt.right { background: #dff2ea; border-color: var(--green); color: #064e36; }
.st-opt.wrong { background: #fde8e8; border-color: var(--red); color: var(--warn); }
.st-score { font-weight: 800; font-size: 1.1rem; }
.st-tutor { background: var(--sun-soft); border-left: 8px solid var(--sun); border-radius: 0 var(--radius) var(--radius) 0; padding: 4px 16px 10px; margin: 1.2rem 0; }
.tabbar a { min-width: 0; }

/* Listing ratings */
.rating { margin: 0.35rem 0; }
.rating .stars { color: var(--sun, #FFB612); letter-spacing: 0.05em; }
.rate { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid rgba(10, 37, 64, 0.12); }
.rate-stars { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0 0; }
.star-btn { min-width: 2.5rem; padding: 0.35rem 0.5rem; background: #fff; border: 1px solid rgba(10, 37, 64, 0.25); border-radius: 0.4rem; color: var(--navy, #0A2540); cursor: pointer; }
.star-btn.on, .star-btn:hover { background: var(--sun, #FFB612); border-color: var(--sun, #FFB612); }

/* 11 Nov 2026: Career explainers, study modules and Due today */
.subnote { margin: .4rem 0 1rem; }
details.subnotes { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; margin: .4rem 0 1rem; }
details.subnotes summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; color: var(--navy); }
details.subnotes dt { font-weight: 800; color: var(--navy); margin-top: .5rem; } details.subnotes dd { margin: 0 0 .5rem; }
.st-today { background: var(--sun-soft); border-left: 8px solid var(--sun); border-radius: 0 var(--radius) var(--radius) 0; padding: 4px 16px 10px; margin: .6rem 0 1rem; }
.st-today h2 { margin: .5rem 0; font-size: 1.3rem; }
.st-today-list, .st-mod-list { list-style: none; margin: 0; padding: 0; }
.st-today-list li, .st-mod-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.st-today-list li:last-child, .st-mod-list li:last-child { border-bottom: 0; }
.st-today-list li span { flex: 1 1 60%; }
.st-today-list li.due span { font-weight: 700; color: var(--navy); }
.st-today-list li button { min-width: 96px; }
.st-mods { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 10px; margin: .6rem 0 1rem; }
.st-mod-add { display: grid; grid-template-columns: 2fr 3fr; gap: 0 10px; align-items: end; margin: .4rem 0 .6rem; }
.st-mod-add button { grid-column: 1 / -1; margin-top: 4px; }
@media (min-width: 560px) { .st-mod-add { grid-template-columns: 2fr 3fr auto; } .st-mod-add button { grid-column: auto; } }
h3.st-group { margin: 1.2rem 0 .2rem; grid-column: 1 / -1; }

/* 17 Nov 2026: narrow listing message threads */
.msg-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--sun); color: var(--navy); font-size: .75rem; font-weight: 800; line-height: 1; }
.tabbar .msg-badge { position: absolute; top: 4px; right: calc(50% - 22px); margin: 0; }
.tabbar a { position: relative; }
.msg-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.msg-list li { border-top: 1px solid var(--line); }
.msg-list li:last-child { border-bottom: 1px solid var(--line); }
.msg-list a { display: block; padding: 12px 4px; text-decoration: none; color: inherit; }
.msg-list a:hover { background: var(--sun-soft); }
.msg-list .preview { display: block; color: var(--muted, #4a5a6a); }
.msg-list li.unread strong { font-weight: 800; }
.msg-thread { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 10px; }
.msg-bubble { max-width: 36rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.msg-bubble.mine { align-self: flex-end; background: var(--sun-soft); border-color: var(--sun); }
.msg-bubble .who { display: block; font-weight: 800; color: var(--navy); font-size: .85rem; }
.msg-plain { overflow-wrap: anywhere; white-space: normal; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; margin: 1rem 0; }
form.msg-report, form.inline { display: inline-block; margin: 0; }
form.inline button { min-height: 40px; padding: 6px 14px; }
.card-foot .btn { margin-top: 8px; }

pre.outbox-body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper, #f7f3ea); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 1rem; font-size: .9rem; }


/* Student perks */
.perkpromo { border-color: var(--sun); }
.perk .card-foot { margin-top: 4px; }
.perk .btn { display: inline-flex; }

/* Feedback button: always there, never in the way. Sits above the tab bar on phones. */
.fb-btn { position: fixed; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px); z-index: 25; display: inline-flex; align-items: center; gap: 6px; background: var(--sun); color: var(--navy); font-weight: 800; font-size: .86rem; text-decoration: none; padding: 9px 14px; min-height: 44px; border-radius: 99px; border: 2px solid var(--navy); box-shadow: 0 6px 18px rgba(10,37,64,.25); }
.fb-btn:hover { background: #ffc94d; }
@media (min-width: 900px) { .fb-btn { bottom: 20px; right: 20px; } }
@media print { .fb-btn { display: none; } }
.fb-form fieldset { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fb-form textarea { width: 100%; }
.fb-done td { opacity: .6; }
.fb-text { white-space: pre-wrap; max-width: 36ch; overflow-wrap: anywhere; }
