/* ── tool.css — Charakter „Hash-Generator“ ─────────────────────────────────────────────────────────────
   WAS:   Akzentfarben (Mint · Violett · Pink), Raster der Tafeln, Hauptbild = Fingerabdruck-Raster (ein Kästchen je Bit,
          gekippte Bits leuchten rosa), Algorithmus-Wähler, Hash-Kacheln, Prüf-Urteil mit Abweichungs-Markierung,
          Datei-Ablage mit Fortschritt, HMAC-Schalter.
   WARUM: Das Tool lebt vom Bild des Hashs: Wer ein Zeichen ändert, sieht die Lawine (~50 % Bits kippen) statt nur
          eine neue Zeichenkette. Pink = „hat sich geändert“ (Bits, Abweichung, Fehlurteil) — bewusst die Warnfarbe des Tools.
   WIE ÄNDERN: Farben nur über --a1/--a2/--a3 unten (a1 = Bit 1/Treffer-Ton, a2 = Verlauf/Meter, a3 = gekippt);
          Zellgröße und Lücken stehen in main.js (Z, G, BG), die Optik der Zellen hier unter „Raster“.
          Grundbausteine stehen in ../_werk/werk.css (gemeinsam für alle Tools).
   LAYOUT (Lauf 2, 27.10.): Desktop (≥ 901 px) zwei Spalten — links Eingabe + Prüfen, rechts das Ergebnis (je Hash eine volle Zeile); darunter in
          voller Breite die eingeklappten Kästen „Erweitert“ und „Fingerabdruck-Bild“, dann „Über dieses Tool“ und „Hilfe & Infos“.
          Handy (≤ 900 px): eine Spalte, Reihenfolge Eingabe → Ergebnis → Prüfen → Kästen (order in den Medienblöcken am Ende der Datei).
          Das Fingerabdruck-Raster ist nur noch im Kasten (kein „Hauptbild“); überholte Regeln stehen auskommentiert (Lauf 2). */
:root { --a1: #2fe0a8; --a2: #8b7cff; --a3: #ff5d8f; --a1-tinte: #04251b; }
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) { --a1: #0c9f73; --a2: #5b4be0; --a3: #d62a68; --a1-tinte: #ffffff; } }
:root[data-thema="hell"] { --a1: #0c9f73; --a2: #5b4be0; --a3: #d62a68; --a1-tinte: #ffffff; }

.kopf-glyphe { padding: 0; overflow: hidden; background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie), 0 10px 30px -14px var(--a1); }   /* Original-Icon (quadratisch, mit eigenem Rahmen) füllt die Plakette */
.kopf-glyphe img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hg-raster { display: grid; gap: 14px; grid-template-columns: minmax(380px, 440px) minmax(0, 1fr); align-items: stretch; }
.spalte { display: grid; gap: 14px; min-width: 0; align-content: start; }
.spalte-rechts { grid-template-rows: 1fr; }                     /* die Ergebnis-Tafel füllt die Spalte → beide Spalten gleich hoch, keine Lücke */
.hg-kopf-rechts { margin-left: auto; }
.hg-ergebnis .fb-kopf { flex-wrap: wrap; }
.hg-ergebnis-werkzeuge { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 10px; }
.hg-lokal { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14px; color: var(--leise); }
.hg-lokal svg { flex: none; width: 16px; height: 16px; color: var(--a1); }
.hg-unten { display: grid; gap: 14px; margin-top: 14px; min-width: 0; }
.fb-faltbar .fb-inhalt { margin-top: 14px; }
.hg-bild-text { margin: 0 0 12px; }
.hg-klein { margin: 8px 0 0; font-size: 14px; color: var(--leise); line-height: 1.45; }

/* ── Eingabe ── */
.hg-eingabe.zieht { outline: 2px dashed var(--a1); outline-offset: 4px; }
.hg-textrahmen { align-items: stretch; }
.hg-textrahmen textarea { flex: 1; min-width: 0; width: 100%; min-height: 128px; max-height: 50vh; resize: vertical; border: 0; background: transparent; outline: none;
  padding: 12px 14px; font: 500 18px/1.4 var(--mono); color: var(--text); }
.hg-textrahmen textarea::placeholder { color: var(--sehr-leise); }
.hg-textinfo { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 12px; font-size: 14px; color: var(--leise); min-height: 24px; }
.hg-leer { border: 0; background: none; padding: 2px 4px; color: var(--a1); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hg-beispiele .chip { min-height: 38px; padding: 5px 12px; font-family: var(--mono); font-weight: 500; }

.hg-dz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 156px; padding: 18px; text-align: center; cursor: pointer;
  border: 2px dashed var(--linie-stark); border-radius: var(--r); background: var(--flaeche-2); transition: border-color .15s, background .15s; }
.hg-dz:hover, .hg-dz:focus-within, .hg-eingabe.zieht .hg-dz { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 9%, var(--flaeche-2)); }
.hg-dz:focus-within { box-shadow: var(--fokus); }
.hg-dz svg { width: 38px; height: 38px; color: var(--a1); }
.hg-dz-text { font: 700 18px var(--schrift); overflow-wrap: anywhere; }
/* Lauf 2: Hinweis steht als .hg-lokal unter der Eingabe
.hg-dz-klein { font-size: 13.5px; color: var(--leise); }
*/
.hg-dateiinfo { margin-top: 10px; font: 500 14.5px var(--mono); color: var(--leise); overflow-wrap: anywhere; min-height: 22px; }
.hg-fortschritt { height: 8px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; margin-top: 8px; }
.hg-fortschritt span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--a1), var(--a2)); border-radius: 99px; transition: width .2s linear; }

