:root {
  --page: #F3F5F8;
  --card: #FFFFFF;
  --border: #DCE2EA;
  --border-strong: #B8C4D6;
  --topbar: #14213D;
  --ink: #14213D;
  --muted: #4B5563;
  --text2: #374151;
  --body: #1F2937;
  --primary: #2457A6;
  --primary-dark: #163A73;
  --track: #E6EBF1;
  --green: #1F6E54;
  --soft: #F6F8FB;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--topbar); color: #fff; }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: #D6DEEB; text-decoration: none; padding: 10px 14px; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.14); font-weight: 600; }
.totals {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 6px;
  color: #D6DEEB; text-decoration: none; font-size: 14px; background: rgba(255,255,255,0.08); white-space: nowrap;
}
.topbar-end { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.totals:hover { color: #fff; background: rgba(255,255,255,0.14); }
.totals strong { color: #FFD27A; font-weight: 700; }
.totals .t-more { display: inline-flex; gap: 6px; align-items: center; }
.totals .t-sep { opacity: .6; }
@media (max-width: 900px) { .totals .t-more { display: none; } }
.namemenu { position: relative; }
.namebtn {
  color: #fff; background: transparent; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6px; padding: 9px 14px; min-height: 44px; cursor: pointer;
}
.namebtn:hover { background: rgba(255,255,255,0.08); }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px;
  background: #fff; color: var(--ink); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20,33,61,0.16); padding: 6px;
}
.menu[hidden] { display: none; }
.menu button, .menu a {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px;
  border-radius: 6px; cursor: pointer; min-height: 44px; color: var(--ink); text-decoration: none;
}
.menu button:hover, .menu a:hover { background: var(--soft); }
.menu .menu-note { font-size: 13px; color: var(--muted); padding: 6px 12px; }

.subbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgba(20,33,61,0.06); }
.subbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.back { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.q-pager { justify-content: space-between; margin-top: 8px; }
.q-pager .btn { gap: 6px; }
.q-pager [data-fwd] { margin-left: auto; }
.subbar-nav { display: flex; gap: 4px; margin-left: auto; }
.subbar-nav a { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border); }
.subbar-nav a:hover { background: var(--soft); }
.subbar-title { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.subbar-title .kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.subbar-title .name { font-weight: 700; font-size: 18px; }

.demo-banner {
  background: #FEF3C7; color: #78350F; font-size: 14px; text-align: center; padding: 8px 16px;
  border-bottom: 1px solid #F5D98B;
}

/* ---------- Layout ---------- */
.page {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start;
}
.page.narrow { max-width: 1100px; padding-top: 28px; }
.page.stack { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card.big { border-radius: 14px; padding: 32px 40px 36px; gap: 22px; }
.card h2 { margin: 0; font-size: 18px; font-weight: 700; }
.card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.display { margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.1; }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
p { margin: 0; }
.prose p + p { margin-top: 10px; }
h2.section { margin: 0; font-size: 20px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.dashed-top { border-top: 1px dashed var(--border); padding-top: 14px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ol.numbered { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Chips ---------- */
.chip {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap; color: #374151; background: #E6EBF1;
}
.chip.upper { text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; min-width: 64px; text-align: center; }
.chip-mastered { color: #166534; background: #DCFCE7; }
.chip-due { color: #92400E; background: #FEF3C7; }
.chip-ready { color: #1E40AF; background: #DBEAFE; }
.chip-learning { color: #2457A6; background: #E8EFFA; }
.chip-locked { color: #374151; background: #E6EBF1; }
.chip-poem { color: #5B2A86; background: #F1E8FA; }
.chip-done { color: #166534; background: #DCFCE7; }
.tag-verify { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #92400E; background: #FEF3C7; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; color: #fff; background: var(--primary); border: 1px solid var(--primary);
  border-radius: 8px; padding: 10px 18px; min-height: 44px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.secondary { color: var(--primary); background: #fff; border-color: var(--border-strong); font-weight: 600; }
.btn.secondary:hover { background: var(--soft); color: var(--primary-dark); }
.btn.outline { color: var(--primary); background: #fff; border-color: var(--primary); font-weight: 600; }
.btn.outline:hover { background: var(--soft); }
.btn.good { background: var(--green); border-color: var(--green); }
.btn.good:hover { background: #17533F; }
.btn.warn { color: #92400E; background: #fff; border-color: #E5C07B; font-weight: 600; }
.btn.warn:hover { background: #FFFBEB; }
.btn.danger { color: #991B1B; background: #fff; border-color: #FCA5A5; font-weight: 600; }
.btn.danger:hover { background: #FEF2F2; }
.btn.pill { border-radius: 999px; padding: 10px 20px 10px 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; font-weight: 600; }

/* ---------- Progress ---------- */
.bar { height: 12px; background: var(--track); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; background: var(--primary); border-radius: 6px; }
.bar.thin { height: 8px; border-radius: 4px; }
.bar.thin > div { background: var(--green); border-radius: 0; }
.meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.meter span { height: 8px; border-radius: 4px; background: var(--border); }
.meter span.on { background: var(--green); }

/* ---------- Today ---------- */
.task {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.task-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task-title { font-weight: 700; font-size: 17px; }
.task-detail { font-size: 14px; color: var(--muted); }
.task-xp { font-size: 14px; color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.task.done { background: #FAFBFC; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stats h2 { grid-column: 1 / -1; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--muted); }
.week-card .terms { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.week-card .terms li { font-size: 13px; background: var(--soft); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.reading { font-size: 15px; }
.reading .label { font-size: 13px; color: var(--muted); }
.reading .where { color: var(--text2); }
.reading .note { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Lesson ---------- */
.passage { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px 28px; }
.passage figcaption { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.passage p { font-family: var(--serif); font-size: 21px; line-height: 1.6; }
/* Keep the line breaks in poem passages. */
.passage p, .example .ex-passage { white-space: pre-line; }
fieldset.choices { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
fieldset.choices legend { font-weight: 700; font-size: 19px; margin-bottom: 12px; padding: 0; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; min-height: 44px; cursor: pointer;
}
.choice:hover { border-color: var(--border-strong); }
.choice input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.choice.is-correct { background: #ECF7F1; border: 2px solid var(--green); padding: 13px 15px; }
.choice.is-correct span { font-weight: 600; }
.choice.is-wrong { background: #FEF2F2; border: 2px solid #DC2626; padding: 13px 15px; }
.choice.answered { cursor: default; }
.feedback { border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.feedback .head { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.feedback.correct { background: #ECF7F1; border: 1px solid #A7D7BF; }
.feedback.correct .head { color: #166534; }
.feedback.wrong { background: #FEF2F2; border: 1px solid #FCA5A5; }
.feedback.wrong .head { color: #991B1B; }
.feedback .why { color: var(--body); }
.lesson-card p { font-size: 15px; color: var(--body); }
.example { background: var(--soft); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.example .ex-passage { font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.callout { border-radius: 12px; padding: 18px 20px; background: #E8EFFA; border: 1px solid #C7D7F0; }

/* ---------- Skill map ---------- */
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; align-items: start; }
.unit-col { display: flex; flex-direction: column; gap: 10px; }
.unit-col > header { display: flex; flex-direction: column; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.unit-col h2 { margin: 0; font-size: 17px; font-weight: 700; }
.skill {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px; text-align: left; width: 100%; color: var(--ink);
  text-decoration: none;
}
a.skill:hover { border-color: var(--primary); color: var(--ink); }
.skill.locked { background: #F7F9FB; }
.skill .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.skill .title { font-weight: 700; font-size: 16px; }
.skill.locked .title { color: var(--text2); }
.skill .note { font-size: 13.5px; color: var(--muted); }
.skill-readings { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed var(--border); padding-top: 6px; font-size: 13.5px; color: var(--text2); }
.skill-readings .label { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.skill-readings .reading .note { font-size: 12.5px; }
.unit-texts { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ---------- Treasury ---------- */
.poem-toggles .small-btn { min-height: 44px; padding: 10px 16px; font-size: inherit; }
.poem-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.recording { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.recording[hidden] { display: none; }
.recording audio { width: 100%; }
.about { background: var(--soft); border-radius: 10px; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; max-width: 68ch; }
.poem-text { font-family: var(--serif); font-size: 23px; line-height: 1.65; display: flex; flex-direction: column; gap: 22px; padding-left: 4px; }
.poem-text .stanza { display: flex; flex-direction: column; }
.poem-text .line { display: block; }
.poem-text.picking .line {
  font: inherit; text-align: left; background: transparent; border: 1px dashed transparent; border-radius: 6px;
  padding: 0 6px; margin-left: -7px; cursor: pointer; color: var(--ink);
}
.poem-text.picking .line:hover { border-color: var(--border-strong); background: var(--soft); }
.poem-text.picking .line[aria-pressed="true"] { background: #F1E8FA; border-color: #C9A8E6; }
textarea, input[type="text"], input[type="email"], input[type="number"], select {
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 12px; background: #fff; color: var(--ink);
  min-height: 44px; width: 100%;
}
textarea { resize: vertical; }
blockquote.saved { margin: 0; font-family: var(--serif); font-size: 18px; font-style: italic; border-left: 3px solid var(--border); padding-left: 12px; }
blockquote.saved .src { display: block; font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--muted); }
.stanza-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.status-line { font-size: 14px; color: var(--muted); min-height: 1.5em; }

/* ---------- Recite ---------- */
.rounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; font-size: 13px; font-weight: 600; }
.round-tab {
  font: inherit; display: flex; flex-direction: column; gap: 6px; color: var(--muted); text-align: left;
  background: transparent; border: 0; border-radius: 6px; padding: 4px 4px 8px; min-height: 44px; cursor: pointer;
}
.round-tab:hover { background: var(--soft); }
.round-tab .bar { height: 6px; border-radius: 3px; background: var(--border); }
.round-tab.done { color: #166534; }
.round-tab.done .bar { background: var(--green); }
.round-tab.now { color: var(--ink); background: #E8EFFA; }
.round-tab.now .bar { background: var(--primary); }
.stanza-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.stanza-tab {
  display: flex; flex-direction: column; min-height: 44px; justify-content: center; padding: 6px 14px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none;
}
.stanza-tab .name { font-weight: 700; font-size: 15px; }
.stanza-tab .state { font-size: 13px; color: var(--muted); }
.stanza-tab:hover { border-color: var(--primary); color: var(--ink); }
.stanza-tab.now { border: 2px solid var(--primary); padding: 5px 13px; background: #E8EFFA; }
@media (max-width: 560px) {
  .rounds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.recite-lines { font-family: var(--serif); font-size: 26px; line-height: 1.6; display: flex; flex-direction: column; gap: 4px; }
.recite-lines .gap { height: 14px; }
.rline {
  font: inherit; color: var(--ink); text-align: left; background: transparent;
  border: 1px dashed var(--border-strong); border-radius: 8px; padding: 6px 12px; cursor: pointer; letter-spacing: 0.02em;
}
.rline.shown { background: #ECF7F1; border: 1px solid #A7D7BF; letter-spacing: 0; }
.rline.plain { border-color: transparent; cursor: default; }
.rline.hidden-line { color: var(--muted); font-family: var(--sans); font-size: 16px; }

/* ---------- Teacher ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text2); }
.error { color: #991B1B; font-size: 14px; }
.ok { color: #166534; font-size: 14px; }
.student-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.student-row:last-child { border-bottom: 0; }
.mini-map { display: flex; flex-direction: column; gap: 6px; }
.mini-map .item { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 22px; max-width: min(520px, calc(100vw - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(20,33,61,0.4); }

/* ---------- Sign-in ---------- */
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.signin-card { max-width: 460px; width: 100%; text-align: center; align-items: center; padding: 36px 32px; gap: 16px; }
.google-btn { background: #fff; color: #1F1F1F; border: 1px solid #747775; font-weight: 600; }
.google-btn:hover { background: #F8FAFF; color: #1F1F1F; border-color: #747775; }

@media (max-width: 640px) {
  .topbar-inner, .subbar-inner { padding: 10px 16px; }
  .subbar-nav { order: 1; }
  .subbar-title { order: 2; flex-basis: 100%; }
  .subbar-nav a { padding: 0 10px; }
  .page { padding: 20px 16px 40px; gap: 20px; }
  .card { padding: 16px; }
  .card.big { padding: 22px 18px 24px; }
  .display { font-size: 32px; }
  .poem-text { font-size: 20px; }
  .recite-lines { font-size: 21px; }
  .passage { padding: 18px; }
  .passage p { font-size: 19px; }
  .rounds { font-size: 11px; }
  .nav a { padding: 8px 10px; }
}
[tabindex="-1"]:focus { outline: none; }
/* Wrapped poem lines get a hanging indent, as in print. */
.poem-text .line { padding-left: 1.4em; text-indent: -1.4em; }
.poem-text.picking .line { padding-left: calc(1.4em + 6px); }

/* ---------- Readings with in-app texts (English 2 Free) ---------- */
.read-link { font-weight: 600; white-space: nowrap; }
.text-soon { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.skill-stretch { position: relative; }
.skill-stretch:hover, .skill-stretch:focus-within { border-color: var(--primary); }
.skill-link::after { content: ''; position: absolute; inset: 0; border-radius: 10px; }
.skill-link:focus-visible { outline: none; }
.skill-link:focus-visible::after { outline: 3px solid #F2B705; outline-offset: 2px; }
.skill-stretch .read-link { position: relative; z-index: 1; }

/* ---------- Reader ---------- */
.reader { max-width: 760px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.reader-head { display: flex; flex-direction: column; gap: 6px; }
.reader-head .byline { color: var(--text2); font-size: 17px; }
.reader-text { font-family: var(--serif); font-size: 21px; line-height: 1.65; color: var(--body); max-width: 66ch; }
.reader-text h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0 0 18px; color: var(--ink); }
.reader-text p { margin: 0 0 1em; }
.reader-text p.lines { white-space: pre-line; }
.chapters summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.chapters ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 2px; }
.chapters a { display: block; padding: 8px 0; }
.chapters a[aria-current] { font-weight: 700; color: var(--ink); }
.chapter-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 20px; }
.chapter-nav .next { margin-left: auto; }
@media (max-width: 640px) {
  .reader { padding: 20px 16px 48px; }
  .reader-text { font-size: 19px; }
}

/* ---------- Writing ---------- */
.prompt, .pre { white-space: pre-line; }
.prompt { font-family: var(--serif); font-size: 19px; line-height: 1.5; }
.writing-box { font-family: var(--serif); font-size: 19px; line-height: 1.6; padding: 14px 16px; min-height: 140px; }
textarea#w-text { min-height: 50vh; }
.writing-box[readonly] { background: var(--soft); color: var(--body); }
.writing-foot { border-top: 1px dashed var(--border); padding-top: 10px; }
.writing-foot .status-line { min-height: 0; }
.warn-text { color: #92400E; }
.writing-list .student-row { padding: 10px 0; }
.callout.returned { background: #FFFBEB; border-color: #F5D98B; }
.submitted-text { white-space: pre-wrap; font-family: var(--serif); font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.answer-block { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.answer-block h3 { font-size: 15px; }
fieldset.rubric-row { margin: 0; padding: 0 0 10px; border: 0; border-bottom: 1px solid var(--border); min-width: 0; }
fieldset.rubric-row legend { padding: 0; margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill input + span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; font-weight: 700;
}
.pill.wide input + span { min-width: 120px; }
.pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid #F2B705; outline-offset: 2px; }

/* Claude feedback: coaching panel and suggested scores. */
.coach-panel { border-left: 4px solid #7C5CBF; }
.coach-entry { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.coach-entry .pre { margin: 0; overflow-wrap: anywhere; }
.coach-earlier summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--primary); }
.coach-earlier .coach-entry { margin-top: 8px; }
.suggest-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.suggest-box .status-line { min-height: 0; }
.callout.suggest-note { background: #F3EFFB; border-color: #D6CAF0; padding: 12px 14px; font-size: 14px; }
.suggest-reason { margin: 6px 0 0; color: #4C3A80; overflow-wrap: anywhere; }
fieldset.suggested .pill input:checked + span { background: #5B3FA0; border-color: #5B3FA0; }
textarea.suggested { border-color: #9C85D6; }

/* The tutor ("Talk it over"): a column beside the writing on a laptop,
   below it at phone width. */
.writing-editor { max-width: 900px; padding-top: 28px; }
.writing-editor.has-tutor { max-width: 1280px; }
.tutor-col { flex: 1 1 380px; position: sticky; top: 96px; }
.tutor-col[hidden], .notice-tutor[hidden] { display: none; }
.tutor-panel { border-left: 4px solid #2F6F8F; }
.tutor-head h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.tutor-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tutor-panel .tutor-thread { max-height: min(56vh, 560px); overflow-y: auto; padding: 2px 4px 2px 0; }
.tutor-thread:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }
.msg { border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; max-width: 94%; }
.msg p { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.msg-who { font-size: 13px; font-weight: 700; color: #1F4E66; }
.msg-at { font-weight: 400; color: var(--muted); }
.msg-tutor { background: #EEF5F8; border: 1px solid #CFE0E8; align-self: flex-start; }
.msg-student { background: #F1F4FA; border: 1px solid #D5DDEB; align-self: flex-end; }
.msg-student .msg-who { color: #163A73; }
.msg-wait { background: #EEF5F8; border: 1px solid #CFE0E8; align-self: flex-start; }
.msg-wait p { color: var(--muted); font-style: italic; }
.tutor-form { display: flex; flex-direction: column; gap: 6px; }
.tutor-form textarea { width: 100%; }
.tutor-log-wrap { flex-basis: 100%; }
.tutor-log summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--primary); font-weight: 600; font-size: 14px; }
.tutor-log .tutor-thread { margin: 4px 0 8px; }
.tutor-class { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.tutor-class h3 { font-size: 15px; }
.task-readings h2 { font-size: 13px; font-weight: 600; }
.task-readings .read-link { margin-left: 4px; }
@media (max-width: 960px) {
  .tutor-col { position: static; }
  .tutor-panel .tutor-thread { max-height: none; }
}

/* Print: only the print sheet (title, student, date, text, grade, comments). */
.print-sheet { display: none; }
@media print {
  body { background: #fff; }
  .topbar, .subbar, .demo-banner, .skip-link, main > :not(.print-sheet) { display: none !important; }
  main { display: block !important; padding: 0 !important; max-width: none !important; }
  .print-sheet { display: block; color: #000; font-family: Georgia, 'Newsreader', serif; font-size: 12pt; line-height: 1.6; }
  .print-sheet h1 { font-size: 18pt; margin: 0 0 4pt; }
  .print-sheet h2 { font-size: 13pt; margin: 18pt 0 4pt; }
  .print-sheet h3 { font-size: 12pt; margin: 12pt 0 2pt; }
  .print-sheet .ps-meta { font-family: Arial, sans-serif; font-size: 10pt; color: #333; margin-bottom: 10pt; }
  .print-sheet .ps-prompt { font-style: italic; margin-bottom: 12pt; white-space: pre-line; }
  .print-sheet .ps-text { white-space: pre-wrap; margin: 0 0 8pt; }
  .print-sheet .ps-grade { border-top: 1px solid #000; margin-top: 18pt; }
}

/* ---------- Library ---------- */
.shelf { display: flex; flex-direction: column; gap: 10px; }
.shelf-head { display: flex; flex-direction: column; gap: 2px; }
.shelf h2 { margin: 0; font-size: 21px; font-weight: 700; font-family: var(--serif); }
.shelf-row {
  list-style: none; margin: 0; padding: 2px 2px 10px; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 260px); gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
}
.shelf-row > li { scroll-snap-align: start; display: flex; min-width: 0; }
.shelf-row.wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); overflow: visible; }
.work-card {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none;
}
a.work-card:hover { border-color: var(--primary); color: var(--ink); }
.work-card.book { background: var(--soft); }
.wc-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; }
.wc-kind { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.wc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wc-title { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.25; }
.wc-by { font-size: 14px; color: var(--text2); }
.wc-why { font-size: 14px; color: var(--primary-dark); font-weight: 600; }
.wc-where { font-size: 13.5px; color: var(--text2); }
.wc-hook { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--body); border-top: 1px dashed var(--border); padding-top: 6px; margin-top: auto; }
.fold:not(.open) .shelf-row { grid-auto-flow: column; overflow-x: auto; }
.fold.open .shelf-row { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); overflow: visible; }
.shelf-extra { border-top: 1px solid var(--border); padding-top: 18px; }
.week-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 6px 16px; }
.week-list a { display: flex; gap: 8px; min-height: 44px; align-items: center; text-decoration: none; padding: 4px 8px; border-radius: 8px; }
.week-list a:hover { background: #fff; }
.week-list a[aria-current] { background: #E8EFFA; font-weight: 700; }
.week-list .wk-n { font-weight: 700; white-space: nowrap; min-width: 66px; color: var(--ink); }
.week-list .wk-t { color: var(--text2); }
.go-on { gap: 14px; }
.arrival { background: #FFF8E6; border: 1px solid #F1DDA6; border-radius: 10px; padding: 10px 14px; color: #5B4300; }
.arrival a { color: #6B3E00; }
.tools-at-work li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool-name { font-weight: 700; }
.serif-title { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.poem-day .poem-hook { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.55; display: flex; flex-direction: column; border-left: 3px solid #E8D8B0; padding-left: 14px; }
.keep-up .ku-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.keep-up .ku-row:first-child { border-top: 0; padding-top: 0; }
.goal-small { gap: 8px; }
.trail { gap: 10px; }
.trail-step { font-size: 15px; line-height: 1.5; }
.record { display: flex; flex-direction: column; gap: 8px; }
.record h3 { margin-top: 6px; }
.poem-list li { line-height: 1.6; }

/* ---------- Tastes and marks ---------- */
.taste { display: flex; flex-direction: column; gap: 16px; }
.taste-intro { border-radius: 12px; background: #FBF6EA; border: 1px solid #EEE2C4; }
.taste-intro > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 18px; }
.taste-intro > summary::-webkit-details-marker { display: none; }
.taste-intro > summary::before { content: '▸'; color: #8A6B2E; transition: transform .15s; }
.taste-intro[open] > summary::before { transform: rotate(90deg); }
.taste-intro > summary h2 { margin: 0; color: #8A6B2E; }
.taste-intro .taste-lead { margin: 0; padding: 0 18px 16px; color: #4A3B1F; font-style: italic; font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif; }
.subbar-meta { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 10px; white-space: normal; }
.subbar-meta [data-read-pct] { font-weight: 700; color: #2457A6; font-variant-numeric: tabular-nums; }
.taste-lead { font-family: var(--serif); font-size: 20px; line-height: 1.55; color: var(--ink); max-width: 66ch; }
.reader-text.excerpt { border-left: 3px solid #E8D8B0; padding-left: 18px; }
.excerpt-where { font-family: var(--sans); }
mark.famous { background: none; cursor: text; color: inherit; }
.glosses-on mark.famous { background: #FBEFCB; color: inherit; border-radius: 3px; padding: 0 1px; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.glosses-on mark.famous:hover, .glosses-on mark.famous[aria-expanded="true"] { background: #F6DF9C; }
/* Devices are marked with the glosses: when Glosses are off, the text is clean. */
.glosses-on .device { text-decoration: underline dotted #7A5B00; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.glosses-on .device:hover, .glosses-on .device[aria-expanded="true"] { background: #F3EDE0; }
.mark-note {
  font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--body); background: #FFFBEF;
  border: 1px solid #EBD9A6; border-radius: 10px; padding: 10px 14px; margin: -0.4em 0 1em;
}
.poem-text .mark-note { margin: 4px 0 8px; }
.mark-note.in-para { margin: 6px 0 8px; font-style: normal; font-weight: 400; white-space: normal; }
.mn-kind { font-weight: 700; color: #6B4A00; margin-right: 4px; }
.famous-list blockquote.saved { white-space: pre-line; }
.about-fold summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--primary); }
.about-fold p { max-width: 66ch; }
.reader-tools { gap: 16px; }
.finish-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.reader-text.picking p { cursor: default; }
.sentence {
  font: inherit; color: inherit; background: transparent; border: 1px dashed transparent; border-radius: 6px;
  padding: 0 2px; text-align: left; cursor: pointer; display: inline;
}
.sentence:hover { border-color: var(--border-strong); background: var(--soft); }
.sentence[aria-pressed="true"] { background: #F1E8FA; border-color: #C9A8E6; }
.save-sheet { position: sticky; bottom: 12px; box-shadow: 0 8px 24px rgba(20,33,61,0.18); }

/* Poem page: rhyme letters in the margin and scansion under the line. */
.poem-toggles .btn[aria-pressed="true"] { background: #E8EFFA; border-color: var(--primary); }
.poem-text .line-wrap { display: block; position: relative; }
.rhyme-letter { display: none; }
.show-rhyme .rhyme-letter {
  display: inline-block; position: absolute; left: -1.6em; width: 1.2em; text-align: right;
  font-family: var(--sans); font-size: 14px; font-weight: 700; color: #8A5A00; top: 0.35em;
}
.show-rhyme .rhyme-letter.unrhymed { color: var(--muted); font-weight: 400; }
.show-rhyme { padding-left: 1.9em; }
.scan-line { display: none; }
.show-scan .scan-line {
  display: table; font-family: var(--sans); font-size: 14px; letter-spacing: 0.02em; color: #14532D;
  background: #E3F5EA; border-left: 3px solid #2F8F6B; border-radius: 0 6px 6px 0; padding: 2px 10px; margin: 2px 0 6px 1.4em;
}
.show-scan .scan-line strong { color: #0B3D24; }
.meter-key { font-weight: 400; }
[data-meter]:not([hidden]) { color: #14532D; background: #E3F5EA; border-radius: 10px; padding: 4px 10px; font-weight: 600; }
@media (max-width: 640px) {
  .shelf-row { grid-auto-columns: minmax(210px, 78%); }
  .taste-lead { font-size: 18px; }
}

/* ---------- Classes menu ---------- */
.classmenu .menu { left: 0; right: auto; min-width: 270px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; }
@media (max-width: 640px) { .classmenu .menu { left: auto; right: 0; } }
.classmenu .menu a[aria-current] { font-weight: 700; background: var(--soft); }
.classmenu .menu .chip { margin-left: 6px; }

/* ---------- About card, glosses, sections ---------- */
.about-card { background: var(--soft); border-radius: 10px; padding: 4px 18px; max-width: 70ch; }
.about-card > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.about-card .about-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 14px; }
.about-card .great { font-size: 17px; line-height: 1.5; color: var(--ink); }
.about-card .about-text { color: var(--body); }
.gloss { text-decoration: none; }
.glosses-on .gloss { text-decoration: underline dotted #9AA7B8; text-decoration-thickness: 1px; text-underline-offset: 5px; cursor: help; }
.glosses-on .gloss:hover, .glosses-on .gloss[aria-expanded="true"] { background: #EEF2F7; }
.small-btn { min-height: 36px; padding: 6px 12px; font-size: 14px; }
[data-gloss-toggle][aria-pressed="true"] { background: #E8EFFA; border-color: var(--primary); }
.lengths { color: var(--text2); }
.toc { margin: 4px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 2px; }
.toc li { padding: 2px 0; }
.toc a, .toc .linkbtn { display: inline-block; padding: 6px 0; text-align: left; text-decoration: none; font-weight: 500; }
.sec-sub { font-weight: 400; }
.sec-sub.ours { color: var(--muted); font-style: italic; margin-left: 0.5em; }
.sec-sub.ours::before { content: '· '; font-style: normal; }
.sec-toggle { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: inline-flex; gap: 8px; align-items: baseline; }
.sec-toggle::after { content: '▾'; font-size: 0.6em; color: var(--muted); }
.sec-toggle[aria-expanded="false"]::after { content: '▸'; }
.landed { background: #FBEFCB; border-radius: 4px; transition: background 2s; }
.skill-actions { position: relative; z-index: 1; display: flex; gap: 14px; font-size: 14px; font-weight: 600; padding-top: 2px; }
.skill-actions a { min-height: 32px; display: inline-flex; align-items: center; }
.passage mark.focus { cursor: default; }
.passage-source { display: block; margin-top: 10px; color: var(--muted); font-family: var(--sans); }
.activity-row { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; }
.activity-row:first-child { border-top: 0; padding-top: 0; }
.tracks-h { font-family: var(--serif); font-size: 26px; margin-top: 10px; }

/* The Treasury's home: a placard for every poem. */
ul.placards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.placard {
  display: flex; flex-direction: column; gap: 6px; height: 100%; box-sizing: border-box; text-decoration: none;
  background: #FFFBEF; color: var(--ink); border: 1px solid #EBD9A6; border-top: 5px solid #B8862B; border-radius: 12px; padding: 16px 18px;
}
.placard:hover { background: #FFF5DA; color: var(--ink); }
.placard.is-today { border-color: #B8862B; box-shadow: 0 0 0 2px #B8862B inset; }
.pl-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.pl-line { font-family: var(--serif); font-style: italic; font-size: 16px; color: #5B4A1E; line-height: 1.4; }
.pl-by { font-size: 13px; color: var(--muted); margin-top: auto; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* The page header stays at the top while scrolling, so anything scrolled to
   ("Keep reading from here", the contents, a landed line) stops below it. */
main [id], .reader-text p, .reader-text section { scroll-margin-top: 140px; }

/* The whole Library: a row of buttons, one per shelf. */
.shelf-chips { gap: 8px; flex-wrap: wrap; }
.shelf-chips .chip-count { font-size: 12px; font-weight: 600; color: #6B7280; margin-left: 2px; }
.work-card[hidden], section.shelf[hidden] { display: none; }
.shelf-chips .btn[aria-pressed="true"] { background: #E8EEF9; border-color: #2457A6; }
.menu a.menu-head { font-size: 13px; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.menu a.menu-head:hover { color: var(--ink, #14213D); }
.menu .menu-note-inline { display: block; font-size: 12px; color: var(--muted); }
ul.plain.treasury-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.treasury-grid .treasury-card { display: flex; flex-direction: column; gap: 2px; }
.treasury-grid .chip { align-self: flex-start; margin-top: 8px; }
.treasury-sub { font-family: var(--serif, Georgia, serif); font-style: italic; color: var(--muted); margin: 2px 0 0; }
ul.plain.track-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
[data-grouping][hidden] { display: none; }
.lib-nav .btn[aria-current="page"] { background: var(--ink, #14213D); color: #FFFFFF; border-color: var(--ink, #14213D); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-sub { font-family: var(--serif); font-style: italic; font-size: 13px; color: #C9D3E6; }
@media (max-width: 720px) { .brand-sub { display: none; } }
.lib-welcome { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); margin: 6px 0 0; max-width: 62ch; }
/* A full-width title row above a page's columns: the title, and the Library buttons beside it. */
.page-top { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* ---------- Lamplight (name menu): the same app, a century earlier ----------
   Warm parchment and walnut instead of cool grey and navy, oxblood links,
   a book serif for the text, old-style figures. Only colours and type change. */
html.lamplight {
  --page: #EFE6D3;
  --card: #FBF6EB;
  --border: #DDCFB2;
  --border-strong: #C2AE88;
  --topbar: #2B1D14;
  --ink: #2A1E15;
  --muted: #6B5A45;
  --text2: #4B3D2E;
  --body: #2E2419;
  --primary: #7A2E1E;
  --primary-dark: #57200F;
  --track: #E7DCC4;
  --green: #4E6B2F;
  --soft: #F5EDDC;
  --sans: 'Newsreader', Georgia, serif;
}
html.lamplight body {
  background: radial-gradient(ellipse at 50% -10%, #FBF3E2 0%, #EFE6D3 45%, #E5D8BD 100%) fixed;
  font-size: 17px; font-variant-numeric: oldstyle-nums;
}
html.lamplight .topbar { background: linear-gradient(#2B1D14, #24180F); border-bottom: 2px solid #8A6B2E; }
html.lamplight .nav a, html.lamplight .totals { color: #E9DBBF; }
html.lamplight .brand-sub { color: #D9C49A; }
html.lamplight .menu, html.lamplight .subbar, html.lamplight .task, html.lamplight .choice,
html.lamplight .skill, html.lamplight .passage, html.lamplight .work-card, html.lamplight .stanza-tab,
html.lamplight .pill input + span, html.lamplight textarea, html.lamplight input[type="text"],
html.lamplight input[type="email"], html.lamplight input[type="number"], html.lamplight select,
html.lamplight .btn.secondary, html.lamplight .btn.outline, html.lamplight .btn.warn, html.lamplight .btn.danger,
html.lamplight .week-list a:hover { background: var(--card); }
html.lamplight .card, html.lamplight .work-card, html.lamplight .task { box-shadow: 0 1px 0 rgba(90,60,20,0.06), 0 6px 18px rgba(90,60,20,0.06); }
html.lamplight .display, html.lamplight h1, html.lamplight h2 { letter-spacing: 0.005em; }
html.lamplight .eyebrow { color: #8A5A10; }
html.lamplight .lib-nav .btn[aria-current="page"] { background: #2B1D14; border-color: #2B1D14; color: #F6E7C1; }
html.lamplight .chip { filter: sepia(0.35); }
html.lamplight :focus-visible { outline-color: #B8860B; }

/* ---------- Quill & Ink (name menu): darker and more archaic than Lamplight ----------
   Candlelit stone, vellum cards with a double gold rule, wax-seal red, tarnished
   gold lettering, the Fell types (1670s). Our own look. One theme at a time. */
html.quill {
  --page: #1A1611; --card: #EFE3C6; --border: #B89B62; --border-strong: #8E7340;
  --topbar: #100E0B; --ink: #2A1A0E; --muted: #5E4A33; --text2: #45331F; --body: #2A1A0E;
  --primary: #7E1618; --primary-dark: #5C0F10; --track: #D9C79E; --green: #3E5A2A; --soft: #E6D6B2;
  --serif: 'IM Fell English', Georgia, serif; --sans: 'IM Fell DW Pica', 'IM Fell English', Georgia, serif;
}
html.quill body {
  background: radial-gradient(ellipse at 50% 0%, #3A3024 0%, #221C15 40%, #120F0B 100%) fixed;
  color: var(--body); font-size: 18px; font-variant-numeric: oldstyle-nums;
}
html.quill .topbar { background: linear-gradient(#0E0C09, #17130E); border-bottom: 1px solid #B08D3C; box-shadow: 0 3px 0 #0E0C09, 0 4px 0 #B08D3C; }
html.quill .brand-name { font-family: 'IM Fell English SC', serif; letter-spacing: .02em; color: #E9D29A; font-size: 25px; }
html.quill .brand-sub { color: #B9A06A; font-family: 'IM Fell English', serif; }
html.quill .nav a, html.quill .totals { color: #DCC79A; font-family: 'IM Fell English', serif; font-size: 18px; }
html.quill .nav a[aria-current="page"] { background: rgba(176,141,60,.18); color: #F2DFA6; }
html.quill .totals strong { color: #E9C46A; }
html.quill .namebtn, html.quill .classbtn, html.quill [data-class-toggle] { border-color: #8E7340 !important; color: #E9D29A !important; }
html.quill .page-head h1, html.quill .display { font-family: 'IM Fell English SC', serif; font-weight: 400; color: #F0DFAF; text-shadow: 0 1px 0 #000, 0 0 18px rgba(233,196,106,.18); letter-spacing: .01em; }
html.quill .page-head .eyebrow { color: #C9A85C; font-family: 'IM Fell English SC', serif; letter-spacing: .14em; }
html.quill .page-head p, html.quill .lib-welcome { color: #D8C59A; }
html.quill .card, html.quill .task, html.quill .work-card, html.quill .passage, html.quill .skill, html.quill .choice, html.quill .menu {
  background: radial-gradient(ellipse at 30% 20%, #F5EBD2 0%, #EADBB8 60%, #DCC79A 100%);
  border: 1px solid #8E7340; box-shadow: inset 0 0 0 3px #EFE3C6, inset 0 0 0 4px #B89B62, inset 0 0 40px rgba(120,80,20,.25), 0 10px 26px rgba(0,0,0,.55);
  color: var(--body);
}
html.quill .card h2, html.quill .card .display, html.quill .work-card h3, html.quill .card h3 { font-family: 'IM Fell English SC', serif; font-weight: 400; color: #3B1F0E; text-shadow: none; }
html.quill .card .eyebrow, html.quill .eyebrow { color: #7E1618; font-family: 'IM Fell English SC', serif; letter-spacing: .12em; }
html.quill .poem-day h2::first-letter, html.quill .card .display::first-letter { color: #7E1618; font-size: 1.25em; }
html.quill .btn { background: radial-gradient(circle at 35% 30%, #A3282A, #6E1112); border-color: #4F0C0C; color: #F2DFA6; font-family: 'IM Fell English SC', serif; letter-spacing: .04em; box-shadow: 0 2px 0 #3A0808, inset 0 1px 0 rgba(255,255,255,.18); }
html.quill .btn.secondary, html.quill .btn.outline { background: transparent; color: #7E1618; border-color: #8E7340; box-shadow: none; }
html.quill .lib-nav .btn.secondary { background: rgba(239,227,198,.08); color: #E9D29A; border-color: #8E7340; }
html.quill .lib-nav .btn[aria-current="page"] { background: #E9D29A; color: #2A1A0E; border-color: #E9D29A; }
html.quill .shelf-chips .btn { background: rgba(239,227,198,.08); color: #E9D29A; border-color: #8E7340; box-shadow:none; font-family:'IM Fell English',serif; }
html.quill .shelf-chips .chip-count { color: #B9A06A; }
html.quill a { color: #7E1618; }
html.quill .page > .page-top a, html.quill main > a, html.quill .section a { color: #E3C77C; }
html.quill h2.section, html.quill h2.section a { color: #EAD7A2; font-family: 'IM Fell English SC', serif; font-weight: 400; }
html.quill .small.muted, html.quill p.small { color: inherit; }
html.quill .chip { filter: sepia(.7) saturate(.7); }
html.quill .poem-hook, html.quill .poem-text { font-family: 'IM Fell English', serif; font-size: 1.08em; }
html.quill .subbar { background: #17130E; border-bottom: 1px solid #8E7340; }
html.quill .subbar, html.quill .subbar a, html.quill .subbar h1, html.quill .subbar span { color: #E9D29A; }
html.quill .shelf-head h2, html.quill .shelf-head h2 a { color: #EAD7A2; font-family: 'IM Fell English SC', serif; font-weight: 400; }
html.quill .shelf-head p, html.quill .shelf > p, html.quill .shelf > a, html.quill main > p { color: #CBB687; }
html.quill .shelf > a, html.quill .shelf a.small { color: #E3C77C; }
html.quill .work-card .chip, html.quill .chip { background: #E4D2A6; color: #5C0F10; border-color: #B89B62; filter: none; }
html.quill .shelf-head p.small.muted { color: #CBB687; }
html.quill main a { color: #E3C77C; }
html.quill main .card a, html.quill main .work-card, html.quill main .work-card a, html.quill main .task a, html.quill .menu a { color: #7E1618; }
html.quill main .btn:not(.secondary):not(.outline) { color: #F2DFA6; }
html.quill main .card .btn.secondary, html.quill main .card .btn.outline, html.quill main .card button.btn.secondary { color: #7E1618; background: rgba(255,250,235,.4); }
html.quill .taste, html.quill .taste-intro, html.quill details.taste-intro { background: rgba(255,250,235,.55) !important; border-color: #C8AE78 !important; }

/* Top bar: today's tally and the class's percent done. */
.totals .t-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.totals.t-course { gap: 8px; }
.totals .t-bar { display: inline-block; width: 56px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.18); overflow: hidden; }
.totals .t-bar > span { display: block; height: 100%; background: #FFD27A; }
a.namebtn, a.namebtn:visited { text-decoration: none; display: inline-flex; align-items: center; color: #fff; }
a.namebtn:hover { color: #fff; }
/* Today: the week's XP as bars. */
.xp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 120px; margin: 4px 0 2px; }
.xp-week .xw-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.xp-week .xw-col span.b { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: var(--primary); min-height: 2px; }
.xp-week .xw-col.today span.b { background: #E0A82E; }
.xp-week .xw-col small { font-size: 12px; color: var(--muted); }
.xp-week .xw-col .v { font-size: 12px; font-weight: 700; color: var(--ink); }
.course-bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.course-bar > span { display: block; height: 100%; background: #E0A82E; }
table.history { width: 100%; border-collapse: collapse; }
table.history th, table.history td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
table.history .h-bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--primary); vertical-align: middle; margin-right: 6px; }
.coming-card { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); border-style: dashed; }
.coming-card:hover { border-color: var(--primary); }
.lib-search input { min-width: 200px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--ink); }
.lib-search.big input { width: 100%; max-width: 640px; font-size: 19px; padding: 12px 16px; }
ul.search-list li { padding: 6px 0; }

/* Geography terms (#/geography) */
ul.plain.geo-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.geo-week { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.geo-week.later { opacity: .7; }
ul.plain.geo-terms { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.geo-term { display: flex; align-items: center; gap: 8px; }
.geo-term .dot { width: 9px; height: 9px; border-radius: 50%; background: #CBD3DE; flex: none; }
.geo-term.s-learning .dot { background: #2457A6; }
.geo-term.s-due .dot { background: #D97706; }
.geo-term.s-known .dot { background: #16A34A; }
ul.plain.geo-sum { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; }
ul.plain.geo-sum li { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.geo-card legend { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.geo-prompt.is-term { font-family: var(--serif, Newsreader, Georgia, serif); font-size: 34px; font-weight: 600; color: var(--ink, #14213D); }
.geo-prompt.is-def { font-family: var(--serif, Newsreader, Georgia, serif); font-size: 21px; line-height: 1.45; color: var(--ink, #14213D); }

/* A question and its answers on one screen (lessons, reviews, Jump in). */
.page.q-page { padding-top: 14px; gap: 22px; }
.q-page .col-main { gap: 12px; }
.q-page .passage { padding: 14px 20px; }
.q-page .passage figcaption { font-size: 12px; margin-bottom: 4px; }
.q-page .passage p { font-size: 18px; line-height: 1.5; }
.q-page .passage-source { margin-top: 6px; }
.q-page fieldset.choices { gap: 7px; }
.q-page fieldset.choices legend { font-size: 17px; margin-bottom: 6px; }
.q-page .choice { padding: 9px 14px; min-height: 40px; }
.q-page .choice.is-correct, .q-page .choice.is-wrong { padding: 8px 13px; }
.q-page .choice input { margin-top: 2px; }
.q-page [data-answer] > .row { margin-top: 8px !important; }
.q-page .feedback { padding: 10px 16px; gap: 4px; }
.q-page .feedback .why { font-size: 15px; line-height: 1.45; }
/* The lesson card stays beside the question and scrolls on its own. */
@media (min-width: 900px) {
  .q-page .col-side { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow-y: auto; }
}
/* Where a quoted passage comes from. */
.passage-source { font-style: italic; }
.q-split, .q-work { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1000px) {
  .q-split.long { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .q-split.long .passage p { font-size: 17px; line-height: 1.45; }
  .q-page .col-side.below { flex-basis: 100%; position: static; max-height: none; }
}
.passage p.passage-ref { font-family: var(--sans); font-style: italic; font-size: 14px; line-height: 1.4; color: var(--muted); margin: 0 0 6px; white-space: normal; }
.q-page .passage p.passage-ref, .q-split.long .passage p.passage-ref { font-size: 14px; line-height: 1.4; }

/* Folding sections on reading pages: Why read it, What to notice, Notice. */
.fold-card > summary, .fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.fold-card > summary::-webkit-details-marker, .fold > summary::-webkit-details-marker { display: none; }
.fold-card > summary::before, .fold > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.fold-card[open] > summary::before, .fold[open] > summary::before { transform: rotate(90deg); }
.fold-card > summary h2, .fold-card > summary h3 { margin: 0; }
.fold-card[open] > summary { margin-bottom: 8px; }
.fold > summary { font-weight: 600; color: var(--link, #2457A6); min-height: 36px; font-size: 15px; }
.fold .fold-body p { margin: 6px 0 0; }
.notice-eyebrow { color: #1E40AF; }
.notice-q { font-size: 18px; font-weight: 600; margin-top: 0; }
.fold-hint { margin-left: 4px; }
.why-card .why-h { margin: 0 0 6px; }
.why-card .blurb { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.4; color: var(--ink); margin: 0 0 4px; padding-left: 14px; border-left: 3px solid #C9A24A; }

/* "Put on my shelf": a ribbon at the top right of a reading. */
.shelf-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.shelf-btn:hover { background: var(--soft); }
.shelf-btn[aria-pressed="true"] { color: #8A2A2A; border-color: #E2C2C2; background: #FBF1F1; }
html.lamplight .shelf-btn[aria-pressed="true"], html.quill .shelf-btn[aria-pressed="true"] { background: transparent; color: #B8892E; border-color: #B8892E; }
@media (max-width: 720px) { .subbar .shelf-btn span { display: none; } .subbar .shelf-btn { order: 1; } }

/* The history menu beside the back button: where he has been this sitting. */
.back-wrap { display: inline-flex; align-items: center; gap: 2px; }
.nav-history { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.nav-history .nav-more, .nav-history .nav-back { min-height: 44px; min-width: 32px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.nav-history .nav-more:hover, .nav-history .nav-back:hover { background: rgba(127,127,127,.14); }
.topbar .nav-history { color: #fff; margin-right: 4px; }
.nav-history .nav-menu { left: 0; right: auto; top: 100%; min-width: 260px; max-width: 360px; }
.nav-history .nav-menu a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Reading layout: the text column, the outline beside a long work, and
   Side by side (passage on one side, everything about it on the other). */
.read-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.reader.with-outline, .reader.split { max-width: 1180px; }
.outline-col { display: none; }
.outline { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.outline .eyebrow { color: #2457A6; }
.outline-list { margin: 0; padding-left: 1.4em; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.outline-list li.here > a { font-weight: 700; color: var(--ink); }
.outline-list .toc-go { text-align: left; }
.dogs { margin: 4px 0 6px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.dogs li { display: flex; align-items: center; gap: 6px; }
.dogs a { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.dogs a:hover { text-decoration: underline; }
.dog-mark, .reader-text p.dogeared::before { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 9px 9px 0 0; border-color: #B5532E transparent transparent transparent; }
.reader-text p.dogeared { position: relative; }
.reader-text p.dogeared::before { content: ''; position: absolute; left: -22px; top: 6px; }
@media (min-width: 1000px) {
  .reader.with-outline { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: 40px; justify-content: center; align-items: start; }
  .reader.with-outline .outline-col { display: block; position: sticky; top: var(--sticky-top, 96px); max-height: calc(100vh - var(--sticky-top, 96px) - 16px); overflow-y: auto; }
  .reader.with-outline .chapters, .reader.split .chapters { display: none; }
  .reader.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr); gap: 32px; align-items: start; }
  .reader.split .read-col, .reader.split .side-col { position: sticky; top: var(--sticky-top, 96px); max-height: calc(100vh - var(--sticky-top, 96px) - 16px); overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; }
  .reader.split .side-col { display: flex; flex-direction: column; gap: 20px; }
  .reader.split .reader-text { max-width: none; }
}
@media (max-width: 999px) {
  .split-toggle { display: none; }
  .reader.split .side-col { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
}

/* Glosses in the margin: each gloss written out at the left of its line, each
   device or famous line named; tap one for its full note. */
.glosses-margin { position: relative; }
.margin-layer { position: absolute; top: 0; right: calc(100% + 18px); width: 200px; height: 100%; pointer-events: none; }
.mnote { position: absolute; right: 0; width: 100%; text-align: left; pointer-events: auto; cursor: pointer; font: 13px/1.35 var(--sans, inherit); color: var(--body); background: #F4F6FA; border: 1px solid #DCE2EC; border-radius: 10px 10px 2px 10px; padding: 5px 9px; font-style: normal; white-space: normal; }
.mnote .mn-kind { font-weight: 700; color: var(--ink); }
.mnote-device { background: #F7F1E3; border-color: #E6D8B6; }
.mnote-famous { background: #FBEFCB; border-color: #EBD48E; }
.mnote:hover { filter: brightness(0.97); }
.reader.margin-mode:not(.split) { max-width: 1000px; }
.reader.margin-mode:not(.split):not(.with-outline) .read-col { padding-left: 220px; }
.reader.margin-mode.with-outline { grid-template-columns: minmax(0, 980px) 240px; }
.reader.margin-mode.with-outline .read-col, .reader.split.margin-mode .read-col { padding-left: 220px; }
.reader.margin-mode.with-outline { max-width: 1300px; }
.poem-text.glosses-margin { margin-left: 210px; }
@media (max-width: 999px) {
  .margin-inline { display: flex; flex-wrap: wrap; gap: 6px; margin: -0.4em 0 1em; }
  .margin-inline .mnote { position: static; width: auto; }
  .reader.margin-mode .read-col, .reader.margin-mode.with-outline .read-col { padding-left: 0; }
  .poem-text.glosses-margin { margin-left: 0; }
}
html.lamplight .mnote, html.quill .mnote { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.12); color: inherit; }
.gloss-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.reader.split.margin-mode { max-width: 1400px; }
.outline-fold > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.outline-fold .outline { margin-top: 6px; }
@media (min-width: 1000px) { .reader.with-outline .outline-fold, .reader.split .outline-fold { display: none; } }

/* A Tool's anchor passage, and a writing task's working passage. */
.anchor-card { margin: 0; padding: 16px 18px; border-radius: 10px; background: #FBF6EA; border: 1px solid #EEE2C4; display: flex; flex-direction: column; gap: 8px; }
.anchor-card .eyebrow { color: #8A6B2E; }
.anchor-passage { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.55; white-space: pre-line; color: var(--body); }
.anchor-hl { background: #F6DF9C; color: inherit; border-radius: 3px; padding: 0 1px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.task-passage .reader-text { font-size: 19px; max-width: none; }
html.lamplight .anchor-card, html.quill .anchor-card { background: rgba(255,255,255,0.35); border-color: rgba(0,0,0,0.12); }

/* Middle school: only works marked all or middle-up show. */
html.middle-school .work-card[data-level="high"] { display: none; }
[data-middle-school][aria-pressed="true"] { background: var(--soft); }

/* Questions on a Taste excerpt; the line a question is about, highlighted. */
.xq-card { display: flex; flex-direction: column; gap: 10px; }
.xq-q { font-size: 18px; font-weight: 600; margin: 4px 0; }
.xq-card .choices { display: flex; flex-direction: column; gap: 8px; }
.xq-feedback { background: var(--soft); border-radius: 8px; padding: 10px 12px; }
::highlight(xq-focus) { background-color: #CFE3FF; }
.xq-focus-el { background: #E3EEFF; border-radius: 4px; }
.xq-card button.choice { text-align: left; font: inherit; color: inherit; width: 100%; }

/* The sound of it: meter, rhyme, rhythm, scanned lines, parallelism. */
.sound-card p { margin: 6px 0; }
.scan-list, .par-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.scan-pair { display: flex; flex-direction: column; margin: 0; font-family: var(--serif); }
.scan-orig { font-size: 17px; }
.scan-marked { font-size: 15px; letter-spacing: .02em; color: #1F5C3A; }
.scan-marked strong { color: #0B3D24; }
.par { display: grid; grid-template-columns: 2.2em 1fr; gap: 6px; }
.par-v { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; padding-top: 2px; }
.par-a, .par-b { margin: 0; font-family: var(--serif); font-size: 17px; }
.par-b { padding-left: 1.6em; }
.par-kind { color: #8A6B2E; }

/* Track banners and honours: the posy, Scholar, Scholar with Distinction. */
.track-banner { grid-column: 1 / -1; width: 100%; display: flex; gap: 28px; flex-wrap: wrap; background: #5C1F2A; color: #FDF6EC; border-radius: 14px; padding: 26px 30px; box-shadow: inset 0 0 0 3px #C9A24A; }
.track-banner a:not(.btn) { color: #F6DF9C; }
.track-banner .btn.secondary { background: transparent; color: #FDF6EC; border-color: #E9D29A; }
.tb-main { flex: 2 1 420px; display: flex; flex-direction: column; gap: 10px; }
.tb-side { flex: 1 1 240px; background: rgba(255,255,255,0.08); border-radius: 10px; padding: 14px 16px; }
.tb-side ul { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.tb-side li span { display: block; color: #EADFCB; }
.tb-small { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #E9D29A; }
.tb-title { font-family: var(--serif); font-size: 34px; margin: 0; color: #fff; }
.tb-hook { font-family: var(--serif); font-style: italic; font-size: 21px; margin: 0; }
.tb-blurb { margin: 0; max-width: 70ch; line-height: 1.55; }
.honours-card { display: flex; flex-direction: column; gap: 14px; }
.honours-card .tier { border-top: 1px dashed var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.honours-card .tier h3 { margin: 0; }
.honours-list { margin: 4px 0 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px; }
.honours-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; max-width: 320px; }
.honours-bar span { display: block; height: 100%; background: #C9A24A; }
.posy-context { font-style: italic; color: var(--muted); margin: 0 0 8px; }
.posy-piece { display: flex; flex-direction: column; gap: 8px; }
.posy-piece h2 { margin: 0; }
.so-far { background: #FBF6EA; border: 1px solid #EEE2C4; border-radius: 10px; padding: 14px 18px; }
.so-far h2 { margin: 0 0 6px; color: #8A6B2E; }
.so-far p { margin: 0; }
.honours-sub { font-family: var(--serif); font-size: 22px; margin: 8px 0 0; }
.quick-qs { display: flex; flex-direction: column; gap: 14px; }
.quick-q { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.quick-q legend { font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.quick-q .choices { display: flex; flex-direction: column; gap: 8px; }
.quick-q button.choice { text-align: left; font: inherit; color: inherit; width: 100%; }
html.lamplight .track-banner, html.quill .track-banner { box-shadow: inset 0 0 0 3px #B8892E; }
.posy-piece > .btn, .posy-piece > .chip { align-self: flex-start; }
.honours-sec { font-family: var(--serif); font-size: 20px; margin: 18px 0 10px; }

/* The teacher's class ticks: any number of classes per student. */
.class-ticks { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.class-ticks legend { font-weight: 600; padding: 0 4px; }
.tick-group { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.tick-group > .tiny { width: 100%; }
.class-tick { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 15px; }

/* "View as …": the band at the top while a teacher sees the app as a student. */
.viewas-band { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: #5B3FA8; color: #fff; font-size: 15px; text-align: center; }
.viewas-band .btn { background: #fff; color: #3D2A75; border-color: #fff; }
