/* punk-book.css — the Grammar place (punk-book.js) and Matcha's questions on THUD's card (punk-book-drill.js).
   BOOK.md. Every colour is a token of the palette worn (frap.css), so each skin, by night, by day and under Field
   mode's red veil, keeps the inks verify_contrast.py prices. The skins' faces reach the titles here as they reach
   THUD's own (Steampunk's Playfair, Cyberpunk's tight display); the book's text keeps the page's face. */

/* ══ the contents ══════════════════════════════════════════════════════════════════ */
.bk-lede { margin: -6px 2px 14px; cursor: default; }
.bk-hero { display: grid; gap: 4px; margin-top: 12px; }
.bk-hero .caps { color: var(--acc-ink); }
.bk-hero__title { font-size: 22px; line-height: 1.2; font-weight: 650; letter-spacing: -.016em; overflow-wrap: anywhere; }
.bk-hero .btn { margin-top: 12px; }
.bk-hero--due { box-shadow: inset 0 0 0 1.5px var(--acc-3), inset 0 1px 0 var(--hi), var(--cast); }
.bk-next { display: flex; align-items: center; gap: 8px; margin: 14px 4px 0; }
.bk-next .i { width: 16px; height: 16px; color: var(--acc-ink); }
.bk-parts { margin-top: 22px; }
.bk-parts .chip[aria-current="page"] { background: var(--acc); color: var(--on-acc); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px -8px var(--acc-3); }
.bk-part { display: flex; align-items: center; gap: 12px; margin: 22px 2px 0; }
.bk-part > .t-foot { margin-left: auto; }
.bk-unit { display: flex; align-items: center; gap: 12px; font-size: 17px; margin-top: 22px; }
/* THE ROAD (WEEK.md W1): a band's head says Wheat & Sky's name for it under its own, its count under both, and what the
   learner can do after it */
.bk-part__main { flex: 1; min-width: 0; }
.bk-part--band .t-foot { display: block; margin-top: 4px; }
.bk-band { display: block; margin-top: 3px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: var(--ink-2); }
.bk-cando { margin: 12px 4px 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.bk-cando .caps { display: block; margin-bottom: 4px; color: var(--acc-ink); }
/* the units' pictures (Matcha Edition's still lifes, in Steampunk and Cyberpunk) */
:is(.bk-unit__art, .bk-part__art, .bk-head__art) { flex: none; object-fit: cover; background: rgba(var(--tint), .06); box-shadow: 0 0 0 1px rgba(var(--tint), .14), var(--cast); }
.bk-unit__art { width: 44px; height: 44px; border-radius: 12px; }
.bk-part__art { width: 52px; height: 52px; border-radius: 14px; }
.bk-head--art { display: flex; align-items: center; gap: 16px; }
.bk-head__main { min-width: 0; }
.bk-head__art { width: 92px; height: 92px; border-radius: 22px; }
@media (max-width: 420px) { .bk-head__art { width: 76px; height: 76px; border-radius: 18px; } }
html[data-palette="steam"] :is(.bk-unit__art, .bk-part__art, .bk-head__art) { box-shadow: 0 0 0 1.5px var(--rim), 0 0 0 4px rgba(0, 0, 0, .22), var(--cast); }
.bk-n { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--acc-ink); margin-right: .12em; }
.bk-row .row__title { font-size: 16px; line-height: 1.3; }
.bk-row--due .row__sub { color: var(--acc-ink); font-weight: 600; }
.bk-group .ring .i { width: 14px; height: 14px; stroke-width: 2.4; color: var(--acc-ink); }

/* ══ a lesson ═══════════════════════════════════════════════════════════════════ */
.bk-head { margin: 4px 2px 16px; }
.bk-eyebrow { color: var(--ink-3); }
.bk-title { margin-top: 6px; font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.022em; overflow-wrap: anywhere; }
.bk-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }   /* minmax: a wide table scrolls in its card, never the page */
/* a lesson on a desk: the page's column is 1080px there, and a rule's paragraph ran 150 letters a line; the lesson stands
   in the 760px column a smaller desk gives every page, centred, its prose near a reading measure */
