/* PhiExam · student web: the প্রশ্নব্যাংক tab (.dev/BANKUI/CONTRACT.md): page by page, tile grids, very little text.
   Palette v2 tokens only (app.css); tones come from .tone-* (--tone, --tone-soft, --tone-solid).
   Grids: 2 columns up to 480 px, 3 up to 900 px, 4 above. */

/* ------------------------------------------------------------------ page rhythm and small words */
.bk { display: block; }
.bk > * + * { margin-top: 14px; }
.bk > .ui-head + * { margin-top: 0; }
.bk section > .ui-section:first-child { margin-top: 8px; }
.bk > section > .ui-section:first-child { margin-top: 20px; }
.bk .ui-head-sub { margin-top: 0; }
.bk-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.bk-grow { flex: 1; min-width: 0; }
.bk-calm { padding: 8px; }
.bk-calm .empty { padding-top: 22px; padding-bottom: 22px; }
.bk-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.bk-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bk-failslot:empty, .bk-verdict:empty, .bk-after:empty { display: none; }
/* the step marker in a page head ("২/৩") */
.bk-step {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
}
.bk-spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: bk-spin .7s linear infinite;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* skeletons drawn in the shape of what is coming */
.skeleton.bk-sk { display: block; width: 100%; height: 140px; border-radius: var(--radius); }
.bk-sk.t { height: 104px; }
.bk-sk.t.small { height: 52px; border-radius: 14px; }
.bk-sk.line { height: 20px; width: 30%; border-radius: 8px; }
.bk-sk.chips { height: 40px; width: 60%; border-radius: 999px; }
.bk-sk.exam { height: 150px; }
.bk-sk.list { height: 236px; }
.bk-sk.quiz { height: 380px; }

