/* Teacher dashboard. Soft palette (Eliza found harsh contrast straining); text stays at 4.5:1 or more.
   Only features supported in current Safari, Chrome, Firefox and Edge. No red: problems use purple. */
:root {
  --bg: #ebe8e0;
  --card: #f4f2ec;
  --ink: #2f3b46;
  --muted: #4a5763;
  --navy: #38587d;
  --green: #46695a;
  --purple: #67508a;
  --purple-bg: #ece6f3;
  --line: #66707a;
  --on-dark: #eef2f5;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
.reloading body { visibility: hidden; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.5 var(--font); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 1rem; }
a { color: var(--navy); }
.icon { flex: none; vertical-align: middle; }

.skip { position: absolute; left: -9999px; top: 0; padding: .5rem 1rem; background: var(--card); color: var(--ink); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* Buttons and fields */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px;
  padding: .55rem 1.2rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; -webkit-appearance: none; appearance: none; }
.button-main { background: var(--navy); color: var(--on-dark); }
.button-main:hover { background: #2f4c6d; }
.button-quiet { background: transparent; color: var(--on-dark); border-color: rgba(238, 242, 245, .6); }
.button-quiet:hover { background: rgba(238, 242, 245, .12); }
.band .button-quiet:focus-visible { outline-color: var(--on-dark); }

label { font-weight: 600; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; min-height: 44px; padding: .55rem .8rem; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 8px; -webkit-appearance: none; appearance: none; }
.stack { display: flex; flex-direction: column; gap: .4rem; }
.stack .button { margin-top: 1rem; }
.panel .stack .button { align-self: flex-start; }
.panel .stack input[type="text"] { max-width: 480px; }

.notice { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.notice-problem { background: var(--purple-bg); color: var(--purple); border: 2px solid var(--purple); font-weight: 600; }

/* Login */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: linear-gradient(160deg, var(--navy) 0%, var(--green) 100%); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border-radius: var(--radius); padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.login-card h1 { margin: .5rem 0 0; text-align: center; }
.login-sub { margin: 0 0 1.5rem; text-align: center; color: var(--muted); }
.login-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: var(--navy); color: var(--on-dark); }

/* Dashboard frame */
.band { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .6rem 1.5rem; background: var(--navy); color: var(--on-dark); }
.band form { margin: 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--on-dark); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand-tag { font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--green); }
.band-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .25rem 1rem; min-width: 0; }
.who { font-weight: 600; color: inherit; }
a.who { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; }
a.who:hover { text-decoration: underline; }
a.who:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

.frame { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.side { background: var(--green); padding: 1rem .75rem; }
.side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.side a { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .5rem .8rem; border-radius: 8px;
  color: var(--on-dark); text-decoration: none; font-weight: 600; }
.side a:hover { background: rgba(238, 242, 245, .12); }
.side a[aria-current] { background: var(--card); color: var(--green); }
.side a:focus-visible { outline-color: var(--on-dark); }
.content { padding: 2rem; max-width: 1100px; width: 100%; min-width: 0; }

.empty { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 3rem 1.5rem; text-align: center;
  background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 0; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--green); color: var(--on-dark); }

/* Narrow screens: the side menu becomes a row under the top band. */
@media (max-width: 720px) {
  .band { padding: .6rem 1rem; }
  /* minmax(0, 1fr) and min-width: 0 stop a wide menu row from stretching the whole page past the screen. */
  .frame { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .side { padding: .5rem; min-width: 0; }
  /* Tabs: icon over label at full reading size. They wrap onto more rows as sections are added, so nothing is ever cut off. */
  .side ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .25rem; }
  .side a { flex-direction: column; justify-content: center; text-align: center; gap: .15rem; min-height: 60px; padding: .4rem .25rem; font-size: .95rem; }
  .content { padding: 1.25rem 1rem; }
  .weeks { grid-template-columns: repeat(2, 1fr); }
}

