/* =========================================================================
   AOP-Coding-Assistent — screen styles (Medinnovo system)
   Three variants share primitives (.ap-*); layout differs per variant
   (.a-* / .b-* / .c-*). All accent moments read --aop-accent so the
   Tweaks panel can re-skin every screen at once.
   ========================================================================= */

:root {
  /* UKB-Teal als Primärakzent (Design-Handoff) */
  --aop-accent:      #009BBB;  /* UKB-Teal */
  --aop-accent-deep: #00748C;  /* teal-700 */
  --aop-accent-tint: #D4EFF4;  /* teal-100 */
  /* Page background — slate-50 wash */
  --bg-1: #F6F7F7;
}

/* Semantic status colours (fixed — meaning, not brand accent).
   Aus der UKB-Chromatik abgeleitet: Grün/Gelb/Rot, fg für Text abgedunkelt. */
:root {
  --st-ok-fg: #35801C;  --st-ok-bg: #E9F5E3;  --st-ok-bd: #C8E5BA;
  --st-wn-fg: #8A6A00;  --st-wn-bg: #FDF3D2;  --st-wn-bd: #ECD789;
  --st-gp-fg: #B0290B;  --st-gp-bg: #FBE5E0;  --st-gp-bd: #F2B5A8;
}

/* ---- screen shell ------------------------------------------------------ */
.aop {
  width: 100%; height: 100%; box-sizing: border-box;
  background: var(--bg-1); color: var(--fg-1);
  font-family: var(--font-sans); font-size: 15px; line-height: var(--lh-base);
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.aop *, .aop *::before, .aop *::after { box-sizing: border-box; }

/* ---- top bar ----------------------------------------------------------- */
.ap-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.ap-brand { display: flex; align-items: center; gap: 11px; }
.ap-logo { height: 30px; width: auto; flex: 0 0 auto; display: block; user-select: none; -webkit-user-drag: none; }
.ap-brandtext { display: flex; flex-direction: column; gap: 2px; }
.ap-wordmark { font-family: var(--font-display); font-weight: 500; font-size: 19px;
  letter-spacing: -0.01em; line-height: 1; }
.ap-sub { font-size: 12px; color: var(--fg-3); letter-spacing: 0.01em; }
.ap-bar-spacer { flex: 1 1 auto; }
.ap-online { display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
  color: var(--fg-2); font-weight: 500; }
.ap-online::before { content: ""; width: 7px; height: 7px; border-radius: 999px;
  background: var(--st-ok-fg); box-shadow: 0 0 0 3px var(--st-ok-bg); }
.ap-chip { font-family: var(--font-mono); font-size: 11px; color: var(--fg-2);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 4px 8px; }

/* ---- generic primitives ----------------------------------------------- */
.ap-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--fg-2); }
.ap-h-serif { font-family: var(--font-display); letter-spacing: var(--tracking-tight); }
.ap-num { font-family: var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
.ap-mono { font-family: var(--font-mono); }

.ap-label { font-size: 12px; font-weight: 600; color: var(--fg-1); display: block; margin-bottom: 6px; }
.ap-input, .ap-select, .ap-textarea {
  width: 100%; font-family: var(--font-sans); font-size: 14px; color: var(--fg-1);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 9px 12px; outline: none;
}
.ap-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237A7468' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: calc(100% - 12px) center; padding-right: 30px; }
.ap-textarea { resize: none; line-height: 1.55; font-size: 13px; white-space: pre-wrap; overflow: hidden; }

.ap-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.ap-seg-item { font-size: 12px; padding: 6px 11px; border-radius: var(--radius-pill);
  color: var(--fg-2); background: var(--bg-3); border: 1px solid transparent; cursor: pointer; }
.ap-seg-item.is-on { background: var(--mi-ink); color: var(--mi-cream); font-weight: 500; }

.ap-btn { font-family: var(--font-sans); font-weight: 500; font-size: 14px; cursor: pointer;
  padding: 11px 18px; border-radius: var(--radius-md); border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ap-btn--primary { background: var(--mi-ink); color: var(--mi-cream); flex: 1 1 auto; }
.ap-btn--ghost { background: transparent; color: var(--fg-1); border-color: var(--border-strong); }

/* status tags + dots */
.ap-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.ap-dot { width: 7px; height: 7px; border-radius: 999px; flex: 0 0 auto; }
.is-ok  .ap-dot, .ap-dot.ok  { background: var(--st-ok-fg); }
.is-warn .ap-dot, .ap-dot.warn { background: var(--st-wn-fg); }
.is-gap .ap-dot, .ap-dot.gap  { background: var(--st-gp-fg); }
.ap-tag.ok  { color: var(--st-ok-fg); background: var(--st-ok-bg); border-color: var(--st-ok-bd); }
.ap-tag.warn{ color: var(--st-wn-fg); background: var(--st-wn-bg); border-color: var(--st-wn-bd); }
.ap-tag.gap { color: var(--st-gp-fg); background: var(--st-gp-bg); border-color: var(--st-gp-bd); }

/* tab bar */
.ap-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); }
.ap-tab { font-size: 13px; font-weight: 500; color: var(--fg-3); padding: 0 0 12px;
  position: relative; cursor: pointer; }
