/* Deliberately a sibling of the seminary-homework-2026 stylesheet: same palette,
   same card/tabbar furniture. Tapping through from one app to the other should
   feel like moving between rooms, not between buildings. */

:root {
  --bg: #0e1016;
  --bg-elev: #171a23;
  --bg-elev-2: #1e222d;
  --line: #272c39;
  --text: #e8eaf2;
  --muted: #9aa1b5;
  --accent: #7b8cff;
  --accent-soft: #2a3160;
  --warn: #efb057;
  --danger: #f0736a;
  --ok: #4fbf8b;
  --nom: #1f9d78;
  --acc: #c8642a;
  --radius: 14px;
  --tabbar: 62px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f9;
    --bg-elev: #ffffff;
    --bg-elev-2: #f0f2f7;
    --line: #e0e3ec;
    --text: #191c25;
    --muted: #6b7285;
    --accent: #4d5fe0;
    --accent-soft: #e4e7ff;
    --nom: #12775a;
    --acc: #a24c1b;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* The countdown to the day you said you wanted this learned by. */
.brand-right {
  text-align: right;
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
}

.brand-right strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.brand-right.is-due strong {
  color: var(--warn);
}

/* ---------- layout ---------- */

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.note {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.empty {
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: baseline;
}

/* ---------- buttons ---------- */

.btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.btn.wide {
  width: 100%;
}

.btn.good {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--line));
  color: var(--ok);
}

.btn.bad {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
  color: var(--danger);
}

.btnrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btnrow.split > * {
  flex: 1 1 0;
}

/* ---------- the map ---------- */

