/* Mathebär's additions to the engine's stylesheet.
 *
 * The engine (lib/engine.css, which arrives with each book) draws the lesson frame.
 * This file draws the two things Mathebär adds on top: the bear that the engine's
 * mascot slot now holds, and the chapter workbook.
 *
 * It is one file for every book rather than an edit to each book's engine.css,
 * because a copy of a stylesheet is a copy of its bugs — and because the engine is
 * upstream's to change, not ours to fork. A book loads both:
 *
 *   <link rel="stylesheet" href="../lib/engine.css">
 *   <link rel="stylesheet" href="../../mathebar.css">
 *
 * Order matters only where specificity ties; none of these selectors collide with the
 * engine's own, so either order renders the same.
 */

/* ---------- the bear ----------
   The engine's mascot is drawn by brandMascot() (see brand.js), which emits the same
   class names the engine's own mascot used so the expression system keeps working.
   Two of them — the wink and the eye under it — are ours, and the engine has no rules
   for them because it never had a bear. Without these four lines the bear shows a
   wink arc, a round pupil and a smile over one face at once. */
.mascot .wink { display: inline; }
.mascot .winkeye { display: none; transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.mascot.happy .wink, .mascot.oops .wink { display: none; }
.mascot.happy .winkeye, .mascot.oops .winkeye { display: inline; }

/* ---------- the band card ----------
   A BAND card is placed at a fixed y = 686 with no max-height, and its columns are
   sized `auto minmax(0, 1fr) auto auto` — a floor of zero on the text column. Both
   show up the moment a reader answers, because answering does two things at once:
   it fills .fb with the feedback, and it reveals the "Show answer" button. That
   button sits beside "Check" on one line, so .acts jumps from 175px to 409px, the
   1fr column absorbs all of it and collapses to about 47px, and the feedback wraps
   one word per line — a card measured at 1248px tall on a 900px stage. Anchored
   to the top at 686, all of that height runs off the bottom into the control strip.

   Two changes fix it at the cause rather than by capping the symptom. Stack the
   buttons, so revealing one does not take width from the text column — that alone
   hands the column back 235px. And anchor the card by its bottom edge, so a tall
   card grows upward into the picture instead of downward under the controls. A
   short card lands almost exactly where it did: a 214px card still starts at 686.

   `top` is set inline by the engine, so !important is the only way a stylesheet
   wins here — hence one, rather than three. */
.card.band {
  top: auto !important;
  bottom: 12px;
}
.card.band .acts { flex-direction: column; align-items: flex-start; gap: 8px; }

/* ---------- the publisher line ----------
   Appended under the cover text by credit() in brand.js. Quieter than the line above
   it and one step smaller — it is a colophon, not an instruction. */
.cover .credit { display: block; margin-top: 16px; font-size: 19px; color: var(--faint); letter-spacing: .02em; }
.cover .credit b { font-weight: 600; color: var(--dim); }

/* Die Regeln fuer den Bericht am Ende des Arbeitshefts stehen in
   site/<buch>/lib/engine.css. Sie standen hier ein zweites Mal, und weil
   diese Datei zuletzt geladen wird, hat die alte Fassung die neue
   ueberschrieben -- die beiden Spalten des Berichts standen dadurch
   untereinander statt nebeneinander. */

/* ---------- das Zeichen des Verlags in der Ecke ---------- */
/* Oben rechts im Rahmen ist in allen 73 Kapiteln frei (gemessen am
   14.11.2026 mit dem Beat-Pruefstand). Die Marke liegt dort, damit sie weder
   eine Zeichnung noch einen Satz der Spalte verdeckt. 32 Prozent Deckkraft:
   sichtbar, aber nebensachlich. Beim Zeigen mit der Maus oder der Tastatur
   wird sie deutlich, sonst waere sie nur ein Fleck. */
.corner-mark {
  position: absolute;
  right: 20px;
  top: 10px;
  z-index: 8;
  font: 500 17px/1 var(--ui);
  letter-spacing: .04em;
  color: var(--chalk);
  opacity: .32;
  text-decoration: none;
  pointer-events: auto;
  transition: opacity .18s ease;
}
.corner-mark:hover,
.corner-mark:focus-visible { opacity: .95; }
