/* ── tool.css — Charakter „Integer Base Converter“ ───────────────────────────────────────────────────────
   WAS:   Akzente (Limette = Ziffern/Bits · Indigo = Vorzeichen/Negatives · Orange = Gewichte/Beiträge), Raster, Ergebnis-Kacheln,
          Rechenweg „Stellenwerte“ (eine Spalte je Stelle: Potenz, Gewicht, Ziffer, Beitrag; nur Anzeige).
   WARUM: Das Tool lebt von der Einsicht, WIE eine Zahl aus Ziffern entsteht. Gesetzte Ziffern leuchten in der Akzentfarbe, je größer die
          Ziffer desto kräftiger.
   WIE ÄNDERN: Farben nur über --a1/--a2/--a3 unten; Grundbausteine (Tafel, Feld, Kachel, Chip, Kästen .fb-*) in ../_werk/werk.css.
   Kennung der Klassen: i- (integer-base).
   LAYOUT (Lauf 2, 27.10.): Desktop (≥ 981 px) zwei Spalten — links Eingabe, rechts Ergebnis (gleich hoch) —, darunter in voller Breite die drei
          eingeklappten Kästen, Über dieses Tool, Hilfe & Infos. Tablet/Handy (≤ 980 px) eine Spalte: Eingabe, Ergebnis, Kästen. Desktop-Feinschliff
          und Handy-Feinschliff stehen in getrennten Medienblöcken am Ende. Entfernte Regeln stehen am Dateiende auskommentiert. */
:root { --a1: #a3e635; --a2: #818cf8; --a3: #fb923c; --a1-tinte: #1a2503; }
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) { --a1: #4d7c0f; --a2: #4f46e5; --a3: #c2410c; --a1-tinte: #f7fee7; } }
:root[data-thema="hell"] { --a1: #4d7c0f; --a2: #4f46e5; --a3: #c2410c; --a1-tinte: #f7fee7; }

.werk { width: min(1080px, 100%); }
/* Original-Icon (breit, transparent) auf neutralem Grund, damit es in hell und dunkel klar erkennbar ist */
.kopf-glyphe { width: 82px; background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie), 0 10px 30px -14px var(--a1); }
.kopf-glyphe img { display: block; width: 66px; height: auto; max-height: 48px; object-fit: contain; }

/* Raster: oben Eingabe | Ergebnis, darunter die drei Kästen in voller Breite */
.i-raster { display: grid; gap: 14px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "ein aus" "dar dar" "bild bild" "tc tc"; align-items: stretch; }
.i-ein { grid-area: ein; } .i-aus { grid-area: aus; }
.i-kasten { align-self: start; }
.i-dar { grid-area: dar; } .i-bild { grid-area: bild; } .i-tc { grid-area: tc; }
.fb-faltbar .fb-inhalt { margin-top: 14px; }

/* Eingabe */
.i-zeile { margin-top: 16px; }
.i-zeile > .feld-label { margin-bottom: 6px; }
.i-basis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.i-mini { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 12px; border-radius: 12px; border: 1.5px solid var(--linie-stark); background: var(--flaeche-2); color: var(--leise); font-size: 15px; font-weight: 700; cursor: text; transition: border-color .15s, box-shadow .15s, background .15s; }
.i-mini:focus-within { border-color: var(--a1); box-shadow: var(--fokus); background: var(--flaeche); }
.i-mini.an { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 16%, var(--flaeche)); color: var(--text); }
.i-mini.fehlerhaft { border-color: var(--fehler); background: var(--fehler-grund); }
.i-mini input { width: 3.6ch; min-width: 0; border: 0; background: transparent; outline: none; padding: 0; text-align: center; font: 500 18px var(--mono); color: var(--text); }
.i-mini input::placeholder { color: var(--sehr-leise); font-size: 14px; }
.i-mini input:focus-visible { box-shadow: none; }
.i-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#leeren .knopf-text { font-family: var(--schrift); font-size: 15px; }

/* Ergebnis: Binär (breit), darunter Dezimal | Hex, dann Oktal | Andere Basis; Binär/Dezimal/Hex groß (.wert.haupt aus werk.css) */
.i-werte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.i-werte .wert.breit, .i-tcwerte .wert.breit { grid-column: 1 / -1; }
.wert.eingabe { background: color-mix(in srgb, var(--a1) 11%, var(--flaeche)); border-color: color-mix(in srgb, var(--a1) 42%, transparent); }
.wert.leise .wert-zahl { color: var(--sehr-leise); }
.i-ziel { grid-column: 1; margin: 4px 0 6px; }
.i-ziel .i-mini { height: 44px; }
.i-leer { text-align: center; padding: 6px 4px 4px; }
.i-leer strong { font: 700 22px var(--titel); }
.i-leer p { color: var(--leise); margin: 6px 0 14px; }
.i-leer .chips { justify-content: center; }
.i-leer .chip { font-family: var(--mono); }

