/* Layout: one narrow column, like a page of a French school notebook. Blue fountain-pen ink for what you
   can act on, the teacher's green and red for right and wrong, a highlighter for the pass mark and the
   words to learn. The explanation is the only surface drawn as ruled paper. */
:root {
  --paper: #fbfcff;
  --panel: #eff2fb;
  --line: #d3daee;
  --ink: #18213f;
  --ink2: #586284;
  --blue: #2942c0;
  --blue-soft: #e2e7fb;
  --on-blue: #ffffff;
  --ok: #12764a;
  --ok-soft: #dbf1e4;
  --bad: #c2352b;
  --bad-soft: #fbe3e0;
  --hl: #ffe14d;
  --on-hl: #18213f;
  --rule: #d9dff3;
  --margin: #e0564b;
  --shade: rgba(24, 33, 63, .10);
  --font-zh: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-fr: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 14px;
  --tabs-h: 58px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10142a; --panel: #1a2040; --line: #2c3560; --ink: #e9ecfb; --ink2: #a0aad0;
    --blue: #95a6ff; --blue-soft: #232c5c; --on-blue: #10142a;
    --ok: #62d49d; --ok-soft: #123a2b; --bad: #ff8d80; --bad-soft: #4a211d;
    --hl: #ffe14d; --on-hl: #18213f; --rule: #232b52; --margin: #ff7b6e; --shade: rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10142a; --panel: #1a2040; --line: #2c3560; --ink: #e9ecfb; --ink2: #a0aad0;
  --blue: #95a6ff; --blue-soft: #232c5c; --on-blue: #10142a;
  --ok: #62d49d; --ok-soft: #123a2b; --bad: #ff8d80; --bad-soft: #4a211d;
  --hl: #ffe14d; --on-hl: #18213f; --rule: #232b52; --margin: #ff7b6e; --shade: rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-zh);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[lang="fr"] { font-family: var(--font-fr); }
.num { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-weight: 600; }

.wrap {
  max-width: 580px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 18px calc(var(--tabs-h) + 34px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.wrap.bare { padding-block: 0 104px; gap: 18px; }

/* ---- brand row ---- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand h1 { font-size: 20px; font-weight: 700; letter-spacing: .01em; line-height: 1.3; }
.mark { font-family: var(--font-num); font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--ink); }
.mark b { background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 88%, transparent 88%); color: var(--on-hl); padding: 0 4px; border-radius: 2px; font-weight: 700; }
.tag { display: inline-flex; align-items: center; font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 999px; background: var(--panel); color: var(--ink2); white-space: nowrap; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.hot { background: var(--hl); color: var(--on-hl); font-weight: 600; }
.qlist.inner { padding-left: 10px; border-left: 2px solid var(--line); margin-bottom: 10px; }
.qlist.inner > li:first-child { border-top: 0; }
.qlist.inner > li:last-child { border-bottom: 0; }

h2 { font-size: 17px; font-weight: 700; line-height: 1.35; text-wrap: balance; }
.sub { color: var(--ink2); font-size: 14px; }
.small { font-size: 13px; color: var(--ink2); line-height: 1.6; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack.tight { gap: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 18px; border-radius: 12px;
  font-weight: 600; font-size: 16px; line-height: 1.25; text-align: center; text-decoration: none;
  background: var(--blue); color: var(--on-blue);
}
.btn.ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn.quiet { background: var(--panel); color: var(--ink); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.link { color: var(--blue); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ---- segmented control ---- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--panel); border-radius: 14px; }
.seg button { min-height: 52px; padding: 6px 8px; border-radius: 11px; text-align: center; line-height: 1.25; color: var(--ink2); }
.seg button b { display: block; font-size: 15px; font-weight: 600; }
.seg button span { display: block; font-size: 11.5px; font-family: var(--font-fr); opacity: .9; }
.seg button[aria-pressed="true"], .seg a[aria-current="page"] { background: var(--paper); color: var(--blue); box-shadow: 0 1px 3px var(--shade); }
.seg.n3 { grid-template-columns: repeat(3, 1fr); }
.seg a { min-height: 44px; padding: 6px 8px; border-radius: 11px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25; color: var(--ink2); text-decoration: none; }
.seg a b { font-size: 15px; font-weight: 600; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; background: var(--panel); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.quick a b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: var(--paper); font-family: var(--font-num); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }

/* ---- progress ---- */
.hero { display: flex; flex-direction: column; gap: 14px; }
.big { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.big small { font-size: 18px; font-weight: 500; color: var(--ink2); letter-spacing: 0; }
.bar { height: 8px; border-radius: 99px; background: var(--panel); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--blue); min-width: 0; }
.bar.ok i { background: var(--ok); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 340px) { .actions { grid-template-columns: 1fr; } }

.themes { display: flex; flex-direction: column; }
.theme { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 7px; align-items: center; width: 100%; padding: 14px 0; border-top: 1px solid var(--line); }
.theme:last-child { border-bottom: 1px solid var(--line); }
.theme .t1 { font-weight: 600; font-size: 16px; line-height: 1.35; }
.theme .t2 { font-size: 12.5px; color: var(--ink2); font-family: var(--font-fr); line-height: 1.35; }
.theme .cnt, .pick .cnt { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-size: 14.5px; color: var(--ink2); white-space: nowrap; }
.theme .cnt b, .pick .cnt b { color: var(--ink); font-weight: 700; }
.theme .bar { grid-column: 1 / -1; height: 5px; }
.theme .go, .pick .go { color: var(--blue); font-weight: 700; margin-left: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border-radius: var(--r); box-shadow: inset 0 0 0 1.5px var(--line); min-height: 76px; }
.pick .t1 { font-weight: 700; font-size: 17px; line-height: 1.35; }
.pick .t2 { font-size: 13px; color: var(--ink2); line-height: 1.35; }

/* ---- notice / paywall ---- */
.note { border-radius: var(--r); background: var(--panel); padding: 14px 16px; font-size: 14px; line-height: 1.65; color: var(--ink); }
.note.blue { background: var(--blue-soft); }
.note.warn { background: var(--bad-soft); color: var(--ink); }
.note b { font-weight: 700; }
.field { display: flex; gap: 8px; }
.field input { flex: 1 1 0; min-width: 0; min-height: 50px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); padding: 8px 12px; font-family: var(--font-num); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.field input::placeholder { letter-spacing: .04em; color: var(--ink2); opacity: .7; text-transform: none; }
.field input.plain { font-family: var(--font-fr); font-size: 16px; letter-spacing: 0; text-transform: none; }
.code { font-family: var(--font-num); font-weight: 700; font-size: 18px; letter-spacing: .04em; white-space: nowrap; }
.msg { font-size: 14px; min-height: 1.4em; }
.msg.bad { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* ---- question ---- */
.qbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.qbar .back { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; color: var(--blue); font-weight: 600; font-size: 15px; }
.qbar .ttl { font-size: 14px; color: var(--ink2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbar .pos { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 700; }
.timer { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; }
.timer.low { color: var(--bad); }
.kind { display: flex; gap: 6px; flex-wrap: wrap; }
.stem { font-family: var(--font-fr); font-size: 21px; line-height: 1.42; font-weight: 600; letter-spacing: .005em; overflow-wrap: anywhere; }
.stemz { font-size: 15.5px; color: var(--ink2); line-height: 1.6; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip[aria-pressed="true"] { background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.chip svg { width: 16px; height: 16px; flex: none; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 13px 14px; border-radius: var(--r); box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper); min-height: 58px; }
.opt .let { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-family: var(--font-num); font-weight: 700; font-size: 15px; background: var(--panel); color: var(--ink2); }
.opt .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 4px; }
.opt .fr { font-family: var(--font-fr); font-size: 17.5px; line-height: 1.4; overflow-wrap: anywhere; }
.opt .zh { font-size: 14px; color: var(--ink2); line-height: 1.5; }
.opt.sel { box-shadow: inset 0 0 0 2px var(--blue); background: var(--blue-soft); }
.opt.sel .let { background: var(--blue); color: var(--on-blue); }
.opt.right { box-shadow: inset 0 0 0 2px var(--ok); background: var(--ok-soft); }
.opt.right .let { background: var(--ok); color: var(--paper); }
.opt.wrong { box-shadow: inset 0 0 0 2px var(--bad); background: var(--bad-soft); }
.opt.wrong .let { background: var(--bad); color: var(--paper); }
.opt[disabled] { cursor: default; opacity: 1; }
.opt.dim { opacity: .62; }

/* ---- the explanation: a note on ruled paper with the red margin line ---- */
.copy {
  --lh: 29px;
  position: relative; border-radius: 6px; padding: 14px 14px 16px 46px;
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px));
  background-size: 100% var(--lh);
  background-position: 0 13px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px var(--shade);
  scroll-margin: 70px 0 110px;
}
.copy::before { content: ""; position: absolute; top: 0; bottom: 0; left: 34px; width: 1.5px; background: var(--margin); opacity: .8; }
.copy .verdict { position: absolute; left: 7px; top: 14px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; line-height: 1; }
.copy.good .verdict { color: var(--ok); }
.copy.miss .verdict { color: var(--bad); }
.copy p, .copy li, .copy h3 { line-height: var(--lh); font-size: 15.5px; }
.copy h3 { font-weight: 700; }
.copy.good h3 { color: var(--ok); }
.copy.miss h3 { color: var(--bad); }
.copy.plain h3, .copy.plain .verdict { color: var(--blue); }
.copy .ans { font-family: var(--font-fr); font-weight: 600; }
.copy .voc { margin-top: var(--lh); }
.copy .voc li { display: flex; flex-wrap: wrap; column-gap: 10px; }
.copy .voc .w { font-family: var(--font-fr); font-weight: 600; background: linear-gradient(transparent 18%, var(--hl) 18%, var(--hl) 86%, transparent 86%); color: var(--on-hl); padding: 0 3px; border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.copy .src { display: block; margin-top: var(--lh); line-height: var(--lh); font-size: 13.5px; }

/* ---- fixed bars ---- */
.tabs, .dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.tabs ul { max-width: 580px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, 1fr); height: var(--tabs-h); }
.tabs a { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; line-height: 1; color: var(--ink2); text-decoration: none; position: relative; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.tabs .dot { position: absolute; top: 7px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: var(--paper); font-family: var(--font-num); font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dock .in { max-width: 580px; margin: 0 auto; display: flex; gap: 10px; padding: 10px 8px; }
.dock .btn { flex: 1 1 0; min-width: 0; }
.dock .btn.fix { flex: 0 0 auto; }

/* ---- exam ---- */
.grid40 { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.grid40 button { aspect-ratio: 1 / 1; border-radius: 9px; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; background: var(--panel); color: var(--ink2); position: relative; }
.grid40 button.done { background: var(--blue); color: var(--on-blue); }
.grid40 button.cur { box-shadow: 0 0 0 2.5px var(--ink); }
.grid40 button.flag::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--hl); box-shadow: 0 0 0 2px var(--paper); }
.grid40 button.okc { background: var(--ok-soft); color: var(--ok); }
.grid40 button.badc { background: var(--bad-soft); color: var(--bad); }
.rules { display: flex; flex-direction: column; }
.rules li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules .k { color: var(--ink2); font-size: 14px; }
.rules .v b { font-family: var(--font-fr); font-variant-numeric: tabular-nums; }

/* score scale: drawn to scale, the pass mark sits at 32/40 */
.scale { position: relative; padding: 26px 0 22px; }
.scale .track { height: 14px; border-radius: 99px; background: var(--panel); overflow: hidden; }
.scale .track i { display: block; height: 100%; background: var(--bad); border-radius: 99px; }
.scale.pass .track i { background: var(--ok); }
.scale .passmark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--ink); }
.scale .passmark span { position: absolute; top: -2px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.5; background: var(--hl); color: var(--on-hl); padding: 0 6px; border-radius: 3px; }
.scale .ends { display: flex; justify-content: space-between; font-family: var(--font-num); font-size: 12px; color: var(--ink2); position: absolute; left: 0; right: 0; bottom: 0; line-height: 1.4; }
.verdict-line { font-size: 22px; font-weight: 700; line-height: 1.3; }
.verdict-line.pass { color: var(--ok); }
.verdict-line.fail { color: var(--bad); }
.split { display: flex; flex-direction: column; }
.split li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.split li:last-child { border-bottom: 1px solid var(--line); }
.split .n { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-weight: 700; }
.split .n.lowv { color: var(--bad); }

.qlist { display: flex; flex-direction: column; }
.qlist > li { border-top: 1px solid var(--line); }
.qlist > li:last-child { border-bottom: 1px solid var(--line); }
.qrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 12px 0; }
.qrow .i { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--ink2); padding-top: 3px; }
.qrow .s { font-family: var(--font-fr); font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.qrow .m { font-weight: 700; font-size: 16px; padding-top: 1px; }
.qrow .m.okm { color: var(--ok); }
.qrow .m.badm { color: var(--bad); }
.m.more { color: var(--blue); font-family: var(--font-num); font-size: 18px; line-height: 1.2; display: inline-flex; align-items: center; }
.qrow .s.zhs { font-family: var(--font-zh); }
.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 13px 0; }
.crow .ct { display: block; font-weight: 600; font-size: 16px; line-height: 1.4; }
.crow .cl { display: block; font-size: 13.5px; color: var(--ink2); line-height: 1.5; }
.words.mini li { padding: 6px 0; font-size: 14px; }
.detail .small { display: block; }
.detail { padding: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }

/* ---- modal ---- */
.veil { position: fixed; inset: 0; z-index: 20; background: rgba(12, 16, 36, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.sheet { width: 100%; max-width: 580px; max-height: 88%; overflow: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 620px) { .veil { align-items: center; padding: 24px; } .sheet { border-radius: 18px; } }

/* ---- words ---- */
.words li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; align-items: baseline; }
.words li:last-child { border-bottom: 1px solid var(--line); }
.words .w { font-family: var(--font-fr); font-weight: 600; overflow-wrap: anywhere; }

.facts { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.facts li { padding-left: 16px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.foot { font-size: 12.5px; color: var(--ink2); line-height: 1.7; display: flex; flex-direction: column; gap: 6px; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.center { text-align: center; }

@media (min-width: 480px) {
  .stem { font-size: 23px; }
  .brand h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  .bar i, .scale .track i { transition: width .5s ease; }
  .copy { animation: rise .28s ease both; }
  @keyframes rise { from { transform: translateY(6px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* registering for the exam: steps and centres */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-family: var(--font-num); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.steps > li > b { font-size: 16px; line-height: 28px; }
.steps p { font-size: 15px; line-height: 1.7; }
.steps .facts { font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 6px 14px; border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 14.5px; }
.centres { display: flex; flex-direction: column; gap: 10px; }
.centre { border-radius: var(--r); background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.centre .cn { font-size: 15.5px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; flex: 1 1 0; }
.centre .ca { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.centre .cd { font-size: 13px; color: var(--ink2); }
.clinks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.clinks a { color: var(--blue); font-weight: 600; font-size: 14px; min-height: 32px; display: inline-flex; align-items: center; }
.small a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---- cram sheet ---- */
/* 考前一页: the page people screenshot. Every group is a small sheet of ruled paper; text sits on the rules. */
.quick.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick.n3 a { gap: 6px; padding: 0 4px; white-space: nowrap; }
.seg.study a { padding: 6px 4px; }
.sh-top .sub .link { margin-left: 4px; white-space: nowrap; }
.sh-exam { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.sh-exam li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 2px 11px; text-align: center; min-width: 0; }
.sh-exam li + li { box-shadow: -1px 0 0 var(--line); }
.sh-exam b { font-family: var(--font-num); font-weight: 700; font-size: 27px; line-height: 1.15; letter-spacing: -.02em; }
.sh-exam b i { font-style: normal; font-weight: 400; color: var(--ink2); padding: 0 1px; }
.sh-exam span { font-size: 12px; line-height: 1.3; color: var(--ink2); }
.sh-exam .pass b { padding: 0 6px; border-radius: 2px; background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 88%, transparent 88%); color: var(--on-hl); }
.sh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.sh-card {
  --lh: 25px;
  min-width: 0; border-radius: 6px; padding: 9px 10px calc(var(--lh) - 8px) 11px;
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px));
  background-size: 100% var(--lh);
  background-position: 0 12px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px var(--shade);
}
.sh-card.wide { grid-column: 1 / -1; }
.sh-card h3 { font-size: 13px; font-weight: 700; line-height: var(--lh); letter-spacing: .08em; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-card li { line-height: var(--lh); min-width: 0; overflow-wrap: anywhere; }
.sh-card .k { font-size: 15.5px; font-weight: 700; line-height: 0; margin-right: 7px; }
.sh-card .k.n { font-family: var(--font-num); font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.sh-card .k.hl { padding: 0 4px; margin-left: -4px; border-radius: 2px; background: linear-gradient(transparent 16%, var(--hl) 16%, var(--hl) 88%, transparent 88%); color: var(--on-hl); }
.sh-card .v { font-size: 13.5px; line-height: 0; }
.sh-card .v i { font-style: normal; font-size: 12px; color: var(--ink2); margin-left: 2px; display: inline-block; line-height: var(--lh); vertical-align: baseline; }
.sh-card.wide li { display: flex; align-items: baseline; column-gap: 12px; }
.sh-card.wide .k { flex: 0 0 5.2em; margin-right: 0; line-height: var(--lh); }
.sh-card.wide .v { flex: 1 1 0; min-width: 0; line-height: var(--lh); }
.sh-rule {
  --lh: 27px;
  position: relative; border-radius: 6px; padding: 11px 14px calc(var(--lh) - 10px) 40px;
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px));
  background-size: 100% var(--lh);
  background-position: 0 14px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px var(--shade);
  scroll-margin-top: 16px;
}
.sh-rule::before { content: ""; position: absolute; top: 0; bottom: 0; left: 28px; width: 1.5px; background: var(--margin); opacity: .8; }
.sh-rule h3 { font-size: 17px; font-weight: 700; line-height: var(--lh); }
.sh-rule p, .sh-rule li { font-size: 14.5px; line-height: var(--lh); }
.sh-rule p { color: var(--ink2); }
.sh-rule ol { counter-reset: shr; }
.sh-rule ol li { counter-increment: shr; position: relative; }
.sh-rule ol li::before { content: counter(shr); position: absolute; left: -32px; top: 0; width: 20px; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 15px; color: var(--margin); }
.sh-asof { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sh-asof .link { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 339px) {
  .sh-grid { grid-template-columns: minmax(0, 1fr); }
  .sh-exam b { font-size: 23px; }
  .quick.n3 a { font-size: 14px; gap: 4px; }
  .quick.n3 a svg { width: 18px; height: 18px; }
}
@media (min-width: 480px) {
  .sh-grid { gap: 12px; }
  .sh-card { padding-left: 14px; padding-right: 14px; }
  .sh-card .v { font-size: 14px; }
  .sh-exam b { font-size: 32px; }
}
@media print {
  @page { size: A4; margin: 11mm; }
  body:has(.sheetpage) { background: #fff; }
  body:has(.sheetpage)::before { display: none; }
  .sheetpage ~ .tabs, .sheetpage ~ .veil, .sheetpage .seg, .sheetpage .sh-top .link, .sheetpage .sh-asof .link, .sheetpage .mark { display: none; }
  .sheetpage {
    --paper: #fff; --ink: #000; --ink2: #333; --blue: #000; --line: #9a9a9a; --rule: #d9d9d9; --margin: #000; --hl: #fff; --on-hl: #000; --shade: transparent;
    color: #000; max-width: none; padding: 0; gap: 9px;
  }
  .sheetpage .sh-grid { display: block; column-count: 3; column-gap: 8px; }
  .sheetpage .sh-card { --lh: 20px; padding: 6px 9px 8px; margin-bottom: 8px; break-inside: avoid; background-image: none; box-shadow: none; border: 1px solid var(--line); }
  .sheetpage .sh-card h3 { border-bottom: 1px solid var(--line); margin-bottom: 2px; }
  .sheetpage .sh-card.wide li { display: block; }
  .sheetpage .sh-card.wide .k { margin-right: 7px; line-height: 0; }
  .sheetpage .sh-card.wide .v { line-height: 0; }
  .sheetpage .sh-card h3 { font-size: 11.5px; }
  .sheetpage .sh-card .k { font-size: 13px; }
  .sheetpage .sh-card .k.n { font-size: 15.5px; }
  .sheetpage .sh-card .k.hl, .sheetpage .sh-exam .pass b { background: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .sheetpage .sh-card .v { font-size: 11.5px; }
  .sheetpage .sh-card .v i { font-size: 10.5px; }
  .sheetpage .sh-exam li { padding: 6px 2px; }
  .sheetpage .sh-exam b { font-size: 22px; }
  .sheetpage .sh-rule { --lh: 20px; break-inside: avoid; background-image: none; box-shadow: none; border: 1px solid var(--line); padding: 7px 12px 8px 38px; }
  .sheetpage .sh-rule h3 { font-size: 14px; }
  .sheetpage .sh-rule p, .sheetpage .sh-rule li { font-size: 12px; }
  .sheetpage .sh-top .sub, .sheetpage .small { font-size: 11px; }
  .sheetpage .foot { font-size: 9.5px; line-height: 1.5; break-inside: avoid; }
  .sheetpage .foot a { color: inherit; }
}

/* ---- welcome (first visit) ---- */
/* A sheet of the notebook: the headline sits on the ruled lines, the pass mark is the teacher's red grade. */
.wl { gap: 20px; }
.wl-hero {
  --lh: 34px;
  position: relative; border-radius: 6px; padding: 9px 14px 17px 40px;
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px));
  background-size: 100% var(--lh);
  background-position: 0 12px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px var(--shade);
}
.wl-hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: 26px; width: 1.5px; background: var(--margin); opacity: .8; }
.wl-kicker { font-size: 13px; line-height: var(--lh); color: var(--ink2); padding-right: 82px; white-space: nowrap; }
.wl-hero h1 { font-size: 27px; line-height: var(--lh); font-weight: 800; letter-spacing: -.01em; }
.wl-hero h1 em { font-style: normal; color: var(--on-hl); background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 90%, transparent 90%); padding: 0 4px; margin: 0 -1px; border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.wl-lead { font-size: 15px; line-height: var(--lh); color: var(--ink); }
.wl-stamp {
  position: absolute; top: 12px; right: 12px; transform: rotate(-7deg);
  display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: center; column-gap: 1px;
  padding: 6px 9px 5px; border: 2px solid var(--margin); border-radius: 50% / 46%;
  color: var(--margin); background: var(--paper); font-family: var(--font-num); line-height: 1; white-space: nowrap;
}
.wl-stamp b { font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.wl-stamp i { font-style: normal; font-size: 13px; font-weight: 700; }
.wl-stamp small { grid-column: 1 / -1; text-align: center; font-family: var(--font-zh); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; margin-top: 3px; padding-top: 3px; border-top: 1.5px solid currentColor; }

.wl-proof-wrap { display: flex; flex-direction: column; gap: 8px; }
.wl-proof { display: grid; }
.wl-proof li { display: flex; flex-direction: column; gap: 5px; padding: 2px 4px 2px 10px; border-left: 1px solid var(--line); min-width: 0; }
.wl-proof li:first-child { border-left: 0; padding-left: 0; }
.wl-proof b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 31px; font-weight: 700; line-height: 1; letter-spacing: -.04em; align-self: flex-start; }
.wl-proof .free b { color: var(--on-hl); background: var(--hl); padding: 2px 4px 1px; margin: -2px -4px -1px; border-radius: 2px; }
.wl-proof span { font-size: 12px; line-height: 1.3; color: var(--ink2); }

.wl-next { gap: 10px; }
.wl-step { font-size: 13px; font-weight: 600; color: var(--blue); line-height: 1.4; letter-spacing: .02em; }
.wl-next h2 { font-size: 20px; }
.wl-next .pick { min-height: 68px; padding: 12px 14px 12px 16px; box-shadow: inset 0 0 0 1.5px var(--blue); }
.wl-next .pick .t1 { color: var(--blue); }
.wl-next .pick .grow { line-height: 1.3; }
.wl-next .pick .t2 { display: inline-block; margin-top: 3px; }
.wl-next .pick .go { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: var(--on-blue); font-size: 17px; line-height: 1; padding-bottom: 2px; vertical-align: middle; }
.wl-next .pick:active { background: var(--blue-soft); }
@media (max-width: 340px) {
  .wl-hero { padding-left: 34px; }
  .wl-hero::before { left: 21px; }
  .wl-hero h1 { font-size: 24px; }
  .wl-lead { font-size: 14px; }
  .wl-proof b { font-size: 26px; }
  .wl-proof li { padding-left: 8px; }
  .wl-proof span { font-size: 11.5px; }
}
/* ---- home polish ---- */
/* brand row (every page): the title sits against the notebook's red margin line, the pass mark is rubber-stamped */
.brand h1 { position: relative; padding-left: 12px; font-weight: 800; letter-spacing: .03em; }
.brand h1::before { content: ""; position: absolute; left: 0; top: 1px; bottom: 1px; width: 2px; border-radius: 2px; background: var(--margin); }
.mark { padding: 1px 6px; border-radius: 5px; font-size: 14.5px; line-height: 1.5; letter-spacing: .02em; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); transform: rotate(-4deg); }
.mark b { margin-right: 1px; padding: 0 3px; background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 86%, transparent 86%); }

/* exam-type switch and the study switch on #cards / #words */
.seg { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.seg button, .seg a { position: relative; }
.seg button[aria-pressed="true"], .seg a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.seg button[aria-pressed="true"] b, .seg a[aria-current="page"] b { font-weight: 700; }

/* progress hero */
.hero.home { gap: 16px; }
.hero-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.ring { position: relative; width: 116px; height: 116px; }
.ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .trk { stroke: var(--line); }
.ring .arc { stroke: var(--blue); stroke-linecap: round; }
.ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ring .n { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.ring .of { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-size: 12.5px; line-height: 1; color: var(--ink2); white-space: nowrap; }
.hero-acts { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hero-fact { font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.hero-fact b { font-family: var(--font-num); font-weight: 700; color: var(--ink); padding: 0 3px; }
.hero-fact b.pass { background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 86%, transparent 86%); color: var(--on-hl); border-radius: 2px; }
.quick { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quick a { min-height: 48px; border-radius: 0; background: none; color: var(--blue); }
.quick a + a { box-shadow: -1px 0 0 var(--line); }
.quick a svg { width: 20px; height: 20px; flex: none; }
.quick a b { font-weight: 700; }

/* the five themes: a contents page on ruled paper, icons in the margin */
.themes { position: relative; border-radius: 6px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 6px 18px -10px var(--shade); }
.themes::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50px; width: 1.5px; background: var(--margin); opacity: .8; pointer-events: none; }
.themes .theme { grid-template-columns: 50px minmax(0, 1fr) auto; column-gap: 0; row-gap: 0; padding: 13px 12px 14px 0; border-top: 1px solid var(--rule); min-height: 78px; }
.themes .theme:first-child { border-top: 0; }
.themes .theme:last-child { border-bottom: 0; }
.theme .ti { display: flex; align-items: center; justify-content: center; color: var(--blue); }
.theme .ti svg { width: 24px; height: 24px; }
.theme .tx { display: flex; flex-direction: column; min-width: 0; padding-left: 14px; }
.theme .tx .t2 { margin-top: 1px; }
.themes .theme .bar { height: 4px; margin-top: 9px; background: var(--rule); }
.themes .theme .cnt { align-self: start; padding: 1px 0 0 12px; font-family: var(--font-num); font-size: 13.5px; }
.themes .theme .cnt b { font-size: 16px; }
.themes .theme .go { margin-left: 6px; }
.theme.full .ti, .theme.full .cnt b { color: var(--ok); }
.theme.full .bar i { background: var(--ok); }

/* tab bar: a short ink stroke over the current tab */
.tabs a::before { content: ""; position: absolute; top: -1px; left: 50%; width: 24px; height: 3px; margin-left: -12px; border-radius: 0 0 3px 3px; background: var(--blue); opacity: 0; }
.tabs a[aria-current="page"]::before { opacity: 1; }

@media (min-width: 480px) {
  .ring { width: 132px; height: 132px; }
  .ring .n { font-size: 40px; }
  .hero-main { gap: 24px; }
}
/* ---- plan and readiness ---- */
/* today's goal: one line and a thin bar under the ring */
.plan { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.plan-now { font-size: 14.5px; line-height: 1.4; color: var(--ink2); min-width: 0; }
.plan-now b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.plan-ok, .plan-week { display: inline-block; margin-left: 10px; font-size: 13.5px; }
.plan-ok { font-weight: 600; color: var(--ok); }
.plan-date { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -8px 0; font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.plan-date b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 700; letter-spacing: -.02em; padding: 0 2px; background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 86%, transparent 86%); color: var(--on-hl); border-radius: 2px; }
.plan-date i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.plan .bar { height: 6px; background: var(--rule); }
.plan .small { line-height: 1.5; }
.plan-ask { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; margin: -6px 0 -10px; }
.plan-ask span { flex: 1 1 0; min-width: 0; }
.plan-ask .link, .plan-form .link { flex: none; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.plan-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding: 12px 14px 4px; border-radius: 12px; background: var(--panel); }
.plan-form label { font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.plan-row { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.plan-form input { flex: 1 1 150px; min-width: 0; min-height: 46px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); padding: 6px 10px; font-family: var(--font-fr); font-size: 16px; }
.plan-form .btn.sm { min-height: 46px; padding-inline: 20px; }
.plan-msg { color: var(--bad); }

/* readiness: a slip of notebook paper with the margin line; the state is rubber-stamped */
.rd { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 14px 12px 32px; border-radius: 6px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 6px 18px -10px var(--shade); }
.rd::before { content: ""; position: absolute; top: 0; bottom: 0; left: 18px; width: 1.5px; background: var(--margin); opacity: .8; }
.rd-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 10px; }
.rd-head h2 { font-size: 15px; letter-spacing: .04em; }
.rd-head span { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.rd-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rd-num { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; min-width: 0; }
.rd-q { margin-left: 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ink2); white-space: nowrap; }
.rd-num b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 46px; font-weight: 700; line-height: .95; letter-spacing: -.04em; }
.rd-num small { font-family: var(--font-fr); font-variant-numeric: tabular-nums; font-size: 14.5px; color: var(--ink2); white-space: nowrap; }
.rd.go .rd-num b { padding: 0 5px; margin-left: -5px; background: linear-gradient(transparent 16%, var(--hl) 16%, var(--hl) 90%, transparent 90%); color: var(--on-hl); border-radius: 2px; }
.rd-state { flex: none; margin: 0 2px 5px 0; padding: 3px 9px; border-radius: 5px; font-size: 14.5px; font-weight: 700; line-height: 1.45; letter-spacing: .08em; white-space: nowrap; color: var(--ink2); box-shadow: inset 0 0 0 1.5px currentColor; transform: rotate(-4deg); }
.rd.near .rd-state { color: var(--blue); }
.rd.go .rd-state { color: var(--ok); }
.rd-scale { position: relative; height: 8px; margin: 6px 0 4px; border-radius: 99px; background: var(--rule); }
.rd-scale i { display: block; height: 100%; max-width: 100%; border-radius: 99px; background: var(--blue); }
.rd.go .rd-scale i { background: var(--ok); }
.rd-pass { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.rd-pass em { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); padding: 0 4px; border-radius: 2px; background: var(--hl); color: var(--on-hl); font-family: var(--font-num); font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.35; }
.rd-line { font-size: 13.5px; line-height: 1.55; }
.rd-weak { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.rd-weak p { display: flex; flex-direction: column; min-width: 0; }
.rd-weak .small { line-height: 1.4; }
.rd-weak b { font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.rd-weak .btn { flex: none; min-height: 44px; padding-inline: 20px; }
.rd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 14px; padding-top: 8px; border-top: 1px solid var(--rule); }
.rd-foot > p { flex: 1 1 0; min-width: 0; }
.rd-foot .hero-fact { flex-basis: 100%; }
.rd-foot .small { line-height: 1.5; }
.rd-foot > .small { flex-basis: 100%; }
.rd-why { display: inline-block; padding: 14px 8px 14px 0; margin: -14px 0; font-size: 13.5px; line-height: inherit; white-space: nowrap; }
.rd-how { flex: 0 0 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--ink2); }
.rd-how li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.rd-how li:last-child { border-bottom: 1px solid var(--rule); }
.rd-how li b { flex: none; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }
.rd-invite { font-size: 15px; line-height: 1.6; }
.rd-invite .small { display: block; margin-top: 2px; }
.rd-empty .rd-foot { border-top: 0; padding-top: 0; }
/* the same estimate on the result page of a mock exam */
.rd-next { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rd-next p { font-size: 15px; line-height: 1.65; }
.rd-next p b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 359px) {
  .rd { padding: 12px 12px 12px 26px; }
  .rd::before { left: 13px; }
  .rd-num b { font-size: 40px; }
  .rd-weak .btn { padding-inline: 16px; }
}
/* ---- offer (unlock page and pay block) ---- */
/* the price is the one thing gone over with the highlighter */
.price { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.price b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; background: linear-gradient(transparent 10%, var(--hl) 10%, var(--hl) 90%, transparent 90%); color: var(--on-hl); padding: 0 7px; border-radius: 2px; }
.price small { font-size: 12.5px; line-height: 1.3; color: var(--ink2); }
.pay { border-radius: var(--r); padding: 18px 16px 16px; background: var(--blue-soft); display: flex; flex-direction: column; gap: 14px; }
.pay h2 { color: var(--ink); }
.pay-facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.pay-facts li { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 0 12px; border-left: 1.5px solid var(--blue); min-width: 0; }
.pay-facts b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.pay-facts span { font-size: 12.5px; line-height: 1.35; color: var(--ink2); }
.pay-line { font-size: 14px; line-height: 1.6; }
.pay-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pay-foot .btn { flex: 0 0 auto; min-width: 116px; }

.offer { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.offer-eye { font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: .1em; color: var(--blue); }
.offer-h { font-size: 27px; font-weight: 800; line-height: 1.24; letter-spacing: -.01em; }
.offer-h > span { display: block; }
.offer-h .num { font-family: var(--font-num); font-weight: 700; }
.cmp tbody th small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink2); }
.offer-price { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.offer-price .price b { font-size: 38px; }
.offer-terms { font-size: 13px; line-height: 1.55; color: var(--ink2); }
.offer-terms b { display: block; font-size: 16px; line-height: 1.4; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 359px) {
  .offer-h { font-size: 24px; }
  .offer-price { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
.offer-after { display: flex; flex-direction: column; gap: 8px; }
.offer-after h3 { font-size: 14px; font-weight: 700; line-height: 1.4; }
.offer-after ol { counter-reset: after; display: flex; flex-direction: column; gap: 8px; }
.offer-after li { counter-increment: after; position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.55; }
.offer-after li::before { content: counter(after); position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue); font-family: var(--font-num); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* free trial next to the unlocked bank: the unlocked column is the inked one */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; line-height: 1.45; }
.cmp thead td { width: 25%; }
.cmp thead th { text-align: left; padding: 10px 10px 8px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.cmp thead th.on { color: var(--blue); background: var(--blue-soft); border-radius: 12px 12px 0 0; }
.cmp tbody th { text-align: left; vertical-align: top; padding: 13px 6px 13px 0; font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); }
.cmp tbody td { vertical-align: top; padding: 11px 10px 13px; border-top: 1px solid var(--line); color: var(--ink2); overflow-wrap: anywhere; }
.cmp tbody td.on { background: var(--blue-soft); color: var(--ink); font-weight: 600; }
.cmp tbody tr:last-child td.on { border-radius: 0 0 12px 12px; }
.cmp td b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin-right: 4px; }
.cmp td.on b { color: var(--ink); }
.cmp td b.key { background: linear-gradient(transparent 8%, var(--hl) 8%, var(--hl) 92%, transparent 92%); color: var(--on-hl); padding: 0 4px; border-radius: 2px; }
.cmp td small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; line-height: 1.45; color: var(--ink2); }

/* a whole question as it is shown after answering, marked as an example */
.offer-sample { position: relative; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; padding: 24px 14px 16px; border: 1.5px dashed var(--line); border-radius: var(--r); min-width: 0; }
.offer-stamp { position: absolute; top: -12px; left: 12px; padding: 2px 9px; border-radius: 3px; background: var(--hl); color: var(--on-hl); font-size: 12.5px; font-weight: 700; line-height: 1.6; letter-spacing: .12em; transform: rotate(-2deg); }
.offer-sample .stem { font-size: 18.5px; }
.offer-sample .opts { gap: 8px; }
.offer-sample .opt { padding: 9px 12px; min-height: 0; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.offer-sample .opt .let { width: 30px; height: 30px; font-size: 14px; }
.offer-sample .opt .txt { padding-top: 3px; }
.offer-sample .opt .fr { font-size: 16px; }
.offer-sample + .pay-foot { margin-top: 6px; }

.offer-have h2 { font-size: 15px; }
.offer-honest { display: flex; flex-direction: column; gap: 6px; padding-left: 14px; border-left: 1.5px solid var(--margin); }
.offer-honest h2 { font-size: 15px; }
.offer-honest p { font-size: 13.5px; line-height: 1.7; color: var(--ink2); }
.offer-code { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1.5px dashed var(--blue); border-radius: var(--r); }
.offer-code .code { font-size: 25px; line-height: 1.3; }
@media (max-width: 359px) { .offer-code .code { font-size: 22px; } }
/* ---- small fixes after the page-by-page review ---- */
.grid40 button { text-align: center; }
/* ---- word popup ---- */
/* Any French word of a question can be tapped (never in the mock exam). The word gets the highlighter,
   and a small note with its meaning is pinned next to it. */
.tw { cursor: pointer; text-decoration: underline dotted var(--line); text-decoration-thickness: 1.5px; text-underline-offset: .26em; -webkit-touch-callout: none; }
.opt .tw { text-decoration-color: var(--ink2); text-decoration-thickness: 1px; }
.opt.dim .tw { text-decoration-color: var(--line); }
.tw.on { text-decoration: none; background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 90%, transparent 90%); color: var(--on-hl); border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
div.opt { cursor: default; }
.tw-hint { font-size: 13px; line-height: 1.5; color: var(--ink2); padding-left: 10px; border-left: 1.5px solid var(--margin); }
.tw-pop { position: fixed; z-index: 7; left: 0; top: 0; width: max-content; min-width: 128px; max-width: min(292px, calc(100vw - 20px)); padding: 9px 14px 12px; background: var(--paper); color: var(--ink); border-radius: 12px; box-shadow: 0 0 0 1.5px var(--blue), 0 10px 26px var(--shade); }
.tw-pop::after { content: ""; position: absolute; left: var(--tw-x, 50%); bottom: -6.5px; width: 11px; height: 11px; margin-left: -5.5px; background: var(--paper); border: solid var(--blue); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tw-pop.below::after { bottom: auto; top: -6.5px; border-width: 1.5px 0 0 1.5px; }
.tw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.tw-w { font-family: var(--font-fr); font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.tw-say { position: relative; flex: none; width: 34px; height: 34px; margin-right: -6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--line); }
.tw-say::before { content: ""; position: absolute; inset: -5px; }
.tw-say svg { width: 17px; height: 17px; }
.tw-zh { font-size: 16px; line-height: 1.5; }
.tw-tip { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 13.5px; line-height: 1.6; color: var(--ink2); }
.tw-tip b { display: inline-block; margin-right: 7px; padding: 0 5px; border-radius: 3px; background: var(--hl); color: var(--on-hl); font-size: 11.5px; font-weight: 700; line-height: 1.55; letter-spacing: .08em; vertical-align: 1px; }
.tw-none { font-size: 14px; line-height: 1.55; color: var(--ink2); }
.copy .voc .tip { flex-basis: 100%; font-size: 13.5px; color: var(--ink2); }
@media (prefers-reduced-motion: no-preference) {
  .tw-pop { animation: tw-in .12s ease-out; }
  @keyframes tw-in { from { opacity: 0; } }
}

/* ---- first question, price buttons, report ---- */
/* welcome: one real question to answer in place, framed like the example on the unlock page */
.wl-try { margin-top: 6px; padding-top: 22px; }
.wl-try .tw-hint { font-size: 12.5px; }
.wl-try .opt:not(div):active { background: var(--blue-soft); }
.wl-on { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--ink); font-size: 14px; line-height: 1.5; }
.wl-on b { display: block; font-size: 16px; font-weight: 700; color: var(--blue); }
.wl-on i { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: var(--on-blue); font-style: normal; font-weight: 700; font-size: 16px; line-height: 1; }
.wl-on { scroll-margin-bottom: calc(var(--tabs-h) + 22px); }
.wl-next { scroll-margin-top: 14px; }

/* the price is written on the button itself, in highlighter; the terms sit right under it */
.buy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.buy .btn { flex-wrap: wrap; gap: 6px 10px; min-height: 54px; font-size: 17px; }
.buy-dot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.buy-p { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16.5px; line-height: 1.5; letter-spacing: -.02em; white-space: nowrap; background: var(--hl); color: var(--on-hl); padding: 0 8px; border-radius: 4px; transform: rotate(-1.5deg); }
.buy-terms { font-size: 12.5px; line-height: 1.4; color: var(--ink2); text-align: center; }
.offer-sample + .buy { margin-top: 6px; }

/* when the bank was last built */
.bank-asof { font-size: 12.5px; }

/* "something is wrong with this question": a quiet line at the foot of the explanation */
.copy .report { position: relative; display: block; width: 100%; margin-top: var(--lh); line-height: var(--lh); font-size: 13px; color: var(--ink2); text-align: right; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.copy .src + .report { margin-top: 0; }
.copy .report::after { content: ""; position: absolute; inset: -8px 0; }
.copy .report .rid { margin-left: 8px; font-family: var(--font-num); }
.rep-id { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; color: var(--ink2); }
.rep-id .code { font-size: 24px; line-height: 1.2; -webkit-user-select: all; user-select: all; background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 90%, transparent 90%); color: var(--on-hl); padding: 0 6px; border-radius: 2px; }
.rep-to { font-weight: 700; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.sheet .msg:empty { display: none; }
/* ---- "do I have to take it?" self-check ---- */
.wl-check { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.wl-check b { color: var(--blue); white-space: nowrap; }
.chk-said { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.chk-said li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chk-said .q { grid-column: 1; font-size: 13px; color: var(--ink2); }
.chk-said .a { grid-column: 1; font-weight: 600; font-size: 15px; }
.chk-said .link { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; min-width: 44px; text-align: center; }
.chk-q h3 { font-size: 19px; line-height: 1.4; }
.chk-opt { min-height: 64px; text-align: left; }
.chk-opt .t2 { overflow-wrap: anywhere; }
.chk-opt .go { color: var(--blue); font-weight: 700; font-size: 20px; }
.chk-res { position: relative; border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); padding: 18px 16px 18px 30px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.chk-res::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; width: 1.5px; background: var(--margin); }
.chk-res h3 { font-size: 21px; line-height: 1.35; padding-right: 84px; }
.chk-res p { font-size: 15px; line-height: 1.75; }
.chk-stamp { position: absolute; right: 14px; top: 16px; padding: 3px 9px; border-radius: 5px; font-size: 14px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; box-shadow: inset 0 0 0 1.5px currentColor; transform: rotate(-4deg); color: var(--ink2); }
.chk-res.yes .chk-stamp { color: var(--bad); }
.chk-res.no .chk-stamp { color: var(--ok); }
.chk-res.maybe .chk-stamp { color: var(--blue); }
.tw-pop { cursor: pointer; }
/* ---- error notice ---- */
#oops { position: fixed; z-index: 40; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--bad), 0 8px 24px var(--shade); display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
#oops b { color: var(--bad); }
#oops code { font-family: var(--font-num); font-size: 12px; overflow-wrap: anywhere; color: var(--ink2); }
#oops button { align-self: flex-end; min-height: 36px; padding: 4px 14px; border-radius: 9px; background: var(--paper); font-weight: 600; }

button, a, [data-a] { touch-action: manipulation; }
