/* Jev Voice Analysis Lab — Phase 2 */

:root {
    --bg: #0f1216;
    --panel: #171b21;
    --panel-2: #1e242c;
    --line: #2a313b;
    --text: #e6eaef;
    --muted: #8b95a3;
    --accent: #5b9cff;
    --accent-2: #3d7ae0;
    --good: #35c48b;
    --warn: #e5a83c;
    --bad: #e2645c;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 18px; }
h2 { font-size: 15px; letter-spacing: .01em; }
h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }

.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 22px;
    background: var(--panel); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 10;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 22px; }

.panel {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px; margin-bottom: 18px;
}
.panel-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}

.badge {
    background: var(--panel-2); border: 1px solid var(--line);
    color: var(--muted); border-radius: 999px;
    padding: 3px 11px; font-size: 12px; white-space: nowrap;
}

/* ---------- Eingabe ---------- */
textarea {
    width: 100%; background: #10141a; color: var(--text);
    border: 1px solid var(--line); border-radius: 8px;
    padding: 13px; font: inherit; line-height: 1.6; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }

.stats-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-top: 12px;
}
.counters { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.counters strong { color: var(--text); font-variant-numeric: tabular-nums; }
.counters .over strong { color: var(--bad); }
.actions { display: flex; gap: 9px; }

.presets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip {
    background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 8px; padding: 9px 16px; font: inherit; font-size: 14px;
    font-weight: 500; cursor: pointer; border: 1px solid transparent;
    transition: background .12s, border-color .12s;
}
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-primary { background: var(--accent-2); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent); }
.btn-secondary { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Segmentierungs-Vorschau ---------- */
.seg-preview {
    margin-top: 14px; padding: 12px 14px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.seg-preview-head { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.seg-list { margin: 0; padding-left: 22px; font-size: 13.5px; }
.seg-list li { margin: 3px 0; }
.seg-list li::marker { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- Status ---------- */
.alert {
    margin-top: 13px; padding: 11px 14px; border-radius: 8px;
    background: rgba(226, 100, 92, .11); border: 1px solid rgba(226, 100, 92, .4);
    color: #f0a9a4; font-size: 13.5px;
}
.loading { margin-top: 13px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.spinner {
    width: 14px; height: 14px; border: 2px solid var(--line);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Übersicht ---------- */
/* Sticky-Kopfzeile darf das Scroll-Ziel nicht verdecken. */
#results { scroll-margin-top: 72px; }

.summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 12px; margin: 0;
}
.summary div {
    background: var(--panel-2); border: 1px solid var(--line);
    border-radius: 8px; padding: 10px 12px;
}
.summary dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.summary dd { margin: 3px 0 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Satz-Cards ---------- */
.card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.card-head .num { color: var(--accent); font-weight: 600; font-size: 13px; }
.card-sentence { font-size: 15.5px; line-height: 1.5; margin: 0 0 15px; }

.dim-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dim-table th {
    text-align: left; font-size: 11.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em;
    padding: 0 10px 7px 0; border-bottom: 1px solid var(--line); font-weight: 500;
}
.dim-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dim-table tr:last-child td { border-bottom: none; }
.dim-name { font-weight: 500; white-space: nowrap; width: 1%; }
.dim-value { font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; font-weight: 600; }

/* Balken */
.bar { display: flex; align-items: center; gap: 9px; }
.bar-track {
    flex: 1; min-width: 90px; height: 7px; background: var(--panel-2);
    border-radius: 4px; overflow: hidden; border: 1px solid var(--line);
}
.bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.bar-fill.good { background: var(--good); }
.bar-fill.warn { background: var(--warn); }
.bar-fill.bad { background: var(--bad); }
.bar-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* Verteilungen */
.dist { margin-top: 7px; display: grid; gap: 3px; }
.dist-row { display: grid; grid-template-columns: 130px 1fr 46px; gap: 9px; align-items: center; font-size: 12px; }
.dist-row .k { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.dist-row.top .k, .dist-row.top .v { color: var(--text); font-weight: 600; }
.dist-track { height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.dist-fill { height: 100%; background: var(--accent-2); }
.dist-row.top .dist-fill { background: var(--accent); }

.conf { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Experimentelle Entscheidungen */
.decisions {
    margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line);
}
.decisions h4 {
    margin: 0 0 9px; font-size: 11.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.dec-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dec {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--panel-2); border: 1px solid var(--line);
    border-radius: 999px; padding: 4px 12px; font-size: 12.5px;
}
.dec .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dec.strong .dot { background: var(--good); }
.dec.possible .dot { background: var(--warn); }
.dec.ambiguous .dot { background: var(--accent); }
.dec.no .dot { background: var(--line); }
.dec.strong { border-color: rgba(53, 196, 139, .45); }
.dec.possible { border-color: rgba(229, 168, 60, .45); }
.dec .val { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Tabellen ---------- */
.table-scroll { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td {
    text-align: left; padding: 7px 12px 7px 0;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cmp th { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.cmp td { font-variant-numeric: tabular-nums; }
.cmp .delta-zero { color: var(--good); }
.cmp .delta-some { color: var(--warn); }

/* ---------- Thresholds ---------- */
.thresholds { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.thresholds label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.thresholds input {
    width: 76px; background: #10141a; color: var(--text);
    border: 1px solid var(--line); border-radius: 6px;
    padding: 6px 9px; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums;
}
.thresholds input:focus { outline: none; border-color: var(--accent); }

/* ---------- Raw ---------- */
details { border-top: 1px solid var(--line); padding: 11px 0 0; }
details + details { margin-top: 9px; }
summary { cursor: pointer; font-size: 13.5px; color: var(--accent); user-select: none; }
.raw {
    background: #0b0e12; border: 1px solid var(--line); border-radius: 8px;
    padding: 13px; overflow: auto; max-height: 420px;
    font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #b9c4d2; white-space: pre; margin: 11px 0 0;
}

/* ---------- Login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; padding: 30px; width: min(380px, 92vw);
}
.login-card h1 { margin-bottom: 7px; }
.login-card form { margin-top: 20px; display: grid; gap: 9px; }
.login-card label { font-size: 12.5px; color: var(--muted); }
.login-card input {
    background: #10141a; color: var(--text); border: 1px solid var(--line);
    border-radius: 8px; padding: 10px 12px; font: inherit;
}
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card .btn { margin-top: 5px; }

@media (max-width: 620px) {
    .dist-row { grid-template-columns: 96px 1fr 44px; }
    .stats-row { flex-direction: column; align-items: stretch; }
    .actions { justify-content: flex-end; }
}

/* ---------- Phase 2.1: Ground Truth + Calibration ---------- */
.human { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.human h4 {
    margin: 0 0 9px; font-size: 11.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.hbtn-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.hbtn {
    background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.hbtn:hover { border-color: var(--accent); }
.hbtn.clear { color: var(--muted); font-size: 11.5px; }
.hbtn.active { font-weight: 600; }
.hbtn.active.direct { background: rgba(53,196,139,.16); border-color: var(--good); color: #7fe0b4; }
.hbtn.active.optional { background: rgba(229,168,60,.16); border-color: var(--warn); color: #f0c877; }
.hbtn.active.thinking { background: rgba(91,156,255,.16); border-color: var(--accent); color: #9dc1ff; }

.hbadge {
    display: inline-block; border-radius: 999px; padding: 2px 9px;
    font-size: 11px; font-weight: 600; letter-spacing: .03em;
}
.hbadge.direct { background: rgba(53,196,139,.16); color: #7fe0b4; }
.hbadge.optional { background: rgba(229,168,60,.16); color: #f0c877; }
.hbadge.thinking { background: rgba(91,156,255,.16); color: #9dc1ff; }

.calib-text { white-space: normal !important; min-width: 260px; max-width: 320px; }

.calib-presets { margin-top: 14px; border-top: 1px solid var(--line); }
.calib-chip-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 7px; margin-top: 11px;
}
.chip-wide {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    border-radius: 8px; padding: 8px 12px; text-align: left; line-height: 1.4;
}

/* ---------- Phase 2.2: Label-Warteschlange + Kalibrieransicht ---------- */
.chip-on { border-color: var(--accent); color: var(--accent); background: rgba(91,156,255,.12); }

.queue-text {
    margin: 0 0 16px; padding: 13px 16px; border-left: 3px solid var(--accent);
    background: var(--panel-2); border-radius: 0 8px 8px 0; font-size: 15.5px; line-height: 1.55;
}
.queue-sentence {
    padding: 11px 0; border-bottom: 1px solid var(--line);
}
.queue-sentence:last-of-type { border-bottom: none; }
.queue-sentence-text { margin-bottom: 8px; font-size: 14.5px; }
.queue-sentence-text .num { color: var(--accent); font-weight: 600; font-size: 12.5px; margin-right: 7px; }
.queue-top {
    margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line);
}
.queue-top h4 {
    margin: 0 0 9px; font-size: 11.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.queue-form .btn-primary { margin-top: 16px; }
/* Radios optisch durch die Pill ersetzen */
.hbtn input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
label.hbtn { display: inline-flex; align-items: center; }

/* Histogramm */
.hist td.histcell { min-width: 190px; white-space: nowrap; }
.histbar { display: inline-block; height: 11px; border-radius: 3px; vertical-align: middle; }
.histbar.direct { background: var(--good); }
.histbar.optional { background: var(--warn); }
.histbar.thinking { background: var(--accent); }
/* Zahl direkt neben dem Balken, sonst liest sie sich als Wert der Nachbarspalte. */
.histnum { margin-left: 7px; color: var(--muted); font-size: 11.5px; }

/* Links auf dunklem Grund lesbar halten. */
a { color: var(--accent); }
a:hover { color: #8fbaff; }

.row-best td { background: rgba(91,156,255,.13); font-weight: 600; }

.errcase {
    display: flex; gap: 13px; align-items: flex-start;
    padding: 11px 0; border-bottom: 1px solid var(--line);
}
.errcase:last-child { border-bottom: none; }
.errval {
    flex: 0 0 auto; min-width: 58px; text-align: center;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
    padding: 4px 9px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px;
}
.errsent { font-size: 14.5px; line-height: 1.5; }

/* ---------- Phase 3: Humanisierung + Audio ---------- */
.hum-controls {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 12px 14px; margin-bottom: 4px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.hum-controls .sep { width: 1px; height: 20px; background: var(--line); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.numlbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.numlbl input { width: 68px; background: #10141a; color: var(--text); border: 1px solid var(--line);
    border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.numlbl select { background: #10141a; color: var(--text); border: 1px solid var(--line);
    border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12.5px; }

.hum-text {
    margin: 0 0 6px; padding: 12px 14px; font-size: 15px; line-height: 1.6;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.hum-rendered { border-left: 3px solid var(--accent); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }

.hum-sent { padding: 13px 0; border-bottom: 1px solid var(--line); }
.hum-sent:last-child { border-bottom: none; }
.hum-sent.chosen { border-left: 3px solid var(--accent); padding-left: 12px; }
.hum-sent-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.hum-sent-head .num { color: var(--accent); font-weight: 600; font-size: 12.5px; }
.band { border-radius: 999px; padding: 2px 9px; font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line); color: var(--muted); }
.band-candidate { background: rgba(91,156,255,.16); color: #9dc1ff; border-color: var(--accent); }
.band-optional { background: rgba(229,168,60,.14); color: #f0c877; }
.band-manual { background: rgba(53,196,139,.16); color: #7fe0b4; }
.hum-sent-text { font-size: 14.5px; margin-bottom: 6px; }
.hum-signals { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.hum-signals b { color: var(--text); }

.act { margin: 6px 0 0; padding-left: 11px; border-left: 2px solid var(--line); }
.act-name { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--accent); }
.act-name.none { color: var(--muted); }
.act-render { margin-left: 8px; background: #10141a; border: 1px solid var(--line);
    border-radius: 4px; padding: 1px 6px; font-size: 12px; color: #b9c4d2; }
.act-why { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

.ovr-row { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hbtn.ovr { padding: 3px 10px; font-size: 12px; }

.audio-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.audio-slot {
    margin-top: 12px; padding: 12px 14px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.audio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.audio-transcript {
    font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
    color: #b9c4d2; margin-bottom: 9px; word-break: break-word;
}
.audio-slot audio { width: 100%; height: 34px; }
.audio-stats { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 9px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.audio-stats i { font-style: normal; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-right: 4px; }

/* ---------- Phase 3.1: Listening Lab ---------- */
.accent { color: var(--accent); }
.alert-soft {
    margin: 0 0 12px; padding: 11px 14px; border-radius: 8px; font-size: 13.5px;
    background: rgba(229,168,60,.10); border: 1px solid rgba(229,168,60,.38); color: #f0c877;
}
.cand-sentence {
    margin: 0 0 12px; padding: 11px 14px; font-size: 15px;
    background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
}
.note-input {
    width: 100%; background: #10141a; color: var(--text); border: 1px solid var(--line);
    border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px;
}
.note-input:focus { outline: none; border-color: var(--accent); }

.variant-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 13px;
}
.variant-card {
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
    padding: 14px; display: flex; flex-direction: column; gap: 9px;
}
.variant-card.picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.variant-card.muted-card { opacity: .55; }
.variant-head { font-weight: 600; font-size: 14px; }
.variant-transcript {
    font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
    color: #b9c4d2; flex: 1; word-break: break-word;
}
.btn-play { width: 100%; }
.variant-meta { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.variant-audio audio { width: 100%; height: 32px; }

.stat-block { margin-bottom: 20px; }
.stat-row { display: grid; grid-template-columns: 170px 1fr 44px; gap: 11px; align-items: center; margin: 5px 0; font-size: 13px; }
.stat-label { color: var(--muted); }
.stat-track { height: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.stat-fill { display: block; height: 100%; }
.stat-fill.vA { background: var(--good); }
.stat-fill.vB { background: var(--accent); }
.stat-fill.vC { background: var(--warn); }
.stat-fill.vnone, .stat-fill.vall_worse { background: var(--muted); }
.stat-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.replay {
    margin-top: 14px; padding: 14px; background: var(--panel-2);
    border: 1px solid var(--accent); border-radius: 10px;
}
.replay h3 { margin-top: 0; }
.replay-row { font-size: 13px; margin: 3px 0; }
.replay-row i { font-style: normal; color: var(--muted); text-transform: uppercase;
    font-size: 11px; letter-spacing: .04em; margin-right: 7px; }

/* ---------- Phase 3.4: Plan-Zusammenfassung ---------- */
.plan-hit, .plan-miss {
    padding: 13px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 14.5px;
}
.plan-hit { background: rgba(53,196,139,.11); border: 1px solid rgba(53,196,139,.42); }
.plan-miss { background: rgba(139,149,163,.10); border: 1px solid var(--line); }
.plan-hit .replay-row, .plan-miss .replay-row { margin-top: 5px; }
details > summary { padding: 4px 0; font-weight: 500; }

/* ---------- Phase 3.6: Beispielkatalog ---------- */
.catalog {
    margin-top: 14px; padding: 15px; border-radius: 10px;
    background: var(--panel-2); border: 1px solid var(--line);
}
.catalog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.catalog-head h3 { margin: 0; }
.catalog-filters {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
    align-items: center; margin-bottom: 13px;
}
.catalog-list { max-height: 460px; overflow-y: auto; display: grid; gap: 9px; }
.catalog-item {
    padding: 11px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.catalog-item:hover { border-color: var(--accent); }
.catalog-meta {
    font-size: 11px; color: var(--muted); text-transform: uppercase;
    letter-spacing: .05em; margin-bottom: 5px;
}
.catalog-text { font-size: 13.5px; line-height: 1.5; margin-bottom: 9px; }

@media (max-width: 720px) {
    .catalog-filters { grid-template-columns: 1fr; }
}

/* ---------- Phase 4.0: Speech Target Lab ---------- */
.diff-box {
    padding: 14px; border-radius: 8px; line-height: 1.9;
    background: var(--panel-2); border: 1px solid var(--line);
    font-size: 14.5px; word-break: break-word;
}
.diff-same { color: var(--text); }
.diff-add {
    background: rgba(53, 196, 139, .16); color: #7fe0b4;
    border-radius: 4px; padding: 1px 5px;
}
.diff-del {
    background: rgba(226, 100, 92, .14); color: #f0a9a4;
    border-radius: 4px; padding: 1px 5px; text-decoration: line-through;
}
.diff-legend { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

.audio-slot-wrap { margin-top: 10px; }
.audio-slot-wrap audio { width: 100%; max-width: 520px; }

/* Ungültige Ground Truth bleibt sichtbar, tritt aber zurück. */
.cmp tr.row-invalid td { opacity: .5; }

/* ---------- P1.1b: Fassungsvergleich ---------- */
/* Die experimentelle Promptversion muss am Knopf auffallen. */
.badge.warn {
    background: rgba(229, 168, 60, .16);
    border-color: var(--warn); color: #f0c877;
}
/* Gewählte Fassung — markiert, aber nicht bewertet. */
.cmp-picked {
    border-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------- P1.2: Gesprächsfunktionen ---------- */
.badge.p12 {
    background: rgba(91, 156, 255, .16);
    border-color: var(--accent); color: #9dc1ff;
}
.fn-seg {
    padding: 10px 12px; margin: 8px 0; border-radius: 8px;
    background: var(--panel-2); border: 1px solid var(--line);
}
.fn-head { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.fn-text { font-size: 14.5px; line-height: 1.6; color: var(--text); }

/* Der P1.1-Vergleich ist nicht der Normalfall — er tritt zurück. */
.cmp-adv { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cmp-adv > summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* ---------- P1.4: Kontextstatus ---------- */
.ctx-status {
    padding: 10px 12px; margin: 12px 0 0; border-radius: 8px;
    background: var(--panel-2); border: 1px solid var(--line); font-size: 14px;
}
/* Grenzfälle treten optisch hervor — sie sind kein Erfolg. */
.ctx-status.ambiguous, .ctx-status.missing, .ctx-status.conflict {
    border-color: var(--warn); background: rgba(229, 168, 60, .10);
}

/* Ein verworfener Vorschlag bleibt sichtbar, tritt aber zurück. */
.edit-verworfen { opacity: .72; border-color: var(--warn); }
