/* ── tool.css — Charakter „JSON Converter“ ────────────────────────────────────────────────────────────────
   WAS:   Akzente (Gold · Himmel · Violett = Eingabe/Fokus · Baum/Pfad · Ausgabe), die Syntaxfarben der Typen (Schlüssel, Text, Zahl,
          Ja/Nein, null), Raster, Textflächen mit Ablagefeld, Status mit Fehlerauszug und das Hauptbild: die Baumansicht samt Pfadleiste.
   WARUM: Das Werkzeug lebt vom Überblick über verschachtelte Daten: jeder Typ hat seine Farbe (auch Legende im Kopf des Baums), der
          gewählte Knoten zeigt seinen Pfad zum Kopieren, Fehler zeigen Zeile, Spalte und einen markierten Auszug.
   WIE ÄNDERN: Akzente und --j-* nur oben in :root (dunkel, hell per Medienabfrage UND data-thema — beide Blöcke gleich halten);
          Grundbausteine in ../_werk/werk.css. Baum-Klassen: .bk (Knoten) .bz (Zeile) .bt (Pfeil) .bs/.bi (Schlüssel/Index) .bv (Wert)
          .bn (Anzahl) .bp (Vorschau) — gebaut in js/main.js (baueZeile). */
:root {
  --a1: #f5b83d; --a2: #38bdf8; --a3: #c084fc; --a1-tinte: #241a03;
  --j-key: #7dd3fc; --j-str: #86efac; --j-num: #d8b4fe; --j-bool: #fdba74; --j-null: #94a3b8;
}
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) {
  --a1: #b45309; --a2: #0369a1; --a3: #7e22ce; --a1-tinte: #ffffff;
  --j-key: #0369a1; --j-str: #15803d; --j-num: #7e22ce; --j-bool: #c2410c; --j-null: #64748b; } }
:root[data-thema="hell"] {
  --a1: #b45309; --a2: #0369a1; --a3: #7e22ce; --a1-tinte: #ffffff;
  --j-key: #0369a1; --j-str: #15803d; --j-num: #7e22ce; --j-bool: #c2410c; --j-null: #64748b;
}

/* LAYOUT (Lauf 2, 27.10.): Desktop zwei gleich breite Spalten — links Eingabe mit Prüfstatus und Beispielen, rechts Ausgabe; darunter über die volle Breite
   der Baum, dann die eingeklappten Kästen (.jc-kasten). Handy: eine Spalte in dieser Reihenfolge (Eingabe → Status → Ausgabe → Baum → Kästen).
   align-items: start — keine Tafel wird auf die Höhe der Nachbarin gedehnt (der Baum sprang vorher mit der Fehlerlage). Desktop/Handy je eigener Medienblock am Ende. */
.jc-raster { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.jc-baum, .jc-kasten { grid-column: 1 / -1; }
/* (alt) Raster 5fr/7fr mit Eingabe | Baum und der Ausgabe ganz unten:
.jc-raster { display: grid; gap: 14px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; }
.jc-werte-box, .jc-aus { grid-column: 1 / -1; }
.jc-ein, .jc-baum { display: flex; flex-direction: column; } */
.kopf-glyphe { background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie), 0 10px 30px -14px var(--a1); }   /* Original-Icon (transparent) auf neutralem Grund, hell und dunkel erkennbar */
.kopf-glyphe img { display: block; width: 40px; height: 40px; object-fit: contain; }
.tafel-kopf { flex-wrap: wrap; }
.jc-ein .tafel-kopf, .jc-aus .tafel-kopf { min-height: 48px; }   /* beide Textflächen beginnen auf gleicher Höhe */
.jc-knoepfe, .jc-modi { margin-left: auto; }
.jc-modi { gap: 2px; }
.jc-modi button { padding: 7px 10px; font-size: 14.5px; }
.jc-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.jc-knoepfe .ikon-knopf, .jc-aktionen .ikon-knopf, .jc-pfad-knoepfe .ikon-knopf, .jc-pfad-knoepfe .kopier.breit { height: 38px; padding: 0 11px; }

/* Chips, Haken */
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--a1) 16%, var(--flaeche)); border-color: var(--a1); }
.jc-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"] .jc-haken { background: var(--a1); border-color: var(--a1); }
.chip[aria-pressed="true"] .jc-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); }
.chip.versteckt, .jc-opt.versteckt { display: none !important; }
.chip:disabled, .ikon-knopf:disabled, .kopier:disabled { opacity: .45; cursor: default; }