/* ------------------------------------------------------------------ the grid and the tile: the one look of the tab */
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 481px) { .bk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 901px) { .bk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
/* the hub's "আরও": 2 on a phone, 4 on a desktop */
@media (min-width: 481px) and (max-width: 900px) { .bk-grid.sq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* choice rows (settings): a fixed number of columns */
.bk-grid.bk-choices { gap: 8px; }
.bk-grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bk-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 481px) {
  .bk-grid.c4, .bk-grid.c2.c4w { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 641px) { .bk-grid.c3.c6w { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.bk-t {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; min-height: 104px;
  margin: 0; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: transform .14s cubic-bezier(.2, .8, .2, 1), border-color .14s, background .14s;
}
a.bk-t:hover, button.bk-t:hover { text-decoration: none; border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); }
a.bk-t:active, button.bk-t:active { transform: scale(.98); }
a.bk-t:focus-visible, button.bk-t:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bk-t-ico {
  position: relative; width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--tone-soft); color: var(--tone);
}
.bk-t-foot { position: relative; margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-width: 0; }
.bk-t-label {
  min-width: 0; font-size: 14px; line-height: 20px; font-weight: 650; overflow-wrap: anywhere;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bk-t-n {
  flex: none; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2);
  font-size: 12px; line-height: 18px; font-weight: 700; text-align: center; white-space: nowrap;
}
.bk-t-note {
  position: relative; color: var(--muted); font-size: 12px; line-height: 17px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* the tick (chosen) or the lock (not in the course) in the corner */
.bk-t-tick {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); pointer-events: none;
}
.bk-t-tick.lock { background: var(--surface-2); color: var(--muted); }
/* a chapter's number, a university's short name: the small art of a tile */
.bk-t-no {
  position: relative; min-width: 36px; height: 36px; padding: 0 6px; flex: none; align-self: flex-start; border-radius: 11px;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 14px; font-weight: 800;
}
.bk-mono {
  position: relative; min-width: 40px; height: 40px; padding: 0 7px; flex: none; align-self: flex-start; border-radius: 12px;
  display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); font-size: 13px; font-weight: 800;
  line-height: 1; white-space: nowrap;
}
/* a university's logo (staff upload it in admin): on a plate that stays white in dark mode too, since logos are made
   for white; the size of a tile's icon. No logo, or one that fails to load: .bk-mono above. */
.bk { --bk-plate: #FFFFFF; }
.bk-logo {
  position: relative; width: 40px; height: 40px; flex: none; align-self: flex-start; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: var(--bk-plate); border: 1px solid var(--border);
}
.bk-logo > img { display: block; width: 32px; height: 32px; object-fit: contain; }
.ui-head > .bk-logo, .ui-head > .bk-mono { align-self: center; }
/* chosen: brand border, a tint and the tick */
.bk-t.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 50%, var(--surface)); }
.bk-t.on .bk-t-n { background: var(--brand); color: var(--on-brand); }
.bk-t.on .bk-t-no { background: var(--brand); color: var(--on-brand); }
.bk-t.on:not(.compact) .bk-t-label { padding-right: 2px; }
/* nothing in it, or switched off: faded, not a button */
.bk-t.off { opacity: .5; cursor: default; }
.bk-t.off .bk-t-note { opacity: 1; }
.bk-t.static { cursor: default; }
.bk-t.static.on { background: var(--surface); }
/* a category: tinted, its drawing in the corner, a solid icon */
.bk-t.tint { overflow: hidden; min-height: 120px; background: var(--tone-soft); border-color: transparent; }
.bk-t.tint .bk-t-ico { background: var(--tone-solid); color: var(--on-tint); }
.bk-t.tint .bk-t-n { background: var(--surface); color: var(--tone); }
a.bk-t.tint:hover, button.bk-t.tint:hover { border-color: color-mix(in srgb, var(--tone) 35%, transparent); }
.bk-art { position: absolute; right: -8px; top: -6px; width: 72px; height: 72px; color: var(--tone); opacity: .2; pointer-events: none; }
/* compact: one row (icon, label, count) — years, topics, choices */
.bk-t.compact { flex-direction: row; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 14px; }
.bk-t.compact .bk-t-ico { width: 32px; height: 32px; border-radius: 10px; }
.bk-t.compact .bk-t-label { flex: 1; font-size: 14px; line-height: 19px; font-weight: 600; }
.bk-t.compact .bk-t-tick { top: -7px; right: -7px; width: 20px; height: 20px; box-shadow: 0 0 0 2px var(--bg); }
.bk-t.compact .bk-t-note { display: none; }
/* a choice tile (how many, how long): centred words */
.bk-choices .bk-t.compact { justify-content: center; min-height: 48px; padding: 6px 8px; text-align: center; }
.bk-choices .bk-t.compact .bk-t-label { flex: 0 1 auto; font-size: 13px; }
.bk-choices .bk-t.compact .bk-t-ico { width: 26px; height: 26px; border-radius: 8px; background: transparent; }
.bk-choices .bk-t.compact.on .bk-t-ico { color: var(--brand); }
/* the style page's rules: small, flat */
.bk-rules .bk-t.compact { min-height: 46px; background: var(--surface-2); border-color: transparent; }
.bk-rules .bk-t.compact .bk-t-ico { background: transparent; color: var(--text-2); }
.bk-rules .bk-t.compact .bk-t-label { font-size: 13px; }
/* optional subjects not picked correctly */
.bk-group.flag .bk-t:not(.on):not(.off) { border-color: var(--bad); }
.bk-flag { margin: 8px 0 0; color: var(--bad-ink); font-size: 13px; font-weight: 600; }

/* the omr.js door, if it ever lands in the "আরও" grid itself: the same tile look, without its sub-line */
.bk-ways > .bk-way {
  grid-column: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; min-height: 104px; padding: 14px;
  border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border); color: var(--text); text-decoration: none;
}
.bk-ways > .bk-way.off { opacity: .5; }
.bk-ways > .bk-way .bk-way-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bk-ways > .bk-way .ui-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tone-soft); color: var(--tone); }
.bk-ways > .bk-way .bk-way-text { margin-top: auto; display: flex; flex-direction: column; }
.bk-ways > .bk-way .bk-way-text strong { font-size: 14px; line-height: 20px; }
.bk-ways > .bk-way .bk-way-text span { color: var(--muted); font-size: 12px; line-height: 17px; }
.bk-ways > .bk-way:not(.off) .bk-way-text span { display: none; }