.ap-tab.is-on { color: var(--fg-1); }
.ap-tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--aop-accent); }
.ap-tab .ap-tab-c { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3);
  margin-left: 6px; }

.ap-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-1); }

.ap-refrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 7px 0;
  border-bottom: 1px solid var(--border); }
.ap-refrow:last-child { border-bottom: 0; }
.ap-refrow .nm { flex: 1 1 auto; color: var(--fg-1); }
.ap-refrow .st { font-size: 10px; font-weight: 600; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; }
.ap-refrow .st.on  { color: var(--st-ok-fg); }
.ap-refrow .st.off { color: var(--fg-3); }
.ap-refrow .ap-mono { font-size: 10.5px; color: var(--fg-3); }

/* =========================================================================
   VARIANT A — Klinisch / Standard workspace
   ========================================================================= */
.a-body { flex: 1 1 auto; display: grid; grid-template-columns: 37% 1fr; min-height: 0; }
.a-left { border-right: 1px solid var(--border); padding: 26px 28px; overflow: hidden;
  display: flex; flex-direction: column; gap: 18px; background: var(--bg-1); }
.a-right { padding: 26px 32px; overflow: hidden; display: flex; flex-direction: column; gap: 18px; }
.a-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a-panel-h .ap-h-serif { font-size: 22px; font-weight: 500; white-space: nowrap; line-height: 1.1; }
.a-formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.a-note { font-size: 12px; color: var(--fg-2); line-height: 1.5; padding: 10px 12px;
  background: var(--bg-3); border-left: 2px solid var(--aop-accent); border-radius: var(--radius-xs); }
.a-textarea { flex: 1 1 auto; min-height: 0; }
.a-actions { display: flex; gap: 10px; }

/* verdict tiles */
.a-verdict { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.a-tile { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); }
.a-tile.feature { border-bottom: 2px solid var(--aop-accent); }
.a-tile .lab { font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--fg-2); }
.a-tile .val { font-family: var(--font-display); font-size: 27px; font-weight: 500; line-height: 1;
  letter-spacing: -0.01em; text-transform: capitalize; }
.a-tile .nt { font-size: 11.5px; color: var(--fg-3); line-height: 1.4; }

.a-fazit { display: flex; flex-direction: column; gap: 12px; }
.a-fazit-lead { font-family: var(--font-display); font-size: 19px; font-weight: 500; line-height: 1.3;
  letter-spacing: -0.01em; }
.a-fazit-text { font-size: 13.5px; color: var(--fg-2); line-height: 1.6; text-wrap: pretty; }

/* 11-point checklist */
.a-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.a-check { display: flex; gap: 11px; padding: 11px 14px; background: var(--bg-2); align-items: flex-start; }
.a-check .ix { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); width: 16px;
  flex: 0 0 auto; padding-top: 1px; }
.a-check .ck { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; margin-top: 5px; }
.a-check.is-ok  .ck { background: var(--st-ok-fg); }
.a-check.is-warn .ck { background: var(--st-wn-fg); }
.a-check.is-gap .ck { background: var(--st-gp-fg); }
.a-check .tx { min-width: 0; }
.a-check .tt { display: block; font-size: 12.5px; font-weight: 600; color: var(--fg-1); }
.a-check .bf { display: block; font-size: 11.5px; color: var(--fg-2); line-height: 1.4; margin-top: 2px; text-wrap: pretty; }

/* =========================================================================
   VARIANT B — Prüfbericht / editorial dossier
   ========================================================================= */
