/* 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 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 */
.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; }
.bk-rule p { font-size: 16.5px; line-height: 1.55; }
.bk-rule p + p { margin-top: 8px; }
.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; }
.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); }
/* a code span of Matcha's (an affix): in a lesson's lines, and wherever punk-book-core.js textHtml and stemHtml draw the
   bank's text (titles, reasons). The accent's ink on glass; on a fill (a button, the lit ✓) the fill's own ink, bold */
.af { font-weight: 700; color: var(--acc-ink); }
:is(.btn, .opt-btn.correct) .af { color: inherit; }
.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;
  }
}
/* 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; }
}
/* ══ the concise card (BOOK.md §2e: the set's options' «Concise», punk_book_set.concise; punk-book-drill.js look(), said())
   The same question, options and reasons, smaller: no instruction over the question (the gap says it; a typed answer
   keeps its own), options of 22 letters or fewer as words in a row under the sentence, and once answered each option
   holds its own reason, one to a line, where it stood; the note shows the rule alone. The materials, marks, inks and
   faces are the card's: a reason is --ink-2 on the plate and --on-rwd on the lit ✓, as the note's are priced (frap.css
   CONTRAST-CONTRACT), in the card's face. ═══════════════════════════════════════════════════════════════════════ */
html.bk-concise[data-skin="frap"].bk-drill body:not(.vk-type) #card .vk-instr { display: none !important; }
html.bk-concise[data-skin="frap"].bk-drill body:not(.vk-type) #card .bk-stem { margin-top: 0; }
/* the words */
html.bk-concise[data-skin="frap"].bk-drill body:not(.vk-type) #main-content > #card > #options.bk-words:not(.bk-said) {
  display: flex !important; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 10px !important; grid-template-columns: none !important;
}
/* every option a block, asked and answered alike: an answer changes its padding, never its display. WebKit builds a button
   anew when its display changes, and built anew as the right answer's sweep began, the sweep (its ::after) was drawn
   late: not yet drawn 1.8 s after the answer in 9 views of 11, under the sweep's load (qa_webkit.py, 2026-10-25) */
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #options .opt-btn:not([hidden]) { display: block !important; }
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #options.bk-words:not(.bk-said) .opt-btn:not([hidden]) {
  flex: 0 0 auto; text-align: center !important;
  width: auto !important; min-width: 96px !important; max-width: 100%; min-height: 52px !important; padding: 0 22px !important;
}
html.bk-concise[data-skin="frap"].bk-drill #options.bk-words:not(.bk-said) .opt-text { text-align: center !important; }
@media (hover: hover) and (pointer: fine) {   /* a keyboard is likely: its key's badge at the right edge, with room of its own */
  html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #options.bk-words:not(.bk-said) .opt-btn:not([hidden]) { padding-right: 52px !important; }
  html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #options:not(.bk-words):not(.bk-said) .opt-btn:not([hidden]) { padding-right: 58px !important; }
  html.bk-concise[data-skin="frap"].bk-drill #options:not(.bk-said) .opt-btn .opt-key {
    position: absolute !important; top: 50% !important; bottom: auto !important; right: 14px !important; margin: 0 !important; transform: translateY(-50%);
  }
}
/* longer options, and every option once answered: one to a row, in a column. The longer stand in it before the answer
   too: a grid there became a column at the answer and built every button anew, its sweep drawn late as above */