.hg-optionen { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.hg-optionen .feld-label { margin-bottom: 5px; }
.segment button:disabled { opacity: .4; cursor: not-allowed; }

.hg-hmac { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--linie); }
.hg-schalter { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 4px 0; font-weight: 700; font-size: 16px; }
.hg-knubbel { position: relative; width: 46px; height: 26px; border-radius: 99px; background: var(--flaeche-3); border: 1px solid var(--linie-stark); transition: background .2s, border-color .2s; flex: none; }
.hg-knubbel::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .25s var(--kurve), background .2s; }
.hg-schalter[aria-checked="true"] .hg-knubbel { background: var(--a1); border-color: var(--a1); }
.hg-schalter[aria-checked="true"] .hg-knubbel::after { transform: translateX(20px); background: var(--a1-tinte); }
#hm-feld { margin-top: 12px; }
#hm-key { font: 500 20px/1.2 var(--mono); }
.hg-auge { flex: none; width: 42px; height: 42px; margin-right: 4px; border-radius: 10px; border: 0; background: none; color: var(--leise); display: grid; place-items: center; }
.hg-auge svg { width: 21px; height: 21px; }
.hg-auge[aria-pressed="true"] { color: var(--a1); }

/* ── Prüfen ── */
.feld-rahmen.passt { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--flaeche-2)); }
.hg-pruefen .feld-rahmen input { font-size: 18px; }
.hg-pruefausgabe { margin-top: 12px; display: grid; gap: 10px; }
.hg-pruefausgabe:empty { display: none; }
.hg-typ { color: var(--leise); font-size: 15px; line-height: 1.45; }
.hg-typ strong { color: var(--text); font: 700 20px var(--titel); margin-right: 6px; }
.hg-typ-sub { display: block; font-size: 13.5px; margin-top: 2px; }
.hg-typ.fehler { color: var(--fehler); }
.hg-hinweiszeile { color: var(--hinweis); font-size: 15px; }
.hg-urteil { border-radius: var(--r); padding: 12px 14px; border: 1px solid; }
.hg-urteil.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 11%, var(--flaeche)); }
.hg-urteil.nein { border-color: color-mix(in srgb, var(--a3) 55%, transparent); background: color-mix(in srgb, var(--a3) 9%, var(--flaeche)); }
.hg-urteil-titel { font: 700 19px var(--schrift); }
.hg-urteil.ok .hg-urteil-titel { color: var(--ok); }
.hg-urteil.nein .hg-urteil-titel { color: var(--a3); }
.hg-urteil-sub { margin-top: 3px; font-size: 14.5px; color: var(--leise); line-height: 1.45; }
.hg-diffzeile { display: grid; grid-template-columns: 5.6em 1fr; gap: 8px; margin-top: 8px; align-items: baseline; }
.hg-difflabel { font-size: 12.5px; font-weight: 700; color: var(--sehr-leise); text-transform: uppercase; letter-spacing: .06em; }
.hg-diffwert { font: 500 13px/1.5 var(--mono); overflow-wrap: anywhere; word-break: break-all; }
.hg-diffwert mark { background: color-mix(in srgb, var(--a3) 28%, transparent); color: var(--text); border-radius: 3px; outline: 1px solid color-mix(in srgb, var(--a3) 60%, transparent); }