/* Textflächen */
.jc-eingabe-box { position: relative; display: flex; min-height: 280px; }
.jc-text { display: block; width: 100%; resize: vertical; padding: 14px 16px; border-radius: var(--r); border: 1.5px solid var(--linie-stark);
  background: var(--flaeche-2); color: var(--text); font: 500 15.5px/1.5 var(--mono); outline: none; tab-size: 2; white-space: pre; overflow: auto; transition: border-color .15s, box-shadow .15s, background .15s; }
.jc-eingabe-box .jc-text { flex: 1; min-height: 280px; resize: none; }
.jc-text::placeholder { color: var(--sehr-leise); }
.jc-text:focus { border-color: var(--a1); box-shadow: var(--fokus); background: var(--flaeche); }
.jc-ausgabe { min-height: 280px; resize: none; background: color-mix(in srgb, var(--a3) 6%, var(--flaeche-2)); }
.jc-ablage { position: absolute; inset: 0; display: none; place-items: center; border: 2.5px dashed var(--a1); border-radius: var(--r); background: color-mix(in srgb, var(--a1) 14%, var(--flaeche)); font: 700 20px var(--titel); pointer-events: none; }
.zieht .jc-ablage { display: grid; }

/* Status */
.jc-status { margin-top: 12px; }
.jc-badge-zeile { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.jc-badge { font: 700 13px/1 var(--schrift); letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--linie-stark); color: var(--leise); }
.jc-badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.jc-badge.fehler { color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 55%, transparent); background: var(--fehler-grund); }
.jc-badge-text { font-weight: 700; font-size: 16px; }
.jc-status .meldung { font-size: 15.5px; }
.jc-ausschnitt { margin-top: 10px; padding: 8px 0; border-radius: var(--r); background: var(--flaeche-2); border: 1px solid var(--linie); overflow: auto; font: 500 14.5px/1.6 var(--mono); }
.jc-ausschnitt .az { display: flex; white-space: pre; padding: 0 12px; min-width: max-content; }
.jc-ausschnitt .az.fehler { background: var(--fehler-grund); }
.jc-ausschnitt .nr { flex: none; margin-right: 12px; color: var(--sehr-leise); text-align: right; user-select: none; min-width: 2ch; }
.jc-ausschnitt .fehler .nr { color: var(--fehler); font-weight: 700; }
.jc-ausschnitt mark { background: var(--fehler); color: var(--grund); border-radius: 3px; padding: 0 2px; font-weight: 700; }
.jc-status-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.jc-status-knoepfe:not(:has(.chip:not(.versteckt))) { display: none; }
.jc-status-knoepfe .chip { min-height: 38px; padding: 4px 13px; background: var(--flaeche-2); }
.jc-repair { margin: 10px 0 0; color: var(--leise); font-size: 14.5px; }
.jc-repair button { border: 0; background: none; color: var(--a1); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 0 4px; }
.jc-hinweise { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.jc-hinweise:empty { display: none; }
.jc-hinweise li { padding: 8px 12px; border-radius: 11px; font-size: 14.5px; line-height: 1.45; background: color-mix(in srgb, var(--hinweis) 12%, transparent); border: 1px solid color-mix(in srgb, var(--hinweis) 40%, transparent); }
.jc-beispiele { margin-top: 14px; }
.jc-beispiele .feld-label { margin-bottom: 6px; }
.jc-beispiele .chip { min-height: 38px; padding: 4px 12px; }

/* Baum (Hauptbild) */
.jc-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 14px; }   /* jetzt in „Hilfe & Infos“ */
.jc-legende li { display: inline-flex; align-items: center; gap: 6px; }
.jc-legende i { width: 10px; height: 10px; border-radius: 3px; background: currentColor; display: inline-block; }
.jc-legende span { color: var(--leise); }
.t-key { color: var(--j-key); } .t-str { color: var(--j-str); } .t-num { color: var(--j-num); } .t-bool { color: var(--j-bool); } .t-null { color: var(--j-null); }
.jc-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.jc-suche { flex: 1 1 220px; min-width: 0; padding-right: 4px; }
.jc-suche input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 9px 12px; font: 500 16px/1.2 var(--mono); }
.jc-suche input::-webkit-search-cancel-button { display: none; }
.jc-treffer { font: 500 13.5px var(--mono); color: var(--leise); white-space: nowrap; padding: 0 6px; }
.jc-mini { width: 30px; height: 30px; border-radius: 9px; border: 0; background: transparent; color: var(--leise); display: grid; place-items: center; padding: 0; }
.jc-mini:hover:not(:disabled) { background: var(--flaeche-3); color: var(--text); }
.jc-mini:disabled { opacity: .35; }
.jc-mini svg { width: 18px; height: 18px; }
.jc-ebenen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jc-ebenen .chip { min-height: 38px; padding: 4px 12px; }
.jc-ebenen .segment button { min-width: 34px; padding: 6px 10px; }
.jc-pfad { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jc-pfad-text { flex: 1 1 160px; min-width: 0; padding: 9px 12px; border-radius: var(--r-klein); background: var(--flaeche-2); border: 1px solid var(--linie); font: 500 15px/1.35 var(--mono); color: var(--a2);
  overflow-x: auto; white-space: nowrap; user-select: all; }
.jc-pfad-text.leer { color: var(--sehr-leise); font-family: var(--schrift); user-select: none; }
.jc-pfad-knoepfe { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.jc-pfad-knoepfe:not(:has(> :not(.versteckt))) { display: none; }   /* keine leere Zeile über dem Baum, solange nichts gewählt ist */
/* (alt) .jc-pfad-knoepfe { …; flex-basis: 100%; min-height: 38px; }  reservierte eine leere Zeile */
.jc-pfad-knoepfe .kopier.breit { border-radius: 12px; background: var(--flaeche); }
.jc-knoten-info { margin: 6px 2px 10px; min-height: 1.4em; font-size: 14px; color: var(--leise); }
.jc-baum-box { min-height: 90px; max-height: min(56vh, 480px); overflow: auto; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche-2); padding: 8px 6px; }
.jc-baum-innen { min-width: max-content; }
.jc-leer { margin: 20px 14px; color: var(--leise); }
.jc-begrenzt { margin: 8px 12px; color: var(--hinweis); font-size: 14px; }
.bk-kinder { margin-left: 11px; padding-left: 10px; border-left: 1px solid var(--linie-stark); }
.bz { display: flex; align-items: baseline; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 8px; font: 500 15px/1.55 var(--mono); cursor: default; outline: none; border-left: 2px solid transparent; }
.bz:hover { background: color-mix(in srgb, var(--flaeche-3) 70%, transparent); }
.bz.sel { background: color-mix(in srgb, var(--a2) 17%, var(--flaeche-2)); border-left-color: var(--a2); }
.bz.treffer { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 60%, transparent); }
.bz.aktuell { background: color-mix(in srgb, var(--a1) 24%, var(--flaeche-2)); box-shadow: inset 0 0 0 1.5px var(--a1); }
.bz:focus-visible { box-shadow: var(--fokus); }
.bt { flex: none; width: 22px; height: 22px; align-self: center; border: 0; background: transparent; color: var(--leise); padding: 2px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.bt.leer { cursor: default; pointer-events: none; }
.bt svg { width: 16px; height: 16px; transition: transform .2s var(--kurve); }
.bt.auf svg { transform: rotate(90deg); }
.bt:hover { background: var(--flaeche-3); color: var(--text); }
.bi { color: var(--sehr-leise); }
.bs { overflow-wrap: anywhere; }
.bd { color: var(--sehr-leise); }
.bv { overflow-wrap: anywhere; min-width: 0; white-space: pre-wrap; }
.bo { color: var(--leise); }
.bn { color: var(--sehr-leise); font-size: 12.5px; padding: 0 6px; border-radius: 99px; border: 1px solid var(--linie); align-self: center; line-height: 1.5; }
.bp { color: var(--sehr-leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.bz[aria-expanded="true"] .bp { display: none; }
.bz[aria-expanded="false"] .bo { display: none; }   /* zugeklappt zeigt die Vorschau { a, b … } selbst die Klammern */
.bz .bs + .bd, .bz .bi + .bd { margin-left: -3px; }
.bmehr { margin: 4px 0 6px 26px; border: 1px dashed var(--linie-stark); background: transparent; color: var(--a2); font: 700 14px var(--schrift); padding: 6px 12px; border-radius: 10px; }
.bmehr:hover { background: var(--flaeche-3); }

/* Kennzahlen */
.jc-stat-gruppen { display: flex; flex-wrap: wrap; gap: 6px 36px; }
.jc-stat { flex: 1 1 240px; max-width: 420px; margin: 0; display: grid; }
.jc-stat > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 7px 0; border-bottom: 1px solid var(--linie); }
.jc-stat dt { color: var(--leise); }
.jc-stat dd { margin: 0; font: 700 15.5px var(--mono); }
/* (alt) .jc-werte-box .werte { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }  — Kennzahlen-Kacheln entfernt */

/* Ausgabe */
.jc-satz { margin: 0 0 12px; color: var(--leise); font-size: 15.5px; }
.jc-optionen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 22px; }   /* im eingeklappten Kasten */
.jc-opt .feld-label { margin-bottom: 5px; }
.jc-schalter { display: flex; flex-wrap: wrap; gap: 8px; }
.jc-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.jc-vorn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-left: auto; }   /* Einzug (Formatiert) / Trennzeichen (CSV) */
.jc-vorn .jc-opt { display: flex; align-items: center; gap: 8px; }
.jc-vorn .jc-opt .feld-label { margin: 0; }
.jc-vorn .segment button { min-height: 34px; padding: 5px 12px; }
.jc-kopier-platz { display: contents; }
.jc-aktionen .kopier.breit { height: 38px; }
.meldung.hinweis { color: var(--hinweis); }
.jc-ausgabe + .meldung { margin-top: 10px; }
.fb-inhalt .jc-satz { margin-top: 0; }
.fb-faltbar .fb-inhalt { margin-top: 14px; }

