/* Interaktive Grammatikmodule in beiden Arbeitsheften.
   Gleiche offene Inhaltsgliederung wie der moderne Übungskörper:
   Text und Abstände statt verschachtelter Karten und Farbfelder.
   Datenattribute, hidden-Zustände und Schrittnavigation bleiben unangetastet. */
.bdtp-workbook-grammar [hidden]{display:none!important}

/* Einmalige Sprachwahl für die gesamte Grammatiklektion. */
.bdtp-gx-lesson-tools{
  display:flex;justify-content:flex-end;align-items:center;
  gap:8px;margin:1px 0 0;padding:0;
}
.bdtp-gx-tabs{
  display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;
  max-width:100%;padding:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;
}
.bdtp-gx-tabs button{
  appearance:none;display:inline-flex;align-items:center;justify-content:center;
  min-height:32px;margin:0;padding:6px 9px;
  border:0;border-bottom:2px solid transparent;border-radius:0;
  background:transparent;box-shadow:none;
  color:#586c7c;font:inherit;font-size:12px;font-weight:600;
  line-height:1.3;cursor:pointer;
}
.bdtp-gx-tabs button:hover:not(:disabled){background:#f5f8fa;color:#223342}
.bdtp-gx-tabs button.is-active{
  border-bottom-color:#223342;background:transparent;
  color:#223342;font-weight:700;box-shadow:none;
}
.bdtp-gx-tabs button:focus-visible{
  outline:2px solid var(--bdtp-section-accent,#8f263d);outline-offset:2px;
}

/* Pro Lektion eine Sprachsteuerung. Die JS-Logik synchronisiert ohnehin alle
   REGEL-/MUSTER-Panels und Modultexte über dieselbe Sprachauswahl:
   - reine Markergrammatik: Register direkt an Regel/Muster (wie Übungen),
   - mit interaktivem Modul: globale Umschaltung, keine doppelten Register. */
.bdtp-workbook-grammar:not(:has(.bdtp-gx-module))>.bdtp-gx-lesson-tools{display:none}
.bdtp-workbook-grammar:has(.bdtp-gx-module) .bdtp-gx-module-head .bdtp-gx-tabs,
.bdtp-workbook-grammar:has(.bdtp-gx-module) .bdtp-workbook-grammar__tabs{display:none}
.bdtp-workbook-grammar:has(.bdtp-gx-module) .bdtp-workbook-grammar__language-block{
  overflow:visible;border:0;border-left:3px solid #d4dee7;
  border-radius:0 7px 7px 0;background:#f7f9fb;
}
.bdtp-workbook-grammar:has(.bdtp-gx-module) .bdtp-workbook-grammar__language-panel{
  padding:12px 15px;background:#f7f9fb;
}

/* Der Modultitel ist ein normaler Abschnittskopf, kein weiterer Kartenkopf. */
.bdtp-gx-module{
  min-width:0;margin:0;padding:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;overflow:visible;
  color:#223342;font-size:14.5px;line-height:1.74;overflow-wrap:anywhere;
}
.bdtp-gx-module+.bdtp-gx-module{margin-top:4px}
.bdtp-gx-module-head{
  display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;
  gap:12px;margin:0 0 17px;padding:0 0 13px;
  border:0;border-bottom:1px solid #e2e8ed;
}
.bdtp-gx-module-head h3{
  flex:1 1 180px;min-width:0;margin:0;
  color:#223342;font-size:16px;font-weight:700;line-height:1.45;
}
.bdtp-gx-module p{margin:9px 0;line-height:1.74}
.bdtp-gx-module h4{
  margin:20px 0 10px;color:#223342;
  font-size:14.5px;font-weight:650;line-height:1.5;
}
.bdtp-gx-step{min-width:0}
.bdtp-gx-step h4:first-child{margin-top:0}
.bdtp-gx-intro{margin:0 0 16px!important;color:#586c7c}

/* Belege und Merksätze entsprechen den dezenten Fragezeilen der Übungen. */
.bdtp-gx-example{
  margin:13px 0;padding:11px 14px;
  border:0;border-left:3px solid #d4dee7;border-radius:0 7px 7px 0;
  background:#f7f9fb;color:#223342;
  font:inherit;line-height:1.65;white-space:normal;
}
.bdtp-gx-prompt{font-weight:650;color:#223342}
.bdtp-gx-summary{
  margin:21px 0 0;padding:12px 14px;
  border:0;border-left:3px solid #d4dee7;border-radius:0 7px 7px 0;
  background:#f7f9fb;color:#223342;line-height:1.68;
}

/* Bedienelemente: neutrale Konturen, sichtbare Auswahl und Fokuszustände. */
.bdtp-gx-module button:not(.bdtp-gx-tabs button){
  appearance:none;min-height:39px;margin:0;padding:8px 12px;
  border:1px solid #c6d2dc;border-radius:7px;
  background:#fff;color:#223342;box-shadow:none;
  font:inherit;font-size:13px;font-weight:600;line-height:1.4;
  cursor:pointer;transition:border-color .14s,background-color .14s;
}
.bdtp-gx-module button:not(.bdtp-gx-tabs button):hover:not(:disabled){
  border-color:#9fb2c0;background:#f5f8fa;
}
.bdtp-gx-module button[aria-pressed="true"]{
  border-color:#a7bac9;background:#f5f8fa;
  color:#223342;box-shadow:inset 3px 0 0 #9db0bf;
}
.bdtp-gx-module button:disabled{cursor:default;opacity:.45}
.bdtp-gx-module :focus-visible{
  outline:2px solid var(--bdtp-section-accent,#8f263d);outline-offset:2px;
}
.bdtp-gx-options{display:flex;flex-wrap:wrap;gap:9px;margin:15px 0}
.bdtp-gx-navigation{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:10px;margin-top:21px;padding-top:14px;border-top:1px solid #e2e8ed;
  color:#586c7c;font-size:12.5px;
}
.bdtp-gx-navigation output{color:#586c7c;font-variant-numeric:tabular-nums}

/* Entscheidungsbaum: Einrückung statt beliebig vieler Boxen im Boxenstapel. */
.bdtp-gx-decision-node{min-width:0}
.bdtp-gx-decision-node h4:first-child{margin-top:0}
.bdtp-gx-decision-result{
  min-width:0;margin:15px 0;padding:1px 0 1px 15px;
  border:0;border-left:3px solid #d4dee7;border-radius:0;
  background:transparent;color:#223342;
}
.bdtp-gx-decision-result>.bdtp-gx-example{margin-bottom:2px}

/* Mehrere Erklärungen werden zu offenen Abschnitten mit einer Trennlinie. */
.bdtp-gx-cards{display:grid;gap:0}
.bdtp-gx-card{
  min-width:0;margin:0;padding:17px 0;
  border:0;border-bottom:1px solid #e2e8ed;border-radius:0;
  background:transparent;color:#223342;box-shadow:none;
}
.bdtp-gx-card:first-child{padding-top:0}
.bdtp-gx-card:last-child{border-bottom:0;padding-bottom:0}
.bdtp-gx-card h4:first-child{margin-top:0}
.bdtp-gx-reveal{margin-top:14px;padding:13px 0 0;border-top:1px solid #e2e8ed}

/* Wortbausteine: diskrete Wortart-Unterscheidung an der Unterkante.
   Keine bunten Textflächen oder zehn verschiedenfarbigen Vollrahmen. */
.bdtp-gx-words,.bdtp-gx-sentence{
  display:flex;align-items:flex-start;flex-wrap:wrap;gap:9px;margin:15px 0;
}
.bdtp-gx-word{
  --gx-color:#7b8994;
  display:inline-flex;flex-direction:column;gap:3px;max-width:100%;
  padding:9px 11px;border:1px solid #e2e8ed;
  border-bottom:2px solid #b5c2cc;border-radius:5px;
  background:#fff;color:#223342;overflow-wrap:anywhere;line-height:1.35;
}
.bdtp-gx-word strong{color:#223342;font-size:1em;font-weight:650}
.bdtp-gx-word small{color:#586c7c;font-size:.72em}
.bdtp-gx-word[data-bdtp-gx-pos="noun"]{--gx-color:#1D4ED8}
.bdtp-gx-word[data-bdtp-gx-pos="verb"]{--gx-color:#B91C1C}
.bdtp-gx-word[data-bdtp-gx-pos="adjective"]{--gx-color:#15803D}
.bdtp-gx-word[data-bdtp-gx-pos="article"]{--gx-color:#6D28D9}
.bdtp-gx-word[data-bdtp-gx-pos="pronoun"]{--gx-color:#0E7490}
.bdtp-gx-word[data-bdtp-gx-pos="preposition"]{--gx-color:#C2410C}
.bdtp-gx-word[data-bdtp-gx-pos="conjunction"]{--gx-color:#BE185D}
.bdtp-gx-word[data-bdtp-gx-pos="adverb"]{--gx-color:#0F766E}
.bdtp-gx-word[data-bdtp-gx-pos="numeral"]{--gx-color:#854D0E}
.bdtp-gx-word[data-bdtp-gx-pos="particle"]{--gx-color:#475569}
@supports (color:color-mix(in srgb, red, white)){
  .bdtp-gx-word{border-bottom-color:color-mix(in srgb,var(--gx-color) 32%,#b5c2cc)}
}

/* Mehrsprachiger Vergleich: Tabellenlinien ohne umgebenden Kartenrahmen. */
.bdtp-gx-table-wrap{
  min-width:0;max-width:100%;overflow-x:auto;
  border:0;border-radius:0;background:transparent;
  -webkit-overflow-scrolling:touch;
}
.bdtp-gx-table{
  width:100%;min-width:540px;margin:0;border-collapse:collapse;table-layout:auto;
  background:#fff;color:#223342;font-size:13.5px;line-height:1.55;
}
.bdtp-gx-table th,.bdtp-gx-table td{
  padding:12px 14px;border:0;border-bottom:1px solid #e2e8ed;
  vertical-align:top;text-align:left;overflow-wrap:anywhere;
}
.bdtp-gx-table th{background:#f5f8fa;color:#223342;font-weight:650}
.bdtp-gx-table tbody tr:last-child>*{border-bottom:1px solid #e2e8ed}

@media(max-width:580px){
  .bdtp-gx-lesson-tools{justify-content:flex-start;margin:0}
  .bdtp-gx-module{font-size:14px}
  .bdtp-gx-module-head{align-items:flex-start;gap:6px;padding-bottom:12px}
  .bdtp-gx-module-head h3{flex-basis:100%;font-size:15.5px}
  .bdtp-gx-module .bdtp-gx-tabs{align-self:flex-start}
  .bdtp-gx-card{padding:15px 0}
  .bdtp-gx-table{font-size:12.5px}
  .bdtp-gx-table th,.bdtp-gx-table td{padding:10px 11px}
  .bdtp-gx-decision-result{padding-left:10px}
}
@media print{
  .bdtp-gx-module,.bdtp-gx-card{box-shadow:none}
  .bdtp-gx-module-head,.bdtp-gx-example,.bdtp-gx-summary{break-inside:avoid}
}
