/* Layout: a study desk — video and Greek text side by side, lesson steps as a strip across the top. */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --sunk: #e9ebe6;
  --ink: #1c2230;
  --muted: #5a6273;
  --line: #d9ddd6;
  --accent: #23517f;       /* tekhelet blue */
  --accent-soft: #dfe8f2;
  --ok: #3f6e2a;
  --ok-soft: #e3eedb;
  --warn: #9a5a00;
  --bad: #a3322a;
  --bad-soft: #f6e1de;
  --hl: #fff2c2;
  --tr-bg: #fbf0d9;          /* translated for this app, awaiting native review */
  --tr-line: #d08a1e;
  --en-bg: #ece8f7;          /* not translated yet, still English */
  --en-line: #8a7cc2;
  /* grammar colours from the original lessons */
  --fem: #d0261b;
  --masc: #1d5fc4;
  --grn: #3a7a1c;
  --mag: #b4229f;
  --con: #b45f06;

  --f-body: "Atkinson Hyperlegible", "Gentium Book Plus", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --f-he: "Gentium Book Plus", "SBL Greek", "Times New Roman", serif; /* Greek text (class name kept from the Hebrew app) */
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181f; --surface: #1c222c; --sunk: #232a35; --ink: #e8ebf0; --muted: #a2abba; --line: #313a48;
    --accent: #8db7e6; --accent-soft: #233447; --ok: #8fc274; --ok-soft: #22331c; --warn: #e0a64a;
    --bad: #f08a80; --bad-soft: #3a2220; --hl: #3d3517; --tr-bg: #2f2716; --tr-line: #e0a64a; --en-bg: #262238; --en-line: #a99be0;
    --fem: #ff7a6e; --masc: #7fb0ff; --grn: #8fd16a; --mag: #f08ae0; --con: #f0a04a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14181f; --surface: #1c222c; --sunk: #232a35; --ink: #e8ebf0; --muted: #a2abba; --line: #313a48;
  --accent: #8db7e6; --accent-soft: #233447; --ok: #8fc274; --ok-soft: #22331c; --warn: #e0a64a;
  --bad: #f08a80; --bad-soft: #3a2220; --hl: #3d3517; --tr-bg: #2f2716; --tr-line: #e0a64a; --en-bg: #262238; --en-line: #a99be0;
  --fem: #ff7a6e; --masc: #7fb0ff; --grn: #8fd16a; --mag: #f08ae0; --con: #f0a04a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 17px/1.55 var(--f-body);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
.he { font-family: var(--f-he); unicode-bidi: isolate; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 0; }

/* Top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  font-family: var(--f-he); font-size: 22px; line-height: 1; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--surface);
}
.brand-name { font-family: var(--f-display); font-size: 20px; font-weight: 700; }
.brand-sub { color: var(--muted); font-weight: 500; }
.top-note { font-size: 13px; color: var(--muted); letter-spacing: .02em; }

main { padding-block: 24px 40px; outline: none; }

/* Home */
.hero { display: grid; gap: 8px; margin-bottom: 24px; }
.hero h1 { font-size: clamp(26px, 4vw, 36px); }
.hero p { margin: 0; color: var(--muted); max-width: 62ch; }
.continue {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); color: var(--surface); border-radius: var(--r); padding: 16px 20px; margin-bottom: 24px;
}
.continue .label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.continue .what { font-family: var(--f-display); font-size: 21px; font-weight: 700; }
.continue a { background: var(--surface); color: var(--accent); text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 999px; }