/* ── Über dieses Tool (Tool-Profil, SEO/GEO) und Hilfe & Infos ── */
.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; max-width: 110ch; }
.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; max-width: 110ch; }
.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 details p + p { margin-top: -6px; }

/* ── Desktop (≥ 901 px) ── */
@media (min-width: 901px) {
  .jc-ein, .jc-aus { padding: 22px; }
}

/* ── Handy / schmal (≤ 900 px): eine Spalte, Reihenfolge Eingabe → Status → Ausgabe → Baum → Kästen ── */
@media (max-width: 900px) {
  .jc-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kopf-glyphe img { width: 32px; height: 32px; }
  .jc-eingabe-box, .jc-eingabe-box .jc-text { min-height: 200px; }
  .jc-ausgabe { min-height: 200px; }
  .jc-eingabe-box .jc-text { font-size: 14.5px; }
  .jc-text { padding: 12px; }
  .jc-badge-text { font-size: 15px; }
  .bz { font-size: 14px; min-height: 34px; }
  .bt { width: 28px; height: 28px; }
  .jc-pfad-text { flex-basis: 100%; }
  .jc-modi { flex-wrap: wrap; margin-left: 0; }
  .jc-knoepfe { margin-left: 0; width: 100%; }
  .jc-knoepfe .ikon-knopf .knopf-text, .jc-aktionen .ikon-knopf .knopf-text, .jc-pfad-knoepfe .knopf-text { display: inline; font-size: 14px; }
  .jc-knoepfe .ikon-knopf { padding: 0 10px; }
  .jc-vorn { margin-left: 0; width: 100%; }
  .tool-profil { padding: 16px; border-radius: 18px; }
}
/* (alt, Lauf 2 ersetzt) @media (max-width: 900px) { .jc-raster { … } .jc-baum-box { flex: none; height: min(66vh, 520px); min-height: 320px; } }
   und .jc-werte-box .werte { grid-template-columns: 1fr 1fr; } */