.b-body { flex: 1 1 auto; display: grid; grid-template-columns: 32% 1fr; min-height: 0; }
.b-left { border-right: 1px solid var(--border); padding: 28px 28px; background: var(--bg-2);
  display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.b-left .ap-textarea { flex: 1 1 auto; background: var(--bg-1); border-style: dashed; }
.b-meta-row { display: flex; flex-direction: column; gap: 12px; }
.b-right { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

/* anthracite verdict band */
.b-band { background: var(--mi-ink); color: var(--mi-cream); padding: 26px 36px 24px;
  display: flex; flex-direction: column; gap: 14px; }
.b-band .ap-eyebrow { color: rgba(242,236,223,0.55); }
.b-headline { font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.18;
  letter-spacing: -0.015em; max-width: 24ch; }
.b-headline em { font-style: normal; border-bottom: 2px solid var(--aop-accent);
  padding-bottom: 1px; }
.b-stats { display: flex; gap: 36px; padding-top: 6px; border-top: 1px solid rgba(242,236,223,0.14); }
.b-stat { display: flex; flex-direction: column; gap: 3px; }
.b-stat .k { font-size: 10.5px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: rgba(242,236,223,0.55); }
.b-stat .v { font-family: var(--font-display); font-size: 23px; font-weight: 500; line-height: 1;
  text-transform: capitalize; display: flex; align-items: center; gap: 8px; }
.b-stat .v .ap-dot { box-shadow: 0 0 0 3px rgba(242,236,223,0.10); }
.b-stat .n { font-size: 11px; color: rgba(242,236,223,0.6); }

.b-main { flex: 1 1 auto; padding: 22px 36px 26px; display: grid;
  grid-template-columns: 1.15fr 0.85fr; gap: 28px; min-height: 0; overflow: hidden; }
.b-ledger-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.b-ledger { columns: 2; column-gap: 26px; }
.b-le { break-inside: avoid; display: grid; grid-template-columns: auto 1fr; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--border); }
.b-le:first-child, .b-le:nth-child(7) { border-top: 0; }
.b-le .no { font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: 15px; color: var(--fg-3); line-height: 1.1; }
.b-le .tt { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.b-le .bf { font-size: 11px; color: var(--fg-2); line-height: 1.4; margin-top: 2px; text-wrap: pretty; }

.b-side { border-left: 1px solid var(--border); padding-left: 28px; display: flex;
  flex-direction: column; gap: 14px; }
.b-codehead { display: flex; align-items: baseline; justify-content: space-between; }
.b-codes { display: flex; flex-direction: column; }
.b-code { padding: 10px 0; border-top: 1px solid var(--border); }
.b-code:first-of-type { border-top: 0; }
.b-code .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.b-code .cd { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--fg-1); }
.b-code .ty { font-size: 9.5px; font-weight: 600; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--fg-3); }
.b-code .tx { font-size: 11px; color: var(--fg-2); line-height: 1.4; margin-top: 3px; text-wrap: pretty; }
.b-code .prov { color: var(--st-wn-fg); }

/* =========================================================================
   VARIANT C — Review-Konsole / Lückenampel rail
   ========================================================================= */
.c-band { flex: 0 0 auto; background: var(--mi-ink); color: var(--mi-cream);
  display: flex; align-items: stretch; }
.c-band-l { padding: 18px 28px; display: flex; flex-direction: column; gap: 4px;
  justify-content: center; border-right: 1px solid rgba(242,236,223,0.14); min-width: 280px; }
.c-band-l .ap-eyebrow { color: rgba(242,236,223,0.55); }
.c-band-l .ttl { font-family: var(--font-display); font-size: 18px; font-weight: 500; line-height: 1.2;
  letter-spacing: -0.01em; max-width: 26ch; }
.c-meters { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, 1fr); }
.c-meter { padding: 16px 24px; display: flex; flex-direction: column; gap: 6px; justify-content: center;
  border-right: 1px solid rgba(242,236,223,0.14); }
.c-meter:last-child { border-right: 0; }
.c-meter .k { font-size: 10.5px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: rgba(242,236,223,0.55); }
.c-meter .v { font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 1;
  text-transform: capitalize; display: flex; align-items: center; gap: 8px; }
.c-bar { height: 4px; border-radius: 999px; background: rgba(242,236,223,0.18); overflow: hidden; }
.c-bar > i { display: block; height: 100%; border-radius: 999px; }