.lessons { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lesson-row {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px;
  text-decoration: none; color: var(--ink);
}
.lesson-row:hover { border-color: var(--accent); }
.lesson-num { font-family: var(--f-display); font-size: 30px; font-weight: 700; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
.lesson-row .t { font-weight: 700; }
.lesson-row .l-name { min-width: 0; }
.lesson-row .he.sub { font-size: 17px; color: var(--muted); display: block; width: fit-content; }
.lesson-row.lite { padding-block: 10px; }
.lesson-row.lite .lesson-num { font-size: 22px; color: var(--muted); }
.lesson-row.lite .t { font-weight: 400; }
.vid-only { display: flex; align-items: center; gap: 8px; }
.check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--surface); }
.lesson-row .check:not(:empty), .extra-row .check:not(:empty) { background: var(--ok); }
.extra-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  margin-inline-start: 28px; padding: 8px 16px; border-radius: var(--r); text-decoration: none; color: var(--ink);
  background: var(--sunk); border: 1px solid transparent;
}
.extra-row:hover { border-color: var(--accent); }
.extra-row .x-name { min-width: 0; }
.extra-row .kind { font-weight: 700; margin-inline-end: 6px; }
.kind-ic { text-align: center; color: var(--accent); font-size: 20px; }
.kind-ic.big { font-size: .9em; margin-inline-end: 4px; }
.dur { font-variant-numeric: tabular-nums; }
.block { margin-bottom: 12px; }
.block > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.block > summary::-webkit-details-marker { display: none; }
.block > summary .b-title { font-family: var(--f-display); font-size: 21px; font-weight: 700; }
.block > summary .b-title::before { content: "▸ "; color: var(--muted); }
.block[open] > summary .b-title::before { content: "▾ "; }
.notice { background: var(--accent-soft); border-radius: var(--r); padding: 12px 16px; margin: 0 0 20px; max-width: 75ch; }
.crumbs { margin-bottom: 8px; }
.crumbs .crumb { margin: 0; }
.extra-stage { display: grid; gap: 12px; max-width: 820px; }
@media (max-width: 560px) {
  .extra-row { grid-template-columns: 28px minmax(0, 1fr) auto; margin-inline-start: 12px; gap: 10px; }
  .extra-row .dur { display: none; }
  .lesson-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .steps-mini { gap: 3px; } .dot { width: 22px; height: 22px; font-size: 11px; }
}
.steps-mini { display: flex; gap: 6px; }
.dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.dot.done { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.later { margin-top: 12px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); font-size: 15px; }

/* Lesson header + step strip */
.crumb { font-size: 14px; margin-bottom: 8px; display: inline-block; }
.lesson-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.lesson-head h1 { font-size: clamp(24px, 3.4vw, 32px); }
.lesson-head .he { font-size: 24px; color: var(--muted); }
.stepbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }
.step {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r);
  background: var(--sunk); border: 2px solid transparent; text-decoration: none; color: var(--ink); min-width: 0;
}
.step .no { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface); color: var(--muted); }
.step .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.on { background: var(--surface); border-color: var(--accent); }
.step.done .no { background: var(--ok); color: var(--surface); }
@media (max-width: 560px) {
  .step { flex-direction: column; gap: 4px; padding: 8px 4px; text-align: center; }
  .step .nm { font-size: 12px; white-space: normal; }
}

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--accent); background: var(--accent); color: var(--surface);
  padding: 9px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn:disabled { opacity: .5; cursor: default; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px;
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip .tick { color: var(--ok); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; }
.linkish.danger { color: var(--bad); }

/* Watch & read */
.watch { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.watch .left { position: sticky; top: 76px; display: grid; gap: 12px; }
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: #000; border-radius: var(--r); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.transcript { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow: auto; overscroll-behavior: contain; padding: 0; }
.transcript-head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; z-index: 1; }
.lines { list-style: none; margin: 0; padding: 8px 0 16px; counter-reset: ln; }
.lines li {
  counter-increment: ln; display: grid; grid-template-columns: 1fr 2.4em; gap: 8px; padding: 6px 16px; cursor: pointer;
  border-inline-start: 3px solid transparent;
}
.lines li::after { content: counter(ln); color: var(--muted); font-size: 12px; text-align: right; padding-top: .5em; font-variant-numeric: tabular-nums; }
.lines li.cur { background: var(--hl); border-inline-start-color: var(--warn); }
.lines .he { font-size: var(--tsize, 24px); line-height: 1.75; }
.w { border-radius: 4px; cursor: help; }
.w.known:hover, .w.sel { background: var(--accent-soft); }
.no-transcript { padding: 24px 16px; color: var(--muted); }
@media (max-width: 860px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  /* Small screens: the video stays pinned at the top while the print text scrolls underneath. */
  .top { position: static; }
  .watch { gap: 12px; }
  .watch .left {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
    background: var(--bg); padding-block: 8px; gap: 8px; box-shadow: 0 8px 12px -10px rgba(0,0,0,.25);
  }
  .watch .left .chip { padding: 4px 10px; }
  .watch .left .btn { padding: 6px 12px; font-size: 15px; }
  .transcript { max-height: none; overflow: visible; }
  .transcript-head { position: static; }
}

.pop {
  position: fixed; z-index: 50; max-width: min(320px, calc(100vw - 32px));
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 15px;
}
.pop .he { font-size: 22px; display: block; }
.pop .tr { opacity: .8; font-style: italic; }

/* Vocabulary */
.vocab-tools { margin-bottom: 14px; }
.card-stage { display: grid; place-items: center; padding: 8px 0 4px; }
.card {
  width: min(460px, 100%); min-height: 230px; border-radius: 14px; border: 1px solid var(--line); background: var(--sunk);
  display: grid; place-items: center; text-align: center; padding: 24px; cursor: pointer; user-select: none;
}
.card .big { font-family: var(--f-he); font-size: 48px; line-height: 1.3; }
.card .en { font-size: 26px; font-family: var(--f-display); font-weight: 700; }
.card .tr { color: var(--muted); font-style: italic; margin-top: 6px; }
.card .hint { color: var(--muted); font-size: 13px; margin-top: 14px; }
.card-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.meter { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; width: min(460px, 100%); margin: 0 auto 10px; }
.meter > i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .25s; }

