:root {
  color-scheme: light;
  --ink: #103b47;
  --muted: #47656d;
  --blue: #395995;
  --paper: #f6faf8;
  --line: #c3d9d5;
  --green: #006f69;
  font: 100%/1.45 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #12272c;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--green); }
[hidden] { display: none !important; }
h1, h2, p, form { margin: 0; }
h1, h2 { line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(1.5rem, 3.8vh, 2.05rem); }
h2 { font-size: 1.35rem; }
:focus-visible { outline: 3px solid #008877; outline-offset: 3px; }
h1[tabindex]:focus:not(:focus-visible) { outline: none; }
.cover {
  margin: auto; width: min(100%, 56.25vh); width: min(100%, 56.25dvh);
  height: min(100vh, 177.778vw); height: min(100dvh, 177.778vw);
  min-height: min(100vh, 32rem); min-height: min(100dvh, 32rem);
  display: flex; flex-direction: column;
  position: relative; background: var(--paper);
  box-shadow: 0 0 4rem #06171b66;
}
body:has(.cover) { display: grid; align-items: center; }
.cover-brand {
  flex: none; display: flex; justify-content: center; align-items: center; background: white;
  padding: .45rem .9rem; border-bottom: 2px solid #a2d8cd;
  height: clamp(4rem, 13%, 8rem);
}
.brand-logo { display: block; object-fit: contain; }
.cover-brand .brand-logo { width: 88%; height: 100%; min-height: 0; }
.cover-art { min-height: 2.5rem; flex: 1; overflow: hidden; position: relative; }
.cover-art img { width: 100%; height: 100%; position: absolute; inset: 0; display: block; object-fit: cover; object-position: 53% 55%; }
.cover-panel {
  background: var(--paper); padding: 1.1rem clamp(1.05rem, 5.5%, 2rem) max(1.25rem, env(safe-area-inset-bottom));
  display: grid; gap: .95rem; border-top: 2px solid #a2d8cd;
}
.cover-panel p:not(.error) { color: var(--muted); }
.stack, .form-stack, .field { display: grid; }
.stack { gap: .65rem; }
.form-stack { gap: .78rem; }
.field { gap: .28rem; }
.field label { color: var(--ink); font-size: 1rem; font-weight: 700; }
.field input {
  appearance: none; width: 100%; min-width: 0; padding: .55rem .78rem; min-height: 2.77rem;
  border: 1px solid #94b2b2; border-radius: .55rem; color: var(--ink); background: white;
}
.field input:hover { border-color: #678f91; }
.field input:focus { border-color: var(--green); }
.field-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.text-action {
  color: var(--green); background: transparent; border: 0; padding: .18rem 0;
  font: inherit; font-weight: 650; text-align: start; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .18em;
}
.text-action:hover { color: #174997; }
.field-heading .text-action { font-size: .94rem; }
.button {
  display: flex; justify-content: center; align-items: center;
  min-height: 2.9rem; width: 100%; border-radius: .8rem; padding: .62rem .9rem;
  font-size: 1.04rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none;
}
.button.primary { border: 1px solid var(--blue); background: var(--blue); color: white; }
.button.primary:hover { background: #2b487f; }
.button.secondary { border: 1px solid #b5cfcd; background: #e5f0ef; color: #154951; }
.button.secondary:hover { background: #d6e7e4; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .7; cursor: wait; }
.feedback.error { color: #84282e; background: #fff0ef; border-inline-start: 3px solid #a94349; padding: .4rem .7rem; }
.help { font-size: .92rem; color: var(--muted); }
.help ul { padding-inline-start: 1.25rem; margin: .3rem 0; }
.back-menu { justify-self: center; }
.workspace { min-height: 100vh; min-height: 100dvh; margin: auto; width: min(100%, 44rem); background: var(--paper); }
.workspace.teacher { width: min(100%, 72rem); }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); border-bottom: 2px solid #a2d8cd; background: white; }
.workspace-header .brand-logo { width: min(44%, 12rem); height: auto; }
.workspace-header .text-action { flex: none; }
.workspace-body { padding: clamp(1.35rem, 4vw, 3rem); }
.dashboard-nav { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1.5rem 0 1.15rem; gap: .3rem 1.25rem; }
.dashboard-nav a { color: var(--muted); padding: .6rem .1rem .7rem; text-decoration: none; font-weight: 650; border-bottom: 3px solid transparent; }
.dashboard-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.dashboard-section { border: 1px solid var(--line); border-radius: .85rem; background: white; padding: 1.2rem; }
.dashboard-section p { margin-top: .5rem; color: var(--muted); }
@media (max-height: 610px) {
  .cover-panel { padding-block: .7rem; gap: .6rem; }
  .form-stack { gap: .5rem; }
}
@media (max-height: 550px) and (orientation: landscape) {
  body:has(.cover) { display: block; }
  .cover { width: min(100%, 24rem); height: auto; min-height: 100vh; }
  .cover-brand { height: 4rem; }
  .cover-art { flex: none; height: clamp(3rem, 16vh, 6rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .button { transition: background .15s, transform .12s; }
}

