:root {
  color-scheme: light;
  --ink: #162942;
  --muted: #53647b;
  --navy: #12233c;
  --line: #dce4ed;
  --paper: #f2f5f9;
  --blue: #234d7c;
  font: 16px/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, input, textarea, select, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid #608ce2; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.65rem); line-height: 1.13; letter-spacing: -.035em; }
h2 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.015em; }
a { color: var(--blue); }
svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.skip { position: fixed; z-index: 2; top: .6rem; left: .6rem; transform: translateY(-200%); padding: .6rem 1rem; background: white; }
.skip:focus { transform: translateY(0); }
.loading { padding: 2rem; }
.brand { display: flex; gap: .8rem; align-items: center; color: white; line-height: 1.15; }
.brand img { object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; }
.brand span { font-size: 1.1rem; font-weight: 800; letter-spacing: .12em; }
.brand small { display: block; margin-top: .24rem; font-size: .72rem; font-weight: 500; letter-spacing: 0; color: #c4d6eb; }
.auth { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(23rem, 1fr); align-items: start; background: #fff; }
.auth-brand { min-height: 100vh; display: grid; align-content: center; justify-content: center; padding: 2rem; background: radial-gradient(ellipse at 30% 28%, #294d72, #12233c 66%); }
.auth-brand .brand { gap: 1rem; }
.auth-brand .brand img { width: 78px; height: 78px; }
.auth-brand .brand span { font-size: 1.75rem; }
.auth-brand .brand small { font-size: .9rem; }
.auth-card { width: min(100%, 36rem); margin: auto; padding: 3rem clamp(1.3rem, 4vw, 4rem); }
.auth-card > p { margin: .9rem 0 1.7rem; color: var(--muted); }
.stack { display: grid; gap: .9rem; }
.stack label { display: grid; gap: .35rem; font-weight: 600; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #bcc9d9; border-radius: .48rem; background: #fff; color: var(--ink); padding: .65rem .8rem; }
textarea { resize: vertical; }
.primary, .secondary { display: inline-flex; gap: .4rem; align-items: center; justify-content: center; border-radius: .5rem; padding: .58rem .85rem; font-weight: 650; text-decoration: none; min-height: 44px; }
.primary { background: var(--blue); border: 1px solid var(--blue); color: white; }
.primary:hover { background: #173c64; }
.secondary { border: 1px solid var(--line); background: #fff; color: var(--blue); }
.secondary:hover { background: #edf4fb; }
.status, .notice { color: #8a351d; }
.status:empty { display: none; }
.notice { border: 1px solid #e7c4af; background: #fff5ed; border-radius: .5rem; padding: .8rem; }
.hint { font-size: .83rem; color: var(--muted); margin: -.5rem 0 0; }
.profile { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 0 0 .9rem; background: var(--paper); padding: 1rem; border-radius: .6rem; }
.profile dt { font-size: .78rem; color: var(--muted); }
.profile dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.report { margin-bottom: 1.15rem; }
.report summary { cursor: pointer; color: var(--blue); font-size: .9rem; }
.report form { padding-top: .8rem; }
.workspace { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; background: var(--navy); display: flex; flex-direction: column; gap: 1.45rem; padding: 1.5rem 1.1rem 1rem; color: #e2ecf6; }
.space-select, .space-single { font-size: .84rem; padding: .55rem .6rem; color: #d2def0; overflow-wrap: anywhere; }
.space-select select { margin-top: .28rem; background: #1f3655; color: #f6fbff; border-color: #526886; padding: .52rem; }
.space-single { border-block: 1px solid #30435d; padding-block: .8rem; font-weight: 650; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav button, .account button { border: 1px solid transparent; border-radius: .5rem; color: inherit; background: transparent; }
.sidebar nav button { min-height: 44px; display: flex; gap: .65rem; align-items: center; padding: .5rem .65rem; text-align: left; font-size: .92rem; }
.sidebar nav button:hover, .account button:hover { background: #223a5b; }
.sidebar nav button[aria-current] { color: #fff; background: #2e4f75; border-color: #4b6c93; font-weight: 700; }
.account { margin-top: auto; display: flex; align-items: center; gap: .55rem; padding-top: 1rem; border-top: 1px solid #30435d; }
.account strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .87rem; }
.initials { display: grid; place-items: center; min-width: 32px; min-height: 32px; border-radius: 50%; color: #fff; background: #35577f; font-size: .72rem; font-weight: 700; }
.account button { margin-left: auto; padding: .5rem; display: grid; place-items: center; min-width: 42px; min-height: 42px; }
.main { width: min(100%, 72rem); margin-inline: auto; padding: clamp(1.15rem, 4vw, 3rem); overflow-wrap: anywhere; }
.main > h1 { margin-bottom: 1.5rem; }
.page-label { margin-bottom: .45rem; color: var(--muted); font-size: .86rem; font-weight: 680; }
.hero { min-height: 216px; display: grid; align-content: end; padding: clamp(1.4rem, 4vw, 2.7rem); background: radial-gradient(ellipse at 94% 0%, #3a638d, #1a3152 68%); color: white; border-radius: .85rem; }
.hero p:last-child { color: #e2edf7; margin-top: .45rem; }
.hero-course { color: #d1e4f9; font-size: .88rem; font-weight: 650; margin-bottom: .45rem; }
.card, .empty { background: #fff; border: 1px solid var(--line); border-radius: .8rem; }
.card { margin-top: 1rem; padding: clamp(1rem, 3vw, 1.5rem); }
.card > h2 { margin-bottom: .7rem; }
.description p, .message-body { white-space: pre-wrap; }
.description p { color: var(--muted); }
.empty { padding: 1.45rem; display: flex; align-items: center; gap: .65rem; color: var(--muted); }
.card > .empty { background: var(--paper); border-color: transparent; }
.player { display: block; width: 100%; max-height: 60vh; aspect-ratio: 16 / 9; border-radius: .6rem; background: #111b28; }
.library ul { list-style: none; padding: 0; margin: 0; }
.library li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.library li:last-child { padding-bottom: 0; }
.library video { grid-column: 1 / -1; }
.resource-icon { display: grid; place-items: center; width: 39px; height: 39px; background: #eaf1f8; border-radius: .5rem; color: var(--blue); }
.resource-title small { display: block; color: var(--muted); }
.library .secondary { font-size: .83rem; }
.message summary { cursor: pointer; font-weight: 720; }
.message summary time { color: var(--muted); font-size: .85rem; font-weight: 500; float: right; padding-left: .7rem; }
.sender { margin: 1rem 0 .35rem; color: var(--muted); font-size: .85rem; }
@media (max-width: 720px) {
  .auth, .workspace { display: block; }
  .auth-brand { min-height: 0; justify-content: start; padding: 1rem 1.3rem; }
  .auth-brand .brand img { width: 49px; height: 49px; }
  .auth-brand .brand span { font-size: 1.2rem; }
  .auth-card { padding-block: 1.65rem; }
  .sidebar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; gap: .45rem; padding: .85rem .85rem .6rem; }
  .sidebar .brand img { width: 36px; height: 36px; }
  .account { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; }
  .account strong, .account .initials { display: none; }
  .space-select, .space-single { grid-column: 1 / -1; padding: .3rem 0; border: 0; }
  .sidebar nav { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; }
  .sidebar nav button { gap: .3rem; justify-content: center; padding: .4rem .3rem; font-size: .8rem; }
  .hero { min-height: 170px; }
}
@media (max-width: 370px) {
  .resource-icon, .library .secondary svg, .sidebar nav svg { display: none; }
  .library li { grid-template-columns: minmax(0, 1fr) auto; }
  .profile { grid-template-columns: 1fr; }
}