/* Shared pieces */
h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.panel { background: var(--card); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.notice-done { background: #e3eee8; color: var(--green); border: 2px solid var(--green); font-weight: 600; }
.button-plain { background: transparent; color: var(--navy); border-color: var(--line); }
.button-plain:hover { background: rgba(56, 88, 125, .08); }
.button-big { min-height: 52px; padding: .7rem 1.6rem; font-size: 1.1rem; }
.back { margin: 0 0 .75rem; }
.back a { font-weight: 600; }

.badge { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.badge-full { background: var(--green); color: var(--on-dark); }
.badge-step { background: var(--navy); color: var(--on-dark); }

/* Group tiles */
.tiles { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; height: 100%;
  padding: 1.25rem; background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--navy); }
.tile-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--on-dark); }
.tile-icon .icon { width: 32px; height: 32px; }
.tile-name { font-size: 1.2rem; font-weight: 700; }
.tile-go { position: absolute; top: 1.25rem; right: 1.25rem; color: var(--navy); }

.add-group summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--navy); }
.add-group[open] summary { margin-bottom: .75rem; }

/* Group page */
.group-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.group-head h1 { margin: 0; }

.weeks { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(4, 1fr); max-width: 720px; }
.week { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .8rem .5rem; border-radius: 10px; text-align: center; border: 2px solid; }
.week-n { font-weight: 700; }
.week-state { font-size: .9rem; font-weight: 600; }
.week-open { background: #e3eee8; border-color: var(--green); color: var(--green); }
.week-locked { background: #f0eee9; border-color: var(--line); border-style: dashed; color: var(--muted); }
.week-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.week-actions form { margin: 0; }

.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.choices legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.choice { display: flex; align-items: flex-start; gap: .7rem; padding: .75rem 1rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: .15rem 0 0; flex: none; accent-color: var(--navy); }
.choice strong { display: block; }
.choice:has(input:checked) { border-color: var(--navy); background: #e9eef4; }
.week-title { font-size: .85rem; line-height: 1.3; color: var(--ink); }

/* Materials */
section > h2 { margin-top: .5rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .25rem; }
.badge-note { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple); }
.doc-tile { gap: .5rem; }
.doc-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top;
  border-radius: 8px; background: #fff; border: 1px solid #d6d2c8; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.original { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 600; }
.doc-page { margin: 1rem 0; }
.doc-page img { display: block; width: 100%; height: auto; background: #fff; border-radius: 8px; border: 1px solid #d6d2c8; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.pager-where { font-weight: 700; }
.is-off { opacity: .45; cursor: default; }
.page-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.page-list a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .6rem;
  border: 2px solid var(--line); border-radius: 8px; background: var(--card); font-weight: 600; text-decoration: none; }
.page-list a[aria-current] { background: var(--navy); border-color: var(--navy); color: var(--on-dark); }
.panel ul, .panel ol { margin: .25rem 0 .5rem; padding-left: 1.5rem; }
.panel li { margin-bottom: .25rem; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .4rem 1.25rem; margin: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: .5rem; }
}

/* Course start and schedule */
.badge-wait { background: #f0eee9; color: var(--muted); border: 1px dashed var(--line); }
.notice-info { background: #e9eef4; color: var(--navy); border: 2px solid var(--navy); }
.course-state { display: flex; align-items: flex-start; gap: .5rem; margin: 0; font-weight: 600; color: var(--muted); }
.course-on { color: var(--green); }
select { min-height: 44px; max-width: 320px; padding: .45rem .8rem; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 8px; }
.schedule { display: flex; flex-direction: column; gap: .6rem; margin-top: .75rem; }
.session { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .5rem 1rem; margin: 0; padding: .75rem 1rem;
  border: 2px solid #d6d2c8; border-radius: 10px; background: #fff; }
.session legend { padding: 0 .3rem; font-weight: 700; }
.session label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.session input { min-height: 44px; width: 100%; padding: .4rem .6rem; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 8px; }
@media (max-width: 720px) {
  .session { grid-template-columns: 1fr 1fr; }
  .session label:first-of-type { grid-column: 1 / -1; }
}

/* Group papers */
.paper-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.paper-list li { display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.paper-list a { font-weight: 600; }
.eyebrow { margin: 0 0 .25rem; font-size: .9rem; font-weight: 700; color: var(--green); }
.paper { max-width: 760px; line-height: 1.65; }
.paper h2 { margin-top: 1.25rem; }
.paper h2:first-child { margin-top: 0; }
.paper p { margin: 0 0 .9rem; }
.sign { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; margin: 1.75rem 0 .5rem; }
.sign-field { display: flex; flex-direction: column; gap: .2rem; min-width: 12rem; flex: 1 1 14rem; max-width: 22rem; }
.sign-field:nth-child(2) { flex: 0 1 10rem; min-width: 8rem; }
.sign-line { display: block; height: 2rem; border-bottom: 2px solid var(--ink); }

/* Quizzes (teacher proofreading view). The correct answer is marked with words and an icon, never by color alone. */
.quiz-tiles { margin-bottom: 1rem; }
.question { max-width: 860px; }
.question h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: 1.1rem; }
.question h4 { margin: 1rem 0 .4rem; font-size: 1rem; }
.q-text { margin: 0 0 .75rem; font-size: 1.05rem; font-weight: 600; }
.options { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.option { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem .8rem; background: #fff; border: 2px solid #d6d2c8; border-radius: 10px; }
.option-correct { border-color: var(--green); background: #e3eee8; }
.opt-key { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .4rem; border-radius: 8px; background: var(--navy); color: var(--on-dark); font-weight: 700; flex: none; }
.opt-text { flex: 1 1 14rem; }
.correct-tag { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--green); white-space: nowrap; }
.why { margin: .5rem 0 0; color: var(--ink); }
.match, .rank { margin: .25rem 0 .5rem; padding-left: 1.75rem; }
.match li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-bottom: .75rem; }
.match li > strong { flex: 0 0 100%; }
.match-to { display: inline-flex; align-items: center; gap: .5rem; }
.match .why { flex: 0 0 100%; }
.rank li { padding: .25rem 0; }

/* Page references on the quiz review screen */
.ref-form { margin: .9rem 0 0; padding: .75rem .9rem; background: #fff; border: 2px dashed #d6d2c8; border-radius: 10px; }
.ref-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.ref-line input[type="text"] { width: 10rem; min-height: 44px; }
.ref-basis { margin: .4rem 0 0; }
.ref-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.ref-buttons .button { min-height: 44px; padding: .4rem 1rem; }
.ref-ok { display: flex; align-items: center; gap: .4rem; margin: .6rem 0 0; color: var(--green); font-weight: 600; }
.badge .icon { width: 16px; height: 16px; margin-right: .15rem; }
.ref-shared { border-style: solid; background: #f4f2ec; }
.ref-label { font-weight: 600; }

/* Group Zoom details and private notes */
textarea { width: 100%; max-width: 760px; min-height: 8rem; padding: .6rem .8rem; font: inherit; line-height: 1.5; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 8px; resize: vertical; }
input[type="url"] { width: 100%; max-width: 560px; min-height: 44px; padding: .55rem .8rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 8px; -webkit-appearance: none; appearance: none; }
.panel .stack input[type="text"], .panel .stack input[type="url"] { max-width: 560px; }

/* Student pages */
.student-main { margin: 0 auto; max-width: 900px; }
.login-card input[readonly] { background: #eceae3; color: var(--muted); }

/* Students (teacher) */
.student-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.student-row { display: grid; grid-template-columns: minmax(10rem, 1.2fr) minmax(12rem, 1.4fr) minmax(8rem, 1.4fr) auto; gap: .25rem 1rem; align-items: center;
  padding: .75rem 1rem; background: var(--card); border: 2px solid transparent; border-radius: 10px; color: var(--ink); text-decoration: none; }
.student-row:hover { border-color: var(--navy); }
.student-name { font-weight: 700; }
.link-panel { border: 2px solid var(--green); }
.link-url { width: 100%; max-width: 100%; margin: .5rem 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
@media (max-width: 720px) { .student-row { grid-template-columns: 1fr; } }

.member-list { list-style: none; margin: .25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.member-list a { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

/* Student quizzes: answers are marked with words and an icon, never by color alone. */
.quiz-q { border: 2px solid var(--line); }
.quiz-q legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 700; padding: 0 .4rem; }
.match-defs { margin-bottom: 1rem; }
.match-rows { display: flex; flex-direction: column; gap: .6rem; }
.match-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
.match-row label { flex: 1 1 14rem; }
.match-row select { flex: 1 1 14rem; min-height: 44px; max-width: 100%; }
.result { padding: .75rem 1rem; margin: .6rem 0; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
.result-right { border-color: var(--green); background: #e3eee8; }
.result-wrong { border-color: var(--purple); background: var(--purple-bg); }
.result-state { display: flex; align-items: center; gap: .4rem; margin: 0 0 .4rem; }
.result-h { margin: 0 0 .5rem; font-size: 1.1rem; }
.home-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Quiz one question at a time: hidden questions use the hidden attribute, so they leave the page for screen readers too. */
.quiz-q[hidden], .step-nav[hidden], [data-step-submit][hidden], [data-step-next][hidden], [data-step-back][hidden] { display: none; }
.step-status { font-weight: 700; }
.encourage { font-size: 1.1rem; }

/* Student home: this week, and the path through the eight weeks */
.group-home { margin-bottom: 2rem; }
.group-home h2 { display: flex; align-items: center; gap: .75rem; }
.this-week { border: 2px solid var(--navy); }
.this-week h3 { margin-top: 0; }
.path { list-style: none; margin: 0 0 1rem; padding: 0; }
.path-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1.1rem; margin-bottom: .6rem; }
.path-now { border: 2px solid var(--navy); }
.path-closed { background: #f0eee9; color: var(--muted); border-style: dashed; }
.path-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.path-body { margin-top: .5rem; }
.path-bar { display: block; width: 100%; max-width: 420px; height: 14px; margin-top: .4rem; }
.inline { display: inline; }

/* ---- Student home: one screen (Eliza chose this layout, 2026-10-17) ---- */
.stu-hi { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: 1rem; }
.stu-hi h1 { margin: 0; }
.stu-nextup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: var(--on-dark);
  border-radius: 16px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 1px 2px rgba(42, 54, 64, .12), 0 6px 18px rgba(42, 54, 64, .08); }
.stu-nextup small { display: block; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; opacity: .9; }
.stu-nextup .stu-group { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.stu-nextup b { display: block; font-size: 1.3rem; margin: .1rem 0; }
.stu-nextup span { display: block; }
.stu-go { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem 1.4rem; border-radius: 999px; background: #f2f5f7; color: #2b4663;
  font-weight: 700; text-decoration: none; border: 2px solid #f2f5f7; transition: transform .15s, box-shadow .15s, background .15s; }
.stu-go:hover, .stu-go:focus-visible { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.stu-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.stu-bb { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; background: var(--card); color: var(--ink); text-decoration: none; border-radius: 16px;
  padding: 1.1rem 1.2rem; min-height: 128px; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(42, 54, 64, .12), 0 6px 18px rgba(42, 54, 64, .08);
  transition: transform .18s, box-shadow .18s, background .18s, color .18s; }
.stu-bb .icon { width: 2rem; height: 2rem; color: var(--navy); }
.stu-bb b { font-size: 1.1rem; }
.stu-bb span { color: var(--muted); font-size: .92rem; line-height: 1.3; }
.stu-bb:hover, .stu-bb:focus-visible { background: var(--navy); color: var(--on-dark); transform: translateY(-4px); box-shadow: 0 12px 26px rgba(42, 54, 64, .25); }
.stu-bb:hover .icon, .stu-bb:focus-visible .icon, .stu-bb:hover span, .stu-bb:focus-visible span { color: var(--on-dark); }
.stu-panel { background: var(--card); border-radius: 16px; padding: 1.1rem 1.3rem; margin-bottom: 1.25rem; box-shadow: 0 1px 2px rgba(42, 54, 64, .12), 0 6px 18px rgba(42, 54, 64, .08); }
.stu-panel h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.stu-light { font-weight: 400; color: var(--muted); }
.stu-weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: .5rem; list-style: none; padding: 0; margin: .4rem 0 .75rem; }
.stu-wk { display: flex; flex-direction: column; align-items: center; gap: .2rem; text-decoration: none; color: var(--ink); padding: .5rem .1rem; border-radius: 12px;
  border: 2px solid transparent; font-size: .85rem; font-weight: 600; text-align: center; transition: background .15s, border-color .15s, transform .15s; }
.stu-lock { color: #5d6872; }
a.stu-wk:hover, a.stu-wk:focus-visible { background: #dfe9f2; border-color: var(--navy); transform: translateY(-2px); }
.stu-meter { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 12px; border: 0; border-radius: 99px; background: #d8d4c8; overflow: hidden; }
.stu-meter::-webkit-progress-bar { background: #d8d4c8; border-radius: 99px; }
.stu-meter::-webkit-progress-value { background: var(--green); border-radius: 99px; }
.stu-meter::-moz-progress-bar { background: var(--green); border-radius: 99px; }
.stu-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .95rem; margin-top: .4rem; }
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .4), 0 1px 2px rgba(42, 54, 64, .25); }
  padding: .5rem .65rem; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 3; }
.stu-link { font-weight: 700; color: var(--navy); }
.stu-mini { font: 600 .95rem var(--font); min-height: 40px; padding: .3rem .9rem; border-radius: 999px; border: 2px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; transition: background .15s; }
.stu-mini:hover, .stu-mini:focus-visible { background: #dfe9f2; }
.week-done { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--soft); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.stu-theme { margin: 0 0 .6rem; font-weight: 600; }
.stu-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; padding: 0; margin: .5rem 0 0; }
.stu-step { counter-increment: step; background: #fff; border: 2px solid var(--soft); border-radius: 14px; padding: .8rem 1rem; transition: border-color .15s, transform .15s; }
.stu-step:hover { border-color: var(--navy); transform: translateY(-2px); }
.stu-step h3 { font-size: 1rem; margin: 0 0 .4rem; display: flex; align-items: center; gap: .6rem; }
.stu-step h3::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--on-dark); font-weight: 800; font-size: .9rem; }
.stu-step ul { margin: 0; padding-left: 1.2rem; }
.stu-step li { margin-bottom: .25rem; font-size: .95rem; }
.stu-more { margin-top: .35rem; }
.stu-more summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: .3rem 0; list-style: none; }
.stu-more summary::-webkit-details-marker { display: none; }
.stu-more summary::before { content: "+ "; }
.stu-more[open] summary { font-size: 0; }
.stu-more[open] summary::before { font-size: .95rem; content: "- Show fewer"; }
.stu-more summary:hover, .stu-more summary:focus-visible { text-decoration: underline; }
@media (max-width: 820px) { .stu-weeks { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .stu-big { grid-template-columns: 1fr; } .stu-bb { min-height: 0; } }
@media (prefers-reduced-motion: reduce) {
  .stu-go, .stu-bb, .stu-wk, .stu-mini, .stu-step { transition: none; }
  .stu-go:hover, .stu-go:focus-visible, .stu-bb:hover, .stu-bb:focus-visible, a.stu-wk:hover, a.stu-wk:focus-visible, .stu-step:hover { transform: none; }
}
.stu-locknote { margin: 0 0 .4rem; }
.stu-locknote .icon { width: 16px; height: 16px; }

/* Student materials: two separate parts on one page */
.mat-jump { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.25rem; }
.mat-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 2px solid var(--navy); font-weight: 700; text-decoration: none; transition: background .15s; }
.mat-jump a:hover, .mat-jump a:focus-visible { background: #dfe9f2; }
.mat-part { background: var(--card); border-radius: 16px; padding: 1.1rem 1.4rem 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 1px 2px rgba(42, 54, 64, .12), 0 6px 18px rgba(42, 54, 64, .08); }
.mat-part .mat-title { font-size: 1.4rem; margin: 0 0 .5rem; padding-bottom: .5rem; border-bottom: 3px solid var(--navy); }
.mat-part h3 { font-size: 1.05rem; margin: 1.1rem 0 .5rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .mat-jump a { transition: none; } }
.stu-plan-link { font-size: .95rem; margin-left: .5rem; white-space: nowrap; }

/* Each week is an achievement: a ring that fills as the reading and the quiz are done, and a green medal when both are */
.stu-rule { margin: 0 0 .25rem; }
.stu-medal { position: relative; width: 56px; height: 56px; display: block; }
.stu-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.stu-disc { position: absolute; inset: 6px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--soft); }
.stu-disc .icon { width: 22px; height: 22px; }
.stu-done .stu-disc { background: radial-gradient(circle at 30% 25%, #6f9b88, #46695a); color: #fff; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .4), 0 2px 6px rgba(42, 54, 64, .3); }
.stu-now .stu-disc { background: var(--navy); color: #fff; box-shadow: none; }
.stu-lock .stu-disc { background: #e6e3da; color: #5d6872; }
.stu-state { font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.stu-done .stu-state { color: var(--green); font-weight: 800; }
.stu-state span { display: block; }

/* Zoom recordings on the group page */
.rec-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.panel .rec-list li { margin: 0; }
.rec-week { min-width: 0; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.rec-head svg { flex: none; }
.rec-more { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.rec-more summary { cursor: pointer; font-weight: 700; color: var(--navy); min-height: 44px; display: flex; align-items: center; }
.rec-more summary:hover { text-decoration: underline; }
.rec-more summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.rec-up { display: grid; gap: .6rem; margin-top: .5rem; }
.rec-up input[type="file"] { min-height: 44px; width: 100%; max-width: 100%; min-width: 0; }
.rec-up progress { width: 100%; max-width: 480px; height: 1.1rem; }
.rec-status { min-height: 1.4em; margin: 0; }
.rec-video { width: 100%; max-height: 70vh; background: #1f2830; border-radius: 10px; }
.tile-wait { cursor: default; }
.tile-wait:hover { border-color: transparent; }

/* Week boxes on the group page: two across on a phone, so nothing needs sideways scrolling */
.week { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Eliza's note on the student home page */
.stu-note-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .25rem 0 .5rem; font-size: 1.05rem; }

/* ---- A student's display choices ("Display" page). They are saved in the account and arrive as attributes on <html>. ---- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1rem; }

/* Text size: everything is sized in rem, so the whole page grows together. */
html[data-text="1"] { font-size: 112.5%; }
html[data-text="2"] { font-size: 131.25%; }
html[data-text="3"] { font-size: 150%; }
html[data-text] .content { overflow-wrap: break-word; }
html[data-text="2"] .stu-weeks, html[data-text="3"] .stu-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-text="1"] .stu-weeks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html[data-text="3"] .stu-big { grid-template-columns: minmax(0, 1fr); }

/* Easy-to-read spacing and letters */
html[data-ease] body { font-family: Verdana, Tahoma, "Atkinson Hyperlegible", "Trebuchet MS", Arial, sans-serif; line-height: 1.8; letter-spacing: .04em; word-spacing: .1em; }
html[data-ease] :is(button, input, select, textarea) { letter-spacing: inherit; word-spacing: inherit; }
html[data-ease] p, html[data-ease] li, html[data-ease] dd { margin-bottom: .9em; }
html[data-ease] .content { overflow-wrap: break-word; }

/* High contrast, stronger outlines, bigger buttons */
html[data-contrast] { --bg: #fff; --card: #fff; --ink: #000; --muted: #1b1b1b; --navy: #0a2a57; --green: #0b4a2a; --purple: #4b2d78; --purple-bg: #fff; --line: #000; --on-dark: #fff; --soft: #000; }
html[data-contrast] a { text-decoration: underline; text-underline-offset: .15em; }
html[data-contrast] a.stu-go, html[data-contrast] a.tile, html[data-contrast] a.stu-bb, html[data-contrast] a.brand, html[data-contrast] a.stu-wk, html[data-contrast] .button { text-decoration: none; }
html[data-contrast] :focus-visible { outline: 4px solid #000; outline-offset: 3px; box-shadow: 0 0 0 7px #fff; }
html[data-contrast] .band :focus-visible, html[data-contrast] .stu-nextup :focus-visible { outline-color: #fff; box-shadow: 0 0 0 7px #000; }
html[data-contrast] :is(.panel, .stu-panel, .mat-part, .tile, .stu-bb, .stu-step, .choice, .rec-week, .stu-nextup, .notice) { border: 2px solid #000; box-shadow: none; }
html[data-contrast] .button, html[data-contrast] .stu-go, html[data-contrast] .stu-mini { min-height: 52px; }
html[data-contrast] .stu-lock, html[data-contrast] .stu-lock .stu-disc, html[data-contrast] .stu-state, html[data-contrast] .stu-light { color: #000; }
html[data-contrast] .stu-lock .stu-disc { background: #fff; box-shadow: inset 0 0 0 2px #000; }

/* Plain page: one column in reading order, nothing decorative */
html[data-plain] :is(.tile-icon, .doc-thumb, .stu-ring, .login-mark, .icon[aria-hidden="true"]) { display: none; }
html[data-plain] :is(.tiles, .stu-big, .stu-weeks, .stu-steps, .rec-list, .weeks) { grid-template-columns: minmax(0, 1fr); }
html[data-plain] .student-main { max-width: 46rem; }
html[data-plain] :is(.stu-panel, .mat-part, .stu-bb, .stu-step, .tile) { box-shadow: none; border: 2px solid var(--line); background: var(--card); }
html[data-plain] .stu-nextup { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
html[data-plain] .stu-nextup .stu-go { background: var(--navy); color: var(--on-dark); border-color: var(--navy); }
html[data-plain] .stu-bb:hover, html[data-plain] .stu-bb:focus-visible { background: var(--card); color: var(--ink); }
html[data-plain] .stu-bb:hover span, html[data-plain] .stu-bb:focus-visible span { color: var(--muted); }
html[data-plain] .stu-disc { box-shadow: none; border: 2px solid var(--line); }

/* No movement: also what "Plain page" does */
html[data-calm] *, html[data-calm] *::before, html[data-calm] *::after,
html[data-plain] *, html[data-plain] *::before, html[data-plain] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
html[data-calm] :is(.stu-go, .stu-bb, .stu-wk, .stu-mini, .stu-step):is(:hover, :focus-visible),
html[data-plain] :is(.stu-go, .stu-bb, .stu-wk, .stu-mini, .stu-step):is(:hover, :focus-visible) { transform: none !important; }
html[data-text] .stu-plan-link { white-space: normal; }

/* The quiz editor */
.q-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid #d6d2c8; }
.q-tools form { margin: 0; }
.q-tools button:disabled { opacity: .45; cursor: default; }
.edit-form { max-width: 860px; }
.edit-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.edit-field p { margin: 0; }
.edit-field input[type="text"] { max-width: 100%; }
.edit-choices { border: 0; margin: 0 0 1rem; padding: 0; }
.edit-choices legend { font-weight: 700; margin-bottom: .4rem; padding: 0; }
.edit-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; margin-bottom: .8rem; padding: .7rem .8rem; background: var(--card); border-radius: 10px; }
.edit-row input[type="text"] { max-width: 100%; }
.edit-tick { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.edit-tick input { width: 22px; height: 22px; accent-color: var(--navy); flex: none; }
.edit-pair { margin-bottom: 1rem; padding: .8rem; background: var(--card); border-radius: 10px; }
.edit-pair .edit-field { margin-bottom: .6rem; }
.edit-pair .edit-field:last-child { margin-bottom: 0; }
.versions { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.versions li { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; padding: .6rem .8rem; background: #fff; border: 2px solid #d6d2c8; border-radius: 10px; }
.version-gist { overflow-wrap: anywhere; }

/* Footer on student pages */
.foot { padding: 1rem 1.5rem 2rem; text-align: center; }
.foot a { font-weight: 600; }