/* Kasten Darstellung */
.i-dar-zeile { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.i-gruppen { margin-top: 14px; }
.i-gruppen .segment { flex-wrap: wrap; }
.i-haken { width: 18px; height: 18px; flex: none; border-radius: 6px; border: 2px solid var(--linie-stark); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--a1) 16%, var(--flaeche)); border-color: var(--a1); }
.chip[aria-pressed="true"] .i-haken { background: var(--a1); border-color: var(--a1); }
.chip[aria-pressed="true"] .i-haken::after { content: ""; width: 9px; height: 5px; border: solid var(--a1-tinte); border-width: 0 0 2.4px 2.4px; transform: translateY(-1px) rotate(-45deg); }
.segment button[aria-pressed="true"] { background: color-mix(in srgb, var(--a1) 14%, var(--flaeche)); }

/* Auswahl über dem Inhalt der Kästen Rechenweg / Zweierkomplement */
.i-wahl { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 14px; }
.i-inline { margin: 0; white-space: nowrap; }
.i-leerhinweis { color: var(--leise); margin: 6px 0; }

/* ── Kasten Rechenweg: Stellenwert-Zellen (nur Anzeige) ── */
.i-stellen { display: flex; flex-wrap: wrap; gap: 8px; }
.i-stelle { --lit: 0%; flex: 0 0 auto; width: 74px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px;
  border: 1px solid var(--linie); background: color-mix(in srgb, var(--a1) var(--lit), var(--flaeche-2)); color: var(--text); font-family: var(--mono); transition: background .25s; }
.i-stelle.an { border-color: color-mix(in srgb, var(--a1) 70%, transparent); }
.i-exp { font-size: 13px; color: var(--leise); white-space: nowrap; }
.i-exp sup { font-size: 10px; margin-left: 1px; }
.i-gew { font-size: 13px; font-weight: 500; color: var(--a3); max-width: 100%; white-space: nowrap; }
.i-ziffer { font: 700 30px/1.15 var(--titel); margin: 3px 0 1px; }
.i-stelle.an .i-ziffer { color: var(--text); }
.i-dez { height: 15px; font-size: 12px; color: var(--leise); }
.i-beitrag { font-size: 13px; color: var(--leise); border-top: 1px solid var(--linie); width: 100%; text-align: center; padding-top: 4px; margin-top: 2px; white-space: nowrap; }
.i-stelle.an .i-beitrag { color: var(--text); font-weight: 500; }
.i-rechnung { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--flaeche-2); border: 1px solid var(--linie); }
.i-rechnung-text { min-width: 0; }
.i-rechnung-text .feld-label { margin-bottom: 2px; color: var(--a3); }
.i-rechnung p { margin: 0; font: 500 17px/1.5 var(--mono); overflow-wrap: anywhere; }
#rechnung-platz { flex: none; }
.i-tcwerte { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ── Über dieses Tool (Tool-Profil, SEO/GEO) ── */
.tool-profil { margin-top: 18px; padding: 20px; border-radius: var(--r-gross); background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten); min-width: 0; }
.tool-profil-titel { margin: 0 0 10px; font: 700 15px/1.2 var(--schrift); letter-spacing: 0.08em; text-transform: uppercase; color: var(--leise); display: flex; align-items: center; gap: 9px; }
.tool-profil-titel::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--a1); }
.tool-profil h3 { margin: 18px 0 8px; font: 700 16px/1.3 var(--schrift); color: var(--text); }
.tool-profil p { margin: 0 0 10px; color: var(--leise); line-height: 1.6; }
.tool-profil-einl { color: var(--text); }
.tool-profil-liste { margin: 0; padding: 0 0 0 20px; color: var(--leise); line-height: 1.55; display: grid; gap: 4px; }
.tool-profil-faq { display: grid; gap: 8px; margin-top: 8px; }
.tool-profil-faq details { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--r); padding: 0 16px; }
.tool-profil-faq summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.tool-profil-faq summary::-webkit-details-marker { display: none; }
.tool-profil-faq summary::after { content: "+"; margin-left: auto; font: 500 22px/1 var(--mono); color: var(--sehr-leise); transition: transform 0.25s var(--kurve); }
.tool-profil-faq details[open] summary::after { transform: rotate(45deg); }
.tool-profil-faq details p { margin: 0 0 14px; }
.wissen-raster { grid-template-columns: minmax(0, 1fr); }