/* ------------------------------------------------------------------ hub */
.bk-access { position: relative; max-width: 220px; min-height: 36px; text-decoration: none; color: var(--text); }
.bk-access::after { content: ""; position: absolute; inset: -4px 0; } /* a 44 px tap target */
.bk-access:hover { text-decoration: none; }
.bk-access .icon { color: var(--brand); flex: none; }
.bk-access-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ admission pages */
.bk-search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; border-radius: 999px; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--muted); cursor: text;
}
.bk-search:focus-within { border-color: var(--brand); }
.bk-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 15px;
}
.bk-search input::placeholder { color: var(--muted); }
.bk-lockline {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.bk-lockline span { flex: 1; min-width: 0; }
.bk-lockline .icon { color: var(--muted); flex: none; }
.bk-lockline:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bk-lock { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 0; }
.bk-lock p { margin: 0; }
.bk-lock-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); }
.bk-units .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.bk-units .chips::-webkit-scrollbar { display: none; }
.bk-units .chip { flex: none; min-height: 44px; }
.bk-units .chip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.bk-more { margin-top: 10px; }
.bk-exams { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.bk-exam { display: flex; flex-direction: column; gap: 10px; }
.bk-exam-top { display: flex; align-items: flex-start; gap: 12px; }
.bk-exam-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-exam-text strong { font-size: 15px; line-height: 23px; overflow-wrap: anywhere; }
.bk-exam-text span { color: var(--muted); font-size: 12px; line-height: 18px; }
.bk-exam-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.bk-exam-actions .btn { flex: 1; }
.bk-exam-actions:empty { display: none; }
.bk-report { text-align: center; }
.bk-report .bk-grid { text-align: left; }
.bk-report-big { margin: 0; font-size: 28px; line-height: 40px; font-weight: 800; }

/* ------------------------------------------------------------------ the sticky glass bar at the bottom of a page */
.bk-foot { position: sticky; bottom: calc(var(--tabbar-h, 0px) + 4px); z-index: 41; margin-top: 18px; }
/* no entrance animation on the bar: an animated parent cuts the blur off (the bar would show the page through it) */
.ui-in > .bk-foot { animation: none; }
/* a page that ends in the bar fills the screen, so a short page still has the bar at the bottom (as the app) */
.bk:has(> .bk-foot) {
  display: flex; flex-direction: column;
  min-height: calc(100dvh - max(14px, env(safe-area-inset-top)) - var(--tabbar-h, 0px) - 40px);
}
.bk:has(> .bk-foot) > .bk-foot { margin-top: auto; margin-bottom: -20px; padding-top: 18px; pointer-events: none; }
.bk-foot > .bk-foot-in { pointer-events: auto; }
.bk-foot-in {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 12px 32px -14px var(--shadow-color);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
}
/* the remembered settings, one small line: "২০ প্রশ্ন · ২০ মিনিট · −০.২৫  বদলাও" */
.bk-foot-line { display: flex; align-items: center; gap: 6px; min-height: 32px; padding-left: 4px; color: var(--muted); font-size: 12px; line-height: 17px; }
.bk-foot-line > .icon { flex: none; }
.bk-foot-set { flex: 1; min-width: 0; }
.bk-change {
  position: relative; flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.bk-change:hover { text-decoration: none; }
.bk-change::after { content: ""; position: absolute; inset: -6px -4px; } /* a 44 px tap target */
.bk-change:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* what is picked, one line: "৩টি অধ্যায় · ৩৮৩ প্রশ্ন" */
.bk-foot-sum { margin: 0; padding-left: 4px; color: var(--text); font-size: 14px; line-height: 21px; font-weight: 700; overflow-wrap: anywhere; }
.bk-foot-sum.warn { color: var(--warn-ink); font-size: 13px; line-height: 19px; }
/* the buttons share the row; the main one is the widest */
.bk-foot-row { display: flex; align-items: center; gap: 8px; }
.bk-foot-row .btn { flex: 1 1 0; min-width: 0; }
.bk-foot-row .btn.bk-go, .bk-foot-row .btn.primary { flex-grow: 1.4; }
.bk-foot-row .btn .chip-n { margin-left: 2px; }
.bk-foot-line.warn { color: var(--warn-ink); font-weight: 600; }

/* ------------------------------------------------------------------ the track row (বিষয়): chips that wrap, no sideways scroll */
.bk-tracks { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-track { min-height: 44px; padding: 0 12px; gap: 6px; max-width: 100%; }
.bk-track > .icon { flex: none; color: var(--muted); }
.bk-track.on > .icon { color: inherit; }
.bk-track.on:hover { border-color: var(--brand); }
.bk-track.locked { color: var(--muted); border-style: dashed; }
.bk-track.off { color: var(--muted); opacity: .55; cursor: default; }
.bk-track.off:hover { border-color: var(--border); }
.bk-track:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ------------------------------------------------------------------ settings (the page, the sheets) */
.segmented.bk-seg { display: flex; width: 100%; flex-wrap: nowrap; }
.segmented.bk-seg button { flex: 1; min-height: 44px; }
.bk-sheet { display: flex; flex-direction: column; gap: 16px; padding-bottom: 4px; }
.bk-set-h { margin: 0 0 8px; color: var(--text-2); font-size: 13px; line-height: 20px; font-weight: 700; }
.bk-set .chip { min-height: 44px; }
.bk-setpage > .bk-set + .bk-set { margin-top: 18px; }
.bk-sets { display: flex; flex-direction: column; gap: 18px; }
.bk-fold-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.bk-fold-btn > span:first-of-type { flex: 1; min-width: 0; }
.bk-fold-btn > .icon { color: var(--muted); flex: none; }
.bk-fold-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bk-fold { display: flex; flex-direction: column; gap: 18px; padding: 4px 2px; }
.bk-fold > .bk-clear { align-self: flex-start; min-height: 44px; padding: 0 14px; gap: 6px; }
/* "কাগজে দেবো" (OMR beta) */
.bk-omr { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.bk-omr .bk-t-ico { width: 32px; height: 32px; border-radius: 10px; }
.bk-omr-label { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.bk-omr .ui-switch::after { content: ""; position: absolute; inset: -7px -2px; } /* a 44 px tap target */
/* 44 px tap targets for the shared small buttons on the bank's pages (common.js / app.js make them 34–38 px) */
.bk .icon-btn { width: 44px; height: 44px; }
.bk .btn.small.bk-more, .bk .btn.small.bk-stop { min-height: 44px; }
.bk-fail { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--tone-soft); color: var(--text); }
.bk-fail .ui-ico { width: 36px; height: 36px; background: var(--surface); }
.bk-fail-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; line-height: 20px; }
.bk-fail-text strong { font-size: 14px; }
.bk-fail-text span { color: var(--text-2); }

/* ------------------------------------------------------------------ topics: one small group per chapter (and the
   chapters of several papers: one group per paper) */
.bk-tgroup + .bk-tgroup { margin-top: 22px; }
.bk-ghead-row { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.bk-ghead { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 21px; font-weight: 700; overflow-wrap: anywhere; }
.bk-all { flex: none; min-height: 44px; min-width: 56px; justify-content: center; }
.bk-tgroup .bk-more { width: 100%; min-height: 44px; margin-top: 8px; }
/* a topic tile: the icon beside the name (up to 3 lines), the count under it (as the app's small tiles) */
.bk-tgroup .bk-t.compact {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px;
  align-content: center; align-items: center;
}
.bk-tgroup .bk-t.compact .bk-t-ico { grid-row: 1 / span 2; align-self: center; }
.bk-tgroup .bk-t.compact .bk-t-label { -webkit-line-clamp: 3; line-height: 19px; }
.bk-tgroup .bk-t.compact .bk-t-n { justify-self: start; }
/* a year tile: the session never breaks ("২০২৫-২৬"); on a phone the count goes under it, as on a topic tile */
.bk-t.bk-yr .bk-t-label { white-space: nowrap; }
@media (max-width: 480px) {
  .bk-t.compact.bk-yr {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px;
    align-content: center; align-items: center;
  }
  .bk-t.compact.bk-yr .bk-t-ico { grid-row: 1 / span 2; }
  .bk-t.compact.bk-yr .bk-t-n { justify-self: start; }
}

/* ------------------------------------------------------------------ quick quiz */
.bk-dots { display: flex; gap: 6px; margin-top: -4px; }
.bk-dot { flex: 1; height: 6px; border-radius: 3px; background: var(--track); transition: background .2s; }
.bk-dot.on { background: var(--brand); }
.bk-dot.good { background: var(--good); }
.bk-dot.bad { background: var(--bad); }
.bk-qcard { display: flex; flex-direction: column; gap: 14px; }
.bk-qcard .q-text { margin-bottom: 0; }
.bk-qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 18px; }
.bk-qmeta .icon-btn { width: 44px; height: 44px; }
.bk-opts { display: flex; flex-direction: column; gap: 10px; }
.bk-opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 52px; padding: 11px 14px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .14s, background .14s;
}
button.bk-opt:hover:not(:disabled) { border-color: var(--brand); }
button.bk-opt:disabled { cursor: default; color: var(--text); }
.bk-opt.static { cursor: default; }
.bk-opt-label {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
  color: var(--text-2); font-size: 13px; font-weight: 700;
}
.bk-opt-body { flex: 1; min-width: 0; padding-top: 3px; line-height: 1.6; overflow-x: auto; }
.bk-opt-mark { display: inline-flex; align-items: center; gap: 4px; flex: none; padding-top: 5px; color: var(--good-ink); font-size: 12px; font-weight: 700; }
.bk-opt.mine { border-color: var(--brand); }
.bk-opt.mine .bk-opt-label { background: var(--brand); color: var(--on-brand); }
.bk-opt.right { border-color: var(--good); background: var(--good-soft); }
.bk-opt.right .bk-opt-label { background: var(--good); color: var(--on-tint); }
.bk-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.bk-opt.wrong .bk-opt-label { background: var(--bad); color: var(--on-tint); }
.bk-verdict-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--tone-soft); color: var(--tone);
}
.bk-verdict-in strong { font-size: 15px; }
.bk-verdict-in span { margin-left: auto; color: var(--text-2); font-size: 12px; }
.bk-after { display: flex; flex-direction: column; gap: 12px; }
.bk-solution { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.bk-preview .bk-solution { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.bk-solution h3 { margin: 0 0 8px; font-size: 15px; line-height: 23px; }
.bk-done { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 18px; text-align: center; }
.bk-done h2 { margin: 10px 0 0; font-size: 22px; line-height: 32px; }

/* ------------------------------------------------------------------ saved (a list: those are questions) */
.bk-slist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.bk-srow { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.bk-srow + .bk-srow { border-top: 1px solid var(--border); }
.bk-srow-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 8px 12px 14px; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.bk-srow-main:hover .bk-srow-stem { color: var(--brand); }
.bk-srow-stem {
  font-size: 14px; line-height: 22px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bk-srow-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 18px; }
.bk-unsave { color: var(--brand); flex: none; border-color: transparent; background: transparent; }
.bk-unsave .icon path { fill: currentColor; }
.bk-preview .bk-opts { margin-top: 4px; }
.bk-undo {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h, 0px) + 12px); z-index: 70; display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--hero-1); color: var(--hero-text);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; transform: translateX(-50%);
  animation: bk-undo-in .2s cubic-bezier(.2, .8, .2, 1); transition: opacity .2s, transform .2s;
}
.bk-undo .icon { color: var(--good-ink); flex: none; }
.bk-undo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-undo.out { opacity: 0; transform: translate(-50%, 8px); }
.bk-undo-btn {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--hero-chip); color: var(--hero-accent);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
@keyframes bk-undo-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ------------------------------------------------------------------ wider screens */
@media (min-width: 640px) {
  .bk-exams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the bar: the settings line on top, then what is picked on the left and the buttons on the right */
  .bk-foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 6px; align-items: center; }
  .bk-foot-in > .bk-failslot, .bk-foot-in > .bk-foot-line { grid-column: 1 / -1; }
  .bk-foot-in > .bk-foot-sum { grid-column: 1; }
  .bk-foot-in:not(:has(> .bk-foot-sum)) > .bk-foot-line { grid-column: 1; } /* no summary: the line beside the buttons */
  .bk-foot-row { grid-column: 2; justify-content: flex-end; }
  .bk-foot-row .btn { flex: 0 0 auto; min-width: 140px; }
  .bk-foot-row .btn.primary { min-width: 200px; }
}
@media (min-width: 1024px) {
  .bk-t.tint { min-height: 136px; padding: 16px; }
  .bk-t.tint .bk-art { width: 96px; height: 96px; }
  .bk-foot { bottom: 16px; }
  .bk:has(> .bk-foot) { min-height: calc(100dvh - 104px); }
  .bk:has(> .bk-foot) > .bk-foot { margin-bottom: -44px; }
  .bk-undo { bottom: 24px; }
  .bk-quick { max-width: 760px; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .bk-spin, .bk-undo { animation: none; }
  .bk-t, .bk-undo, .bk-dot { transition: none; }
  a.bk-t:active, button.bk-t:active { transform: none; }
}