.c-body { flex: 1 1 auto; display: grid; grid-template-columns: 300px 1fr; min-height: 0; }
.c-input { border-right: 1px solid var(--border); padding: 22px 22px; background: var(--bg-2);
  display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.c-input .ap-textarea { flex: 1 1 auto; font-size: 12px; }
.c-work { display: grid; grid-template-columns: 1fr; min-height: 0; }
.c-cols { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 0; }
.c-rail { padding: 22px 26px; overflow: hidden; border-right: 1px solid var(--border); }
.c-rail-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }

/* the gap-rail timeline */
.c-track { position: relative; padding-left: 26px; }
.c-track::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border); }
.c-node { position: relative; padding: 0 0 13px; }
.c-node:last-child { padding-bottom: 0; }
.c-node .nd { position: absolute; left: -26px; top: 2px; width: 16px; height: 16px; border-radius: 999px;
  background: var(--bg-1); border: 2px solid var(--border); display: flex; align-items: center;
  justify-content: center; }
.c-node .nd > i { width: 7px; height: 7px; border-radius: 999px; }
.c-node.is-ok  .nd { border-color: var(--st-ok-bd); } .c-node.is-ok  .nd > i { background: var(--st-ok-fg); }
.c-node.is-warn .nd { border-color: var(--st-wn-bd); } .c-node.is-warn .nd > i { background: var(--st-wn-fg); }
.c-node.is-gap .nd { border-color: var(--st-gp-bd); } .c-node.is-gap .nd > i { background: var(--st-gp-fg); }
.c-node .rowt { display: flex; align-items: baseline; gap: 8px; }
.c-node .no { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }
.c-node .tt { font-size: 12.5px; font-weight: 600; }
.c-node .bf { font-size: 11px; color: var(--fg-2); line-height: 1.4; margin-top: 2px; text-wrap: pretty; }
.c-node.active .bf { color: var(--fg-1); }
.c-node.active .tt { color: var(--aop-accent); }

.c-side { display: grid; grid-template-rows: 1fr 1fr; min-height: 0; }
.c-pane { padding: 20px 24px; overflow: hidden; }
.c-pane + .c-pane { border-top: 1px solid var(--border); }
.c-pane-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.c-coderow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--border); }
.c-coderow:first-of-type { border-top: 0; }
.c-coderow .cd { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.c-coderow .ty { font-size: 9px; font-weight: 600; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--fg-3); }
.c-coderow .rl { font-size: 11px; color: var(--fg-2); }
.c-gaprow { display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--border); font-size: 12px; }
.c-gaprow:first-of-type { border-top: 0; }
.c-gaprow .fd { flex: 1 1 auto; font-weight: 500; }
.c-gaprow .hn { font-size: 10.5px; color: var(--fg-3); }

/* =========================================================================
   VARIANT D — Klar · A, all-sans + clearer hierarchy
   Reuses A's two-column shell; overrides serif → sans and adds explicit
   status pills, a legend and more breathing room.
   ========================================================================= */
.aop--d .ap-wordmark { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }
.aop--d .ap-h-serif  { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }

.d-body { flex: 1 1 auto; display: grid; grid-template-columns: 36% 1fr; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.d-left { border-right: 1px solid var(--border); padding: 28px 30px; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px; background: var(--bg-2); }
.d-right { padding: 22px 36px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.d-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d-h .ttl { font-family: var(--font-sans); font-weight: 700; font-size: 23px; letter-spacing: -0.01em;
  line-height: 1.1; }
.d-h .ttl.big { font-size: 27px; }
.d-h .meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }

.d-formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.d-note { font-size: 12.5px; color: var(--fg-2); line-height: 1.5; padding: 12px 14px;
  background: var(--bg-3); border-radius: var(--radius-md); display: flex; gap: 10px; align-items: flex-start; }
.d-note::before { content: ""; width: 4px; align-self: stretch; border-radius: 999px;
  background: var(--aop-accent); flex: 0 0 4px; }
.d-actions { display: flex; gap: 10px; }

/* verdict tiles — color-coded by status for instant read */
.d-verdict { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.d-tile { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0 0 13px; overflow: hidden; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; }
.d-tile .cap { height: 4px; }
.d-tile.is-ok  .cap { background: var(--st-ok-fg); }
.d-tile.is-warn .cap { background: var(--st-wn-fg); }
.d-tile.is-gap .cap { background: var(--st-gp-fg); }
.d-tile .inner { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 7px; }
.d-tile .lab { font-size: 11px; font-weight: 600; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--fg-2); }
.d-tile .val { font-family: var(--font-sans); font-weight: 700; font-size: 22px; line-height: 1;
  letter-spacing: -0.015em; text-transform: capitalize; display: flex; align-items: center; gap: 8px; }
.d-tile.is-ok  .val { color: var(--st-ok-fg); }
.d-tile.is-warn .val { color: var(--st-wn-fg); }
.d-tile.is-gap .val { color: var(--st-gp-fg); }
.d-tile .val .ap-dot { width: 9px; height: 9px; }
.d-tile .nt { font-size: 12px; color: var(--fg-3); line-height: 1.4; }

.d-fazit { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 18px; display: flex; flex-direction: column; gap: 8px; }
.d-fazit-lead { font-family: var(--font-sans); font-weight: 600; font-size: 16px; line-height: 1.35;
  letter-spacing: -0.005em; }
.d-fazit-text { font-size: 13px; color: var(--fg-2); line-height: 1.6; text-wrap: pretty; }
.d-fazit-foot { display: flex; align-items: center; gap: 8px; padding-top: 4px; }

/* section header + legend for the 11 points */
.d-sec-h { display: flex; align-items: center; justify-content: space-between; }
.d-sec-h .lbl { font-size: 12px; font-weight: 700; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--fg-1); }
.d-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--fg-2); }
.d-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* clearer 11-point checklist */
.d-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.d-check { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  border-left: 3px solid var(--border); padding: 9px 14px;
  display: flex; flex-direction: column; gap: 3px; }
.d-check.is-ok  { border-left-color: var(--st-ok-fg); }
.d-check.is-warn { border-left-color: var(--st-wn-fg); }
.d-check.is-gap { border-left-color: var(--st-gp-fg); }
.d-check.is-na  { border-left-color: var(--fg-3); }
.d-check .top { display: flex; align-items: center; gap: 9px; }
.d-check .no { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.d-check .tt { font-size: 13px; font-weight: 600; color: var(--fg-1); flex: 1 1 auto; min-width: 0; }
.d-check .bf { font-size: 12px; color: var(--fg-2); line-height: 1.4; text-wrap: pretty; }
.d-pill { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--radius-pill); border: 1px solid transparent; white-space: nowrap; }
.d-pill.is-ok  { color: var(--st-ok-fg); background: var(--st-ok-bg); border-color: var(--st-ok-bd); }
.d-pill.is-warn { color: var(--st-wn-fg); background: var(--st-wn-bg); border-color: var(--st-wn-bd); }
.d-pill.is-gap { color: var(--st-gp-fg); background: var(--st-gp-bg); border-color: var(--st-gp-bd); }
.d-pill.is-na  { color: var(--fg-2); background: var(--bg-2); border-color: var(--border); }

/* ---- KI-Versand-Vorschau (Abschnitt 16b in app.js) ---------------------- */
/* Modal, das den anonymisierten Text VOR jedem KI-Aufruf zur Freigabe zeigt. */
.ai-preview-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(26, 28, 30, .55);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.ai-preview {
  background: var(--bg-2, #fff); color: var(--fg-1, #1a1c1e);
  width: 100%; max-width: 760px; max-height: 86vh;
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border, #d8cfc6); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  font-family: var(--font-sans, system-ui, sans-serif);
}
.ai-preview-head { display: flex; flex-direction: column; gap: 2px; }
.ai-preview-head strong { font-size: 16px; }
.ai-preview-sub { font-size: 12.5px; color: var(--fg-2, #74787c); }
.ai-preview-hint { margin: 0; font-size: 13px; color: var(--fg-2, #4a4d50); }
.ai-preview-text {
  flex: 1 1 auto; min-height: 120px; overflow: auto; margin: 0;
  padding: 10px 12px; border: 1px solid var(--border, #d8cfc6); border-radius: 10px;
  background: var(--bg-1, #f6f0e4);
  font: 12.5px/1.55 var(--font-mono, ui-monospace, monospace);
  white-space: pre-wrap; word-break: break-word;
}
.ai-preview-mark {
  background: var(--st-ok-bg, #e9f0e7); color: var(--st-ok-fg, #2c5c36);
  border-radius: 4px; padding: 0 3px; font-weight: 600;
}
.ai-preview-remember { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-2, #4a4d50); }
.ai-preview-actions { display: flex; justify-content: flex-end; gap: 10px; }
