/* 1.4 Das Binärsystem */
.bn-kopf { padding: 6px 0 22px; }
.bn-karte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 22px; margin-bottom: 20px;
}
.bn-karte h2 { font-size: 19px; margin: 0 0 12px; }
.bn-karte p { margin: 0 0 14px; }
.info { font-size: 16px; line-height: 1.6; color: var(--tinte-2); max-width: 70ch; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; }
.abschreib { border-left: 4px solid var(--akzent); padding: 4px 0 0 18px; max-width: 70ch; }
.abschreib p { font-size: 16.5px; line-height: 1.7; color: var(--tinte-2); }

.rechner { margin-top: 18px; padding: 18px; border-radius: var(--radius); background: var(--flaeche-2); border: 1px solid var(--rand); }
.lampen { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.lampe {
  display: grid; justify-items: center; gap: 6px; padding: 10px 2px 8px; border-radius: 14px; cursor: pointer;
  background: var(--flaeche); border: 2px solid var(--rand); color: var(--gedaempft); font: inherit; touch-action: manipulation;
}
.lampe .wert { font: 700 14px var(--schrift-mono); }
.lampe .bit { font: 800 28px var(--schrift-mono); color: var(--tinte); }
.lampe svg { width: 30px; height: 30px; }
.lampe .glas { fill: transparent; stroke: var(--rand-stark); stroke-width: 2; }
.lampe.an { border-color: var(--akzent); background: var(--akzent-zart); color: var(--akzent-tief); }
.lampe.an .glas { fill: #D97757; stroke: #A94E2F; }
.rechner-ergebnis { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 16px 0 4px; }
.rechner-zeile { display: flex; align-items: baseline; gap: 10px; }
.etikett { font-size: 12.5px; font-weight: 640; letter-spacing: .08em; text-transform: uppercase; color: var(--gedaempft); }
.gross { font: 800 30px var(--schrift-mono); color: var(--tinte); letter-spacing: .06em; }
.rechnung { font: 600 16px var(--schrift-mono); color: var(--tinte-2); min-height: 1.5em; overflow-wrap: anywhere; }
.rechner-regler { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.feld { display: grid; gap: 5px; }
.feld span { font-size: 13px; font-weight: 600; color: var(--gedaempft); }
.feld input, .feld select {
  font: 600 17px var(--schrift-mono); color: var(--tinte); background: var(--flaeche);
  border: 1px solid var(--rand-stark); border-radius: 12px; padding: 10px 14px; min-width: 0;
}
.feld input { width: 190px; }
.feld select { width: 100px; }
.feld input:focus, .feld select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.feld[hidden] { display: none; }

.tabelle-rahmen { overflow-x: auto; margin-bottom: 14px; }
.umrechnung { border-collapse: separate; border-spacing: 4px; margin: 0 auto 0 0; }
.umrechnung th { font: 700 13px var(--schrift-mono); color: var(--gedaempft); padding: 4px 2px; text-align: center; }
.umrechnung td { text-align: center; padding: 0; }
.umrechnung .dez { font: 800 18px var(--schrift-mono); color: var(--tinte); padding: 0 12px 0 4px; text-align: right; }
.zelle {
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer; font: 800 19px var(--schrift-mono);
  background: var(--flaeche-2); color: var(--tinte); border: 1px solid var(--rand-stark); touch-action: manipulation;
}
.zelle.eins { background: var(--akzent-zart); border-color: var(--akzent); color: var(--akzent-tief); }
.zelle.falsch { border-color: #c2410c; background: color-mix(in srgb, #c2410c 12%, var(--flaeche)); }
.zelle.richtig { border-color: var(--gut); }
.umrechnung .pruef { padding-left: 8px; min-width: 70px; font-weight: 700; text-align: left; }
.zeile-ok { color: var(--gut); }
.zeile-nein { color: #c2410c; }
.antwort { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.rueck { min-height: 1.4em; margin: 10px 0 0 !important; font-weight: 600; }
.rueck-richtig { color: var(--gut); }
.rueck-falsch { color: #c2410c; }

.modus { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.aufgabe-text { font: 700 22px var(--schrift-mono); color: var(--tinte); }
.spiel-bits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.spiel-bits .zelle { width: 46px; height: 58px; display: grid; align-content: center; gap: 2px; }
.spiel-bits .zelle small { font: 600 11px var(--schrift-mono); color: var(--gedaempft); }
.spiel-bits .zelle.fest { cursor: default; }
.spiel-stand { font-size: 14px; color: var(--gedaempft); margin: 8px 0 0 !important; }

@media (max-width: 560px) {
  .bn-karte { padding: 16px 14px; }
  .lampen { gap: 4px; }
  .lampe .bit { font-size: 22px; }
  .zelle { width: 34px; height: 40px; font-size: 16px; }
  .umrechnung { border-spacing: 2px; }
  .umrechnung .dez { font-size: 15px; padding-right: 6px; }
  .feld input { width: 150px; }
}

/* Videokarten */
.video { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: center; margin: 0 0 14px; text-decoration: none; color: inherit; border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px; background: var(--flaeche-2); max-width: 640px; }
.video:hover { border-color: var(--akzent); }
.video img { width: 100%; height: auto; display: block; border-radius: 10px; }
.video-titel { font-weight: 700; font-size: 16px; }
.video-titel small { display: block; margin-top: 4px; font-weight: 500; font-size: 13px; color: var(--gedaempft); }
.bn-karte h3 { font-size: 16.5px; margin: 18px 0 10px; }
.bn-karte h3:first-of-type { margin-top: 0; }

/* Schritte */
.schritte-leiste { display: flex; gap: 6px; margin-bottom: 16px; }
.schritte-leiste button { flex: 1 1 0; min-width: 0; height: 40px; border-radius: 10px; cursor: pointer; font: 700 14px var(--schrift-mono); border: 1px solid var(--rand); background: var(--flaeche); color: var(--gedaempft); touch-action: manipulation; }
.schritte-leiste button.fertig { background: var(--akzent-zart); color: var(--akzent-tief); }
.schritte-leiste button.jetzt { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.schritte-feld [data-schritt][hidden] { display: none; }
.schritte-knoepfe { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 28px; }
.schritte-zaehler { font-size: 14px; color: var(--gedaempft); font-weight: 600; text-align: center; }
@media (max-width: 560px) { .video { grid-template-columns: minmax(0, 1fr); } }
