/* AMCAI Learn — mobile-first. */
:root {
  --navy: #07101e;
  --navy-2: #0f1c33;
  --gold: #d9b450;
  --gold-dark: #8a6d1c;
  --text: #1a2230;
  --soft: #4a5468;
  --bg: #f6f8fc;
  --card: #ffffff;
  --border: #e3e8f0;
  --blue: #1d4ed8;
  --green: #11643a;
  --green-bg: #e8f6ee;
  --amber: #8a5300;
  --amber-bg: #fff6e0;
  --red: #a4161a;
  --red-bg: #fdecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(7, 16, 30, .06), 0 4px 16px rgba(7, 16, 30, .05);
  --edge: var(--navy);          /* the outline every box wears, the same navy as the current Section tile */
  --edge-w: 2px;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--blue);
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.1rem); }
h2 { font-size: clamp(1.2rem, 1rem + 1vw, 1.45rem); }
p { margin: 0 0 1em; }
code { font-size: .9em; background: #eef1f6; padding: .1em .35em; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--navy); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: .5rem; }
.muted { color: var(--soft); }
.small { font-size: .9rem; }
.hint { color: var(--soft); font-size: .95rem; margin: 0 0 .5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--gold-dark); margin: 0 0 .25rem; }
.inline-form { display: inline; margin: 0; }
.stack { display: grid; gap: .75rem; }
.stack label { display: grid; gap: .25rem; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=number], select, textarea {
  font: inherit; padding: .55rem .7rem; border: 1px solid #b9c2d3; border-radius: 8px; background: #fff; width: 100%; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.5; }

/* Top bar */
.topbar { background: var(--navy); color: #fff; position: relative; z-index: 20; }
.topbar__inner { max-width: 1120px; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; }
.brand__word { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; }
.topbar__nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .95rem; }
.topbar__link { color: #fff; }
.topbar__link--main {
  display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .85rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.topbar__link--main:hover { background: rgba(255,255,255,.12); }
.topbar__link--main.is-current { background: #fff; color: var(--navy); border-color: #fff; }
.topbar__study {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .3rem .85rem;
  border-radius: 999px; background: var(--gold); color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.topbar__study:hover { background: #e6c46a; }
.topbar__who { color: #c9d2e3; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-banner { background: var(--amber-bg); color: var(--amber); text-align: center; font-size: .9rem; padding: .4rem 1rem; border-bottom: 1px solid #f0d9a0; }
main { max-width: 1120px; margin: 0 auto; padding: 1rem; outline: none; }
.footer { text-align: center; color: var(--soft); font-size: .85rem; padding: 2rem 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .6rem 1.1rem; border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
}
.btn--primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--primary:hover { background: #e6c46a; }
.btn--secondary { background: #fff; color: var(--navy); border-color: #b9c2d3; }
.btn--secondary:hover { border-color: var(--navy); }
.btn--quiet { background: transparent; color: var(--blue); text-decoration: underline; padding-left: .5rem; padding-right: .5rem; }
.btn--on-dark { color: #fff; }
.btn--sm { min-height: 40px; padding: .4rem .8rem; font-size: .95rem; }
.btn--lg { padding: .8rem 1.4rem; font-size: 1.1rem; }
.btn--xl { padding: 1rem 1.5rem; font-size: 1.2rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .6; cursor: progress; }

/* Cards, flashes, chips */
.card { background: var(--card); border: var(--edge-w) solid var(--edge); border-radius: var(--radius); padding: 1.25rem; margin: 0 0 1rem; }
.flashes { margin-bottom: 1rem; }
.flash { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 .5rem; border: var(--edge-w) solid; }
.flash--info { background: #eaf1ff; border-color: #173a8a; color: #173a8a; }
.flash--error { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.flash--warn { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.flash p:last-child { margin: 0; }
.chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: #eef1f6; color: var(--soft); }
.chip--active { background: #eaf1ff; color: #173a8a; }
.chip--done { background: var(--green-bg); color: var(--green); }
.tag { display: inline-block; margin-left: .5rem; padding: 0 .45rem; border-radius: 6px; background: #eef1f6; color: var(--soft); font-size: .75rem; text-transform: uppercase; }

/* Sign in */
.signin { max-width: 440px; margin: 2rem auto; text-align: center; }
.lede { font-size: 1.1rem; color: var(--soft); }
.preview-signin { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--border); text-align: left; }
.preview-signin h2 { font-size: 1.05rem; }
.preview-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }

/* Course home */
.hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border: 0; padding: 1.5rem; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; }
.hero__progress { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .5rem 0 1.25rem; }
.hero__count { margin: 0; color: #c9d2e3; font-size: .95rem; }
.hero__done { font-size: 1.15rem; margin: 0; }
.meter { flex: 1 1 160px; height: 10px; background: rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.continue { flex-direction: column; align-items: flex-start; text-align: left; width: 100%; }
.continue__sub { font-weight: 500; font-size: .95rem; opacity: .85; }
.unit__title { margin-top: 1.5rem; }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-card { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: start; }
.lesson-card--done { border-color: var(--green); }
.lesson-card__num {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font-weight: 800;
}
.lesson-card--done .lesson-card__num { background: var(--green); color: #fff; }
.lesson-card__title { font-size: 1.15rem; margin: 0 0 .25rem; }
.lesson-card__title a { color: var(--text); text-decoration: none; }
.lesson-card__title a:hover { text-decoration: underline; }
.lesson-card__summary { color: var(--soft); margin: 0 0 .5rem; }
.lesson-card__meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; margin: 0; font-size: .92rem; color: var(--soft); }
.lesson-card__links { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
@media (min-width: 640px) {
  .lesson-card { grid-template-columns: auto 1fr auto; }
  .lesson-card__links { grid-column: auto; flex-direction: column; margin-top: 0; }
  .continue { width: auto; }
}

/* Lesson header + tabs */
.lesson-head { margin-bottom: 1rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .92rem; color: var(--soft); margin-bottom: .75rem; }
.lesson-head__title { margin-bottom: .75rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--border); }
.tabs__tab {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .5rem 1.1rem;
  color: var(--soft); text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-current=page] { color: var(--navy); border-bottom-color: var(--gold); }
.tabs__num {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .85rem;
  background: #eef1f6; color: var(--soft);
}
.tabs__tab[aria-current=page] .tabs__num { background: var(--navy); color: var(--gold); }
.tabs__soon {
  padding: .05rem .45rem; border-radius: 999px; background: var(--amber-bg); color: var(--amber);
  font-size: .7rem; letter-spacing: .05em; text-transform: uppercase;
}
.lesson-meta { color: var(--soft); font-size: .95rem; }
.back-link { display: inline-block; margin-bottom: .5rem; }

/* Lesson reading layout */
.resume { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; background: #eaf1ff; border-color: var(--edge); }
.resume span { color: #173a8a; font-weight: 600; }
.lesson-layout { display: grid; gap: 1rem; }
.outline__details { background: var(--card); border: var(--edge-w) solid var(--edge); border-radius: var(--radius); padding: .25rem .9rem; }
.outline__summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: .35rem; }
.outline__list { margin: 0 0 .75rem; padding-left: 1.4rem; font-size: .95rem; }
.outline__list li { margin: .2rem 0; }
.outline__link { color: var(--soft); text-decoration: none; display: inline-block; padding: .15rem 0; }
.outline__link:hover { text-decoration: underline; color: var(--text); }
.outline__link.is-seen { color: var(--text); }
.outline__link.is-current { color: var(--navy); font-weight: 700; }
.outline__link--quiz { font-weight: 700; color: var(--gold-dark); }
.lesson { background: var(--card); border: var(--edge-w) solid var(--edge); border-radius: var(--radius); padding: 1.25rem; min-width: 0; position: relative; }
.reading-meter { position: sticky; top: 0; height: 4px; margin: -1.25rem -1.25rem 1rem; background: #eef1f6; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; z-index: 5; }
.reading-meter__fill { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.lesson-section { max-width: var(--measure); padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.lesson-section:last-of-type { border-bottom: 0; }
.lesson-section__title { padding-top: .25rem; }
.lesson-section ul, .lesson-section ol { padding-left: 1.4rem; margin: 0 0 1em; }
.lesson-section li { margin: .3rem 0; }
.passage { background: #fbfaf7; border: 1px solid #e6e1d6; border-radius: 12px; padding: 1.1rem 1.4rem; margin: 1.2em 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.05em; line-height: 1.65; }
.passage__kicker { font-family: inherit; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #8a7b5a; margin: 0 0 .2em; }
.passage__title { margin: 0 0 .6em; font-size: 1.25em; }
.passage__source { font-size: .85em; color: #6b6b6b; margin: .8em 0 0; font-style: italic; }
.callout { border-left: 4px solid var(--gold); background: #fffaf0; padding: .75rem 1rem; border-radius: 0 10px 10px 0; margin: 0 0 1em; }
.callout p:last-child { margin: 0; }
/* Worked arithmetic and data tables in lesson text; MathML inherits the body font size. */
.worked { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1rem; line-height: 1.45; background: #f4f6fa; border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1em; overflow-x: auto; white-space: pre; }
.lesson-table { margin: 0 0 1em; }
.lesson-table th, .lesson-table td { padding: .45rem .7rem; }
math { font-size: 1.08em; }
math[display="block"] { margin: .5em 0; }
.math-fallback { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff3f3; padding: 0 .25em; border-radius: 4px; }

/* Lesson video (its own tab) */
.video-stage { max-width: 760px; }
.video { margin: 0; }
.video__player, .video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--navy); }
.video__frame {
  display: grid; place-content: center; justify-items: center; gap: .6rem; color: #fff;
  background: linear-gradient(135deg, var(--navy), #1b2f55); border: 2px dashed rgba(217, 180, 80, .55);
}
.video__play {
  width: 4rem; height: 4rem; border-radius: 50%; background: rgba(255, 255, 255, .14); position: relative;
}
.video__play::after {
  content: ""; position: absolute; left: 1.6rem; top: 1.2rem;
  border-style: solid; border-width: .8rem 0 .8rem 1.3rem; border-color: transparent transparent transparent var(--gold);
}
.video__soon { margin: 0; font-weight: 700; letter-spacing: .02em; }
.video__caption { margin-top: .75rem; }
.video__title { font-size: 1.1rem; margin-bottom: .2rem; }
.video__label {
  display: inline-block; margin-right: .35rem; padding: .05rem .5rem; border-radius: 6px; vertical-align: .1em;
  background: var(--navy); color: var(--gold); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
}
.video__meta { color: var(--soft); font-size: .92rem; margin: 0; }
.video-next { display: grid; justify-items: start; gap: .35rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.video-next p { margin: 0; }
.lesson-end { max-width: var(--measure); background: #fffaf0; border-color: var(--edge); }
@media (min-width: 960px) {
  .lesson-layout { grid-template-columns: 240px 1fr; align-items: start; }
  .outline { position: sticky; top: 4.5rem; }
  .outline__details { border: 0; background: transparent; padding: 0; }
  .outline__summary { pointer-events: none; list-style: none; }
  .outline__summary::-webkit-details-marker { display: none; }
  .lesson { padding: 2rem 2.5rem; }
  .reading-meter { margin: -2rem -2.5rem 1.5rem; }
}

/* Choices, quick checks, quizzes */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* Floating the legend keeps it inside bordered fieldsets (quiz cards) instead of straddling the border. */
legend { padding: 0; width: 100%; float: left; }
legend + * { clear: both; }
.choices { display: grid; gap: .5rem; }
.choice {
  display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .9rem; min-height: 48px;
  border: 2px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer;
}
.choice:hover { border-color: #9fb0cc; }
.choice input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; flex: none; accent-color: var(--navy); }
.choice:has(input:checked) { border-color: var(--navy); background: #f2f5fb; }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice input:focus-visible { box-shadow: none; }
.check { margin-top: 1.25rem; padding: 1rem; border: 1px solid #d6def0; background: #f8faff; border-radius: 12px; }
.check__label { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: var(--blue); }
.check__prompt { display: block; font-weight: 700; font-size: 1.05rem; margin: .2rem 0 .6rem; }
.check__actions { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin-top: .75rem; }
.feedback:empty { display: none; }
.feedback { margin-top: .75rem; padding: .75rem 1rem; border-radius: 10px; background: #fff; border: var(--edge-w) solid var(--edge); }
.feedback p:last-child { margin-bottom: 0; }
.feedback__verdict { font-weight: 800; margin-bottom: .35rem; }
.feedback__verdict--right { color: var(--green); }
.feedback__verdict--wrong { color: var(--red); }

.quiz-intro .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.facts div { background: var(--bg); border: var(--edge-w) solid var(--edge); border-radius: 10px; padding: .6rem .8rem; }
.facts dt { font-size: .8rem; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; font-weight: 700; }
.quiz-intro__done { font-size: 1.1rem; font-weight: 600; }
.attempt-list { list-style: none; padding: 0; margin: 0; }
.attempt-list li { display: flex; gap: 1rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.attempt-list li:last-child { border-bottom: 0; }

.page--attempt { max-width: 760px; margin: 0 auto; }
.attempt-head h1 { margin-bottom: .25rem; }
.answered { font-weight: 600; color: var(--soft); min-height: 1.6em; }
.question legend { margin-bottom: .6rem; }
.question__num { display: block; font-size: .85rem; font-weight: 800; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.question__prompt { display: block; font-weight: 700; font-size: 1.1rem; }
.question--blank { border-color: #f0c674; box-shadow: 0 0 0 2px #f6dfa8; }
.attempt-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Results */
.score { display: grid; gap: 1rem; align-items: center; }
.score__ring {
  width: 7.5rem; height: 7.5rem; border-radius: 50%; display: grid; place-items: center;
  border: 10px solid #f3c2c2; background: #fff;
}
.score__ring--mid { border-color: #f6dfa8; }
.score__ring--high { border-color: #a7dcbc; }
.score__pct { font-size: 1.8rem; font-weight: 800; }
.score__line { font-size: 1.15rem; margin-bottom: .25rem; }
.score__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (min-width: 720px) {
  .score { grid-template-columns: auto 1fr; }
  .score__actions { grid-column: 1 / -1; }
}
.note { background: #eaf1ff; border-color: var(--edge); color: #173a8a; }
.section-title { margin-top: 1.5rem; }
.review-list { list-style: none; padding: 0; margin: 0; }
.review { border-left-width: 6px; }
.review--right { border-left-color: var(--green); }
.review--part { border-left-color: #d79a00; }
.review--wrong { border-left-color: var(--red); }
.review__verdict { font-weight: 800; margin-bottom: .35rem; }
.review--right .review__verdict { color: var(--green); }
.review--part .review__verdict { color: var(--amber); }
.review--wrong .review__verdict { color: var(--red); }
.review__prompt { font-weight: 600; }
.review__answer { margin-bottom: .35rem; }
.review__why { margin: .5rem 0 0; padding: .6rem .8rem; background: var(--bg); border-radius: 8px; }

/* Teacher */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--border); }
.table thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); white-space: nowrap; }
.cell-status { font-weight: 700; }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.link-list { padding-left: 1.2rem; }

/* My courses dashboard */
.dash-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin: .25rem 0 1rem; }
.dash-head h1 { margin: 0; }
.dash-head p { margin: 0; color: var(--soft); }
.pickup { margin-bottom: 1.75rem; }
.pickup__main { min-width: 0; }
.pickup__course { display: flex; align-items: center; gap: .5rem; color: #c9d2e3; font-weight: 600; margin: 0 0 .25rem; }
.pickup__title { color: #fff; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem); margin: 0 0 .35rem; }
.pickup__meta { color: #c9d2e3; margin: 0 0 1.1rem; font-size: .95rem; }
.pickup .continue { max-width: 30rem; }
.dash-courses { margin-bottom: 1.5rem; }
.dash-courses__title { margin: 0 0 .75rem; }
.course-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 720px) { .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.course-card { --accent: #1f3a68; --accent-bg: #eef2f8; display: flex; flex-direction: column; gap: .7rem; margin: 0; border-top: 6px solid var(--accent); min-width: 0; }
.subject--ela { --accent: #2f6fdd; --accent-bg: #eaf1ff; }
.subject--math { --accent: #9b4dca; --accent-bg: #f4ebfb; }
.subject--science { --accent: #18865b; --accent-bg: #e8f6ee; }
.subject--social { --accent: #c2410c; --accent-bg: #fff0e6; }
.subject--aviation { --accent: #0f766e; --accent-bg: #e6f6f4; }
.subject--tech { --accent: #4338ca; --accent-bg: #eef0ff; }
.subject--world-lang { --accent: #b45309; --accent-bg: #fff6e0; }
.subject--arts { --accent: #be185d; --accent-bg: #fdecf4; }
.subject--health { --accent: #15803d; --accent-bg: #eaf7ee; }
.course-card--attention { box-shadow: 0 0 0 3px #f0c46a; }
.course-card__top { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.course-card__icon { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--accent-bg); }
.course-card__title { font-size: 1.08rem; margin: 0; overflow-wrap: anywhere; }
.course-card__title a { color: var(--text); text-decoration: none; }
.course-card__title a:hover { text-decoration: underline; }
.course-card__teacher { margin: .1rem 0 0; color: var(--soft); font-size: .92rem; }
.course-card__where { margin: 0; font-size: .95rem; }
.course-card__progress { display: grid; gap: .35rem; }
.course-card .meter { flex: none; height: 9px; background: #e7ecf4; }
.course-card .meter__fill { background: var(--accent); }
.course-card__count { margin: 0; color: var(--soft); font-size: .88rem; }
.course-card__status { margin: 0; font-size: .92rem; }
.course-card__next { margin-top: auto; flex-direction: column; align-items: flex-start; text-align: left; }
.course-card__next .continue__sub { font-size: .88rem; color: var(--soft); opacity: 1; }
.to-grade { display: flex; align-items: center; gap: .5rem; margin: .25rem 0 .75rem; padding: .5rem .75rem; border: var(--edge-w) solid var(--edge); border-radius: 10px; background: var(--amber-bg); color: #5a4300; font-weight: 600; text-decoration: none; }
.to-grade:hover { background: #f8e9bf; }
.to-grade__count { display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding: 0 .4rem; border-radius: 999px; background: var(--amber); color: #1a1a1a; font-weight: 800; }
.course-card__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.xp-courses { margin: .25rem 0 0; padding-left: 1.2rem; }

/* Start Here */
.page--start-here { max-width: 960px; margin: 0 auto; }
.start-here-link { margin: 0 0 1.25rem; padding: .7rem 1rem; background: var(--amber-bg); border: var(--edge-w) solid var(--edge); border-radius: 12px; }
.start-here-link a { color: #5a4300; text-decoration: none; }
.start-here-link a:hover { text-decoration: underline; }
.hero__help { color: var(--gold); font-weight: 600; }
.start-here__steps { margin: 1.25rem 0 .5rem; }
.start-here__steps h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.start-here__steps ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; }

/* Study tools */
.page--study { max-width: 1120px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: .75rem; font-weight: 600; }
.study-head { margin-bottom: 1rem; }
.study-head .lede { margin-bottom: 0; }
.field { display: grid; gap: .35rem; margin: 0 0 1rem; }
.field__label { font-weight: 700; }
.study-window { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 860px) {
  .study-window { grid-template-columns: 280px minmax(0, 1fr); }
  .study-side { position: sticky; top: 1rem; }
  .tool-list .tool__blurb { display: none; } /* the chat pane explains the chosen tool */
  .tool-list .tool input { grid-row: auto; }
}
.study-side { padding: 1rem; }
.tool-list { display: grid; gap: .5rem; }
.tool {
  display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: start; align-content: start;
  padding: .65rem .75rem; border: 2px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
}
.tool:hover { border-color: #9fb0cc; }
.tool input { grid-row: span 2; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--navy); }
.tool:has(input:checked) { border-color: var(--navy); background: #f2f5fb; }
.tool:has(input:focus-visible) { box-shadow: var(--focus); }
.tool input:focus-visible { box-shadow: none; }
.tool__name { font-weight: 700; }
.tool__blurb { color: var(--soft); font-size: .88rem; }
.study-external { border-top: 1px solid var(--border); padding-top: .9rem; margin-top: .25rem; }
.study-external .tool__name { margin: 0 0 .2rem; }
.study-external .tool__blurb { display: block; margin: 0 0 .6rem; }
.study-honest { margin: 1rem 0 0; padding: .6rem .75rem; background: var(--amber-bg); border-radius: 10px; font-size: .86rem; color: #5a4300; }
.study-chat { display: flex; flex-direction: column; gap: 1rem; min-height: 32rem; padding: 1.1rem 1.25rem; }
.tool-guide__title { margin: 0 0 .25rem; font-size: 1.35rem; }
.tool-guide__what { margin: 0; color: var(--ink); }
.tool-guide__cols { display: grid; gap: 1rem; margin-top: .9rem; padding: .9rem 1rem; background: var(--bg); border-radius: 12px; }
@media (min-width: 640px) { .tool-guide__cols { grid-template-columns: 3fr 2fr; } }
.tool-guide__cols h3 { margin: 0 0 .35rem; font-size: .95rem; }
.tool-guide__cols ol { margin: 0; padding-left: 1.2rem; }
.tool-guide__cols p { margin: 0; }
.study-thread { display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.bubble { max-width: 92%; padding: .7rem .95rem; border-radius: 16px; line-height: 1.5; }
.bubble--you { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.bubble--tool { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.bubble--latest { border-left: 5px solid var(--gold); }
.bubble--latest:focus, .bubble--latest:focus-visible, .bubble--error:focus-visible { outline: none; box-shadow: none; }
.bubble--error { align-self: flex-start; background: var(--amber-bg); }
.bubble__who { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--soft); }
.study-answer__body > :first-child { margin-top: 0; }
.study-answer__body > :last-child { margin-bottom: 0; }
.study-answer__body ul, .study-answer__body ol { padding-left: 1.4rem; }
.study-disclaimer { margin: -.4rem 0 0; }
.study-composer { margin-top: auto; border-top: 1px solid var(--border); padding-top: .9rem; }
.prompt-chips[hidden], .tool-guide[hidden] { display: none !important; }
.prompt-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.prompt-chips__label { font-size: .85rem; font-weight: 700; color: var(--soft); }
.chip { border: 1px solid #9fb0cc; background: #fff; color: var(--navy); border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .88rem; cursor: pointer; }
.chip:hover { background: #f2f5fb; }
.field--composer { margin-bottom: .5rem; }
.field--composer textarea { resize: vertical; }
.study-composer__row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.study-composer__row .hint { margin: 0; flex: 1 1 16rem; }
.study-composer__actions { display: flex; gap: .5rem; }
.study-paused { border-left: 6px solid var(--amber); }

/* Course home: level card, Section tiles, locked items */
.hero { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .hero { grid-template-columns: 1fr 300px; align-items: start; } }
.level-card {
  display: flex; gap: .85rem; align-items: center; padding: .85rem 1rem; border-radius: 12px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; text-decoration: none;
}
.level-card:hover { background: rgba(255, 255, 255, .13); }
.level-card__icon { font-size: 2rem; line-height: 1; }
.level-card__body { display: grid; gap: .3rem; flex: 1; min-width: 0; }
.level-card__title { font-weight: 700; color: var(--gold); }
.level-card__xp { font-size: .95rem; color: #e6ebf4; }
.level-card__more { font-size: .85rem; color: #c9d2e3; }
.meter--xp { flex: none; height: 8px; }
.sections { margin-top: 1.5rem; }
.sections__title { font-size: .95rem; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.section-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 640px) { .section-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.section-tile {
  display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center; padding: .6rem .75rem;
  background: var(--card); border: 2px solid var(--edge); border-radius: 12px; color: var(--text); text-decoration: none;
}
.section-tile:hover { box-shadow: 0 0 0 1px var(--edge); }
.section-tile[aria-current="true"] { background: #e6edf8; box-shadow: 0 0 0 1px var(--edge); }
.section-tile__num {
  grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font-weight: 800; font-size: .95rem;
}
.section-tile__name { font-weight: 700; }
.section-tile__meta { font-size: .82rem; color: var(--soft); }
.section-tile--done .section-tile__num { background: var(--green); color: #fff; }
.section-tile--locked { background: #f1f3f7; color: var(--soft); border-color: #9aa6ba; }
.section-tile--locked .section-tile__num { background: #dfe4ec; color: var(--soft); font-size: .8rem; }
.unit:focus { outline: none; }
.unit__lock { border-left: 6px solid var(--amber); }
.unit__pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-weight: 600; }
.lesson-card--test { border-left: 6px solid var(--gold); }
.lesson-card--locked { background: #f7f8fb; }
.lesson-card--locked .lesson-card__num { background: #dfe4ec; color: var(--soft); font-size: 1rem; }
.lesson-card__lock { margin: 0 0 .5rem; font-size: .92rem; color: var(--amber); }
.chip--locked { background: #eef1f6; color: var(--soft); }
.chip--warn { background: var(--amber-bg); color: var(--amber); }

/* XP, gate notes, rewards */
.earn {
  display: grid; grid-template-columns: auto 1fr auto; gap: .25rem .6rem; align-items: center; margin: 0 0 1rem; padding: .45rem .75rem;
  font-size: .92rem; color: var(--soft); background: #fffaf0; border: 1px solid #f0e2b8; border-radius: 10px;
}
.earn__icon { color: var(--gold-dark); align-self: start; }
.earn__link { justify-self: end; font-weight: 600; }
@media (max-width: 600px) {
  .earn { grid-template-columns: auto 1fr; }
  .earn__link { grid-column: 2; justify-self: start; }
}
.lesson-end__xp { color: var(--soft); }
.feedback__xp { margin: .25rem 0 0; font-weight: 700; color: var(--gold-dark); font-size: .92rem; }
.lesson-sub { font-size: 1.08rem; margin: 1.25rem 0 .4rem; }
.gate { border-radius: 10px; padding: .6rem .9rem; margin: 0 0 1.25rem; border: var(--edge-w) solid var(--edge); border-left: 6px solid var(--blue); background: #eef3ff; }
.gate p { margin: 0; }
.gate--pass { border-left-color: var(--green); background: var(--green-bg); }
.gate--below { border-left-color: var(--amber); background: var(--amber-bg); }
.rewards { display: grid; gap: .6rem; }
.rewards__xp { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin: 0; }
.rewards__gain { font-size: 1.35rem; font-weight: 800; color: var(--gold-dark); }
.rewards__level { margin-left: auto; font-weight: 600; text-decoration: none; }
.rewards__badges { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }

/* Achievements */
.level-hero { display: flex; gap: 1rem; align-items: center; }
.level-hero__icon { font-size: 3rem; line-height: 1; }
.level-hero__body { flex: 1; }
.level-hero__title { margin: 0 0 .25rem; }
.level-hero .meter { display: block; background: #e3e8f0; }
.levels { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.badge-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.badge { display: grid; gap: .15rem; padding: .8rem; border: var(--edge-w) solid var(--edge); border-radius: 12px; background: var(--card); }
.badge--earned { border-color: var(--green); }
.badge--new { grid-template-columns: auto 1fr; align-items: center; gap: .75rem; background: #fffaf0; border-color: var(--edge); }
.badge--locked .badge__icon { filter: grayscale(1); opacity: .45; }
.badge__icon { font-size: 1.8rem; line-height: 1.1; }
.badge__name { font-weight: 700; }
.badge__how { font-size: .9rem; color: var(--soft); }
.badge__got { font-size: .85rem; font-weight: 700; color: var(--green); }
.badge__got--no { color: var(--soft); font-weight: 600; }
.table--compact th, .table--compact td { padding: .45rem .6rem; }

/* Locked page */
.locked { border-left: 6px solid var(--amber); max-width: 46rem; }
.locked__reason { font-size: 1.05rem; }
.locked__todo-title { font-size: 1.1rem; margin-top: 1.25rem; }
.todo-list { padding-left: 1.3rem; display: grid; gap: .9rem; }
.todo__text { margin: 0 0 .4rem; }
.todo__review { margin: .4rem 0 0; }

/* Teacher view and report */
.teacher-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.flag { font-size: .85rem; font-weight: 600; padding: .1rem .5rem; border-radius: 6px; background: #eef1f6; color: var(--soft); }
.flag--high { background: var(--red-bg); color: var(--red); }
.flag--medium { background: var(--amber-bg); color: var(--amber); }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form { display: block; margin-top: .35rem; }
.section-switch { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.section-switch a { padding: .25rem .7rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.section-switch a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.level-chip { display: inline-block; white-space: nowrap; font-weight: 700; font-size: .88rem; padding: .1rem .55rem; border-radius: 999px; }
.level-chip--mastered { background: var(--green-bg); color: var(--green); }
.level-chip--nearly { background: var(--amber-bg); color: var(--amber); }
.level-chip--support { background: var(--red-bg); color: var(--red); }
.report-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.page--report .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.row--test td, .row--test th { background: #fffaf0; }
.badge-list { padding-left: 1.2rem; }


@media (max-width: 480px) {
  .topbar__who { display: none; }
  .topbar__inner { gap: .25rem .75rem; }
  .topbar__nav { margin-left: 0; width: 100%; gap: .4rem .75rem; font-size: .9rem; }
  .topbar__nav .inline-form { margin-left: auto; }
  .topbar__study { padding: .25rem .7rem; }
  .tabs__tab { flex: 1 1 auto; justify-content: center; padding: .5rem .6rem; gap: .4rem; }
  .tabs__num { display: none; }
}
@media (min-width: 720px) {
  .topbar { position: sticky; top: 0; }
  .reading-meter { top: 3.6rem; }
}
@media (max-width: 380px) {
  body { font-size: 1rem; }
  main { padding: .75rem; }
  .card, .lesson { padding: 1rem; }
  .reading-meter { margin: -1rem -1rem 1rem; }
  .tabs__tab { padding: .5rem .45rem; gap: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .topbar, .tabs, .outline, .check, .lesson-end, .footer, .preview-banner, .reading-meter, .video { display: none !important; }
  .lesson, .card { box-shadow: none; border: 0; }
  .no-print { display: none !important; }
  .page-report main { padding: 0; }
  .page-report .card { break-inside: avoid; padding: .5rem 0; }
  .page-report .table-wrap { overflow: visible; }
}

/* Variables and short expressions written as `x > 5` in lesson text. */
code.var { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .95em; background: #f1f4f9; padding: .05em .35em; border-radius: 5px; white-space: nowrap; }

/* Written work (student page and teacher review) */
.writing-form__label { display: block; font-weight: 700; margin-bottom: .4rem; }
.writing-form__text, .review-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.05rem; line-height: 1.55; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: 10px; min-height: 14rem; resize: vertical; }
.review-form textarea { min-height: 7rem; }
.writing-form__count { margin: .4rem 0 .9rem; }
.writing-form__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.writing-text p { white-space: pre-wrap; }
.writing-score { font-size: 1.4rem; margin: .25rem 0 .75rem; }
.writing-feedback { border-left: 4px solid var(--gold); background: #fffaf0; padding: .75rem 1rem; border-radius: 0 10px 10px 0; margin-bottom: 1rem; }
.lesson-card--writing .lesson-card__num { background: #f1f4f9; }
.unit__subtitle { margin: 1.5rem 0 .5rem; font-size: 1.05rem; }
/* Projects & writing: the course's written work in one list */
.topbar__work[aria-current="page"] { background: #fff; }
.work-strip { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; }
.work-strip:hover { background: #f8fafe; }
.work-strip__icon { font-size: 1.6rem; }
.work-strip__body { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 auto; }
.work-strip__go { font-weight: 700; color: var(--navy); white-space: nowrap; }
.work-filters p { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .6rem; }
.work-filters a.chip { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.work-filters a.chip:hover { background: #dfe6f3; }
.work-counts { margin: .25rem 0 0; }
.scope-note { background: #eaf1ff; color: #173a8a; padding: .55rem .85rem; border-radius: 8px; margin: .5rem 0 1rem; font-size: .95rem; }
/* "Before you start" notice */
.consent-form { margin: 1.25rem 0 .75rem; }
.consent-form label { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1rem; font-weight: 600; }
.consent-form input[type="checkbox"] { width: 1.3rem; height: 1.3rem; flex: none; margin-top: .1rem; }
@media (max-width: 560px) { .work-strip { flex-wrap: wrap; } .work-strip__go { width: 100%; } }
.review-layout { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .review-layout { grid-template-columns: minmax(16rem, 1fr) 2fr; align-items: start; } }
.review-list { list-style: none; margin: 0; padding: 0; }
.review-list__item a { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .5rem; border-radius: 8px; text-decoration: none; color: inherit; }
.review-list__item a:hover, .review-list__item.is-selected a { background: #f1f4f9; }
.review-prompt { margin: .5rem 0; }
.review-prompt summary { cursor: pointer; font-weight: 600; }
.review-text { background: #fafbfd; border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; max-height: 28rem; overflow: auto; }
.review-form__row { display: flex; align-items: center; gap: .75rem; margin: .75rem 0; }
.review-form__row input { font: inherit; font-size: 1.1rem; width: 6rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px; }
.btn .count { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--amber); color: #1a1a1a; font-size: .85em; text-align: center; }
.writing-form__count.is-enough { color: #1b6e3a; font-weight: 600; }

/* Uploads (student attach section, file lists, teacher review) */
.writing-files h2 { margin-top: 0; }
.file-list { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .5rem; }
.file-list__item { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: .6rem .75rem; border: var(--edge-w) solid var(--edge); border-radius: 10px; background: #fff; }
.file-list__name { flex: 1 1 12rem; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.file-list__meta { flex: 0 0 auto; }
.file-list__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.file-picker { display: block; width: 100%; margin: 0 0 .75rem; padding: .6rem; font: inherit; border: 2px dashed #9fb0cc; border-radius: 10px; background: #fafbfd; }
.file-picker:focus-visible { box-shadow: var(--focus); border-radius: 10px; }
.file-status { margin: .5rem 0 0; min-height: 1.6em; }
.writing-actions { margin: 0 0 1rem; }
.review-files { margin: .75rem 0 1rem; }
.chip--files { background: #eaf1ff; color: #173a8a; }
@media (max-width: 480px) {
  .file-list__item { flex-direction: column; align-items: stretch; }
  .file-list__name { flex: 0 0 auto; }
  .file-list__actions .btn, .writing-actions .btn { flex: 1 1 auto; }
}

/* Staff leaderboard */
.filters { display: flex; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.filters select { padding: .4rem .6rem; border-radius: 8px; border: 1px solid #d8d2c4; font: inherit; }
.stats { margin: 0; }
.stats strong { font-size: 1.15em; }
.leaderboard th, .leaderboard td { vertical-align: middle; }
.leaderboard__rank { font-size: 1.2em; text-align: center; width: 2.5rem; }
.leaderboard__top td { background: #fffaf0; }
.leaderboard__detail td { padding-top: 0; border-top: 0; }
.leaderboard .meter { width: 120px; }
.badge-feed { list-style: none; padding: 0; margin: 0; }
.badge-feed li { padding: .35rem 0; border-bottom: 1px solid #eee7d8; }
.badge-feed li:last-child { border-bottom: 0; }
.dash-courses__action { margin-left: .75rem; vertical-align: middle; font-weight: 600; }


/* Vocabulary words (a bold word that has a glossary entry) and the glossary page */
.term { position: relative; cursor: help; border-bottom: 2px dotted var(--gold-dark); }
.term:focus { outline: none; box-shadow: var(--focus); border-radius: 3px; }
.term::after {
  content: attr(data-definition);
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30;
  width: max-content; max-width: min(20rem, calc(100vw - 2rem));
  padding: .55rem .75rem; background: var(--navy); color: #fff;
  font-size: .9rem; font-weight: 400; line-height: 1.4; text-align: left; font-style: normal;
  border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.term:hover::after, .term:focus::after { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .term::after { transition: none; transform: none; } }
.term-example { border-bottom: 2px dotted var(--gold-dark); }
.glossary__head { margin-bottom: 1rem; }
.glossary__letters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.glossary__letters a { display: inline-block; min-width: 2.2rem; text-align: center; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); text-decoration: none; font-weight: 600; }
.glossary__group { margin-bottom: 1rem; }
.glossary__letter { margin: 0 0 .5rem; color: var(--gold-dark); }
.glossary__list { margin: 0; }
.glossary__entry { padding: .55rem 0; border-top: 1px solid var(--border); }
.glossary__entry:first-child { border-top: 0; }
.glossary__entry dt { font-weight: 700; }
.glossary__entry dd { margin: .15rem 0 0; color: var(--text); }


/* Skill Passport: My passport, the badge cards, the public page and the Skill Check pages */
.passport__head { margin-bottom: 1rem; }
.passport__counts { margin: 0 0 .75rem; font-size: 1.05rem; }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem; list-style: none; margin: 0; padding: 0; }
.stage { border: var(--edge-w) solid var(--edge); border-radius: 10px; padding: .55rem .7rem; background: var(--card); }
.stage__name { display: block; font-weight: 700; }
.stage__count { display: block; font-size: .85rem; color: var(--soft); }
.stage.is-reached { border-color: var(--gold-dark); }
.stage.is-current { background: var(--navy); color: #fff; border-color: var(--navy); }
.stage.is-current .stage__count { color: #dbe3f0; }
.passport__family { margin: 1.25rem 0; }
.badge-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: .85rem; }
.badge-card { display: flex; gap: .85rem; align-items: flex-start; }
.badge-card.is-earned { border-color: var(--green); background: var(--green-bg); }
.ring { --pct: 0; flex: 0 0 4rem; width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--gold-dark) calc(var(--pct) * 1%), var(--border) 0); }
.ring::before { content: ""; position: absolute; inset: .42rem; border-radius: 50%; background: var(--card); }
.badge-card.is-earned .ring { background: conic-gradient(var(--green) 100%, var(--border) 0); }
.badge-card.is-earned .ring::before { background: var(--green-bg); }
.ring span { position: relative; font-weight: 700; font-size: .9rem; }
.badge-card__body { min-width: 0; flex: 1; }
.badge-card__name { margin: 0 0 .25rem; font-size: 1.05rem; }
.badge-card__meta { margin: 0 0 .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.badge-card__skill { margin: 0 0 .4rem; }
.badge-card__left { margin: 0 0 .4rem; color: var(--text); }
.badge-card__share summary { cursor: pointer; font-weight: 600; }
.badge-card__form { display: grid; gap: .4rem; margin-top: .4rem; }
.badge-card__form textarea { width: 100%; }
.check-line { display: flex; gap: .4rem; align-items: center; }
.chip--ok { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.chip--muted { color: var(--soft); }
.verify { max-width: 36rem; margin: 2rem auto; }
.verify__skill { font-size: 1.1rem; }
.people { list-style: none; margin: 0; padding: 0; }
.people__row { padding: .6rem 1rem; border-top: 1px solid var(--border); }
.people__row:first-child { border-top: 0; }
/* Explorer badges (grades 6 to 8) on My passport, and the link between an Explorer badge and its high school badge */
.passport__explorer { margin: 1.25rem 0; }
.passport__explorer > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.passport__explorer-title { display: inline; margin: 0; font-size: 1.2rem; }
.passport__explorer[open] > summary { margin-bottom: .5rem; }
.chip--junior { background: #eaf1ff; color: #173a8a; }
.badge-card__path { margin: 0 0 .4rem; color: var(--soft); }
.passport__group { margin: 1rem 0 .5rem; font-size: 1.05rem; color: var(--soft); }
/* Add a list: the pasted roster */
.stack textarea { width: 100%; font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; }
