/* ==========================================================================
   lesson.css — Alltagsdeutsch workshop, shared stylesheet.
   Every module and reference page links this. Never write inline styles.

   DESIGN NOTE
   This is a trilingual document. Three voices live on the page:
     · Turkish — the explaining voice. Serif, flowing prose, calm.
     · German  — the voice being learned. Sans-serif, larger, signal colour.
     · German definition — the bridge between them. Sans-serif, quiet, indented.
   The split is not decoration: the reader's eye must find "which one do I have
   to memorise" at a glance. A fourth family (mono) is used only for labels,
   level badges and buttons.

   Palette taken from the world of paperwork: cold paper, ink, signal blue
   (structure and German text), amber (emphasis — "stop here"). Articles keep
   their own colours: der blue, die red, das green — the shared code among
   learners of German. CEFR levels get their own scale, cool to hot.

   Mobile first. The design is built narrow and grows via min-width.
   ========================================================================== */

/* --- Tokens: light theme ------------------------------------------------- */
:root {
  --ground: #f4f6f8;
  --panel: #ffffff;
  --ink: #131820;
  --muted: #5a6472;
  --rule: #d8dde4;
  --rule-soft: #e8ebf0;

  --signal: #12558f;
  --signal-soft: #e4eef7;
  --amber: #8d5c0c;
  --amber-soft: #f8efdc;
  --ok: #1a6b46;
  --ok-soft: #e2f0e8;
  --bad: #a02a20;
  --bad-soft: #fae9e7;

  --violet: #6a3a9c;
  --violet-soft: #efe7f8;

  --der: #12558f;
  --die: #a8213f;
  --das: #1a6b46;

  /* CEFR scale, cool to hot. A level badge must be readable as a rank at a
     glance, so the hue climbs with the level rather than being categorical. */
  --l-b1: #4a7a34;
  --l-b2: #12558f;
  --l-c1: #8d5c0c;
  --l-c2: #9c2b6b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter,
    "Bitstream Charter", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --measure: 34rem;
  --pad: 1.15rem;
}

/* --- Tokens: dark theme -------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e1319;
    --panel: #161d26;
    --ink: #e4e8ee;
    --muted: #8e99a8;
    --rule: #2a3441;
    --rule-soft: #1e2731;

    --signal: #6aaee8;
    --signal-soft: #14212e;
    --amber: #dcaa54;
    --amber-soft: #241d10;
    --ok: #5cb98a;
    --ok-soft: #12241b;
    --bad: #e08b81;
    --bad-soft: #251614;

    --violet: #b98ee0;
    --violet-soft: #1f1729;

    --der: #6aaee8;
    --die: #e88a9c;
    --das: #5cb98a;

    --l-b1: #8cc06e;
    --l-b2: #6aaee8;
    --l-c1: #dcaa54;
    --l-c2: #e585b6;
  }
}

/* The viewer's theme switch stamps data-theme on the root element; it has to
   beat the media query in both directions. */
:root[data-theme="dark"] {
  --ground: #0e1319;
  --panel: #161d26;
  --ink: #e4e8ee;
  --muted: #8e99a8;
  --rule: #2a3441;
  --rule-soft: #1e2731;
  --signal: #6aaee8;
  --signal-soft: #14212e;
  --amber: #dcaa54;
  --amber-soft: #241d10;
  --ok: #5cb98a;
  --ok-soft: #12241b;
  --bad: #e08b81;
  --bad-soft: #251614;
  --violet: #b98ee0;
  --violet-soft: #1f1729;
  --der: #6aaee8;
  --die: #e88a9c;
  --das: #5cb98a;
  --l-b1: #8cc06e;
  --l-b2: #6aaee8;
  --l-c1: #dcaa54;
  --l-c2: #e585b6;
}
:root[data-theme="light"] {
  --ground: #f4f6f8;
  --panel: #ffffff;
  --ink: #131820;
  --muted: #5a6472;
  --rule: #d8dde4;
  --rule-soft: #e8ebf0;
  --signal: #12558f;
  --signal-soft: #e4eef7;
  --amber: #8d5c0c;
  --amber-soft: #f8efdc;
  --ok: #1a6b46;
  --ok-soft: #e2f0e8;
  --bad: #a02a20;
  --bad-soft: #fae9e7;
  --violet: #6a3a9c;
  --violet-soft: #efe7f8;
  --der: #12558f;
  --die: #a8213f;
  --das: #1a6b46;
  --l-b1: #4a7a34;
  --l-b2: #12558f;
  --l-c1: #8d5c0c;
  --l-c2: #9c2b6b;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 1.9rem var(--pad) 4.5rem;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Reading measure. Cards and tables are allowed to break out of it. */
p, ul, ol, blockquote, .callout, .quiz, .checklist, .recall, .lesson-footer {
  max-width: var(--measure);
}

/* --- Headings ------------------------------------------------------------ */
h1, h2, h3 {
  font-weight: 400;
  line-height: 1.18;
  text-wrap: balance;
  letter-spacing: -0.012em;
}

h1 { font-size: 1.72rem; margin: 0 0 0.5rem; max-width: 26rem; }

h2 {
  font-size: 1.2rem;
  margin: 2.6rem 0 0.8rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-soft);
  max-width: var(--measure);
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.9rem 0 0.55rem;
  letter-spacing: 0;
}