.hero {
  background: linear-gradient(160deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
}

.hero-line {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.hero-mnemonic {
  font-size: 25px;
  font-weight: 700;
  margin: 6px 0 4px;
  letter-spacing: 0.2px;
}

.hero-sub {
  color: var(--muted);
  font-size: 13px;
}

.acro {
  display: grid;
  /* Wider than it was: a tile now carries a letter, a name and a gist. */
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.acro-item {
  /* A tile is only ~76px wide on a small phone, and names like
     "Apollonius's Canon" are longer than that. break-word splits a word only
     when it cannot fit a line by itself — `anywhere` also shrinks the column's
     min-content, which had the grid hyphenating "Possessio/n" for no reason. */
  overflow-wrap: break-word;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.acro-letter {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}

.acro-word {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.set-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.set-head h2 {
  margin: 0;
  font-size: 16px;
  text-transform: none;
}

.set-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0 0 10px;
}

.bigidea {
  background: var(--bg-elev-2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin: 10px 0 0;
}

.mnemonic-line {
  font-size: 17px;
  font-weight: 650;
  margin: 2px 0 6px;
}

.mnemonic-why {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- cards (Learn) ---------- */

.concept {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
  overflow: hidden;
}

.concept + .concept {
  margin-top: 8px;
}

.concept > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.concept > summary::-webkit-details-marker {
  display: none;
}

.concept-name {
  font-weight: 620;
  flex: 1;
}

.concept-hook {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.concept-body {
  padding: 0 13px 13px;
  border-top: 1px solid var(--line);
}

.concept-body > * {
  margin-top: 11px;
}

.label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.hook {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-elev-2));
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
  padding: 9px 11px;
}

.hook-line {
  font-size: 15.5px;
  font-weight: 650;
}

.hook-why {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.spot {
  background: var(--bg-elev-2);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13.5px;
}

.watch {
  border: 1px dashed color-mix(in srgb, var(--warn) 50%, var(--line));
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  color: color-mix(in srgb, var(--warn) 75%, var(--text));
}

.ex {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.ex + .ex {
  margin-top: 9px;
}

.ex-ref {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.greek {
  font-family: 'Gentium Plus', 'SBL Greek', 'Palatino Linotype', Palatino, Georgia, serif;
  font-size: 17px;
  line-height: 1.5;
  margin: 3px 0;
}

.ex-en {
  font-size: 13.5px;
}

.ex-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

mark {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

/* ---------- filters ---------- */

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.chip {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.chip.on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent);
}

/* ---------- drill ---------- */

.flash {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 22px 16px;
}

.flash-prompt-label {
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
}

.flash-prompt {
  font-size: 21px;
  font-weight: 650;
  line-height: 1.35;
}

.flash-prompt.is-small {
  font-size: 16.5px;
  font-weight: 500;
}

.flash-answer {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  text-align: left;
}

.flash-answer .name {
  font-size: 18px;
  font-weight: 650;
}

.flash-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
}

.box-pips {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}

.pip {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--line);
}

.pip.on {
  background: var(--ok);
}

/* ---------- spot it ---------- */

.q-prompt {
  font-size: 16px;
  line-height: 1.45;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}

.option {
  text-align: left;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.option.correct {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 16%, var(--bg-elev-2));
}

.option.wrong {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, var(--bg-elev-2));
}

.option:disabled {
  cursor: default;
  opacity: 0.85;
}

.option.correct:disabled,
.option.wrong:disabled {
  opacity: 1;
}

.verdict {
  margin-top: 12px;
  font-size: 13.5px;
}

.verdict .why {
  color: var(--muted);
  margin-top: 4px;
}

.score {
  font-variant-numeric: tabular-nums;
}

/* ---------- progress ---------- */

.bar {
  height: 7px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.bar-fill {
  height: 100%;
  background: var(--ok);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.stats > div {
  background: var(--bg-elev-2);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.stat {
  display: block;
  font-size: 21px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.stats small {
  color: var(--muted);
  font-size: 11px;
}

.mastery {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.mastery:last-child {
  border-bottom: 0;
}

.mastery-name {
  flex: 1;
  font-size: 13.5px;
}

/* ---------- confusion pairs ---------- */

.confusion {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
}

.confusion + .confusion {
  margin-top: 8px;
}

.confusion-q {
  font-weight: 620;
  font-size: 14px;
}

.confusion-test {
  font-size: 13px;
  margin-top: 5px;
}

.confusion-test b {
  color: var(--accent);
}

.confusion-ex {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
}

/* ---------- back link to the homework app ---------- */

.backlink {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.backlink svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- tab bar ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  /* Six tabs now. auto-fit keeps them even without hard-coding the count. */
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.tab {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  padding: 8px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.tab svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.on {
  color: var(--accent);
}

/* ---------- installing it ---------- */

.card h2 .dismiss {
  margin-left: auto;
  padding: 3px 8px;
  line-height: 1;
}

.btn.ghost {
  background: none;
  color: var(--muted);
}

.inline-icon {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn .inline-icon {
  vertical-align: -3px;
  margin-right: 5px;
}

.steps {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--text);
}

.steps li + li {
  margin-top: 6px;
}

.note.ready {
  color: var(--ok);
}

code {
  background: var(--bg-elev-2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
}

/* ---------- the formula block ----------
   The bare shape of the construction, before a word of prose. */

.formula {
  background: var(--bg-elev-2);
  border-radius: 11px;
  padding: 14px 12px 12px;
  margin-top: 11px;
}

.fcols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 6px 18px;
  text-align: center;
}

.fcol {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* The pattern row: the thing to remember. */
.fpat {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

/* The worked row underneath, in the accent so the eye pairs them up. */
.ffill {
  font-size: 13px;
  color: var(--accent);
  line-height: 1.3;
}

.fladder {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.fladder li + li {
  margin-top: 4px;
}

.fnote,
.fcaption {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

/* A ladder is read down the left edge, so its prose lines up with it. */
.formula.is-ladder .fnote,
.formula.is-ladder .fcaption {
  text-align: left;
}

.fnote + .fcaption {
  margin-top: 5px;
}

.flash .formula {
  background: var(--bg-elev);
  margin-top: 9px;
}

/* ---------- Greek-first quiz prompts ----------
   The exam is on the Greek, so the Greek is the question and the English
   is a gloss you can put away. */

.q-ref {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin-bottom: 4px;
}

.q-greek {
  font-size: 21px;
  line-height: 1.55;
  margin: 0 0 8px;
}

.q-prompt.is-gloss {
  font-size: 13.5px;
  color: var(--muted);
}

/* Blurred rather than removed, so the layout does not jump when you peek. */
.q-prompt.is-hidden {
  filter: blur(5px);
  user-select: none;
}

.q-prompt + .btn.ghost {
  margin-top: 8px;
}

/* The group's own hook, above its tiles on the map. */
.group-hook {
  margin: -4px 0 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- the like-I'm-five block ----------
   Leads every card. Bigger and warmer than the prose under it, because it is
   the one part you should be able to read at a glance and understand. */

.eli5 {
  background: color-mix(in srgb, var(--warn) 13%, var(--bg-elev-2));
  border-left: 3px solid var(--warn);
  border-radius: 0 11px 11px 0;
  padding: 11px 13px;
  margin-top: 11px;
}

.eli5 .label {
  color: color-mix(in srgb, var(--warn) 78%, var(--text));
}

.eli5 p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.flash .eli5,
.hero + .card .eli5 {
  text-align: left;
}

/* The summary chart's own wording, kept verbatim — the tier you want the night
   before, when the exam will use these words and not mine. */
.bookdef {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- the person picker ----------
   Top right, always one tap away, because a shared tablet needs it more than
   the person who set the app up does. */

.topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.whoami {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12.5px;
  max-width: 46vw;
  cursor: pointer;
}

.whoami:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mastery .pill {
  font-size: 10.5px;
}

/* ---------- the cheat sheet ----------
   Every peg in the app, on one screen, at the top of the Map. */

.sheet-set + .sheet-set {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sheet-case {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.sheet-row {
  display: grid;
  grid-template-columns: minmax(74px, auto) 1fr;
  gap: 4px 12px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 6px 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.sheet-row + .sheet-row {
  margin-top: 4px;
}

.sheet-row:active {
  background: var(--bg-elev-2);
}

.sheet-key {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sheet-members {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}

/* Narrow screens stack the peg above what it stands for. */
@media (max-width: 380px) {
  .sheet-row {
    grid-template-columns: 1fr;
  }
}

/* A few plain words under each tile, so the map explains itself. */
.acro-gist {
  display: block;
  font-size: 11.5px;
  line-height: 1.3;
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  margin-top: 3px;
}

/* The cheat sheet's first strip: what each set does, before any acrostic. */
.sheet-does {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.does-row {
  display: grid;
  grid-template-columns: minmax(92px, auto) 1fr;
  gap: 4px 12px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.does-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 620;
}

.does-what {
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 380px) {
  .does-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- pictures ----------
   One emoji per card, standing next to the plain words so the two are learned
   together. It never appears on the front of a drill card: recognising the
   picture is not the same as recalling the answer. */

.eli5 {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.eli5-pic {
  font-size: 30px;
  line-height: 1.1;
  flex: none;
}

.concept-pic {
  font-size: 19px;
  width: 24px;
  flex: none;
  text-align: center;
}

.acro-pic {
  display: block;
  font-size: 19px;
  line-height: 1.1;
  margin-bottom: 2px;
}

/* The answer side of a drill card leads with it, big. */
.flash .eli5-pic {
  font-size: 34px;
}

/* Which word the question is actually about. */
.q-target {
  font-size: 13px;
  color: var(--muted);
  margin: -2px 0 8px;
}

/* An answer that is reasoned rather than the book's, and says so. */
.why.unofficial {
  border-left: 2px solid var(--warn);
  padding-left: 9px;
  margin-top: 8px;
  font-size: 12.5px;
  color: color-mix(in srgb, var(--warn) 70%, var(--text));
}

/* A missed question on the test's result page. */
.missed + .missed {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.missed .btnrow {
  margin-top: 8px;
}

/* ---------- the peg ----------
   One shape for "which letter of the key is this card", used at three sizes:
   peg-lg heads the card and the drill answer, peg-mini rides the collapsed
   row, peg-chip labels a group. The lit slot is the card; the dim ones are
   the letters either side of it, which is the part that was missing — a
   letter on its own is not a peg, a letter with its neighbours is. */

.peg-key {
  display: inline-flex;
  align-items: baseline;
  /* Word keys can run to five slots ("Aim · Outcome · If · Whoever · Whenever"),
     which will not fit one phone line. Let them wrap rather than overflow. */
  flex-wrap: wrap;
  gap: 3px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.peg-part {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  transition: none;
}

.peg-part.on {
  color: var(--accent);
}

.peg-gap {
  width: 7px;
}

.peg-lg {
  font-size: 25px;
  line-height: 1;
}

.peg-lg .peg-part.on {
  /* The one slot that is this card, boxed so it reads before the words do. */
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 6px;
  padding: 1px 5px;
  margin: 0 2px;
}

.peg-mini {
  font-size: 11px;
  letter-spacing: 1px;
  gap: 1.5px;
  flex: 0 0 auto;
  align-self: center;
}

.peg-mini .peg-part.on {
  color: var(--accent);
}

.peg-mini.is-extra .peg-part {
  color: color-mix(in srgb, var(--muted) 50%, transparent);
}

.peg-chip {
  font-size: 13px;
  letter-spacing: 1.2px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.peg-chip .peg-part {
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
}

.peghead {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-elev-2));
  border-left: 3px solid var(--accent);
  border-radius: 0 11px 11px 0;
  padding: 11px 13px;
}

.peghead .peg-of {
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 60%, var(--text));
  font-weight: 700;
  margin-top: 7px;
}

.peghead .hook-line {
  margin-top: 3px;
}

.peghead.is-extra {
  background: var(--bg-elev-2);
  border-left-color: var(--line);
}

.peghead.is-extra .peg-of {
  color: var(--muted);
}

.flash-answer .peghead {
  margin-top: 9px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.group-head {
  margin: 14px 0 8px;
}

.group-head h3 {
  margin: 0;
}

.acro-letter.is-extra {
  /* Not a letter of the key. Say so, instead of inventing one. */
  color: var(--muted);
  font-weight: 600;
}

.peg-front {
  /* The whole face of a flashcard: the key, one slot lit, nothing else. */
  display: flex;
  justify-content: center;
  font-size: 40px;
  margin: 6px 0;
}

.peg-front .peg-part.on {
  padding: 2px 8px;
}

/* ---------- the picture: one street, seven stops ----------
   The board is the whole course at a glance — every place, and every object
   standing in it. Nothing here is hand-drawn: the stops come from the sets,
   the objects from the cards, so a new chapter adds itself. */

.street-line {
  font-size: 27px;
  line-height: 1.3;
  margin: 4px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}

.street-arrow {
  font-size: 16px;
  color: var(--muted);
  margin: 0 1px;
}

.street {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.stop {
  display: grid;
  gap: 3px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  padding: 10px 11px;
}

.stop-pic {
  font-size: 30px;
  line-height: 1.1;
}

.stop-name {
  font-weight: 700;
  font-size: 14.5px;
}

.stop-things {
  /* Everything that lives here, in one line. This is the bit you picture. */
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 1px;
  overflow-wrap: break-word;
  margin: 2px 0 1px;
}

.stop-case,
.stop-count {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.street-why {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.place-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.place-head h2 {
  margin: 0;
}

.place-head.is-small h2 {
  font-size: 16px;
}

.place-head.is-small .btn {
  margin-left: auto;
}

.place-pic {
  font-size: 38px;
  line-height: 1;
}

.place-head.is-small .place-pic {
  font-size: 28px;
}

.place-case {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.place-line {
  margin: 11px 0 0;
  font-size: 15px;
  line-height: 1.55;
}

.place-things {
  font-size: 21px;
  line-height: 1.6;
  letter-spacing: 2px;
  margin-top: 10px;
  overflow-wrap: break-word;
}

.scene {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 11px 12px;
  background: var(--bg-elev-2);
}

.scene-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.scene-spot {
  font-size: 23px;
  line-height: 1;
}

.scene-title {
  font-weight: 700;
  font-size: 14.5px;
}

.scene-line {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

.things {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.things.is-bare {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.thing {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  font: inherit;
  color: inherit;
  cursor: pointer;
  overflow-wrap: break-word;
}

.things.is-bare .thing {
  padding: 5px 7px;
  border-radius: 9px;
}

.thing-pic {
  font-size: 24px;
  line-height: 1.1;
}

.things.is-bare .thing-pic {
  font-size: 19px;
}

.thing-tile {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--accent);
}

.thing-name {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
}

.peg-dot {
  color: var(--muted);
  opacity: 0.5;
  font-weight: 400;
}