/* ── Hauptbild ── */
/* Lauf 2: Quellen-Marke entfällt
.hg-quelle { font: 500 14px var(--mono); color: var(--leise); padding: 5px 11px; border-radius: 99px; background: var(--flaeche-2); border: 1px solid var(--linie);
  max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
*/
.hg-beispiele { margin-bottom: 12px; }
.hg-algos { margin-bottom: 14px; }
.hg-algochip { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 13px; line-height: 1.2; }
.hg-algochip strong { font: 700 15.5px var(--mono); }
.hg-algochip small { font-size: 12.5px; }
.hg-algochip.an { background: color-mix(in srgb, var(--a1) 18%, var(--flaeche)); border-color: var(--a1); }
.hg-raster-rahmen { position: relative; padding: 18px; border-radius: 16px; border: 1px solid var(--linie); overflow: hidden;
  background-color: var(--flaeche-2);
  background-image: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--a1) 10%, transparent), transparent 55%), radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--a2) 10%, transparent), transparent 55%); }
.hg-raster-bild { transition: opacity .25s; }
.hg-raster-bild.rechnet { opacity: .45; }
.hg-svg { display: block; width: 100%; height: auto; max-height: 420px; }
.z { fill: var(--flaeche-3); stroke: transparent; stroke-width: 1.6; transition: fill .4s var(--kurve), stroke .4s var(--kurve); }
.z.e { fill: var(--a1); }
.z.k { fill: color-mix(in srgb, var(--a3) 18%, transparent); stroke: var(--a3); }
.z.k.e { fill: var(--a3); }
.hg-raster-bild.leer .z { fill: color-mix(in srgb, var(--flaeche-3) 70%, transparent); }
.hg-svg rect:hover { stroke: var(--text); }
.hg-leer-hinweis { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font: 700 18px var(--schrift); color: var(--text);
  background: color-mix(in srgb, var(--flaeche-2) 70%, transparent); }
/* Lauf 2: Zellinfo entfällt
.hg-zellinfo { min-height: 20px; margin: 6px 0 0; font-family: var(--mono); font-size: 13.5px; color: var(--sehr-leise); }
*/

.hg-lawine { margin-top: 8px; }
.hg-lawine-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.hg-lawine-kopf strong { font: 700 15px var(--schrift); letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
.hg-lawine-kopf span { font: 700 19px var(--mono); color: var(--a3); }
.hg-meter { position: relative; height: 10px; margin-top: 8px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; }
.hg-meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--a2), var(--a3)); transition: width .5s var(--kurve); }
.hg-meter-mitte { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); opacity: .55; }
.hg-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 12px 0 0; padding: 0; font-size: 13.5px; color: var(--leise); }
.hg-legende li { display: inline-flex; align-items: center; gap: 7px; }
.hg-legende i { width: 14px; height: 14px; border-radius: 4px; border: 1.6px solid transparent; }
.hg-legende .b1 { background: var(--a1); } .hg-legende .b0 { background: var(--flaeche-3); }
.hg-legende .k1 { background: var(--a3); }

