@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --ink: #17233b;
  --text: #293548;
  --muted: #667184;
  --line: #d7dde5;
  --blue: #2f61d5;
  --teal: #008577;
  --danger: #a72d40;
  --radius: 8px;
  --font: "Newsreader", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.55; letter-spacing: 0; }
button, input { font: inherit; }
a { color: var(--blue); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.login-panel { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 18px 42px rgba(23,35,59,.11); }
.brand-mark { width: 56px; height: 56px; display: block; margin-bottom: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--teal); font-size: .78rem; font-weight: 750; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: var(--ink); font-size: clamp(2rem, 8vw, 3rem); line-height: 1.04; }
.intro { margin-bottom: 24px; color: var(--muted); }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 6px; color: var(--ink); font-weight: 650; }
.login-form input { width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.login-form input:focus { border-color: var(--blue); outline: 3px solid rgba(47,97,213,.16); }
.login-form button, .download-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.login-form button:hover, .download-button:hover { background: var(--blue); }
.back-link { display: inline-block; margin-top: 20px; color: var(--muted); }
.message { padding: 10px 12px; border-radius: 6px; }
.message.error { border: 1px solid #ecc7cd; background: #fff7f8; color: var(--danger); }

.student-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px max(18px, calc((100% - 1040px) / 2)); border-top: 3px solid #a27a3b; border-bottom: 1px solid var(--line); background: #fff; }
.student-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 700; line-height: 1.05; text-decoration: none; }
.student-brand img { width: 44px; height: 44px; }
.student-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; font-weight: 400; }
.logout-button { min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; }
.dashboard { width: min(1040px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 70px; }
.welcome { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.welcome p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1.1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin: 34px 0 16px; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: 1.55rem; }
.section-heading span { color: var(--muted); font-size: .9rem; }
.copy-list { display: grid; gap: 12px; }
.copy-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.copy-date { margin-bottom: 4px; color: var(--muted); font-size: .8rem; font-weight: 650; }
.copy-card h3 { margin-bottom: 7px; color: var(--ink); font-size: 1.25rem; }
.copy-comment { max-width: 680px; margin-bottom: 0; }
.copy-actions { min-width: 132px; display: grid; gap: 10px; justify-items: stretch; text-align: center; }
.grade { color: var(--teal); font-size: 1.3rem; }
.download-button { min-height: 38px; font-size: .9rem; }
.empty-state { padding: 34px; border: 1px dashed #b9c2ce; border-radius: var(--radius); background: rgba(255,255,255,.55); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 1.15rem; }
.empty-state p { margin: 5px 0 0; color: var(--muted); }

@media (max-width: 640px) {
  .login-panel { padding: 26px 22px; }
  .student-header { align-items: flex-start; }
  .student-brand img { width: 38px; height: 38px; }
  .logout-button { font-size: .86rem; }
  .dashboard { padding-top: 38px; }
  .copy-card { grid-template-columns: 1fr; gap: 16px; }
  .copy-actions { min-width: 0; grid-template-columns: auto 1fr; align-items: center; }
}