html.bk-concise[data-skin="frap"].bk-drill body:not(.vk-type) #main-content > #card > #options:is(.bk-said, :not(.bk-words)) {
  display: flex !important; flex-direction: column; align-items: stretch; gap: 8px !important; grid-template-columns: none !important;
}
/* longer options: the card's rows, slimmer */
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #options:not(.bk-words):not(.bk-said) .opt-btn:not([hidden]) {
  width: 100% !important; min-height: 48px !important; padding-top: 10px !important; padding-bottom: 10px !important;
}
/* answered: each option holds its reason, one to a line, in the order they stood */
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #options.bk-said .opt-btn:not([hidden]) {
  width: 100% !important; height: auto !important; min-height: 0 !important; padding: 12px 50px 12px 18px !important; text-align: left !important;
}
html.bk-concise[data-skin="frap"].bk-drill #options.bk-said .opt-text { display: inline !important; text-align: left !important; }
html.bk-concise[data-skin="frap"].bk-drill #options.bk-said .opt-key { display: none !important; }   /* answered: nothing left to press (as on a desk) */
html.bk-concise[data-skin="frap"].bk-drill #options .bk-why {
  margin-left: .45em; font-size: 15.5px; line-height: 1.42; font-weight: 500; letter-spacing: 0; color: var(--ink-2);
  white-space: normal; overflow-wrap: anywhere; animation: bk-why .3s ease-out both;
}
html.bk-concise[data-skin="frap"].bk-drill #options.bk-long .bk-why { display: block; margin: 4px 0 0; }
html.bk-concise[data-skin="frap"].bk-drill #options .opt-btn.correct .bk-why { color: var(--on-rwd); }
html.bk-concise[data-skin="frap"].bk-drill #options.bk-said .opt-btn.bk-dim { opacity: 1; }
html.bk-concise[data-skin="frap"].bk-drill #options.bk-said .opt-btn.bk-dim .opt-text { opacity: .6; }
@keyframes bk-why { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html.bk-concise[data-skin="frap"].bk-drill #options .bk-why { animation: none; } }
/* the note: the rule alone; its verdict and reasons stay for a screen reader (the options say them to the eye) */
html.bk-concise[data-skin="frap"].bk-drill #grammar-note.revealed:not(.bk-notyet) :is(.gn-pair, .bk-reasons) {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #grammar-note.revealed { min-height: 0 !important; }   /* the engine's 216px (quiz-common.css), left between a phone's width and a desk's, stood empty under the rule */
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #grammar-note.revealed:not(.bk-notyet) { padding: 11px 16px !important; border-radius: 18px !important; }
html.bk-concise[data-skin="frap"].bk-drill body #main-content > #card > #grammar-note.revealed:not(.bk-notyet):not(:has(> .bk-rule)) {
  padding: 0 !important; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html.bk-concise[data-skin="frap"].bk-drill #grammar-note:not(.bk-notyet) > .bk-rule { margin-top: 0; padding-top: 0; border-top: 0; }
/* ⚑ 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; min-width: 0; }
.bk-hero--two .bk-hero__ways .btn { margin-top: 0; }
/* «Only its questions» and its count did not fit a phone's line: held to one, the button widened the card's column and
   both ways ran past its edge (2026-11-15, 428 px). The count goes under the words and the button grows to hold both */
.bk-hero__q { gap: 2px 10px; flex-wrap: wrap; white-space: normal; text-align: center; height: auto; padding-block: 9px; }
.bk-hero__q small { color: var(--ink-3); font-size: 13px; font-weight: 600; }
/* 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__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__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 (2026-11-16; punk-book.js ordersSection, threadPage; THEORY.md §2): 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-quiz--mix .bk-quiz__n { background: color-mix(in srgb, var(--acc-ink) 16%, transparent); color: var(--acc-ink); }

/* THE ANSWERED SENTENCE, HEARD (punk-book-voice.js, 2026-11-17): the sentence again, and again slowly, in the note's
   corner, as the tortoise stands in a round of words, so the note keeps the height punk-book-drill.js measured.
   Never in Field mode (silent: the buttons are not there to be pressed). */
#grammar-note .bv-ears { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; gap: 8px; }
#grammar-note .gn-pair:has(> .bv-ears) .gn-verdict { padding-right: 98px; }
.bv-ear { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; 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); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bv-ear svg { width: 22px; height: 22px; }
.bv-ear:hover, .bv-ear:focus-visible { color: var(--ink); }
.bv-ear:active { transform: scale(.94); }
html[data-watch="on"] .bv-ears { display: none; }

/* HEAR AND WRITE (docs/teach/S3.md; punk-book-drill.js, 2026-11-17): the card says what to do and holds the voice's two
   keys, again and slowly (their own size: a typed card's prompt grows on a wide screen); «Check» draws the book's line
   over the typed one, a word outside the run they share marked as matcha/js/dictation.js compare marks it (the book's
   underlined: a word missed; yours wavy: not the book's), the English under them. No count of right in the bar: the
   round is not scored. Never in Field mode: the round is said aloud, so it is not offered there. */
.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: 4.8em minmax(0, 1fr); gap: 10px; align-items: baseline; margin: 10px 0 0; }
.bk-heard__k { color: var(--ink-3); font-family: var(--caps); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.bk-heard__t { color: var(--ink); font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
.bk-heard__en { margin: 10px 0 0 calc(4.8em + 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__go .i { flex: none; }
.bk-hear__of { margin: -4px 4px 12px; }
html[data-skin="frap"].bk-hearing #streak.top-stats { display: none !important; }
html[data-watch="on"] :is(.bk-hear, .bk-hear-ears) { display: none !important; }

/* THE WHOLE BOOK (#/grammar/map and its card on the Grammar place; punk-book.js mapPage(), mapCard()). The systems
   down, the parts 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-map__app { margin: 10px 4px 0; }
.bk-map__app a { color: var(--acc-ink); font-weight: 600; text-decoration: none; }
.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; } }

/* S5 · «See it in a story» (punk-book-rules.js): lines of stories at the learner's level that use the lesson's small
   word, the word marked as the book marks a word (underlined in the accent's ink), each a way into its story; and the way
   back to a story a lesson was opened from */
.bk-seen[hidden] { display: none; }
.bk-seen > h2 { margin: 0 0 4px; }
.bk-seen__say { margin: 0 0 10px; }
.bk-seen__lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bk-seen__a { display: grid; gap: 3px; padding: 11px 14px; border-radius: var(--r-tile, 14px); color: inherit; text-decoration: none;
  background: color-mix(in srgb, var(--ink) 5%, transparent); }
.bk-seen__a:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.bk-seen__a:focus-visible { outline: 2px solid var(--acc-ink); outline-offset: 2px; }
.bk-seen__uk { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
mark.bk-seen__w { padding: 0; background: none; color: inherit; text-decoration-line: underline; text-decoration-color: var(--acc-ink);
  text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.bk-seen__en { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.bk-seen__from { font-size: 12.5px; line-height: 1.3; color: var(--ink-3); }
.bk-seen__foot { margin: 10px 0 0; }
.bk-story-back { display: inline-flex; margin: 0 0 12px; }