/* ── Ergebnis-Kacheln: je Hash eine volle Zeile ── */
.hg-werte { display: grid; gap: 10px; grid-template-columns: 1fr; }
.hg-hash { padding: 12px 12px 12px 16px; }
.hg-hash .wert-zahl { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; word-break: break-all; }
.hg-hash.leer .wert-zahl { color: var(--sehr-leise); }
/* Lauf 2: keine Hervorhebung einer „Haupt“-Zeile
.hg-hash.haupt .wert-zahl { font-size: 18px; font-weight: 500; }
.hg-hash.haupt { background: color-mix(in srgb, var(--a1) 11%, var(--flaeche)); border-color: color-mix(in srgb, var(--a1) 55%, transparent); }
*/
.hg-hash.passt { background: color-mix(in srgb, var(--ok) 13%, var(--flaeche)); border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.hg-hash.passt .wert-label::after { content: " ✓"; color: var(--ok); }
.hg-hash.schwach .wert-zusatz { color: var(--hinweis); font-size: 13px; }
.hg-hash .wert-label { color: var(--text); font-family: var(--mono); font-size: 15px; }
#alle-platz .kopier.breit { height: 40px; }

/* ── Ü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 (≥ 901 px) ── */
@media (min-width: 901px) {
  /* Lauf 2: kein position: sticky mehr — die lange linke Spalte wurde bei kleiner Fensterhöhe unten abgeschnitten
  .spalte-links { position: sticky; top: 12px; } */
  .hg-ergebnis { padding: 24px; }
  .spalte-links { grid-template-rows: auto 1fr; }     /* Prüfen füllt den Rest → linke Spalte so hoch wie die Ergebnisliste */
}

/* ── Handy (≤ 900 px): eine Spalte, Eingabe zuerst, dann Ergebnis, dann Prüfen ── */
@media (max-width: 900px) {
  .hg-raster { grid-template-columns: minmax(0, 1fr); }
  .spalte { display: contents; }
  .hg-eingabe { order: 1; } .hg-ergebnis { order: 2; } .hg-pruefen { order: 3; }
  /* (alt) .hg-eingabe { order: 1; } .hg-buehne { order: 2; } .hg-ergebnis { order: 3; } .hg-pruefen { order: 4; } */
}
@media (max-width: 640px) {
  .hg-raster { gap: 10px; }
  .hg-unten { gap: 10px; margin-top: 10px; }
  .kopf-glyphe { width: 46px; height: 46px; }
  .hg-raster-rahmen { padding: 12px; }
  .hg-textrahmen textarea { font-size: 17px; min-height: 108px; }
  .hg-hash .wert-zahl { font-size: 15px; }
  .hg-hash { padding: 10px 8px 10px 12px; }
  .hg-hash .wert-label { white-space: nowrap; font-size: 14px; }
  .hg-algos { gap: 6px; }
  .hg-algochip { padding: 5px 10px; min-height: 46px; }
  .hg-diffzeile { grid-template-columns: 1fr; gap: 2px; }
  #alle-platz .kopier.breit .knopf-text { display: inline; }
  .hg-lawine-kopf span { font-size: 16px; }
  .hg-pruefen .feld-rahmen input { font-size: 15px; }
  .hg-eingabe .tafel-titel, .hg-ergebnis .tafel-titel { font-size: 14px; }
  .hg-ergebnis-werkzeuge { flex-basis: 100%; justify-content: space-between; margin-left: 0; margin-top: 4px; }
  .tool-profil { padding: 16px; border-radius: 18px; }
}