/* --- Masthead ------------------------------------------------------------ */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 0.85rem;
}

.subtitle {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 1.5rem;
  max-width: 30rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
  margin: 0 0 2rem;
  max-width: var(--measure);
}

/* --- Body text ----------------------------------------------------------- */
p { margin: 0 0 1rem; }

a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--signal) 38%, transparent);
}
a:hover { border-bottom-color: var(--signal); }
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

strong { font-weight: 600; }

/* A German fragment embedded inside flowing Turkish prose. */
.de {
  font-family: var(--sans);
  font-size: 0.95em;
  font-weight: 500;
  color: var(--signal);
}

ul, ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.45rem; }
ol li::marker { font-family: var(--mono); font-size: 0.85em; color: var(--signal); }

blockquote {
  margin: 1.4rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--signal-soft);
  padding: 0.1em 0.32em;
  border-radius: 3px;
  overflow-wrap: break-word;
}

pre {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.55;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.85rem 0.9rem;
  margin: 0 0 1.2rem;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

/* --- Sidenote (inline on mobile, in the margin on wide screens) ---------- */
.sidenote {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 1.1rem 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
  max-width: var(--measure);
}
.sidenote strong { color: var(--ink); }

/* --- Callout ------------------------------------------------------------- */
.callout {
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent);
  border-left: 3px solid var(--amber);
  border-radius: 0 5px 5px 0;
  padding: 0.9rem 1rem;
  margin: 1.5rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.4rem;
}

/* --- Tables -------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.4rem;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  font-size: 0.85rem;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 0.45rem 0.8rem 0.45rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
thead th {
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ==========================================================================
   PHRASE CARD — the visual anchor of the page and its actual product.
   The German sentence is large and in signal colour. Below it sit TWO
   answer layers, both hidden by default:
     .p-dedef — a German paraphrase (monolingual-dictionary mode)
     .p-tr    — the Turkish gloss (safety net)
   Hiding them is not decoration: trying to recall the meaning before seeing
   it retains far better than reading it. Tap a card to reveal it.
   Three global mask states are driven by data-mask on <body>; see phrases.js.
   ========================================================================== */

.phrase {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  border-radius: 0 5px 5px 0;
  padding: 0.85rem 0.9rem;
  margin: 0 0 0.7rem;
}

.p-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  min-height: 1.2rem;
}
/* No badge and no speaker button (the device may have no German voice) —
   in that case there is no point reserving an empty row. */
.p-head:empty { display: none; }

.p-reg {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}
.p-reg.hoeren { color: var(--muted); background: var(--rule-soft); border-color: transparent; }
.p-reg.schreiben { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }

/* CEFR badge. This is the spine of the whole course: the same intent is taught
   at several levels, and the badge is what lets the learner pick a rung. It
   sits first in the row and is the only badge that is always present. */