.wordlist { width: 100%; border-collapse: collapse; }
.wordlist th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.wordlist td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wordlist td.he { font-size: 24px; white-space: nowrap; }
.wordlist .tr { color: var(--muted); font-style: italic; }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.tbl { overflow-x: auto; max-width: 100%; }

/* Grammar (from the Aleph with Beth grammar lessons) */
.grammar { max-width: 760px; }
.grammar h3 { font-size: 21px; margin: 28px 0 8px; color: var(--accent); }
.grammar h3:first-child { margin-top: 0; }
.grammar p { margin: 0 0 10px; }
.grammar p.c { text-align: center; }
.grammar :is(p, li, td) { unicode-bidi: plaintext; }
.grammar .tbl { margin: 10px 0 16px; }
.grammar table { border-collapse: collapse; margin: 0 auto; }
.grammar td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: middle; }
.grammar td p { margin: 0; }
.grammar img { display: inline-block; vertical-align: middle; border-radius: 6px; margin: 6px; background: #fff; }
.grammar sup.fn a { text-decoration: none; font-weight: 700; padding: 0 2px; }
.grammar .notes { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 12px; font-size: 14px; color: var(--muted); }
.grammar .notes li { margin-bottom: 6px; }
.grammar :lang(grc), .grammar .greek { font-family: var(--f-he); }
.fem { color: var(--fem); } .masc { color: var(--masc); } .grn { color: var(--grn); } .mag { color: var(--mag); } .con { color: var(--con); }

/* Test */
.q { border-top: 1px solid var(--line); padding: 18px 0; }
.q:first-of-type { border-top: 0; padding-top: 4px; }
.q .prompt { font-weight: 700; margin-bottom: 10px; }
.q .prompt .he { font-size: 1.25em; font-weight: 400; line-height: 1; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.opt {
  text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r);
  padding: 10px 14px; cursor: pointer; min-height: 52px;
}
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.he { font-size: 22px; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt:disabled { cursor: default; }
.why { margin-top: 10px; font-size: 15px; padding: 10px 12px; border-radius: 8px; background: var(--sunk); }
.why.right { border-inline-start: 4px solid var(--ok); }
.why.wrong { border-inline-start: 4px solid var(--bad); }
.score { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r); margin-top: 8px; }
.score.pass { background: var(--ok-soft); }
.score.fail { background: var(--bad-soft); }
.score .num { font-family: var(--f-display); font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }

.next-step { display: flex; justify-content: flex-end; margin-top: 16px; }

.foot { color: var(--muted); font-size: 14px; padding-block: 24px 40px; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 8px; max-width: 80ch; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.grammar h2.sub-lesson { font-size: 24px; margin: 36px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Easy story pages: print text + Reading Practice slide show */
.story-meta { display: grid; gap: 4px; padding: 12px 16px 0; }
.story-meta .he { font-family: var(--f-he); font-size: 22px; font-weight: 700; }
.pdf-note { padding: 0 16px 14px; margin: 0; }
.book { display: grid; gap: 10px; padding: 12px; outline: none; }
.book:fullscreen { background: #111; align-content: center; padding: 16px; }
.book-stage { overflow: hidden; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.book:fullscreen .book-stage { border: 0; background: #111; }
.book-page { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; cursor: pointer; user-select: none; -webkit-user-drag: none; }
.book:fullscreen .book-page { height: calc(100vh - 110px); aspect-ratio: auto; }
.book-page.turn-next { animation: turn-next .28s ease-out; }
.book-page.turn-prev { animation: turn-prev .28s ease-out; }
@keyframes turn-next { from { opacity: .3; transform: translateX(6%); } to { opacity: 1; transform: none; } }
@keyframes turn-prev { from { opacity: .3; transform: translateX(-6%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .book-page.turn-next, .book-page.turn-prev { animation: none; } }
.book-bar { display: flex; align-items: center; gap: 10px; }
.book-count { flex: 1; text-align: center; font-variant-numeric: tabular-nums; }
.book:fullscreen .book-count { color: #ddd; }
.book-bar .btn:disabled { opacity: .4; cursor: default; }
.book-range { width: 100%; accent-color: var(--accent); }
@media (max-width: 860px) { .watch.reading .left { position: static; } }

/* Learning paths, skipping, Push myself lock, reviews and practice */
.top-nav { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.top-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top-nav a:hover { color: var(--accent); }
.path-line { margin-top: 6px; }
.setup h1 { margin-top: 0; }
.setup h2, .section-h { font-size: 17px; margin: 22px 0 8px; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.mode { text-align: left; display: grid; gap: 6px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.mode b { font-size: 17px; }
.mode span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.mode.on { border-color: var(--accent); background: var(--accent-soft); }
.mode:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggles { display: grid; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.skipbar { margin: 4px 0 12px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; font-size: 15px; color: var(--muted); }
.skipbar.push { border-style: solid; border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.stepbar .step.opt { opacity: .55; }
.steps-mini .dot.skipped, .steps-mini .dot.off { background: transparent; color: var(--muted); border-style: dashed; }
.lock { font-size: 16px; }
.locked { text-align: center; }
.locked .row { justify-content: center; flex-wrap: wrap; }
.lock-big { font-size: 40px; }
.checkin { border-color: var(--accent); }
.checkin .row { flex-wrap: wrap; }
.wrap-row { flex-wrap: wrap; gap: 8px; }
.review-row .kind-ic { color: var(--warn); }
ul.skipped { margin: 0; padding-left: 20px; line-height: 1.8; }
@media (max-width: 560px) { .top-nav { gap: 10px; font-size: 14px; } .top-nav .top-note { display: none; } }

/* Settings wheel */
.top-in { position: relative; }
.gear { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.gear:hover, .gear[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.settings-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 90px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.settings-pop .modes { grid-template-columns: 1fr; margin: 10px 0 12px; gap: 8px; }
.settings-pop .mode { padding: 10px 14px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; }
.sp-x { background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; }
.sp-note { margin: 8px 0 0; color: var(--muted); }

/* One question at a time */
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; margin-bottom: 6px; }
.q.one { margin-top: 14px; border-bottom: 0; }
.q.one .prompt { font-size: 19px; }
.opt .key { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-inline-end: 10px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); font-family: var(--f-body, inherit); vertical-align: middle; }

.quiz-next { margin-top: 12px; }
.missed-h { font-size: 17px; margin: 18px 0 8px; }
ol.missed { padding-left: 20px; display: grid; gap: 12px; }
ol.missed .why { margin-top: 6px; }
.bad-a { color: var(--bad); font-weight: 600; }
.good-a { color: var(--ok); font-weight: 600; }

/* Language bar */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.lang-btn .caret { opacity: .6; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 31; min-width: 160px; padding: 6px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.lang-menu[hidden] { display: none; }
.lang-menu button { text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--accent-soft, rgba(0,0,0,.05)); outline: none; }
.lang-menu button.on { color: var(--accent); font-weight: 700; }
.lang-menu button.on::after { content: " ✓"; }
.langbar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.watch.solo { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.watch.solo .left { position: static; }
.all-words { margin: 4px 0 14px; }
.all-words summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.all-words .tbl { max-height: 60vh; overflow: auto; margin-top: 8px; }
.deck-mode { margin-bottom: 6px; }

/* Greek course: illustrated lesson documents */
.g-head { align-items: baseline; gap: 12px; }
.g-head h2 { font-size: 22px; }
.grammar.lessondoc { font-family: var(--f-he); font-size: 20px; line-height: 1.6; }
.grammar.lessondoc img { max-width: 100%; height: auto; }
.grammar.lessondoc h2, .grammar.lessondoc h3 { font-family: var(--f-he); }
/* Review status of language versions */
.lang-menu .st { display: block; font-size: 11px; font-weight: 600; color: var(--warn); }
.review-strip { background: var(--tr-bg); border-bottom: 1px solid var(--line); font-size: 14px; padding: 8px 0; }
.lesson-row.ai-tr { background: var(--tr-bg); border-color: var(--tr-line); }
.grammar.ai-tr { background: var(--tr-bg); border-inline-start: 4px solid var(--tr-line); padding: 12px 16px; border-radius: var(--r); }
.notice.ai-tr { background: var(--tr-bg); border-inline-start: 4px solid var(--tr-line); }
.lesson-row.en-only { background: var(--en-bg); border-color: var(--en-line); }
.grammar.en-only { background: var(--en-bg); border-inline-start: 4px solid var(--en-line); padding: 12px 16px; border-radius: var(--r); }
.notice.en-only { background: var(--en-bg); border-inline-start: 4px solid var(--en-line); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); margin: 0 0 12px; }
.key-sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; }
.key-sw.ai-tr { background: var(--tr-bg); border: 2px solid var(--tr-line); }
.key-sw.en-only { background: var(--en-bg); border: 2px solid var(--en-line); margin-inline-start: 8px; }

.foot .credit { font-weight: 700; color: var(--ink); }
.about h1 { margin-bottom: 8px; }
.about h2 { font-size: 20px; margin: 22px 0 6px; }
.about p { max-width: 70ch; }
.about .langs { padding-left: 1.2em; }
.st-ready { color: var(--ok); font-weight: 700; }
.st-review { color: var(--warn); font-weight: 700; }

/* Word lists on phones: one word per block (word on top, pronunciation + meaning below), no sideways scrolling. */
@media (max-width: 600px) {
  .wordlist thead { display: none; }
  .wordlist, .wordlist tbody { display: block; width: 100%; }
  .wordlist tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .wordlist td { border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  .wordlist td.he { grid-column: 1 / -1; white-space: normal; font-size: 24px; }
  .wordlist td.tr { grid-column: 1; }
  .wordlist td:last-child { grid-column: 2; }
}

/* Header on phones: course name on one or two lines, without the word "Course". */
@media (max-width: 600px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 17px; line-height: 1.15; }
}
.brand-mark { font-size: 17px; letter-spacing: -.5px; }
/* Compact skip bar: a small "Skip" button on the right */
.skipbar.compact { display: flex; justify-content: flex-end; align-items: center; gap: 8px; border: 0; background: none; padding: 0; margin: 0 0 10px; font-size: 14px; }
.skip-note { color: var(--muted); }
.skip-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.skip-btn:hover, .skip-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.card .snd { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 20px; width: 44px; height: 44px; cursor: pointer; margin: 6px auto 0; display: block; }
.card .snd:hover { border-color: var(--accent); }

/* Sound switch on the flashcards: speaker icon only; red cross when off. */

/* Sound switch on the flashcards: speaker icon only; red cross when off. */
.snd-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; }
.snd-toggle svg { display: block; }
.snd-toggle .cross { stroke: #d32f2f; display: none; }
.snd-toggle.off .cross { display: inline; }
.snd-toggle.off .waves { display: none; }

/* Colours choice in the settings panel */
.sp-theme { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sp-theme .row { margin-top: 6px; gap: 6px; flex-wrap: wrap; }

/* Outside content (YouTube, BibleLing) loads only after a click: a calm placeholder until then */
.ext-gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; background: var(--sunk); color: var(--ink); }
.bl-frame .ext-gate { position: absolute; }
.ext-gate p { max-width: 34em; margin: 0; }
.eg-load { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 12px 22px; background: var(--accent); color: var(--surface); font-weight: 700; font-size: 17px; cursor: pointer; }
.eg-load:hover { filter: brightness(1.1); }
.eg-icon { font-size: 18px; }
.eg-always { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