/* Desktop-Feinschliff (≥ 981 px) */
@media (min-width: 981px) {
  .i-ein, .i-aus { min-height: 0; }
  .i-werte .wert.haupt .wert-zahl { font-size: 28px; }
}
/* Tablet und Handy: eine Spalte */
@media (max-width: 980px) {
  .i-raster { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ein" "aus" "dar" "bild" "tc"; }
}
/* Handy-Feinschliff (≤ 640 px) */
@media (max-width: 640px) {
  .kopf-glyphe { width: 66px; }
  .kopf-glyphe img { width: 52px; max-height: 40px; }
  .i-werte, .i-tcwerte { grid-template-columns: minmax(0, 1fr); }
  .i-werte .wert.haupt .wert-zahl { font-size: 24px; }
  .i-basis .segment { width: 100%; }
  .i-basis .segment button { flex: 1; padding-left: 4px; padding-right: 4px; }
  .i-gruppen .segment { display: grid; width: 100%; }
  .i-gruppen .segment button { text-align: left; }
  .i-stellen { gap: 6px; }
  .i-stelle { width: calc((100% - 18px) / 4); }
  .i-ziffer { font-size: 26px; }
  .i-gew, .i-beitrag, .i-exp { font-size: 12.5px; }
  .i-rechnung { flex-direction: column; }
  .i-rechnung p { font-size: 15px; }
  .tool-profil { padding: 16px; }
}

/* ══ Lauf 2 (27.10.) entfernt: Bit-Streifen, Alle-Basen-Tafel, Klick-Zustände der Stellen, Zielbasis im Etikett ══
.i-frei-label { display: inline-flex; align-items: center; gap: 8px; }
.i-frei-label .i-mini { height: 32px; padding: 0 4px; border-radius: 9px; border-width: 1px; }
.i-frei-label .i-mini input { width: 2.8ch; font-size: 16px; }
.i-stelle:hover { border-color: var(--linie-stark); transform: translateY(-2px); }
.i-stelle:active { transform: translateY(0) scale(.97); }
.i-stelle.geist { opacity: .55; border-style: dashed; }
.i-stelle.geist:hover { opacity: 1; }
/* ── Zweierkomplement: Bit-Streifen ── * /
.i-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 14px; color: var(--leise); }
.i-leg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 7px; vertical-align: -1px; }
.i-leg-vz::before { background: var(--a2); }
.i-leg-bit::before { background: var(--a1); }
.i-bits { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; }
.i-bits:empty { display: none; }
.i-byte { display: flex; gap: 3px; padding: 6px; border-radius: 12px; background: var(--flaeche-2); border: 1px solid var(--linie); }
.i-bit { width: 30px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 3px; border-radius: 8px; border: 1.5px solid var(--linie-stark); background: transparent; font-family: var(--mono); color: var(--sehr-leise); transition: background .15s, border-color .15s, color .15s, transform .1s; }
.i-bit:hover { border-color: var(--a1); transform: translateY(-1px); }
.i-bit:active { transform: scale(.94); }
.i-bit b { font: 700 19px/1.2 var(--mono); }
.i-bit small { font-size: 10px; color: var(--sehr-leise); }
.i-bit.an { background: var(--a1); border-color: var(--a1); color: var(--a1-tinte); }
.i-bit.an small { color: var(--a1-tinte); opacity: .75; }
.i-bit.vz { border-color: var(--a2); }
.i-bit.vz:hover { border-color: var(--a2); }
.i-bit.vz.an { background: var(--a2); border-color: var(--a2); color: #fff; }
.i-bit.vz.an small { color: #fff; }
.i-byte.vz-gruppe { border-color: color-mix(in srgb, var(--a2) 55%, transparent); }
.i-tcwerte { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.i-allewerte { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 14px; }
.i-alle summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.i-alle summary::-webkit-details-marker { display: none; }
.i-alle summary::after { content: "+"; margin-left: auto; font: 500 24px/1 var(--mono); color: var(--sehr-leise); transition: transform .25s var(--kurve); }
.i-alle details[open] summary::after { transform: rotate(45deg); }
.i-alle summary h2 { margin: 0; }
.i-alle summary:focus-visible { box-shadow: var(--fokus); border-radius: 8px; }

*/