@media (min-width: 1100px) { #view > .bk-head--lesson, #view > .bk-body { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; } }
.bk-card { --r: var(--r-tile); padding: 18px 18px 16px; }
.bk-card > .caps, .bk-list > .caps, .bk-learn > .caps, .bk-words > .caps { display: block; margin-bottom: 8px; color: var(--acc-ink); }
.bk-learn { margin: 0 2px; font-size: 17px; line-height: 1.45; }
/* THUD ENG (WEEK.md W7): the rule's tone, Wheat & Sky's three voices, above the lesson's first rule */
.bk-voice { display: grid; gap: 7px; margin: 0 2px; }
.bk-voice__l { color: var(--ink-3); font-size: 11px; }
.bk-voice .seg { width: 100%; }
/* THUD ENG (WEEK.md W6): what a set's misses have in common, Wheat & Sky's name and rule for it */
.bk-mc { padding: 14px 16px; border-radius: 18px; margin: 0 0 12px; }
.bk-mc__k { color: var(--acc-ink); font-size: 11px; }
.bk-mc__t { margin: 6px 0 4px; font-size: 18px; font-weight: 700; line-height: 1.25; }
.bk-mc__r { margin: 0; font-size: 15.5px; line-height: 1.5; }
.bk-mc__n { margin: 8px 0 0; }
.bk-rule p { font-size: 16.5px; line-height: 1.55; }
.bk-rule p + p { margin-top: 8px; }
.bk-rule p.bk-cap { margin: 16px 0 4px; font-size: 13.5px; line-height: 1.4; font-weight: 650; color: var(--ink-3); }   /* a table's caption inside its rule */
.bk-rli { margin: 8px 0 0 1.1em; padding: 0; display: grid; gap: 4px; font-size: 16px; line-height: 1.5; }
.bk-scroll { margin-top: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bk-tables .bk-scroll:first-child { margin-top: 0; }
.bk-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bk-table th { padding: 0 14px 8px 0; text-align: left; vertical-align: bottom; font-size: 12.5px; line-height: 1.3; font-weight: 650; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.bk-table td { padding: 9px 14px 9px 0; vertical-align: top; font-size: 17px; line-height: 1.35; font-weight: 550; border-bottom: 1px solid var(--line); }
.bk-table tr:last-child td { border-bottom: 0; }
/* a phone: four columns at 17px ran a subject's cell («he / she / it — anyone single») five lines deep; set tighter there */
@media (max-width: 520px) { .bk-table td { padding: 8px 10px 8px 0; font-size: 15px; line-height: 1.32; } .bk-table th { padding-right: 10px; } }
.bk-table :is(th, td):last-child { padding-right: 0; }
.bk-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.bk-pairs { --r: var(--r-tile); margin: 0; padding: 0; list-style: none; }
.bk-pair { position: relative; display: grid; gap: 3px; padding: 12px 16px; }
.bk-pair + .bk-pair::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--line); }
.bk-uk { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.bk-en { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.bk-arrow { margin: 10px 4px 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.bk-watch { box-shadow: inset 3px 0 0 var(--acc-3), inset 0 1px 0 var(--hi), var(--cast); }
.bk-watch p { font-size: 16px; line-height: 1.55; }
.bk-body .ok { color: var(--acc-ink); font-weight: 650; white-space: nowrap; }
.bk-body .x { color: var(--wrong-ink); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--wrong); }
.bk-body .af { font-weight: 700; color: var(--acc-ink); }
.bk-words { margin: 2px 2px 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.bk-practise { display: grid; gap: 12px; margin-top: 6px; }
.bk-practise > .caps { margin-bottom: 0; }
.bk-practise .t-call { line-height: 1.45; }
.bk-state { display: flex; align-items: center; gap: 14px; }
.bk-state .ring__in b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bk-state .ring__in small { font-size: 10px; color: var(--ink-3); }
.bk-state .ring .i { width: 18px; height: 18px; stroke-width: 2.4; color: var(--acc-ink); }
.bk-every__say { margin: -4px 4px 0; }
.bk-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.bk-nav__a { --r: var(--r-tile); display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 14px; color: inherit; text-decoration: none; }
.bk-nav__a--next { justify-content: space-between; text-align: right; }
.bk-nav__a--next .bk-nav__t { justify-items: end; margin-left: auto; }
.bk-nav__a .i { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.bk-nav__t { display: grid; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.3; }
.bk-nav__t > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-nav__t .caps { color: var(--ink-3); }
.bk-source { margin: 6px 4px 0; }
.bk-wait { min-height: 120px; }
@media (max-width: 420px) { .bk-nav { grid-template-columns: 1fr; } .bk-nav__a--next { flex-direction: row; } }
@media (min-width: 960px) { .bk-title { font-size: 36px; } .bk-card { padding: 22px 24px 20px; } }

/* the skins' titles (punk-steam.css, punk-cyber.css name THUD's own; these are the Grammar's) */
html[data-palette="steam"] :is(.bk-title, .bk-hero__title, .bk-part .t-head) { font-family: var(--display); font-weight: 700; letter-spacing: 0; }
html[data-palette="steam"] .bk-title { font-weight: 800; }
html[data-palette="cyber"] :is(.bk-title, .bk-hero__title, .bk-part .t-head) { font-family: var(--display); font-weight: 750; letter-spacing: -.024em; }

/* ══ the questions on THUD's card (drill.html?g=…) ══════════════════════════════════ */
html[data-skin="frap"].bk-drill #card .bk-stem {
  margin-top: 8px; font-size: clamp(21px, 1.25vw + 15px, 32px); line-height: 1.28; font-weight: 600; letter-spacing: -.012em;
  text-wrap: balance; overflow-wrap: anywhere; white-space: normal;
}
html[data-skin="frap"].bk-drill #card .bk-gap {
  display: inline-block; min-width: 2.4em; height: 1.06em; margin: 0 .08em; vertical-align: -.16em; border-radius: 9px;
  background: rgba(var(--tint), .08); box-shadow: inset 0 0 0 1.5px var(--acc-3);
}
html[data-skin="frap"].bk-drill #card .bk-gap--filled {
  min-width: 0; height: auto; margin: 0 .02em; padding: 0 .2em; vertical-align: baseline; color: var(--acc-ink); -webkit-text-fill-color: currentColor;
  background: rgba(var(--acc-rgb), .14); box-shadow: none; animation: bk-fill .42s var(--spring, ease-out) both;
}
@keyframes bk-fill { from { opacity: 0; transform: translateY(4px); } }
html[data-skin="frap"].bk-drill #card .bk-cue { color: var(--ink-3); -webkit-text-fill-color: currentColor; font-weight: 500; }
html[data-skin="frap"].bk-drill #options .opt-btn[hidden] { display: none !important; }
html[data-skin="frap"].bk-drill #options .opt-btn.bk-dim { opacity: .48; }
html[data-skin="frap"].bk-drill #options.bk-long { grid-template-columns: minmax(0, 1fr) !important; }
html[data-skin="frap"].bk-drill body:not(.vk-type) #main-content > #card > #options.bk-long { grid-template-columns: minmax(0, 1fr) !important; }
html[data-skin="frap"].bk-drill #options.bk-long .opt-btn { min-height: 56px !important; }
html[data-skin="frap"].bk-drill #options .opt-text { white-space: normal; overflow-wrap: anywhere; text-align: left; }
/* the typed answer, in a review: the field and its button (the engine draws their frame when it runs; here it does not) */
html[data-skin="frap"].bk-drill #type-wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 16px auto 0; width: 100%; max-width: 560px; }
html[data-skin="frap"].bk-drill #type-input { flex: 1 1 200px; min-width: 0; min-height: 56px; padding: 0 18px; font: inherit; font-size: 22px; font-weight: 600; text-align: center; }
html[data-skin="frap"].bk-drill #type-input::placeholder { font-size: 16px; font-weight: 500; }
html[data-skin="frap"].bk-drill #type-input:disabled { opacity: .7; }
html[data-skin="frap"].bk-drill #type-submit { flex: none; min-height: 56px; padding: 0 22px; font: inherit; font-size: 16px; font-weight: 650; cursor: pointer; }
html[data-skin="frap"].bk-drill #type-submit:disabled { opacity: .5; cursor: default; }
html[data-skin="frap"].bk-drill #grammar-note .bk-reasons { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
html[data-skin="frap"].bk-drill #grammar-note .bk-reasons li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 15px; line-height: 1.42; color: var(--ink-2); }
html[data-skin="frap"].bk-drill #grammar-note .bk-rm { font-weight: 800; line-height: 1.42; }
html[data-skin="frap"].bk-drill #grammar-note .bk-r .bk-rm { color: var(--acc-ink); }
html[data-skin="frap"].bk-drill #grammar-note .bk-w .bk-rm { color: var(--wrong-ink); }
html[data-skin="frap"].bk-drill #grammar-note .bk-o { color: var(--ink); font-weight: 700; margin-right: .2em; }
html[data-skin="frap"].bk-drill #grammar-note .bk-chose { margin: 0 -8px; padding: 6px 8px; border-radius: 10px; background: rgba(229, 96, 78, .12); }
html[data-skin="frap"].bk-drill #grammar-note .gn-pair { text-align: left; justify-content: flex-start; }
html[data-skin="frap"].bk-drill #grammar-note.bk-notyet .gn-verdict { color: var(--ink) !important; }
html[data-skin="frap"].bk-drill #grammar-note.bk-notyet .gn-note { text-align: left; }
/* the results: a question is a sentence, not a word */
.bk-res .fr-q__uk.bk-q { white-space: normal; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.4; font-weight: 550; }
.bk-res .bk-q .bk-gap--filled, .bk-res .bk-a { color: var(--acc-ink); font-weight: 700; }
.bk-res .bk-cue { color: var(--ink-3); }
.bk-res .fr-q__note .bk-o { color: var(--ink); margin-right: .2em; }
.bk-res .fr-q__note.bk-w .bk-o { color: var(--wrong-ink); }
.bk-res .fr-q__note + .fr-q__note { margin-top: 6px; }
/* the counter's room under the round's bar on a phone, as the engine gives a word's card (vocab-engine.js, its own sheet) */
@media (max-width: 600px) { html[data-skin="frap"].bk-drill #card-number { padding-top: calc(env(safe-area-inset-top, 0px) + 36px) !important; min-height: 0 !important; } }
@media (max-width: 600px) and (pointer: coarse) { html[data-skin="frap"].bk-drill #card-number { padding-top: calc(env(safe-area-inset-top, 0px) + 50px) !important; } }
/* on a phone a word's verdict floats over its answers; a rule's reasons are longer, and are read with the answers in
   view: the note stays under them, shrinks to the room above Continue and scrolls inside */
@media (max-width: 560px) {
  html[data-skin="frap"].bk-drill body #main-content > #card > #grammar-note.revealed {
    margin-bottom: calc(max(var(--sab), 12px) + 64px) !important; flex: 0 1 auto !important; min-height: 0 !important; max-height: none !important; overflow-y: auto !important;
  }
}
/* …but on a short phone (428 x 746) that room was 62 px: there the card grows to hold the note whole and the page scrolls
   (punk-book-drill.js roomy()); where the note keeps its own scroll, its foot fades while there is more below */
@media (max-width: 560px) {
  html[data-skin="frap"].bk-drill body #main-content > #card.bk-grow { height: auto !important; max-height: none !important; flex: none !important; }
  html[data-skin="frap"].bk-drill body #main-content > #card.bk-grow > #grammar-note.revealed { flex: none !important; overflow-y: visible !important; }
  html[data-skin="frap"].bk-drill #grammar-note.is-long:not(.is-end) { -webkit-mask: linear-gradient(#000 calc(100% - 30px), transparent); mask: linear-gradient(#000 calc(100% - 30px), transparent); }
}
/* three answers on a desk stand in one row (a gender: masculine, feminine, neuter), not two and one */
@media (min-width: 1100px) {
  html[data-skin="frap"].bk-drill body:not(.vk-type) #main-content > #card > #options.bk-three:not(.bk-long) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
/* ⚑ a report on a question (the set's options sheet) */
.bk-flag__note { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--tint), .05); color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
.bk-flag__note:focus { outline: none; border-color: var(--acc-3); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .2); }
/* reduced motion: the answer lands in its gap without moving */
@media (prefers-reduced-motion: reduce) { html[data-skin="frap"].bk-drill #card .bk-gap--filled { animation: none; } }
/* Listen: a speaker at an example's end (shown only where the device has a Ukrainian voice) */
.bk-pair:has(> .bk-say:not([hidden])) { padding-right: 60px; }
.bk-say { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(var(--tint), .08); color: var(--acc-ink); cursor: pointer; }
.bk-say .i { width: 18px; height: 18px; }
.bk-say.is-on { background: var(--acc); color: var(--on-acc); }
/* Listen to the examples: the control at a lesson's top, and the line being read */
.bk-readall { justify-self: start; gap: 8px; }
.bk-readall .i { width: 17px; height: 17px; color: var(--acc-ink); }
.bk-pair.is-reading { background: rgba(var(--acc-rgb), .12); }
.bk-pair.is-reading .bk-uk { color: var(--acc-ink); }
/* Questions only: a part's card */
.bk-quiz { --r: var(--r-tile); display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.bk-quiz__main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bk-quiz__main .caps { color: var(--acc-ink); }
.bk-quiz__main b { font-size: 16px; line-height: 1.3; font-weight: 650; }
.bk-quiz .i--chev { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
html[data-palette="steam"] .bk-quiz__main b { font-family: var(--display); font-weight: 700; }

/* the rule, one tap away under the reasons (punk-book-drill.js ruleOf), and from each question in the results */
.bk-rule { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(var(--tint), .12); text-align: left; }
.bk-rule > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; color: var(--acc-ink); font-size: 14px; line-height: 1.35; }
.bk-rule > summary::-webkit-details-marker { display: none; }
.bk-rule > summary::after { content: ""; flex: none; align-self: center; width: 7px; height: 7px; margin-left: auto; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.bk-rule[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.bk-rule__lab { flex: none; font-weight: 700; }
.bk-rule__of { color: var(--ink-3); }
.bk-rule__body { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.bk-rule__body p { margin: 0 0 8px; }
.bk-rule__body ul { margin: 0 0 8px; padding-left: 20px; }
.bk-rule__watch { color: var(--ink-2); }
.fr-q__rule { display: inline-block; margin-top: 10px; color: var(--acc-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.fr-q__rule:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .bk-rule > summary::after { transition: none; } }

/* Questions only: the missed waiting (a count in place of the ring), and a unit's own link under its heading */
.bk-quiz__n { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--wrong) 16%, transparent); color: var(--wrong-ink); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.bk-unitq { display: flex; align-items: center; gap: 8px; margin: -2px 4px 10px; padding: 4px 0; color: var(--acc-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.bk-unitq .i--chev { width: 14px; height: 14px; opacity: .7; }
.bk-unitq:hover span { text-decoration: underline; }
.bk-size { margin: 0 12px 12px; }

/* Words and Grammar, two modes: the Grammar's own Review and Record (punk-book.js review(), record()) */
.bk-mode { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.bk-mode .gh { margin: 8px 4px -4px; }
.bk-mode__say { margin: 4px 6px 0; }
.bk-empty { padding: 22px 20px; }
.bk-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bk-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; }
.bk-tile b { font-family: var(--display, inherit); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.bk-tile span { color: var(--ink-3); font-size: 13px; line-height: 1.3; }
@media (min-width: 900px) { .bk-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }


/* The course (FLOW.md F4): its card leads Questions only on the Grammar place, with its way in; at a sitting's end, the
   outlined way to go over the missed stands above the way on (punk-book-drill.js courseEnd) */
.bk-quiz__go { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--btn-fill); color: var(--on-btn); font-size: 14px; font-weight: 700; box-shadow: inset 0 1px 0 var(--btn-rim); }
.bk-quiz__go .i { width: 15px; height: 15px; }
.fr-pre { min-height: 50px; font-weight: 650; box-shadow: inset 0 0 0 1.5px rgba(var(--acc-rgb), .5); }
.bk-quiz--course { flex-wrap: wrap; row-gap: 8px; }
.bk-quiz--course > .bk-quiz__cap { flex: 0 0 100%; color: var(--acc-ink); }
/* QUIZ.md P1: one card, two ways (the lesson, or only its questions in order) */
.bk-hero--two .bk-hero__ways { display: grid; gap: 10px; margin-top: 12px; }
.bk-hero--two .bk-hero__ways .btn { margin-top: 0; }
.bk-hero__q { gap: 10px; }
.bk-hero__q small { color: var(--ink-3); font-size: 13px; font-weight: 600; }
/* at 375 wide (an iPhone SE, a mini, an X or 11 Pro) the two ways' unbroken labels pushed the card 8 px past the screen
   (WebKit, 2026-10-25): the column may not grow past the card, and «Only its questions» stacks over its count when the two
   do not fit side by side */
.bk-hero, .bk-hero--two .bk-hero__ways { grid-template-columns: minmax(0, 1fr); }
.bk-hero__q { flex-wrap: wrap; white-space: normal; row-gap: 2px; text-align: center; }
/* QUIZ.md P7: wider than a phone, the two ways stand side by side (on a desk they ran the whole width, one above the other) */
@media (min-width: 1000px) { .bk-hero--two .bk-hero__ways { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ── the Tryzub (run 4, punk-trizub.js): its card at the top of Grammar, its sheet ── */
.bk-tz { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 14px; width: 100%; margin-top: 12px; padding: 12px 14px 12px 10px;
  text-align: left; color: var(--ink); font: inherit; border: 0; border-radius: var(--r, 20px); cursor: pointer; }
.bk-tz__cv, .bk-tz__svg { width: 92px; height: 129px; display: block; }
.bk-tz--begun { grid-template-columns: 64px 1fr auto; padding-block: 8px; }   /* once it has grown: a smaller row */
.bk-tz--begun .bk-tz__cv, .bk-tz--begun .bk-tz__svg { width: 64px; height: 90px; }
.bk-tz__cv { opacity: 0; transition: opacity .8s ease; }
.bk-tz__cv.drawn { opacity: 1; }
.bk-tz__svg { fill: none; stroke: var(--acc); stroke-width: 1.4; }
.bk-tz__main { display: grid; gap: 3px; min-width: 0; }
.bk-tz__title { font-weight: 700; font-size: 16px; line-height: 1.25; }
.bk-tz__sub { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.bk-tz__big { display: grid; place-items: center; margin: 6px 0 4px; }
.bk-tz__big .bk-tz__cv, .bk-tz__big .bk-tz__svg { width: min(72vw, 300px); height: min(100.8vw, 420px); }
.bk-tz__count { text-align: center; margin: 0 0 10px; }
.bk-tz--res { margin: 4px 0 14px; text-decoration: none; grid-template-columns: 92px 1fr; }

/* ── THE CERTIFICATES (punk-cert.js, RUN4.md box K): the page, the Record's rows, the Debrief's card, the print ── */
.ct { display: grid; justify-items: center; gap: 16px; padding-bottom: 28px; }
.ct__sheet { position: relative; margin: 4px 0 0; aspect-ratio: 1240 / 1754; border-radius: 6px; overflow: hidden;
  /* as tall as leaves its ways in view above the tab bar on a phone (428 × 746), never wider than the page or 560 */
  width: min(100%, 560px, max(220px, calc((100svh - 260px) * 1240 / 1754)));
  background: linear-gradient(180deg, var(--ct-p1, #f4ecd9), var(--ct-p2, #e3d4b2)); box-shadow: 0 18px 50px rgba(0,0,0,.38), 0 2px 6px rgba(0,0,0,.25);
  view-transition-name: ct-sheet; }
.ct__img { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease; }
.ct__img.is-in { opacity: 1; }
.ct__wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ct-soft, var(--ink-3)); font-size: 14px; }
/* its ways, a round button and a word each (Mobbin: Photoroom's under a finished picture) */
.ct__acts { display: flex; justify-content: center; gap: 26px; width: min(100%, 560px); }
.ct__act { display: grid; justify-items: center; gap: 7px; min-width: 64px; padding: 0; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ct__ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; --r: 50%; }
.ct__ic .i { width: 22px; height: 22px; }
.ct__act--main .ct__ic { background: var(--acc); color: var(--on-acc); box-shadow: 0 10px 22px -10px rgba(var(--acc-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.ct__act:disabled { opacity: .45; cursor: default; }
.ct__act:focus-visible { outline: none; }
.ct__act:focus-visible .ct__ic { outline: 2px solid var(--acc-2); outline-offset: 3px; }
/* on a desk the sheet stands as tall as the window lets it, its ways beside it (a picture and its inspector) */
@media (min-width: 900px) {
  .ct { grid-template-columns: auto minmax(200px, 240px); justify-content: center; align-items: start; column-gap: 44px; row-gap: 18px; }
  .ct__sheet { grid-column: 1; grid-row: 1 / span 3; margin: 0; width: min(560px, max(280px, calc((100svh - 150px) * 1240 / 1754))); }
  .ct__acts { grid-column: 2; grid-row: 1; flex-direction: column; align-items: stretch; gap: 12px; width: auto; margin-top: 6px; }
  .ct__act { grid-template-columns: 54px 1fr; justify-items: start; align-items: center; gap: 14px; text-align: left; font-size: 15px; }
  .ct__foot { grid-column: 2; grid-row: 2; text-align: left; }
}
/* a small certificate grows into its sheet, and back (punk-cert.js names the one tapped) */
::view-transition-group(ct-sheet) { animation-duration: .5s; animation-timing-function: var(--spring); }
@media (prefers-reduced-motion: reduce) { .ct__img { transition: none; } ::view-transition-group(ct-sheet), ::view-transition-old(ct-sheet), ::view-transition-new(ct-sheet) { animation: none; } }
html[data-watch="on"]::view-transition-group(ct-sheet), html[data-watch="on"]::view-transition-old(ct-sheet), html[data-watch="on"]::view-transition-new(ct-sheet) { animation: none; }
.ct__foot { text-align: center; margin: 0; }
.ct__say { max-width: 32em; text-align: center; }
.ct__link { background: none; border: 0; padding: 0; font: inherit; color: var(--acc-ink, var(--acc)); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ct-row__seal { flex: none; width: 26px; height: 36px; margin: 0 4px 0 2px; }
.ct-name { width: 100%; margin-top: 14px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.18));
  background: var(--field, rgba(255,255,255,.06)); color: var(--ink); font: inherit; font-size: 18px; }
.ct-name:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
.bk-cert { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 12px 14px 12px 12px;
  border-radius: 18px; color: inherit; text-decoration: none; }
.bk-cert__seal { width: 52px; height: 73px; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,.35)); }
.bk-cert__main { display: grid; gap: 3px; min-width: 0; }
.bk-cert__title { font-weight: 700; font-size: 16px; line-height: 1.25; }
.bk-cert__sub { color: var(--ink-2); font-size: 13px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ct-print { display: none; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  body.ct-printing > *:not(.ct-print) { display: none !important; }
  body.ct-printing > .ct-print { display: block !important; width: 100%; height: auto; }
}

/* THE BOOK'S OTHER ORDERS (ENG.md call 69; punk-book.js ordersSection, threadPage): three orders under the one «next»,
   each a closed panel that says itself; a thread's page; the thread a lesson stands on, under its title */
.bk-orders-h { margin-top: 28px; }
.bk-orders-sub { margin: -2px 4px 10px; }
.bk-order .order__peek b { margin-right: 6px; color: var(--ink); font-weight: 650; }
.bk-order__name { margin: 0 0 8px; color: var(--ink); font-size: 19px; font-weight: 700; line-height: 1.2; }
.bk-order__go { margin: 8px 0 12px; }
.bk-order__later { margin: 8px 0 12px; }
.bk-threads { margin: 8px -6px 10px; border-top: 1px solid var(--line); }
.bk-thread-fig { margin-top: 12px; padding: 14px 14px 8px; }
.bk-onthread { margin: 8px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.bk-onthread .caps { margin-right: 6px; font-size: 10px; letter-spacing: .18em; }
.bk-onthread a { color: var(--acc-ink); font-weight: 600; text-decoration: none; }
.bk-onthread a:hover { text-decoration: underline; }
.bk-thread .row__sub { display: block; white-space: normal; overflow: visible; -webkit-line-clamp: unset; }
.bk-find { margin: 2px 0 0; text-align: center; }
.bk-find .btn { max-width: 100%; white-space: normal; text-align: center; padding-block: 8px; }   /* its Ukrainian is two lines on a phone; a button's nowrap ran it off the screen (call 73) */
.bk-quiz--mix .bk-quiz__n { background: color-mix(in srgb, var(--acc-ink) 16%, transparent); color: var(--acc-ink); }
/* THE WHOLE BOOK (#/grammar/map and its card on the Grammar place; punk-book.js mapPage(), mapCard()). The systems
   down, the road's levels across; a square its lessons and the bar of those behind the learner. Still: nothing here moves. */
.bk-mapcard .bk-mapfig { flex: none; width: 56px; max-width: 56px; margin: 0; }
.ofig.bk-mapfig .ln.here { stroke: var(--acc-ink); stroke-opacity: 1; stroke-width: 1.5; }
.bk-map { margin-top: 12px; padding: 12px 10px 6px; }
.bk-map__t { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.bk-map__t thead td { width: 33%; }
.bk-map__t th a { display: block; color: var(--acc-ink); font-weight: 600; text-decoration: none; }
.bk-map__t th a:hover { text-decoration: underline; }
.bk-map__t thead th { padding: 2px 0 6px; font-family: var(--caps); font-size: 10px; letter-spacing: .1em; text-align: center; }
.bk-map__t tbody th { padding: 4px 6px 4px 4px; font-size: 12.5px; line-height: 1.25; text-align: left; }
.bk-map__t td { padding: 6px 2px 6px; border: 1px solid transparent; border-radius: 8px; text-align: center; vertical-align: middle; }
.bk-map__t tbody td.some, .bk-map__t tbody td.full, .bk-map__t tbody td.here { border-color: var(--line); }
.bk-map__t tbody td.here { border-color: var(--acc-ink); box-shadow: inset 0 0 0 1px var(--acc-ink); }
.bk-map__n { display: block; color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bk-map__bar { display: block; height: 3px; margin: 4px 3px 0; border-radius: 2px; background: var(--line); overflow: hidden; }
.bk-map__bar i { display: block; height: 100%; border-radius: 2px; background: var(--acc-ink); }
.bk-map__key { margin: 8px 4px 10px; }
.bk-map__key .bk-map__bar { display: inline-block; width: 22px; margin: 0 8px 0 0; vertical-align: middle; }
.bk-map .order__lines { margin: 0 4px; }
.bk-level__uk { color: var(--ink-2); font-weight: 500; }
.bk-level__uk::before { content: '· '; color: var(--ink-3); }
.bk-level__here { margin-left: 6px; color: var(--acc-ink); font-size: 9.5px; letter-spacing: .16em; }
.bk-sitfig { margin-top: 12px; padding: 14px 14px 6px; }
.bk-sits { margin-top: 12px; }
.bk-sit__n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid currentColor; border-radius: 50%; color: var(--ink-3); font-size: 15px; font-weight: 650; }
.bk-sit--now .bk-sit__n { color: var(--acc-ink); }
.bk-sit .row__sub { display: block; overflow: visible; white-space: normal; -webkit-line-clamp: unset; line-clamp: unset; }
@media (min-width: 720px) { .bk-map__t tbody th { font-size: 14px; } .bk-map__n { font-size: 15px; } .bk-map__t td { padding: 9px 4px 8px; } }

/* HEAR AND WRITE (ENG.md call 97; punk-book-drill.js, eng-hear.js; THUD CORE's S3): the card says what to do and holds
   the voice's two keys, again and slowly; «Check» draws the book's line over the typed one, a word outside the run they
   share marked (the book's underlined: a word missed; yours wavy: not the book's), the Ukrainian under them. Not scored;
   never in Field mode: the round is said aloud. */
.bk-hear-ears { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.bk-hear-ear { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: rgba(var(--tint), .09); box-shadow: inset 0 0 0 1px rgba(var(--tint), .12); color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 650; line-height: 1; letter-spacing: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bk-hear-ear svg { flex: none; width: 22px; height: 22px; }
.bk-hear-ear:hover, .bk-hear-ear:focus-visible { color: var(--ink); }
.bk-hear-ear:active { transform: scale(.96); }
#grammar-note.bk-heard { text-align: left; }
.bk-heard__line { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 10px; align-items: baseline; margin: 10px 0 0; }
.bk-heard__k { color: var(--ink-3); font-family: var(--caps, inherit); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.bk-heard__t { color: var(--ink); font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
.bk-heard__uk { margin: 10px 0 0 calc(5.6em + 10px); color: var(--ink-2); font-size: 15px; line-height: 1.45; }
mark.bk-diff { padding: 0; background: none; color: inherit; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
mark.bk-diff--book { text-decoration-color: var(--acc-ink); }
mark.bk-diff--typed { color: var(--wrong-ink); text-decoration-color: var(--wrong-ink); text-decoration-style: wavy; text-decoration-thickness: 1.5px; }
.bk-hear-row--diff .fr-q__mark { color: var(--ink-2); background: rgba(var(--tint), .09); }
.bk-hear[hidden], .bk-hear-none[hidden] { display: none !important; }   /* a .btn sets its own display */
.bk-practise > .bk-hear { display: grid; gap: 12px; }
.bk-hear__of { margin: -4px 4px 12px; }
html[data-watch="on"] :is(.bk-hear, .bk-hear-ears) { display: none !important; }

/* SEE IT IN A STORY (ENG.md call 98; eng-rules.js story()): the lesson's words in the library's own lines, the word
   marked as the book marks a form (.af), each line a tap from its story. Drawn only where the lesson has a line. */
.bk-story { display: grid; gap: 8px; margin-top: 18px; }
.bk-story[hidden] { display: none !important; }
.bk-story__h { margin: 0 4px; }
.bk-story__sub { margin: 0 4px 2px; }
.bk-story__lv { font-weight: 700; font-variant-numeric: tabular-nums; }
.bk-story__row { align-items: center; text-decoration: none; color: inherit; }
.bk-story__line { display: block; font-size: 16px; line-height: 1.5; color: var(--ink); }
.bk-story__line mark { padding: 0; background: none; color: var(--acc-ink); font-weight: 700; }
.bk-story__from { display: block; margin-top: 3px; }