.p-lvl {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.15rem 0.35rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.p-lvl.b1 { color: var(--l-b1); }
.p-lvl.b2 { color: var(--l-b2); }
.p-lvl.c1 { color: var(--l-c1); }
.p-lvl.c2 { color: var(--l-c2); }

/* The card's left edge repeats the level, so a page can be skimmed for
   difficulty without reading a single badge. */
.phrase.lvl-b1 { border-left-color: var(--l-b1); }
.phrase.lvl-b2 { border-left-color: var(--l-b2); }
.phrase.lvl-c1 { border-left-color: var(--l-c1); }
.phrase.lvl-c2 { border-left-color: var(--l-c2); }

/* Speak button — injected by speak.js, never rendered when no voice exists.
   margin-left:auto pushes it to the right end of the row; no separate spacer
   element is needed (such an element also stopped p-head from being :empty). */
.p-speak {
  flex: 0 0 auto;
  margin-left: auto;
  width: 44px;
  height: 44px;
  margin-top: -0.5rem;
  margin-right: -0.25rem;
  margin-bottom: -0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.p-speak:hover { color: var(--signal); background: var(--signal-soft); }
.p-speak:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.p-speak.speaking { color: var(--signal); }
.p-speak svg { width: 20px; height: 20px; fill: currentColor; }

/* German — the thing to be memorised. */
.p-de {
  font-family: var(--sans);
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* German paraphrase — the monolingual bridge, and the reason this course can
   run from B1 to C2 on one card. Marked with a guillemet so the eye separates
   it from the phrase itself without needing a colour of its own. */
.p-dedef {
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0.5rem 0 0;
  padding-left: 0.9rem;
  position: relative;
  max-width: none;
}
.p-dedef::before {
  content: "\203a";
  position: absolute;
  left: 0;
  color: var(--signal);
  font-weight: 600;
}

/* Turkish gloss — the safety net. Hidden by default. */
.p-tr {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.4rem 0 0;
  padding-left: 0.9rem;
  position: relative;
  max-width: none;
}
.p-tr::before {
  content: "\203a";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* Three-state masking, driven by data-mask on <body> (see phrases.js):
     both  — nothing revealed. Hardest, and the default.
     de    — German definition only. Monolingual-dictionary mode.
     open  — everything revealed. For reference pages and quick lookup.
   A single card can always be opened on its own with data-open, which beats
   whatever the page-level state is. */
body[data-mask="both"] .phrase:not([data-open="1"]) .p-dedef,
body[data-mask="both"] .phrase:not([data-open="1"]) .p-tr,
body[data-mask="de"] .phrase:not([data-open="1"]) .p-tr { display: none; }

/* The fourth state is the productive direction and the actual goal of the
   course: only the Turkish gloss is visible and the German has to be produced
   from memory. It is a separate state rather than a fourth rung of the same
   scale because it reverses which side is the prompt. */
body[data-mask="produce"] .phrase:not([data-open="1"]) .p-de,
body[data-mask="produce"] .phrase:not([data-open="1"]) .p-dedef { display: none; }
body[data-mask="produce"] .phrase:not([data-open="1"]) .p-tr {
  font-size: 1rem;
  color: var(--ink);
}
body[data-mask="produce"] .phrase:not([data-open="1"]) .p-note { display: none; }

.p-peek {
  display: none;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.4rem 0;
  background: none;
  border: none;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  min-height: 34px;
}
body[data-mask="both"] .phrase:not([data-open="1"]) .p-peek,
body[data-mask="de"] .phrase:not([data-open="1"]) .p-peek,
body[data-mask="produce"] .phrase:not([data-open="1"]) .p-peek { display: block; }
.p-peek:hover { color: var(--signal); }
.p-peek:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.p-note {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.5rem 0 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
  max-width: none;
}
.p-note strong { color: var(--ink); }

/* A phrase the other side will say — you must RECOGNISE it, not produce it. */
.phrase.hear { border-left-color: var(--muted); background: transparent; }
.phrase.hear .p-de { font-weight: 400; color: var(--muted); }

/* The card being read during "listen in order". */
.phrase.now-playing {
  border-color: var(--signal);
  border-left-width: 5px;
  box-shadow: 0 0 0 3px var(--signal-soft);
}

/* --- Phrase group heading and control bar ------------------------------- */
.p-group {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 1.8rem 0 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule-soft);
}

.drill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 1.3rem 0 0.9rem;
}
.drill-bar .lbl {
  flex: 1 1 100%;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.drill-bar button {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.55rem 0.6rem;
  min-height: 44px;
  cursor: pointer;
}
.drill-bar button:hover { border-color: var(--muted); }
.drill-bar button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.drill-bar button.active {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--panel);
  font-weight: 600;
}

/* ==========================================================================
   DIALOGUE — the phrases assembled in their real order.
   You and the other side must separate visually: whose turn it is should be
   readable at a glance.
   ========================================================================== */

.dialog {
  margin: 1.3rem 0 1.8rem;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding: 0.4rem 0;
}

.turn {
  padding: 0.65rem 0 0.65rem 0.85rem;
  border-left: 3px solid var(--rule);
  margin: 0.45rem 0;
}
.turn.you {
  border-left-color: var(--signal);
  background: var(--signal-soft);
  border-radius: 0 4px 4px 0;
  padding-right: 0.7rem;
}

/* Speaker label; speak.js appends the speaker button here. */
.t-who {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.turn.you .t-who { color: var(--signal); font-weight: 600; }
.turn .p-speak {
  width: 34px;
  height: 34px;
  margin: -0.55rem 0;
}
.turn .p-speak svg { width: 15px; height: 15px; }

.t-de {
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.45;
  margin: 0;
  max-width: none;
  overflow-wrap: break-word;
}
.turn.you .t-de { font-weight: 500; }

.t-tr {
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0.3rem 0 0;
  max-width: none;
}

/* ==========================================================================
   GLOSSARY — the article is memorised together with the word, hence colour.
   der blue · die red · das green (the shared code among learners of German)
   ========================================================================== */

/* On a narrow screen the glossary is NOT two columns: Turkish drops below the
   German, indented. Squeezing two columns into 390px was clipping the Turkish
   column — and this page is mainly used on a phone. Columns return at 40rem. */
table.vocab, table.vocab tbody, table.vocab tr, table.vocab td {
  display: block;
  width: auto;
}
table.vocab thead { display: none; }
table.vocab tr {
  border-bottom: 1px solid var(--rule-soft);
  padding: 0.6rem 0;
}
table.vocab td { border: none; padding: 0; }

.v-de {
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 500;
  overflow-wrap: break-word;
}
.v-tr {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 1rem;
  margin-top: 0.1rem;
}

.art {
  font-weight: 700;
  margin-right: 0.28em;
}
.art.der { color: var(--der); }
.art.die { color: var(--die); }
.art.das { color: var(--das); }
.art.pl { color: var(--muted); }

.v-pl {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.3em;
  white-space: nowrap;
}
.v-note {
  display: block;
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Wide comparison table (register ladder, particle table). Such a table
   cannot be stacked — columns sitting side by side is its whole purpose — so
   it scrolls horizontally on a narrow screen. */
table.wide {
  min-width: 30rem;
  font-variant-numeric: tabular-nums;
}
table.wide td { padding: 0.45rem 0.8rem 0.45rem 0; vertical-align: baseline; }
.w-key {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--signal);
  white-space: nowrap;
}
.w-a {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}
.w-b, .w-c {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Article colour key */
.art-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0 0 0.9rem;
}
.art-key b { font-size: 0.8rem; }

/* ==========================================================================
   TRAP — the mistake made consistently when moving from Turkish to German.
   Showing the wrong form is risky (it can stick), so the wrong version is
   always struck through and faded; the correct one dominates.
   ========================================================================== */

.trap {
  background: var(--bad-soft);
  border: 1px solid color-mix(in srgb, var(--bad) 22%, transparent);
  border-left: 3px solid var(--bad);
  border-radius: 0 5px 5px 0;
  padding: 0.85rem 1rem;
  margin: 1.4rem 0;
  max-width: var(--measure);
}
.trap .callout-label { color: var(--bad); }

.t-wrong, .t-right {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0 0 0.3rem;
  max-width: none;
  padding-left: 1.3rem;
  position: relative;
  overflow-wrap: break-word;
}
.t-wrong { color: var(--bad); text-decoration: line-through; opacity: 0.8; }
.t-right { color: var(--ok); font-weight: 600; text-decoration: none; }
.t-wrong::before, .t-right::before {
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.t-wrong::before { content: "\00d7"; color: var(--bad); }
.t-right::before { content: "\2713"; color: var(--ok); }

.t-why {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0.55rem 0 0;
  max-width: none;
}

/* --- Track badge -------------------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: 0.1em;
}
.badge.werkzeug { background: var(--rule-soft); color: var(--muted); }
.badge.amt { background: var(--signal-soft); color: var(--signal); }
.badge.gesundheit { background: var(--bad-soft); color: var(--bad); }
.badge.wohnen { background: var(--ok-soft); color: var(--ok); }
.badge.geld { background: var(--amber-soft); color: var(--amber); }
.badge.schule { background: var(--violet-soft); color: var(--violet); }

/* --- Module masthead ---------------------------------------------------- */
.mod-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
.mod-head .mh-id { color: var(--signal); font-weight: 600; }

/* Goal box — what you will be able to do once this module is finished. */
.goal {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.9rem 1rem;
  margin: 1.4rem 0 1.8rem;
  max-width: var(--measure);
}
.goal .callout-label { color: var(--signal); }
.goal > :last-child { margin-bottom: 0; }

/* --- Step list ---------------------------------------------------------- */
.steps { counter-reset: st; list-style: none; padding: 0; margin: 0 0 1.3rem; }
.steps li {
  position: relative;
  padding: 0 0 0.6rem 2.1rem;
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
}
.steps li::before {
  counter-increment: st;
  content: counter(st);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid var(--signal);
  border-radius: 50%;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4rem;
  text-align: center;
}

/* --- Practice section --------------------------------------------------- */
.practice {
  border-top: 2px solid var(--ink);
  margin-top: 2.8rem;
  padding-top: 0.4rem;
}
.practice h2 { border-top: none; padding-top: 0.5rem; }

/* --- Quiz (quiz.js) ----------------------------------------------------- */
.quiz { margin: 1.3rem 0 1.8rem; }
.quiz-q { margin-bottom: 1.7rem; }
.quiz-q .q-prompt { font-weight: 600; margin: 0 0 0.6rem; }
.quiz-q .q-prompt::before {
  content: attr(data-n);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--signal);
  margin-right: 0.45rem;
}

.q-options { list-style: none; margin: 0; padding: 0; }
.q-options li {
  margin: 0 0 0.4rem;
  padding: 0.75rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.45;
  transition: border-color 0.12s ease, background 0.12s ease;
  overflow-wrap: break-word;
}
.q-options li:hover { border-color: var(--muted); }
.q-options li:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.q-options li.picked-right {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 600;
  cursor: default;
}
.q-options li.picked-wrong {
  border-color: var(--bad);
  background: var(--bad-soft);
  color: var(--bad);
  text-decoration: line-through;
  cursor: default;
}
.q-options li.reveal-right { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.quiz-q.answered .q-options li { cursor: default; }
.quiz-q.answered .q-options li:hover { border-color: var(--rule); }
.quiz-q.answered .q-options li.picked-right:hover,
.quiz-q.answered .q-options li.reveal-right:hover { border-color: var(--ok); }

.q-explain {
  display: none;
  margin: 0.6rem 0 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}
.quiz-q.answered .q-explain { display: block; }

.quiz-score {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 0.6rem;
}

/* --- Write from memory (quiz.js) ---------------------------------------- */
.recall { margin: 1.3rem 0 1.8rem; }
.recall .r-prompt { font-weight: 600; margin: 0 0 0.5rem; }
.recall textarea {
  width: 100%;
  min-height: 5.5rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 0.65rem 0.7rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  resize: vertical;
}
.recall textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

.recall button, .quiz button, .checklist button {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--ground);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 0.95rem;
  min-height: 44px;
  margin-top: 0.55rem;
  cursor: pointer;
}
.recall button:hover, .quiz button:hover, .checklist button:hover { opacity: 0.86; }
.recall button:focus-visible, .checklist button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.r-model {
  display: none;
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  background: var(--signal-soft);
  border-left: 3px solid var(--signal);
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
}
.r-model > :last-child { margin-bottom: 0; }
.r-model .p-de { font-size: 0.98rem; margin-bottom: 0.4rem; }
.recall.revealed .r-model { display: block; }
.recall.revealed button { display: none; }

/* --- Checklist (checklist.js) ------------------------------------------- */
.checklist { margin: 1.3rem 0 1.8rem; }
.checklist ol { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2.3rem;
  border-bottom: 1px solid var(--rule-soft);
  margin: 0;
  cursor: pointer;
  font-size: 0.93rem;
  line-height: 1.45;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.85rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
}
.checklist li.done::before {
  content: "\2713";
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.15rem;
  text-align: center;
}
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.checklist li:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.checklist-progress {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* --- Source line -------------------------------------------------------- */
.source {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 0.85rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.source .callout-label { color: var(--muted); }

/* --- Footer ------------------------------------------------------------- */
.lesson-footer {
  border-top: 2px solid var(--ink);
  margin-top: 3rem;
  padding-top: 1.1rem;
  font-size: 0.93rem;
}
.lesson-footer h3 { margin-top: 1.2rem; }
.lesson-footer h3:first-child { margin-top: 0; }
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.76rem;
}

/* --- Reference document variant ----------------------------------------- */
body.reference h1 { font-size: 1.6rem; }

/* ==========================================================================
   PROGRESS (progress.js)
   State is encoded by both colour and shape: relying on colour alone is not
   accessible.
   ========================================================================== */

.prog-control {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.85rem 1rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.prog-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.prog-label.state-learning { color: var(--amber); font-weight: 600; }
.prog-label.state-done { color: var(--ok); font-weight: 600; }

.prog-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.prog-row button {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
}
.prog-row button.ghost { color: var(--muted); }
.prog-row button:hover { border-color: var(--muted); }
.prog-row button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.prog-row button.active {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--panel);
  font-weight: 600;
}

/* --- index: summary + percentage ---------------------------------------- */
.prog-summary { margin: 0 0 1.6rem; max-width: var(--measure); }
.prog-figure { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.prog-pct {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.prog-sub { font-size: 0.88rem; color: var(--muted); }

.prog-bar {
  height: 8px;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.7rem 0 1.1rem;
}
.prog-bar span {
  display: block;
  height: 100%;
  background: var(--signal);
  border-radius: 3px 0 0 3px;
  transition: width 0.3s ease;
}

.prog-resume {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--ink);
  color: var(--ground);
  border: none;
  border-radius: 5px;
  padding: 0.85rem 1rem;
  text-decoration: none;
}
.prog-resume:hover { opacity: 0.9; border: none; }
.prog-resume:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.prog-resume .lbl {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.prog-resume .val { font-size: 1.02rem; font-weight: 600; }

/* --- index: module list ------------------------------------------------- */
.prog-section {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 1.9rem 0 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-soft);
}
.prog-section:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.prog-grid { list-style: none; margin: 0; padding: 0; max-width: 44rem; }
.prog-item { margin: 0 0 0.4rem; }
.prog-item a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule);
  border-radius: 0 4px 4px 0;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 56px;
}
.prog-item a:hover { border-color: var(--muted); border-left-color: var(--signal); }
.prog-item a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.pi-id {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 1.7rem;
  font-variant-numeric: tabular-nums;
}
.pi-body { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 auto; min-width: 0; }
.pi-title { font-size: 0.94rem; line-height: 1.3; }
.pi-sub {
  font-size: 0.79rem;
  line-height: 1.35;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pi-state {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
}
.state-learning .pi-state {
  border-color: var(--amber);
  background: linear-gradient(to top, var(--amber) 50%, transparent 50%);
}
.state-done .pi-state {
  border-color: var(--ok);
  background: var(--ok);
  position: relative;
}
.state-done .pi-state::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 17px;
  text-align: center;
}
.state-learning a { border-left-color: var(--amber); }
.state-done a { border-left-color: var(--ok); }
.state-done .pi-id, .state-done .pi-title { color: var(--muted); }

/* --- Backup ------------------------------------------------------------- */
.prog-backup { max-width: var(--measure); margin: 1.2rem 0; }
.prog-code {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0.6rem 0.7rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  resize: vertical;
  word-break: break-all;
  margin-bottom: 0.5rem;
}
.prog-code:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.prog-msg { font-family: var(--mono); font-size: 0.72rem; margin: 0.5rem 0 0; color: var(--muted); }
.prog-msg.ok { color: var(--ok); }
.prog-msg.bad { color: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Wide screen — grow the mobile design, do not rebuild it.
   ========================================================================== */

@media (min-width: 40rem) {
  :root { --pad: 2rem; }
  body { padding: 3rem var(--pad) 7rem; max-width: 60rem; margin: 0 auto; font-size: 1.09rem; }
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.45rem; font-style: italic; margin-top: 3rem; }
  h3 { font-size: 1.12rem; }
  .subtitle { font-size: 1.28rem; }
  .phrase { padding: 1rem 1.15rem; }
  .p-de { font-size: 1.16rem; }
  .p-tr { font-size: 0.94rem; }
  .t-de { font-size: 1.04rem; }
  table { font-size: 0.89rem; }

  /* The glossary becomes a real table on a wide screen. */
  table.vocab, table.vocab tbody { display: table; width: 100%; }
  table.vocab thead { display: table-header-group; }
  table.vocab tr { display: table-row; padding: 0; border-bottom: none; }
  table.vocab td {
    display: table-cell;
    border-bottom: 1px solid var(--rule-soft);
    padding: 0.5rem 0.8rem 0.5rem 0;
    vertical-align: top;
  }
  .v-de { font-size: 1rem; width: 52%; }
  .v-tr { padding-left: 0; margin-top: 0; }
  .drill-bar button { flex: 0 0 auto; }
  .prog-row button { flex: 0 0 auto; }
  .prog-resume { flex-direction: row; align-items: center; justify-content: space-between; }
  .nav-links { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
}

/* Sidenotes become actual margin notes */
@media (min-width: 68rem) {
  .sidenote {
    float: right;
    clear: right;
    width: 15rem;
    margin: 0.3rem -17.5rem 1rem 0;
    padding-left: 0;
    border-left: none;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Print — reference pages are designed to end up on paper.
   On printed paper a hidden translation cannot exist: everything opens.
   ========================================================================== */

@media print {
  :root {
    --ground: #fff; --panel: #fff; --ink: #000; --muted: #444;
    --rule: #bbb; --rule-soft: #ddd;
    --signal: #0d3f6b; --signal-soft: #f1f5f9;
    --amber: #6d4708; --amber-soft: #faf6ee;
    --ok: #14532d; --ok-soft: #f2f8f4; --bad: #7f1d1d; --bad-soft: #fdf4f3;
    --der: #0d3f6b; --die: #7f1d1d; --das: #14532d;
  }
  body { padding: 0; max-width: none; font-size: 10.5pt; }
  h1 { font-size: 19pt; }
  h2 { font-size: 13pt; margin-top: 15pt; }
  h2, h3 { page-break-after: avoid; }
  /* `table` is deliberately NOT in this list: a long comparison table does not
     fit one page, and forbidding a break left a huge gap. Keeping rows
     unbroken is enough. */
  .phrase, .trap, .turn, pre, tr, .callout, .quiz-q, .goal { page-break-inside: avoid; }
  /* Paper is wide: the glossary becomes a real table here too. */
  table.vocab, table.vocab tbody { display: table; width: 100%; }
  table.vocab thead { display: table-header-group; }
  table.vocab tr { display: table-row; padding: 0; }
  table.vocab td {
    display: table-cell;
    border-bottom: 1px solid var(--rule-soft);
    padding: 0.35rem 0.7rem 0.35rem 0;
    vertical-align: top;
  }
  .v-de { width: 50%; }
  .v-tr { padding-left: 0; margin-top: 0; }
  table.wide { min-width: 0; }
  .p-de { font-size: 11pt; }
  .p-tr, .p-note { font-size: 9pt; }
  a { color: #000; border-bottom: none; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 7pt; color: #555; word-break: break-all;
  }
  .no-print, .drill-bar, .p-speak, .p-peek, .prog-row,
  .quiz button, .recall button, .checklist button { display: none !important; }
  /* Everything must be visible in print */
  .phrase .p-dedef, .phrase .p-tr { display: block !important; }
  .r-model, .q-explain { display: block !important; }
}

/* ==========================================================================
   ALLTAGSDEUTSCH ADDITIONS
   Everything below is specific to this workshop and has no counterpart in the
   sibling IT course: the level key, the register ladder, and the cross-link.
   ========================================================================== */

/* --- CEFR level key ----------------------------------------------------- */
.lvl-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 1.3rem;
  max-width: none;
}
.lvl-key b {
  font-size: 0.66rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
  margin-right: 0.25rem;
}
.lvl-key .b1 { color: var(--l-b1); }
.lvl-key .b2 { color: var(--l-b2); }
.lvl-key .c1 { color: var(--l-c1); }
.lvl-key .c2 { color: var(--l-c2); }

/* --- Register ladder ----------------------------------------------------
   One intent, several rungs. The rungs are stacked with a visible spine so
   the ladder metaphor survives on a phone, where a table would not. */
.ladder {
  margin: 1.2rem 0 1.8rem;
  max-width: none;
}
.ladder-intent {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 1.6rem 0 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule-soft);
}
.ladder-intent .who {
  display: block;
  font-family: var(--serif);
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-top: 0.25rem;
}
.rung {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.6rem 0 0.6rem 0.7rem;
  border-left: 3px solid var(--rule);
  background: var(--panel);
  border-top: 1px solid var(--rule-soft);
  border-right: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0 4px 4px 0;
  margin-bottom: 0.3rem;
}
.rung.b1 { border-left-color: var(--l-b1); }
.rung.b2 { border-left-color: var(--l-b2); }
.rung.c1 { border-left-color: var(--l-c1); }
.rung.c2 { border-left-color: var(--l-c2); }
.rung .r-lvl {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.12rem 0.3rem;
  margin-top: 0.15rem;
}
.rung.b1 .r-lvl { color: var(--l-b1); }
.rung.b2 .r-lvl { color: var(--l-b2); }
.rung.c1 .r-lvl { color: var(--l-c1); }
.rung.c2 .r-lvl { color: var(--l-c2); }
.rung .r-body { flex: 1 1 auto; min-width: 0; }
.rung .r-de {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  overflow-wrap: break-word;
}
.rung .r-eff {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0.3rem 0 0;
  max-width: none;
}
.rung .r-eff strong { color: var(--ink); }

/* --- Particle card ------------------------------------------------------
   A particle is not a word with a meaning; it is a move. So the card leads
   with the move, not with a translation. */
.particle {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--amber);
  border-radius: 0 5px 5px 0;
  padding: 0.85rem 0.9rem;
  margin: 0 0 0.8rem;
}
.particle .pa-word {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--amber);
  margin: 0 0 0.2rem;
}
.particle .pa-move {
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
  max-width: none;
}
.particle .pa-mode {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
  max-width: none;
}
.particle .pa-pair {
  display: block;
  border-top: 1px dashed var(--rule);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
.particle .pa-bare, .particle .pa-with {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0 0 0.25rem;
  max-width: none;
}
.particle .pa-bare { color: var(--muted); }
.particle .pa-with { color: var(--ink); font-weight: 500; }
/* The two labels sit in a fixed-width column so the sentences below them
   line up. Without the width, "mit" and "ohne" push their sentences to
   different indents and the whole point of the pairing — reading the two
   versions against each other — is lost. */
.particle .pa-bare::before, .particle .pa-with::before {
  display: inline-block;
  width: 2.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-right: 0.4rem;
  opacity: 0.75;
}
.particle .pa-bare::before { content: "ohne"; }
.particle .pa-with::before { content: "mit"; color: var(--amber); opacity: 1; }
.particle .pa-why {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.55rem 0 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
  max-width: none;
}
.particle .pa-why strong { color: var(--ink); }

/* --- Cross-link to the sibling workshop -------------------------------- */
.sibling {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.9rem 1rem;
  margin: 1.6rem 0;
  background: var(--panel);
  max-width: var(--measure);
}
.sibling .callout-label { color: var(--muted); }
.sibling p:last-child { margin-bottom: 0; }
.sibling a { font-weight: 600; }

/* --- Wide comparison table: column emphasis --------------------------- */
table.wide .w-a { color: var(--ink); font-weight: 500; }
table.wide thead th { white-space: nowrap; }

@media print {
  .sibling { border-style: dashed; }
  .rung, .particle, .ladder { page-break-inside: avoid; }
}
